149 template<
typename T,
K_UINT_32 BEG,
bool OQ =
false,
150 bool OVR =
false,
bool DBG =
true>
495 virtual void makeA();
498 virtual void makeW();
505 virtual void makeQ();
531 virtual void makeH();
539 virtual void makeV();
547 virtual void makeR();
virtual void makeMeasure()=0
Actual measurement function . Fills in z.
Matrix Q_
Modified version of Q to whiten process noise.
void setSizeZ(K_UINT_32 m_)
Sets the size of the measurement vector.
K_UINT_32 getSizeU() const
Returns the size of the input vector.
Generic Extended Kalman Filter (EKF) template base class.
Matrix Q
Process noise covariance matrix.
const Matrix & calculateP() const
Returns the a posteriori error covariance estimate matrix.
virtual void makeR()
Virtual creator of R.
void makeBaseWImpl()
makeBaseW() template method.
void makeBaseRImpl()
makeBaseR() template method.
virtual void makeBaseV()
Virtual pre-creator of V.
Matrix H_
Modified version of H to whiten measure noise.
virtual void makeBaseA()
Virtual pre-creator of A.
void makeVImpl()
makeV() template method.
Minimalist vector template class.
virtual void makeW()
Virtual creator of W.
virtual ~EKFilter()
Virtual destructor.
void measureUpdate(T dz, T r)
U-D convariance factorization update.
virtual void makeQ()
Virtual creator of Q.
K_UINT_32 getSizeW() const
Returns the size of the process noise vector.
Vector dz
Innovation vector.
EKFilter()
Default constructor.
const Vector & predict(Vector &u_)
Returns the predicted state vector (a priori state estimate).
void makeAImpl()
makeA() template method.
Matrix U
Cholesky factorization of P.
K_UINT_16 flags
Temporary vector.
void makeBaseQImpl()
makeBaseQ() template method.
virtual void makeProcess()=0
Actual process . Fills in new x by using old x.
K_UINT_32 getSizeV() const
Returns the size of the measurement noise vector.
K_UINT_32 getSizeX() const
Returns the size of the state vector.
Matrix A
A jacobian matrix.
Matrix _P
Temporary matrix.
Matrix W
A jacobian matrix.
void makeQImpl()
makeQ() template method.
K_UINT_32 nv
Size of the measurement noise vector.
Vector x
Corrected state vector.
void step(Vector &u_, const Vector &z_)
Makes one prediction-correction step.
virtual void makeV()
Virtual creator of V.
void makeBaseAImpl()
makeBaseA() template method.
void makeBaseVImpl()
makeBaseV() template method.
KVector< T, BEG, DBG > Vector
Vector type.
Contains the interface of the KMatrix template class.
Matrix V
A jacobian matrix.
virtual void sizeUpdate()
Resizes all vector and matrices. Never call or overload this !
static void upperInvert(Matrix &P_)
Inplace upper triangular matrix inversion.
Matrix R
Measurement noise covariance matrix.
virtual void makeBaseH()
Virtual pre-creator of H.
Vector v
Temporary vector.
void init(Vector &x_, Matrix &P_)
Sets initial conditions for the Kalman Filter.
virtual void makeDZ()
Hook-up function to modify innovation vector.
void NoModification()
Allows optimizations on some calculations.
void setSizeV(K_UINT_32 nv_)
Sets the size of the measurement noise vector.
virtual void makeBaseQ()
Virtual pre-creator of Q.
void setSizeX(K_UINT_32 n_)
Sets the size of the state vector.
static void factor(Matrix &P_)
Inplace upper triangular matrix Cholesky (UDU) factorization.
Starting index of matrices and vectors.
Contains the implementation of the EKFilter base template class.
void setSizeW(K_UINT_32 nw_)
Sets the size of the process noise vector.
const Vector & simulate()
Returns the predicted measurement vector.
K_UINT_32 getSizeZ() const
Returns the size of the measurement vector.
unsigned short int K_UINT_16
Unsigned 16-bits integral type.
K_UINT_32 nu
Size of the input vector.
virtual void makeCommonProcess()
Optional function used to precalculate common values for process.
T type
Type of objects contained in matrices and vectors.
Matrix H
A jacobian matrix.
unsigned long int K_UINT_32
Unsigned 32-bits integral type.
K_UINT_32 nn
Number of columns of U.
void timeUpdateStep(Vector &u_)
Makes one prediction step.
void makeHImpl()
makeH() template method.
const Vector & getX() const
Returns the corrected state (a posteriori state estimate).
virtual void makeCommonMeasure()
Optional function used to precalculate common values for measurement.
virtual void makeBaseW()
Virtual pre-creator of W.
Vector d
Temporary vector.
void makeWImpl()
makeW() template method.
Minimalist matrix template class.
Vector a
Temporary vector.
virtual void makeA()
Virtual creator of A.
K_UINT_32 n
Size of the state vector.
void measureUpdateStep(const Vector &z_)
Makes one correction step.
K_UINT_32 m
Size of the measurement vector.
void timeUpdate()
MWG-S orthogonalization algorithm for U-D time update.
void setSizeU(K_UINT_32 nu_)
Sets the size of the input vector.
KMatrix< T, BEG, DBG > Matrix
Matrix type.
Matrix R_
Modified version of R to whiten measure noise.
void makeBaseHImpl()
makeBaseH() template method.
void setDim(K_UINT_32 n_, K_UINT_32 nu_, K_UINT_32 nw_, K_UINT_32 m_, K_UINT_32 nv_)
Sets all dimensions at once.
virtual void makeBaseR()
Virtual pre-creator of R.
K_UINT_32 nw
Size of the process noise vector.
virtual void makeH()
Virtual creator of H.
void makeRImpl()
makeR() template method.
Vector z
Predicted measurement vector.
Matrix W_
Modified version of W to whiten process noise.
Contains the interface of the KVector template class.
bool modified_
Boolean flag used by NoModification().