Interface KalmanTypeFilter<States extends Num,Inputs extends Num,Outputs extends Num>

Type Parameters:
States - The number of states.
Inputs - The number of inputs.
Outputs - The number of outputs.
All Known Implementing Classes:
ExtendedKalmanFilter, KalmanFilter, UnscentedKalmanFilter

public interface KalmanTypeFilter<States extends Num,Inputs extends Num,Outputs extends Num>
Interface for Kalman filters for use with KalmanFilterLatencyCompensator.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Correct the state estimate x-hat using the measurements in y.
    Returns the error covariance matrix.
    double
    getP(int i, int j)
    Returns an element of the error covariance matrix.
    Returns the state estimate.
    double
    getXhat(int i)
    Returns an element of the state estimate.
    void
    predict(Matrix<Inputs,N1> u, double dtSeconds)
    Project the model into the future with a new control input u.
    void
    Resets the observer.
    void
    Sets the error covariance matrix.
    void
    setXhat(int i, double value)
    Sets an element of the state estimate.
    void
    Sets the state estimate.
  • Method Details

    • getP

      Returns the error covariance matrix.
      Returns:
      The error covariance matrix.
    • getP

      double getP(int i, int j)
      Returns an element of the error covariance matrix.
      Parameters:
      i - The row.
      j - The column.
      Returns:
      An element of the error covariance matrix.
    • setP

      void setP(Matrix<States,States> newP)
      Sets the error covariance matrix.
      Parameters:
      newP - The error covariance matrix.
    • getXhat

      Returns the state estimate.
      Returns:
      The state estimate.
    • getXhat

      double getXhat(int i)
      Returns an element of the state estimate.
      Parameters:
      i - The row.
      Returns:
      An element of the state estimate.
    • setXhat

      void setXhat(Matrix<States,N1> xHat)
      Sets the state estimate.
      Parameters:
      xHat - The state estimate.
    • setXhat

      void setXhat(int i, double value)
      Sets an element of the state estimate.
      Parameters:
      i - The row.
      value - The value.
    • reset

      void reset()
      Resets the observer.
    • predict

      void predict(Matrix<Inputs,N1> u, double dtSeconds)
      Project the model into the future with a new control input u.
      Parameters:
      u - New control input from controller.
      dtSeconds - Timestep for prediction.
    • correct

      Correct the state estimate x-hat using the measurements in y.
      Parameters:
      u - Same control input used in the predict step.
      y - Measurement vector.