32 #ifndef KALMAN_FILTER_LINEAR_ORD1_H 33 #define KALMAN_FILTER_LINEAR_ORD1_H 45 template <
typename NumType,
size_t XDim,
size_t UDim,
typename ParamType>
53 for (
size_t i = 0; i < 2 * XDim; ++i)
66 for (
size_t i = 0; i < 2 * XDim; ++i)
68 this->
Sigma_(i, i) = 1000000;
93 for (
size_t i = 0; i < XDim; ++i)
101 void computef(
const Eigen::Matrix<NumType, UDim, 1>& _u)
override 103 for (
size_t i = 0; i < XDim; ++i)
105 this->
f_(i) = this->
x_(i) + this->
x_(i + XDim) *
Ta_;
106 this->
f_(i + XDim) = this->
x_(i + XDim);
115 for (
size_t i = 0; i < XDim; ++i)
118 this->
Q_(i, i + XDim) = this->
Q_(i + XDim, i) =
TaSqr_ *
nn_(i);
119 this->
Q_(i + XDim, i + XDim) =
Ta_ *
nn_(i);
129 void setNN(
const size_t& _i,
const double& _val)
136 Eigen::Matrix<NumType, XDim, 1>
nn_;
148 #endif // KALMAN_FILTER_LINEAR_ORD1_H Eigen::Matrix< NumType, XDim, 1 > f_
State transition function vector
virtual void precompute(const double &_Ta) override
Interface for precomputation function called at the beginning of the prediction step.
Eigen::Matrix< NumType, XDim, 1 > x_
State vector
Eigen::Matrix< NumType, XDim, 1 > nn_
container storing state noise variance values.
virtual void computeSigmaInit() override
Interface for initialization of the state covariance matrix Sigma_.
Eigen::Matrix< NumType, XDim, XDim > Phi_
void setNN(const size_t &_i, const double &_val)
Sets a noise variance parameter.
Interface for simplified manipulation of specialized (Extended) Kalman Filter prediction part...
Eigen::Matrix< NumType, XDim, XDim > Q_
to the state variables
Eigen::Matrix< NumType, XDim, XDim > Sigma_
State covariance matrix
Partial implementation of KalmanFilterPredictInterface for 1st order multivariate (linear) integrator...
void computef(const Eigen::Matrix< NumType, UDim, 1 > &_u) override
Interface for computation of the state transition function vector f_.
KalmanFilterLinOrd1(ParamType &_params)
void computeQ() override
Interface for computation of the state process noise matrix Q_.
void computePhi() override
Interface for computation of the state transition matrix Phi_.