Error when using KalmanEstimator to estimate Ephemeris

Hello,
I am trying to use KalmanEstimator to estimate Ephemeris (using both ground-based and space-based measurements). I am getting the following error:
“org.hipparchus.exception.MathIllegalArgumentException: matrix must have at least one row
at org.hipparchus.linear.AbstractRealMatrix.(AbstractRealMatrix.java:68)
at org.hipparchus.linear.Array2DRowRealMatrix.(Array2DRowRealMatrix.java:63)
at org.hipparchus.linear.MatrixUtils.createRealMatrix(MatrixUtils.java:143)
at org.orekit.estimation.sequential.KalmanModel.(KalmanModel.java:288)
at org.orekit.estimation.sequential.KalmanEstimator.(KalmanEstimator.java:111)
at org.orekit.estimation.sequential.KalmanEstimatorBuilder.build(KalmanEstimatorBuilder.java:76)”

Here is how my code works:
First I create the KalmanEstimatorBuilder via:
org.orekit.estimation.sequential.KalmanEstimatorBuilder

Then I create a 6-dimensional process noise covariance matrix via:
org.hipparchus.linear.DiagonalMatrix
and create a provider with this process noise covariance matrix via:
org.orekit.estimation.sequential.ConstantProcessNoise

Then I use KalmanEstimatorBuilder.addPropagationConfiguration twice, once for the object to be observed and once for a space-based observer. Both the observed object and the space-based observer are represented as org.orekit.propagation.conversion.EphemerisPropagatorBuilder.

Do you have any ideas about why I am getting this error?
Thank you,
Erin

Hi @erinf,

EphemerisPropagatorBuilder is meant to estimate measurements’ parameters only. The idea is to rely on a reference ephemeris (e.g. GNSS or LEO SP3) to estimate the bias of a ground station or a GNSS receiver.
The orbit cannot be estimated and the orbital drivers are automatically deselected.
Thus you need to select at least one measurement parameter to make it work.

That being said, I’m not sure the Kalman was ever tested with EphemerisPropagatorBuilder so it might still be buggy. For example, I don’t think that the case where " CovarianceMatrixProvider for orbital and propagation parameters is empty" is handled.
So I guess you ran into an issue. Could you eventually share your code, so we can see how we could fix it?

Maxime

I’m sorry for my late reply, but the KalmanEstimator should work with an ephemeris propagator. There is a unit test class showing it: src/test/java/org/orekit/estimation/sequential/EphemerisKalmanEstimatorTest.java · release-12.0 · Orekit / Orekit · GitLab
In addition, there is another forrum thread talking about that.

Best regards,
Bryan

Thank you both for this further information and these references! I have been able to make my code work using these references.