DSSTTesseral HansenObjects null pointer exception

Dear Orekit Community,

I am using one of the tutorials uploaded to Orekit’s GitLab (DSSTPropagation) to propagate some initial conditions for a relatively short time (5 years). However, the DSSTTesseral force model crashes with a null pointer exception. When HansenObjects.computeHansenObjectsInitValues(*) method is called, the array returns a null value seeming that hansenObjects[rows][columns] is not initialized.

A similar case with possible explanations about the error can be found in a previous post: DSSTTesseralForce null pointer exception. In that post, it was suggested that the error could be avoided by either reducing initial eccentricity or removing drag effect. In that case, the perigee altitude was very low and the orbit propagator was not adapted in the case where the dynamic effects were too important.

In my case, the orbit is almost circular and the drag effect is not considered. Besides, several propagations are executed in a row with the same configuration and only for particular initial conditions.

To reproduce the test, I leave below the files I am using, the main and the input file from which I extract the initial conditions. Everything is set up as the original configuration of Orekit 10.1 and run with the most recent Orekit data available.

dsst-propagation.in.txt (1.5 KB) DSSTPropagation.java (42.8 KB)

The error:
Exception in thread “main” java.lang.NullPointerException
at org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral$HansenObjects.computeHansenObjectsInitValues(DSSTTesseral.java:2798)
at org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral$UAnddU.(DSSTTesseral.java:2401)
at org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral.getMeanElementRate(DSSTTesseral.java:438)
at org.orekit.propagation.semianalytical.dsst.DSSTPropagator$Main.elementRates(DSSTPropagator.java:994)
at org.orekit.propagation.semianalytical.dsst.DSSTPropagator$Main.computeDerivatives(DSSTPropagator.java:973)
at org.orekit.propagation.integration.AbstractIntegratedPropagator$ConvertedMainStateEquations.computeDerivatives(AbstractIntegratedPropagator.java:677)
at org.hipparchus.ode.ExpandableODE.computeDerivatives(ExpandableODE.java:134)
at org.hipparchus.ode.AbstractIntegrator.computeDerivatives(AbstractIntegrator.java:265)
at org.hipparchus.ode.nonstiff.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:257)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:468)
at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:414)
at org.orekit.tutorials.propagation.DSSTPropagation.run(DSSTPropagation.java:379)
at org.orekit.tutorials.propagation.DSSTPropagation.main(DSSTPropagation.java:135)

Thanks in advance.

Hi @farribax

I investigated your problem.

First, it is important to know that the DSST has changed a lot in Orekit 10.0 version. Indeed, during this version, we introduced orbit determination feature using DSST.

Therefore, I tried your configuration using Orekit 9.3 (i.e. before the changes) and everything work. After that, I tried using Orekit 10.0 and the problem occur. As a result, it seems that a regression was introduced in Orekit 10.0. Could you open an issue on the Orekit issue tracker?

You have two possibilities to run your program correctly:

  1. Use Orekit 9.3 instead of Orekit 10.1. There are three important changes between the two versions for DSST initialization. You can use that old version of the tutorial to help you.

    • First, you have to remove the mu parameter in DSST force models initialization. It has been introduced in Orekit 10.0 in order to estimate that parameter during DSST orbit determination. It is not used for Orekit before 10.0 in DSST force model constructors.

    • Furthermore, DataContext cannot be used. You have to initialize the orekit-data by usingDataProvidersManager manager = DataProvidersManager.getInstance(); instead of DataProvidersManager manager = DataContext.getDefault().getDataProvidersManager();

    • Finally, you cannot use PropagationType object. Before Orekit 10.0 boolean values were used. Considering your example, the boolean values to use are:

      final DSSTPropagator dsstProp = new DSSTPropagator(integrator, true);
      dsstProp.setInitialState(new SpacecraftState(orbit, mass), false);

  2. I tried to reduce a little bit your initial eccentricity. Using 0.017522 instead of 0.017822 allows your program running correctly with all Orekit versions. Before and after Orekit 10.0. This is just a workaround, bug must be fixed.

Best regards,