NaN appears during the integration
Hi there!
I am trying to test the Orekit package in Python for orbit propagation. I want to propagate a VLEO with the following parameters:
- SMA_INIT = 6737652 m
- ECC_INIT = 0.003
- INC_INIT = 97.47 deg
- RAAN_INIT = 0.0 deg
- OMEGA_INIT = 64 deg
- THETA_INIT = 296 deg
at EPOCH 2005:08:20 T12:00:00 for 30 days.
I am using KeplerianOrbit to define the orbit at the beginning, then switch to a CircularOrbit to avoid singularities when the eccentricity value drops below a certain threshold. NumericalPropagator is implemented as propagator, DormandPrince853Integrator as integrator.
The disturbance effects considered are
- gravitational effect up to degree and order 5, implementing NormalizedProvider and HolmesFeatherstoneAttractionModel;
- atmospheric drag, considering the NRLMSISE00 model and the IsotropicDrag model on a 0.18 m^2 area with a 2.2 drag coefficient.
At a certain point of the propagation, the run gives the following error:
Traceback (most recent call last):
File "orekit_free_propagation.py", line 234, in <module>
num_prop_orekit(KEP_STATE, DURATION, START_DATE, TIMESTEP)
File "orekit_free_propagation.py", line 139, in num_prop_orekit
kep_propp = propagator_num.propagate(tt)
orekit.JavaError: <super: <class 'JavaError'>, <JavaError object>>
Java stacktrace:
org.orekit.errors.OrekitException: NaN appears during integration near time 20
at org.orekit.errors.OrekitException.unwrap(OrekitException.java:154)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.integrateDynamics(AbstractIntegratedPropagator.java:511)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:424)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:384)
Caused by: org.hipparchus.exception.MathIllegalStateException: NaN appears during integration near time 20
at org.hipparchus.ode.nonstiff.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:268)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.integrateDynamics(AbstractIntegratedPropagator.java:477)
... 2 more
I tried to change a bit the scenario and I discovered that the error occurs only when the atmospheric drag is added to the propagation. Since I am using Orekit in Python, I cannot debug the underlying Java code properly and I do not get what is causing the NaN values. Has anyone ever encountered a similar problem? Can you help me?
I attach here the code of the test in case you want to replicate the error.
Thank you in advance for the help.