Set Propagator's default attitude provider to be aligned with Propagator.getFrame()
For performance reasons when possible the default attitude provider should be aligned with the Propagator's Frame. This avoid computing frame transformations to/from EME2000 when the user isn't interested in the attitude. Some performance profiling on my machine has shown that for the TLEPropagator
computing the attitude is about as expensive as computing the position and velocity. In other words, there is a factor of two slow down if the default attitude law is not changed and the user doesn't need an EME2000 aligned attitude. I think most analytical propagators would benefit from changing the default attitude provider including EphemerisSegmentPropagator
and Ephemeris
. Since this changes semantics and may subtly break some applications I think we should wait until the next major release to make the change. I can add a FrameAligned
AttitudeProvider
now.
Workaround until this is fully implemented:
TLEPropagator p = ...;
Frame teme = FramesFactory.getTEME()
// with new FrameAligned class
p.setAttitudeProvider(new FrameAligned(teme));
// with existing classes, but not as fast
p.setAttitudeProvider(new FixedRate(epoch, teme, AngularCoordinates.IDENTITY));