Hello,
I am using Orekit-Jpype version v13.1.4.0, and I have noticed an unexpected behaviour when using the StateCovarianceBlender class in combination with the OrbitHermiteInterpolator class.
Specifically, it seems that, when interpolating at the exact same epoch of the first interpolation point, an error is raised by the StateCovarianceBlender interpolator because of what I think is some numerical noise in the epoch of the start of the allowed interpolation range. The latter does not happen regularly, so it may not be trivial to reproduce.
Below you can find a simplified (not working) version of my code
from java import util
from orekit_jpype import pyhelpers
from org.hipparchus.analysis import polynomials
from org.orekit import frames
from org.orekit import orbits
from org.orekit import propagation
from org.orekit import time
# Set frame
eme2000 = frames.FramesFactory.getEME2000()
# Set blending function
blending_func = polynomials.SmoothStepFactory.getQuadratic()
# Create orbit interpolator
hermite_orbit_interp = orbits.OrbitHermiteInterpolator(2, eme2000)
# Create covariance blender
covariance_blender = propagation.StateCovarianceBlender(
blending_func,
hermite_orbit_interp,
eme2000,
orbits.OrbitType.CARTESIAN,
orbits.PositionAngleType.MEAN,
)
# Prepare list of interpolation points
time_stamped_pair_list = util.ArrayList()
for i in range(100):
# NOTE: `orbit` is an Orbit object while `orekit_cov` is a StateCovariance object
time_stamped_pair_list.add(time.TimeStampedPair(orbit, orekit_cov))
# Interpolate
# NOTE: `epoch` is a datetime.datetime object
orekit_epoch = pyhelpers.datetime_to_absolutedate(epoch)
interpolated_pair = covariance_blender.interpolate(
orekit_epoch, time_stamped_pair_list)
Below you can find the details of the error I have encountered.
Traceback (most recent call last):
File "AbstractTimeInterpolator.java", line 93, in org.orekit.time.AbstractTimeInterpolator.interpolate
Exception: Java Exception
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "./test.py", line 236, in get_ephemeris
interpolated_pair = covariance_blender.interpolate(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
org.orekit.errors.org.orekit.errors.TimeStampedCacheException: org.orekit.errors.TimeStampedCacheException: unable to generate new data before 2026-03-04T13:08:27.172000000000000608Z, but data is requested for 2026-03-04T13:08:27.172Z which is 6.08E-16 s before
Epoch 2026-03-04T13:08:27.172Zis exactly the epoch of the first interpolation point passed to the interpolate() method of a StateCovarianceBlender object.
- Have you noticed a similar behavior?
- Am I using the
StateCovarianceBlenderclass improperly?
Thanks again for all the support, wish you a great day!
Best,
GmM