[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orekit Developers] Ephemeris Propagator Attitude Override

Hello all,

We have been using the Ephemeris propagator for awhile to do an analysis with definitive ephemeris and attitude.  Recently however we have wanted to have a definitive ephemeris with a new attitude defined by an attitude provider.  The current implementation of Ephemeris propagator doesn't allow for this.  To get this working for our project I made some slight modifications and I wanted to know if the group would like me to contribute these back.

The methodology to get this working is simple.  The base classes already have the concept of attitude provider calls, so I'm just leveraging that.  In the construction of the Ephemeris propagator however I set the attitude provider to null.  In the basicPropagate method, where the hard work in the Ephemeris propagator is done I do a check to see if the getAttitudeProvider() returns null.  If it does then it simply returns the interpolated spacecraft state. 

If it is set however it uses the attitude provider to calculate a new attitude.  We then build a new state out of the interpolated state's orbit, the newly calculated attitude and the mass from the interpolated state.  Because the attitude provider needs a PVProvider, I created a LocalPVProvider that simply echos a passed in spacecraft state term.  I think I need to modify my code to also return additional states, which it currently doesn't do. 

I built a new unit test that confirms the override works.  I also checked to make sure that all existing unit tests pass with this code modification.