Tesseral force with DSST propagator

Dear all,

I’m having trouble using the tesseral forces with DSST.
Here is a code sample:

GravityFieldFactory.addPotentialCoefficientsReader(EGMFormatReader('EGM2008_to2190_TideFree.*',
                                                                                   False))
normalized_provider = GravityFieldFactory.getNormalizedProvider(self._harmonics_degree, self._harmonics_order)
unnormalized_provider = GravityFieldFactory.getUnnormalizedProvider(normalized_provider)
zonal = DSSTZonal(unnormalized_provider)
orekit_itrf = utils.toOrekitFrame('itrf')
tesseral = DSSTTesseral(orekit_itrf, Constants.WGS84_EARTH_ANGULAR_VELOCITY, unnormalized_provider)

Note: toOrekitFrame is just a method that returns a Frame from a name (string).
The zonal forces seem to work fine, however as soon as I add the tesseral terms, I get this during propagation:

orekit.JavaError: <super: <class 'JavaError'>, <JavaError object>>
E           Java stacktrace:
E       java.lang.ArrayIndexOutOfBoundsException: -1
E       	at org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral.computeNSum(DSSTTesseral.java:858)
E       	at org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral.access$1100(DSSTTesseral.java:84)
E       	at org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral$FourierCjSjCoefficients.buildFourierCoefficients(DSSTTesseral.java:1264)
E       	at org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral$FourierCjSjCoefficients.generateCoefficients(DSSTTesseral.java:1220)
E       	at org.orekit.propagation.semianalytical.dsst.forces.DSSTTesseral.updateShortPeriodTerms(DSSTTesseral.java:561)
E       	at org.orekit.propagation.semianalytical.dsst.DSSTPropagator.computeMeanOrbit(DSSTPropagator.java:843)
E       	at org.orekit.propagation.semianalytical.dsst.DSSTPropagator.computeMeanState(DSSTPropagator.java:676)
E       	at org.orekit.propagation.semianalytical.dsst.DSSTPropagator.computeMeanState(DSSTPropagator.java:647)
E       	at org.orekit.propagation.semianalytical.dsst.DSSTPropagator.getInitialIntegrationState(DSSTPropagator.java:914)
E       	at org.orekit.propagation.integration.AbstractIntegratedPropagator.integrateDynamics(AbstractIntegratedPropagator.java:470)
E       	at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:425)
E       	at org.orekit.propagation.integration.AbstractIntegratedPropagator.propagate(AbstractIntegratedPropagator.java:385)

Moreover, I would say that the normalized provider is fine because I can successfully use a HolmesFeatherstoneAttractionModel initialized with it.

Cheers,
Romain.

Hi Romain,

Is it possible to see how do you initialize the initial state and the DSST propagator?
In other words, could you provide the full initialization of the DSST propagator?

Thank you,
Bryan

Hi Bryan.

Sure. I handpicked stuff because it is a bit spread out in the code:

self._propagator = DSSTPropagator(hipparchus_integrator, propagation_type)
self._propagator.setMu(mu)
self._propagator.setInitialState(spacecraft_state)
self._propagator.setResetAtEnd(False)
for force in [zonal, tesseral]:
       self._propagator.addForceModel(force)

The main difference I see w.r.t. how I use the NumericalPropagator is that I don’t set the OrbitType and PositionAngle. Also I don’t set an initial step-size for the integrator: is that an issue?

I have some additional questions. What are the values of propagation_type, _harmonics_degree, and _harmonics_order? Also, what is the value of the step used by the Hipparchus integrator?

I think the issue is related to the short period terms, but I need the value of these parameters to confirm and find a solution.

Best regards,
Bryan

The problem arises no matter the propagation type (OSCULATING or MEAN).
I am testing with self._harmonices_order = self._harmonics_degree = 2.
I am using Dormand-Prince 5 with min. and max. stepsize of 0.01 and 60s respectively, with tolerances computed to “reach” a position error of 0.01m. That may be too stringent for a semi-analytical propagation maybe? I was just reusing values from the full numerical ones.

Edit: I tried Runge-Kutta 4 with a step of 10s and the propagation still crashes.

Cheers,
Romain.

Ok, that’s a bug. We have an (old) issue opened for that: https://gitlab.orekit.org/orekit/orekit/-/issues/672

I recommend you to use bigger steps. Because the integrated elements are the mean elements, with DSST you can use integration steps equal to several orbital periods.

Bryan

I confirm that when trying a 4x4 geopotential, I do not have an error.
Thank you Bryan for the explanation!

Best,
Romain.