Issue with maneuver date estimation propagator

Hello !
First of all, thanks a lot for this great new feature which allows the estimation of the maneuver dates, it is impressive !

I was following the tutorial and I tried to retrieve the propagator post-estimation but I have been unable to propagate from this propagator while it is possible when the maneuver date is not estimated.

 Propagator[] estimatedPropagators = estimator.estimate();
 Orbit estimated = estimatedPropagators[0].getInitialState().getOrbit();
 estimatedPropagators[0].propagate(estimated.getDate().shiftedBy(12 * 3600));
org.orekit.errors.OrekitException: unknown additional state "org.orekit.estimation.leastsquares.BatchLSModel-derivatives"

Do you think that it could be a bug ? Maybe the resetters of the maneuverTriggers which are not reset after the estimation?

Thanks in advance for your support !

Hi @TheoN,

Welcome back to the forum.

It is indeed a bug, thanks for finding it!
Could you please open an issue on the forge?

What’s happening is that the maneuver’s date parameter drivers are selected in the Maneuver force models but the propagator does not have an additional state meant to compute the state transition matrix (or derivatives).
However, since the drivers are selected Orekit tries to get and store the STM when the date event is triggered.
Hence the exception.

Now I don’t know how it should be handled with:

  1. Silently ignore the exception if the propagator is not STM-ready
  2. Or throw a clearer exception?

@luc, what do you think?

@TheoN I wanted to offer you a workaround consisting in deselecting all the maneuvers’ drivers prior to propagation… but I’ve tested it and it doesn’t seem to work.
I don’t know why… but this is a problem because it means the estimated propagator is unusable as is. This means we should probably lean towards solution 1 for the fix.

Hope this helps,

Perhaps we could do some tricks with ForceModel.init()?
It seems to me that it is called by AbstractIntegratedPropagator.ConvertedMainStateEquations.init() and when called the additional states seem to have been set up and are available in the SpacecraftState. So perhaps we could look there and see if we find the STM or not, and if we can’t find it we shut down its use in the rest of the force model?

It does look like a good idea

Hello, thank you very much for your support !
I have created the issue on gitlab :