Crash during computation of mean elements for BrouwerLydanne

Hello,

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 ?

TestBrouwer.java (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(KeplerianOrbit.java:1366)
	at org.orekit.orbits.KeplerianOrbit.<init>(KeplerianOrbit.java:186)
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator$BLModel.propagateParameters(BrouwerLyddanePropagator.java:1438)
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.computeMeanParameters(BrouwerLyddanePropagator.java:740)
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.resetInitialState(BrouwerLyddanePropagator.java:682)
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.<init>(BrouwerLyddanePropagator.java:533)
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.computeMeanOrbit(BrouwerLyddanePropagator.java:644)
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.computeMeanOrbit(BrouwerLyddanePropagator.java:600)
	at org.orekit.propagation.analytical.BrouwerLyddanePropagator.computeMeanOrbit(BrouwerLyddanePropagator.java:568)
	at TestBrouwer.main(TestBrouwer.java:23)

Thank you.

Christophe

Hi Christophe,

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

Best,
Romain.

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:

Cheers,
Romain.

1 Like

Hello,

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.

Cheers,
Romain.

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.

Cheers,
Maxime

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.

Bryan

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.

Romain.