Class AbstractKalmanFilter<T extends Measurement>

    • Constructor Detail

      • AbstractKalmanFilter

        protected AbstractKalmanFilter​(MatrixDecomposer decomposer,
                                       ProcessEstimate initialState)
        Simple constructor.
        Parameters:
        decomposer - decomposer to use for the correction phase
        initialState - initial state
    • Method Detail

      • predict

        protected void predict​(double time,
                               RealVector predictedState,
                               RealMatrix stm,
                               RealMatrix noise)
        Perform prediction step.
        Parameters:
        time - process time
        predictedState - predicted state vector
        stm - state transition matrix
        noise - process noise covariance matrix
      • computeInnovationCovarianceMatrix

        protected RealMatrix computeInnovationCovarianceMatrix​(RealMatrix r,
                                                               RealMatrix h)
        Compute innovation covariance matrix.
        Parameters:
        r - measurement covariance
        h - Jacobian of the measurement with respect to the state (may be null if measurement should be ignored)
        Returns:
        innovation covariance matrix, defined as \(h.P.h^T + r\), or null if h is null
      • correct

        protected void correct​(T measurement,
                               RealMatrix stm,
                               RealVector innovation,
                               RealMatrix h,
                               RealMatrix s)
                        throws MathIllegalArgumentException
        Perform correction step.
        Parameters:
        measurement - single measurement to handle
        stm - state transition matrix
        innovation - innovation vector (i.e. residuals) (may be null if measurement should be ignored)
        h - Jacobian of the measurement with respect to the state (may be null if measurement should be ignored)
        s - innovation covariance matrix (may be null if measurement should be ignored)
        Throws:
        MathIllegalArgumentException - if matrix cannot be decomposed