Bug in the inner class UmbraDetector (main class : SolarRadiationPressure)
It seems the formula used in the g function of the UmbraDetector is not
the same as the one used in the EclipseDetector class.
The EclipseDetector handles both umbra & penumbra, by using a boolean
(totalEclipse) :
public double g(final SpacecraftState s) throws OrekitException {
[ ... ]
final double rs = FastMath.asin(occultedRadius / ps.getNorm());
final double ro = FastMath.asin(occultingRadius / po.getNorm());
return totalEclipse ? (angle - ro + rs) : (angle - ro - rs);
}
In the UmbraDetector (inner class of SolarRadiationPressure that
implements EventDetector), the Sun occulted radius is missing :
"return sunEarthAngle - alphaEarth;". The PenumbraDetector is consistent
with the EclipseDetector ("return sunEarthAngle - alphaEarth -
alphaSun;")
By the way, maybe the EclipseDetector should be used (an the EventOccurred override) in SolarRadiationPressure class, instead of defining two new inner classes.
(from redmine: issue id 58, created on 2012-01-18, closed on 2012-01-18)