[Python Wrapper] Bounded Propagator Min/Max Date Error

I have encountered an intermittent bug when using BoundedPropagator ephemeris objects. I have generated a bounded propagator by parsing an OEM file, but on some occasions the “getMinDate” methods on this return weird incorrect dates. The only workaround I have found to solve this is to use the “getGeneratedEphemeris” method on the boundedpropagator object itself again first, but this does not always work. See attached screenshots for the results of these.

FYI I am using the python wrapper for OREKIT.

E.g. here I am able to get the correct date by using the getGeneratedEphemeris method:

but here trying the exact same method yields the same incorrect output as before, with no rhyme or reason to when it works or not:
image

Is this a known issue?

Hi Alex,

Those dates are infinite. Did you call propagate(...) before calling getGeneratedEphemeris()? The min/max date for the generated ephemeris are (in the common case) just the arguments from the last call to propagate(...). If propagate(...) has not been called the max/min dates are initialized to positive/negative infinity.

That said any BoundedPropagator should probably initialize the min/max dates for the return value of getGeneratedEphemeris() to it’s own min/max dates. Could you create an issue for this at https://gitlab.orekit.org/orekit/orekit/issues A failing JUnit test case or a patch would be helpful.

Regards,
Evan

Hi Evan,

They did look rather large… I didn’t call propagate yet no, my OEM reader code just calls …getPropagator().getGeneratedEphemeris() on the EphemerisFile object as shown below:

I will post an issue for this also, but would appreciate a workaround that I can use in the meantime :slight_smile:

Workaround is to delete .getGeneratedEphemeris() in the above code. It’s also more efficient. The return value of getPropagator() is a BoundedPropagator so there is no need to call getGeneratedEphemeris(). In general it is necessary to call setEphemerisMode(), then propagate(...) before calling getGeneratedEphemeris(). See the docs for setSlaveMode(), setMasterMode(), setEphemerisMode() to understand the different propagation modes.