`EventShifter` - Shifting events whose trigger is based on additional states

Hello forum,

I am working with EventShifter to model an operational delay (to switch attitude). The g function of the raw detector depends on the additional state(s) to find the event properly. But when I try to use an EventShifter on this raw detector, it does not seem to shift the event.

I have been going over the code to understand how the event shifting happens and I found out that we use state.shiftedBy() method which copies the additional states and does not change it while trying to find the g value for the shifted time.

Is there a way to fix this so that we will be able to shift the events that depend on additional states?

Could you check in the debugger if the additional state you want to shift has entries in both additional and additionalDot fields under the same name?
If so, we could at least shift that given a single state simply.

Could you check if the attached patch would solve the problem for you?

Beware, this patch is not complete yet as there remains two tests that fail when the patch is applied, and I need to understand why, so I cannot push it to repository yet.
state-interpolation-with-additional-derivatives.patch (25.5 KB)

@luc, Thanks for the patch. I am currently working with the Python implementation of orekit. For a different answer, I had applied the patch, regenerated the jar files and recreated the orekit python wrapper, I will need some more time to find and modify with new changes before I can test.

Also, I forgot to mention the additional state I am working with is kind of a step function at the event (it is the orbit count from the start of the propagation which gets incremented by 1 when it crosses node). So I am not sure how the additionalDot would exactly behave.