resetInitialState does not reset mass in deepDSP4 and SGP4

I want to propagate an orbit using the deepDSP4 and SGP4 propagators. Because of the way my code has been implemented, I first build those propagators providing some default values, then I try to reset the initial state by invoking the method resetInitialState with the actual spacecraft state I want to use as initial conditions.
I noticed that the orbit is correctly resetted, but this is not true for the mass which remains, during the propagation, equal to the default values originally set.

Here below I report a short piece of code to show you what happens. The strange thing is that if I invoke the getInitialState I get the correct mass value, while the wrong one shows up only during propagation.
Can you please tell me what I am doing wrongly?

Thank you very much,

    public static void main(String[] args) {

        DataContext.getDefault().getDataProvidersManager().addProvider(new ClasspathCrawler(""));
        // Settings
        double a = 6860176.23765572;
        double e = 0.0010160613326433334;
        double i = 1.7044014447593043;
        double om = 1.439233350035424;
        double OM = 1.3884502116745805;
        double th = 1.1625681691480643;

        AbsoluteDate startingEpoch = new AbsoluteDate(2022, 01, 01, 12, 00, 0.0, TimeScalesFactory.getTAI());
        AbsoluteDate finalEpoch = new AbsoluteDate(2022, 01, 01, 10, 59, 30.0, TimeScalesFactory.getTAI());

        Orbit keplerianOrbit = new KeplerianOrbit(a, e, i, om, OM, th, PositionAngle.TRUE, FramesFactory.getGCRF(), startingEpoch, Constants.IERS2010_EARTH_MU);

        String line1 = "1 31135U 07013A   11003.00000000  .00000816  00000+0  47577-4 0    11"; // the first element (69 char String)
        String line2 = "2 31135   2.4656 183.9084 0021119 236.4164  60.4567 15.10546832    15"; // the second element (69 char String)
        DeepSDP4 prop = new DeepSDP4(new TLE(line1, line2), new InertialProvider(FramesFactory.getGCRF()), 500); // default mass value of 500 kg

        SpacecraftState initialSpacecraftState = new SpacecraftState(keplerianOrbit, 10.0); // set mass to 10 kg
        prop.resetInitialState(initialSpacecraftState); // reset initial conditions
        System.out.println(prop.getInitialState().getMass()); // --> GET: 10.0
        System.out.println(prop.propagate(finalEpoch).getMass()); // --> GET: 500.0


Hi @MarcoTosato

First of all, it is not recommended to use the resetInitialState() method of SGP4/SDP4 propagators. We only implemented it for TLE-based orbit determination because the propagator must be updated between two iterations of the estimation algorithm.
For orbit propagation only, I recommend to not use this method because the spacecraft state is represented by the input TLE. Finally, in SGP4/SDP4 models, the mass of the spacecraft is not used in the equations. As a result, it doesn’t have any influence on the propagation results.

Best regards,

Hi @MarcoTosato,

Yes, the mass of TLEPropagator is not reset.
Actually, the mass is no means for TLEPropagator.

The initialState is assigned directly, so prop.getInitialState().getMass() is the new one.

For propagated state, the mass of propagator is used, by getMass().