Class AbstractKalmanFilter<T extends Measurement>

java.lang.Object
org.hipparchus.filtering.kalman.AbstractKalmanFilter<T>
Type Parameters:
T - the type of the measurements
All Implemented Interfaces:
KalmanFilter<T>
Direct Known Subclasses:
ExtendedKalmanFilter, LinearKalmanFilter

public abstract class AbstractKalmanFilter<T extends Measurement> extends Object implements KalmanFilter<T>
Shared parts between linear and non-linear Kalman filters.
Since:
1.3
  • Constructor Details

    • AbstractKalmanFilter

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

    • 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
    • getPredicted

      public ProcessEstimate getPredicted()
      Get the predicted state.
      Specified by:
      getPredicted in interface KalmanFilter<T extends Measurement>
      Returns:
      predicted state
    • getCorrected

      public ProcessEstimate getCorrected()
      Get the corrected state.
      Specified by:
      getCorrected in interface KalmanFilter<T extends Measurement>
      Returns:
      corrected state