EphemerisGenerator store the
AttitudeProvider given during the construction of a maneuver to override the default one? When I try to retrieve the attitude after the propagation, I always get the default one.
I know that I can reconstruct it using
getAttitude from the provider itself, but it is still weird and clunky.
This is intentional.
The idea is to override the attitude only during maneuvers. Think of it as the spacecraft leaving nominal attitude (the one registered in the propagator) to switch to maneuver attitude, and then back to nominal attitude when maneuver is over.
This is not perfect (a better way would be to use an attitude sequence) but works well for simple cases.
What confuses me is the fact that the generator is supposed to store all the itermediate steps to then interpolate between them. The fact that the new attitude is not present in the generator seems odd. As if the attitudeOverride is not really used to compute the attitude, but rather just to get the thrust vector. If this is the case, then that would also mean that the drag during the maneuver is computed using the default attitude and not the maneuver one, no?
Yes, this is exactly that.
Yes, and this is the reason why this solution is not the best way. It is intended for approximate computation, when users don’t want to go to all the fuss of setting up an attitude sequence.
I see. Thanks for the insight!
I’ll use the attitude sequence then