001// Copyright (c) FIRST and other WPILib contributors.
002// Open Source Software; you can modify and/or share it under the terms of
003// the WPILib BSD license file in the root directory of this project.
004
005package edu.wpi.first.math.estimator;
006
007import edu.wpi.first.math.Matrix;
008import edu.wpi.first.math.Num;
009import edu.wpi.first.math.numbers.N1;
010
011public interface KalmanTypeFilter<States extends Num, Inputs extends Num, Outputs extends Num> {
012  Matrix<States, States> getP();
013
014  double getP(int i, int j);
015
016  void setP(Matrix<States, States> newP);
017
018  Matrix<States, N1> getXhat();
019
020  double getXhat(int i);
021
022  void setXhat(Matrix<States, N1> xHat);
023
024  void setXhat(int i, double value);
025
026  void reset();
027
028  void predict(Matrix<Inputs, N1> u, double dtSeconds);
029
030  void correct(Matrix<Inputs, N1> u, Matrix<Outputs, N1> y);
031}