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

[Orekit Developers] Fix for end point exceptions on Ephemeris propagator



Hello all,

I'm surprised I haven't run into this before but on a project I'm starting to see exceptions with the Ephemeris propagator when I'm doing event detection.  If the event straddles an end point then the ImmutableTimestampedCache is asked to return points just outside of the data bounds. It looks like the EventState.evaluateStep is sometimes taking the final state and slightly perturbing it forward beyond the ephemeris bounds (it doesn't know it's the final state of the ephemeris obviously).  We are getting around this by backing off the propagation window by a second but it'd be ideal if we could do something like:

-load ephemeris
-get ephemeris start date
-get ephemeris stop date
-set up event detectors
-propagator from the start date to the stop date
-collect the detected dates

I'd change Ephemeris.basicPropagate to first check if the requested date is within the bounds or not.  If it is outside the bounds it will get the "interpolatedState" by doing the SpacecraftState.shiftedBy operator rather than trying to interpolate.  My thought is that if it is within a certain tolerance (like 1e-6 or something) then we just do it but if the requested date is outside of that range then it checks a user configurable field a user can set allowing/forbidding extrapolation.  

Thoughts?

I'd like to get this into Orekit 9.0 if everyone agrees.