Some more thoughts about this problem.
State handling is quite involved in Orekit. State contains orbit, attitude, mass and additional states. Additional states may be constants that are copied around, values evaluated from analytical equations, or values obtained by ODE integration (the last one only for numerical and DSST propagators which are integration-based).
During propagation, each state is built up progressively. Here is what happens for integration- based propagators:
- position-velocity is computed by integrating space dynamics equations
- attitude is added using attitude provider (in
- constants (unmanaged) additional states are added (in
- analytical additional states are added (in
- additional states managed by integrated equations are added
So attitude is handled early in this process. Even if we were to pass the
AttitudeProvider it would probably not help in your case because the additional states have not been included yet.
What I could suggest (but it is only a wild guess, I did not check it works or not) would be to add a 6th step that would apply a user-provided post-processing object to the state before it is returned. This post-processing would simply take a state and return a possibly modified state. In your case, you could have the attitude really handled there, overriding the attitude used in earlier step, perhaps by simple interpolation, or using a crude model, or reusing data extracted the previous call if you use the same object as attitude provider and as state post-processor.
I did not check we could insert this everywhere properly (for example, is it taken into account before force models are called in the core of the integration, I don’t know yet).
Such a new feature could be added in 10.3 if required.
What do you think of this proposal?