40template <
int States,
int Inputs,
int Outputs>
82 double K(
int i,
int j)
const {
return m_K(i, j); }
94 double Xhat(
int i)
const {
return m_xHat(i); }
109 void SetXhat(
int i,
double value) { m_xHat(i) = value; }
147 SteadyStateKalmanFilter<1, 1, 1>;
149 SteadyStateKalmanFilter<2, 1, 1>;
#define WPILIB_DLLEXPORT
Definition: SymbolExports.h:36
A plant defined using state-space notation.
Definition: LinearSystem.h:31
A Kalman filter combines predictions from a model and measurements to give an estimate of the true sy...
Definition: SteadyStateKalmanFilter.h:41
void SetXhat(const StateVector &xHat)
Set initial state estimate x-hat.
Definition: SteadyStateKalmanFilter.h:101
SteadyStateKalmanFilter & operator=(SteadyStateKalmanFilter &&)=default
SteadyStateKalmanFilter(LinearSystem< States, Inputs, Outputs > &plant, const StateArray &stateStdDevs, const OutputArray &measurementStdDevs, units::second_t dt)
Constructs a staeady-state Kalman filter with the given plant.
Definition: SteadyStateKalmanFilter.inc:23
void Correct(const InputVector &u, const OutputVector &y)
Correct the state estimate x-hat using the measurements in y.
Definition: SteadyStateKalmanFilter.inc:80
void Predict(const InputVector &u, units::second_t dt)
Project the model into the future with a new control input u.
Definition: SteadyStateKalmanFilter.inc:74
void Reset()
Resets the observer.
Definition: SteadyStateKalmanFilter.h:114
void SetXhat(int i, double value)
Set an element of the initial state estimate x-hat.
Definition: SteadyStateKalmanFilter.h:109
double K(int i, int j) const
Returns an element of the steady-state Kalman gain matrix K.
Definition: SteadyStateKalmanFilter.h:82
double Xhat(int i) const
Returns an element of the state estimate x-hat.
Definition: SteadyStateKalmanFilter.h:94
const Matrixd< States, Outputs > & K() const
Returns the steady-state Kalman gain matrix K.
Definition: SteadyStateKalmanFilter.h:74
Vectord< Outputs > OutputVector
Definition: SteadyStateKalmanFilter.h:45
SteadyStateKalmanFilter(SteadyStateKalmanFilter &&)=default
Vectord< Inputs > InputVector
Definition: SteadyStateKalmanFilter.h:44
const StateVector & Xhat() const
Returns the state estimate x-hat.
Definition: SteadyStateKalmanFilter.h:87
Vectord< States > StateVector
Definition: SteadyStateKalmanFilter.h:43
This class is a wrapper around std::array that does compile time size checking.
Definition: array.h:26
Definition: AprilTagPoseEstimator.h:15
Eigen::Matrix< double, Rows, Cols, Options, MaxRows, MaxCols > Matrixd
Definition: EigenCore.h:21
Eigen::Vector< double, Size > Vectord
Definition: EigenCore.h:12
template class EXPORT_TEMPLATE_DECLARE(WPILIB_DLLEXPORT) LinearQuadraticRegulator< 1