KalmanEstimator : KalmanObserver and negative eccentricity with NumericalPropagatorBuilder

Hi @sbaudier,

Not sure about your negative eccentricity issue, but I can probably help walk through the other part - since posting that topic you linked, I have gotten the orekit EKF working quite well.

First off, you should subclass the observer with the python-specific subclass. Also I have found that the subclassing can have issues if you don’t superclass it with itself in the init. See below:

#My Kalman Observer class
from org.orekit.estimation.sequential import PythonKalmanObserver
class MyObserverTest(PythonKalmanObserver):
    def __init__(self):
        super(MyObserverTest, self).__init__()
    def evaluationPerformed(self, estimation):
        print('step')

A thought or two on the negative eccentricity thing:

  1. Check that the position/velocity states are in an inertial reference frame. Fixed/ECEF could slip through here since you are building measurements on the fly, but the PV class does not have a reference frame. You can ensure that by making sure your PV coordinates coming out of spacecraft_state are forced into an inertial frame via pv_coordinates = spacecraft_state.getPVCoordinates(FramesFactory.getEME2000())
  2. The orbit type should have been configured from the initial orbit used in the construction of your NumericalPropagatorBuilder. Not sure if this helps, but in mine I have PositionAngle.TRUE and have not had to make mine into an Equinoctial orbit