Crash during computation of mean elements for BrouwerLydanne


On Orekit 12.0, I have a crash during the computation of the mean elements for the Brouwer-Lydanne propagator when I use a perfectly (or almost perfectly) circular osculating orbit as input.
During the iterations, the eccentricity becomes slightly negative and an exception is raised.
In the example, the exception is raised with eccentricity = 0 but with eccentricity = 1e-4, I still have the problem. With ecc=1e-3, it works.

Is there a problem in the way I try to use it ? (1.1 KB)

Exception in thread "main" org.orekit.errors.OrekitException: paramètre invalide eccentricity: -0,001 n'est pas dans l'intervalle [0, ∞]
	at org.orekit.orbits.KeplerianOrbit.checkParameterRangeInclusive(
	at org.orekit.orbits.KeplerianOrbit.<init>(
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator$BLModel.propagateParameters(
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.computeMeanParameters(
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.resetInitialState(
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.<init>(
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.computeMeanOrbit(
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.computeMeanOrbit(
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.computeMeanOrbit(
	at TestBrouwer.main(

Thank you.


Hi Christophe,

I believe you have encountered this known issue.
Unfortunately it’s still not solved.


1 Like

I missed this issue and the thread.

Thank you Romain!

Actually @alberto-ferrero is currently trying to fix this, any help welcome :wink:


1 Like


I don’t know if this is linked to the issue at hand, but I have noticed something strange in the Brouwer Lyddane implementation, more specifically the method propagateParameters.
The comments say that the variable l is a true anomaly. Yet in the constructor of KeplerianOrbit, it is given as a mean anomaly via the PositionAngleType input. Is that something (weird yet) inherent to the theory or is it a typo? Same thing stands in the Field version.


Hi @serrof,

That’s an interesting finding! And a potential clue, maybe?

I think it deserves an issue on its own: clarify the usage of the anomaly and either correct the comments or correct the code.


What says the reference paper?

If it says that it is a mean anomaly, so there is an issue in the documentation.
If it says that it is a true anomaly, so there is an issue in the code.


Looking at Phipps thesis, the letter “l” refers to mean anomalies, so it seems that the comments are misleading. They are also like that in some tests though, which is stranger.

Anyway, I think that method is fishy. It uses UnivariateDerivative2 yet there’s no call to getSecondDerivative beyond initialization. So basically some computations get lost.