I was looking at the DSST code for the solar radiation pressure and I have noticed that the shadow function, the K and H variables are flipped in the range definition (second line of the code below) according to S. Valk and A. Lemaitre
I am reading this wrong or it is a typo?
if (cPhi < 0.) {
final double range = 1. + auxiliaryElements.getK() * cosL + auxiliaryElements.getH() * sinL;
final double S = 1. - m2 * range * range - cPhi * cPhi;
// Is the shadow equation 3.5-1 satisfied ?
if (FastMath.abs(S) < S_ZERO) {
// Is this the entry or exit angle ?
final double dSdL = m2 * range * (auxiliaryElements.getK() * sinL - auxiliaryElements.getH() * cosL) + cPhi * (alpha * sinL - beta * cosL);
if (dSdL > 0.) {
// Exit from shadow: 3.5-4
exitFound = true;
ll[0] = FastMath.atan2(sinL, cosL);
} else {
// Entry into shadow: 3.5-5
entryFound = true;
ll[1] = FastMath.atan2(sinL, cosL);
}
}
}
}
The equations mentioned in the Orekit code refer to Danielson’s work:
SEMIANALYTIC SATELLITE THEORY
D. A. Danielson, C. P. Sagovac, B. Neta, L. W. Early
Mathematics Department - Naval Postgraduate School - Monterey, CA 93943 - 1995.
I don’t know the reference to S. Valk and A. Lemaitre you mention, but after checking, Orekit’s code is quite consistent with the equations given in Danielson’s work.
Apologies for the delayed response. My colleague and I reviewed our source, as well as the books by Escobal and Danielson.
Firstly, the sine and cosine terms in the shadow function are correctly implemented in Orekit—there is no typo there. Our original source was incorrect.
Secondly, while reviewing the calculations, I believe we found another typo in the transcription from Escobal’s book to Danielson’s. On page 69 of Danielson’s book, the denominator in the M function should be a²(1-h²-k²)². Currently, the parentheses are not squared, which appears to be an error.
It would be helpful if someone else from the community could verify this finding.
Thank you for your time, and I wish you all the best for the upcoming Christmas holidays.
I don’t think there is a mistake in the M term of the shadow function of Danielson document.
The shadow function is presented in Cefola, Long, and Holloway, The long-term prediction of artificial satellite, AAS Paper 74-170. cefola1974.pdf (1.7 MB). See equation C-1 of the attached document.
All the papers provided simply reference Escobal’s Methods of Orbit Determination without offering any supporting calculations. If you can get a copy of the 1965 edition of Escobal’s book, it contains all the necessary computations. Other versions of the book focus heavily on deriving similar formulas for orbits around the Moon, which are quite complex and difficult to manipulate when trying to retrieve the simpler case of an Earth orbit.
I also want to point out that there is still an error in the M function, which should become noticeable for orbits with eccentricities higher than 0.3 (I’ll run some tests and update you with the results). In the meantime, I’ve attached our derivation of the equation, which matches exactly with Escobal’s work just in case you’re unable to retrieve the original version of the book. shadow.pdf (99.2 KB)
I read your demonstration and Danielson’s reference, but I’m afraid I’m not expert enough to judge who’s right or wrong. And I couldn’t find Escobal’s book.
Maybe @paulcefo could help us to find out if there was a typo or not in Danielson’s paper?
I do still have a question
In both references (Danielson 95 and Cefola 74) the last term of the shadow function S is -(\alpha cosL + \beta sin L)^2, but in your demonstration the last term is -(\alpha cos \nu +\beta sin \nu)^2.
Isn’t that another discrepancy?
Hi @MaximeJ,
I can not upload the whole book from Escobal due to size limitation, but here is an extract of the chapter in which develops the shadow function. Escobal1965Extract.pdf (327.4 KB)
Regarding your question I will have a look at it.