I am currently dealing with the covariance propagation coming from an ephemeris file.
The CCSDS OEM format might have only one covariance matrix sample in it, which then I would like to propagate during the whole arc of the ephemeris file.

I tried to use the new MatricesHarvester interface that was introduced in the last releases, however it triggers an unsupported exception when coupled with an ephemeris propagator.
So, to be able to propagate the covariance I thought of spawning a NumericalPropagatorBuilder, fitting the trajectory in the ephemeris propagator and then use the harvester to compute the covariance matrix at each step during the propagation with the newly created NumericalPropagator.

However I was wondering if there could be a simpler approach with the current release (v 11.2.1) or if you plan to provide a different solution in the future to deal with this particular case?

â€śIt is normalâ€ť (or not )
With the current version of Orekit, the Ephemeris propagator doesnâ€™t have a matrix harvester. Therefore, it is not able to compute a state transition matrix and then it canâ€™t propagate a covariance matrix. Thatâ€™s why you have the unsupported exception.
Adding the harvester is a new feature we must add. It is straightforward to do since we already have a lot of matrix harvester implementations that can be used as example.

We implemented for the next version (i.e. 11.3) a new class able to propagate a state covariance matrix using the common used linear model. Its name is StateCovarianceMatrixProvider. The class uses the concept of AdditionalState, so it can be easy to configure and to add to an orbit propagator. It works for all propagators having a matrix harverster. So, it works for the numerical propagator.
Once the harvester added for the Ephemeris, it will also work with it.

I donâ€™t know if we will have time to implement the Ephemeris harvester for the next releaseâ€¦ However, because it is a very interesting new feature we will probably add it very soon.

Good to know about the StateCovarianceMatrixProvider and that you plan to add an harvester also for the Ephemeris.
Well at this point I am looking forward for the next release/s

I worked on the implementation of the EphemerisHarvester in order to use the StateCovarianceMatrixProvider with an Ephemeris. Unfortunately, I faced an issue that compromise the implementationâ€¦

It is not possible for the Ephemeris propagator to compute the state transition matrix. Orekit computes partial derivatives using automatic differentiation. The automatic differentiation uses the â€śFieldâ€ť elements implemented in Hipparchus library. More precisely, the Gradient implementation of the â€śFieldâ€ť elements.

The gradient converter used to convert the Ephemeris to FieldEphemeris cannot computes partial derivatives since it only knows the List (i.e., without derivatives) of SpacecraftState of the input Ephemeris. The conversion of List<SpacecraftState> to List<FieldSpacecraftState> is done without derivatives information. Therefore, the computed STM is always equal to zero. I didnâ€™t find any solution for this.

Iâ€™m sorry for the explanations which are complicated. The â€śFieldâ€ť elements are difficult to understand in Orekitâ€¦even for the Orekit team

Your current approach with the NumericalPropagator is the correct one. It will be simplified with the StateCovarianceMatrixProvider. But it will not be possible to use the Ephemeris propagatorâ€¦

thanks for the update and the explanation
Now that I am thinking a bit more, it makes sense that we cannot use it. We canâ€™t get the partial without a propagation done in the background

Ok, so we will rely on the NumericalPropagatorBuilder class

Iâ€™m dropping by this thread to inform you that, although we canâ€™t propagate covariance with the Ephemeris class as @bcazabonne said, we will soon be able to interpolate covariance (see Issue #970 for more information).

In your case and when this will be ready, youâ€™ll be able to propagate the covariance using the NumericalPropagator as previously explained and then save some tabulated states and their associated covariances using an Ephemeris. Later on you will be able to interpolate the covariance very precisely between your tabulated values !