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

Re: [Orekit Developers] Ephemeris Propagator Attitude Override



Hank Grabowski <hank@applieddefense.com> a écrit :

Hello all,

Hi Hank,


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.

This seems interesting and your approach is fine with me.
I just wonder in this case if we should trim the ephemeris beforehand, removing the attitude if it is not expected to be used. Of course, in this case using the ephemeris without an AttitudeProvider would trigger an error. I'm not sure this additional feature would be a good idea, and your proposal is already good without this.

best regards,
Luc


Thoughts?

Hank




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.