Estimate Measurement Parameters in the Unscented Kalman Model

Hello! Thank you very much for your prompt response @bcazabonne! :slightly_smiling_face:

I’ve tried using the Extended Kalman Filter; however, a similar issue arises since there are no orbital parameters to estimate in the SemiAnalyticalKalmanModel.java. You can see that an error (matrix must have at least one row) will occur as there are no orbital parameters to estimate.

// Initialize inverse of the orbital part of the state transition matrix
this.phiS = MatrixUtils.createRealIdentityMatrix(getNumberSelectedOrbitalDriversValuesToEstimate());

The only estimator that seems to work correctly with magnitude measurements is the KalmanEstimator. As soon as I use the UnscentedKalmanEstimator, the problem described in the previous post occurs. Below, I show in the following image one of the key differences between the Unscented Kalman Model and the Kalman Model in this process.

On the left is the Unscented Kalman Model, while on the right is the Kalman Model. There is a clear difference between lines 227-230 of the UKM and lines 221-226 of the KM. It can be observed that in the case of the KM, it works because it first detects that c != null before adding the value to covarianceIndirection. In the case of the UKM, the value of i increases even if c == null, causing the model to stop working when the number of the four quaternions I want to measure is exceeded (which defines the size of columns = 4). This leads to the problem mentioned in the previous post.

On the other hand, it’s worth mentioning that I’ve tried using builder.deselectDynamicParameters(), but I’m using an EphemerisPropagatorBuilder instead of a NumericalPropagatorBuilder as in previous versions. However, I was already performing this treatment previously before the builder:

    for (final ParameterDriver parameterDriver : propagatorBuilder.getOrbitalParametersDrivers().getDrivers())
        {parameterDriver.setSelected(false);}
    for (final ParameterDriver parameterDriver : propagatorBuilder.getPropagationParametersDrivers().getDrivers())
        {parameterDriver.setSelected(false);}

I appreciate your time in advance for the offered assistance. Best regards, and I look forward to your response!