Additional state (derivative) and detector initialization

Hi all,

I’m having a problem when trying to implement my own IntervalEventTrigger (with Orekit 12.0, don’t know if that’s relevant here), but it is essentially linked to event detectors and additional derivatives.
An error happens during propagation setup when the Maneuver’s init method is called, itself calling the g method of the underlying event detector via the isFiringOnInitialState. The issue is that my event uses an additional state variable defined via AdditionalDerivativesProvider, but the initialState coming out of updateAdditionalStates (inside ConvertedMainStateEquation’s init of AbstractIntegratedPropagator) doesn’t have any. Indeed variables defined via derivatives do not seem to be added there, since the method is defined in AbstractPropagator, which is common with analytical models and cannot handle additional differential equations. Shoudln’t we overload this in AbstractIntegratedPropagator then?

Note: if I remove the force, the propagation works fine and include the derivative-defined dependent variables so on that aspect, my set up is correct I guess.

Cheers,
Romain.

Yes overloading the method for integrated propagator is the way to go.
Do we also provide additional states (not integrated ones but analytical ones) in the init method of analytical propagators?

Hi Luc,

I’ve opened this MR that changes the way the state is generated in the init method of ConvertedMainStateEquations in (Field)AbstractIntegratedPropagator, by looking for the values in the stored initial state (if applicable). It’s the only way I found to retrieve relevant values.

Cheers,
Romain.