"MSAFE getAverageFlux() throws range error during propagation"

Hi everyone,

I am currently using V12.2.1 and encountered an error regarding to MarshallSolarActivityFutureEstimation.getAverageFlux(). It throws MathIllegalArgumentExceptıon: -0 out of [0,1] range and it points to PolynomialSplineFunction.value().

I am trying to update the spacecraft state in future time and back propagating it to the current time by some iterations. I was dealing with a cartesian orbit at epoch 07.04.2025. I tought that it might be caused by the incosistency between MSAFE time span and state epoch because I am propagating it to one year and back. Yet, my orekit data is already up-to-date and I checked the MSAFE time span which is covering the dates that my analysis is running. I tried to change the FluxLevel from STRONG to AVERAGE and it worked during for few iterations and than it throw the same error.

How can I avoid this error or what is the root cause is there any idea?
Thanks in advance,

Exception in thread "main" org.hipparchus.exception.MathIllegalArgumentException: -0 out of [0, 1] range
	at org.hipparchus.util.MathUtils.checkRangeInclusive(MathUtils.java:356)
	at org.hipparchus.analysis.polynomials.PolynomialSplineFunction.value(PolynomialSplineFunction.java:137)
Caused by: org.hipparchus.exception.MathIllegalArgumentException: -0 out of [0, 1] range
	at org.orekit.models.earth.atmosphere.data.MarshallSolarActivityFutureEstimation.getAverageFlux(MarshallSolarActivityFutureEstimation.java:366)
	at org.orekit.models.earth.atmosphere.NRLMSISE00.getDensity(NRLMSISE00.java:1179)
	at org.orekit.forces.drag.DragForce.acceleration(DragForce.java:90)
	at org.orekit.forces.ForceModel.addContribution(ForceModel.java:120)
	at org.orekit.propagation.integration.AbstractIntegratedPropagator$Main.computeDerivatives(AbstractIntegratedPropagator.java:979)
    at org.orekit.propagation.integration.AbstractIntegratedPropagator$ConvertedMainStreamEquations.computeDerivatives(AbstractIntegratedPropagator.java:810)
	at org.hipparchus.ode.ExpandableODE.computeDerivatives(ExpandableODE.java:134)
	at org.hipparchus.ode.nonstiff.ExplicitRungeKuttaIntegrator.applyInternalButcherWeights(ExplicitRungeKuttaIntegrator.java:131)
	at org.hipparchus.ode.nonstiff.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:241)
	at org.orekit.propagation.integration.AbstractIntegratedPropagator.integrateDynamics(AbstractIntegratedPropagator.java:509)

Hi there,

I’m pretty sure a colleague of mine has already come across that exception too. Unfortunately they couldn’t reproduce it so we didn’t investigate further but I’m definitely interested.
Would you be able to work out a code example for people here to run?

Cheers,
Romain.