TLIB documentation
Tracking routines often relies on some "magic" constants that vary over time according to external conditions, or that simply cannot be determined analytically. The tlConst object is a Kalman-filter based estimator of constants that can be dynamically updated. It provides an easy way to perform least-square approximation of a set of data without memorization.
Public Member Functions | |
| tlConst () | |
| tlConst (T val, float pCv, int tol=-1) | |
| tlConst (T val, float eCv, float pCv, float mCv, int tol=-1) | |
| virtual | ~tlConst () |
| int | init (T val, float pCv, int tol=-1) |
| int | init (T val, float eCv, float pCv, float mCv, int tol=-1) |
| int | setVal (T val) |
| int | setParam (float pCv, int tol=-1) |
| int | setParam (float eCv, float pCv, float mCv, int tol=-1) |
| int | setTol (int tol) |
| int | update (T val) |
| int | getTol () |
| T | getVal () |
| T | getNext () |
| float | getState () |
| float | getEstimate () |
Constructor, initialize the most significant Kalman filter parameter (process covariance).
| init | initial value of the constant | |
| pCv | process covariance | |
| tol | tolerance for input values [%], -1 for no input filtering |
| tlConst< T >::tlConst | ( | T | init, | |
| float | eCv, | |||
| float | pCv, | |||
| float | mCv, | |||
| int | tol = -1 | |||
| ) | [inline] |
Constructor, initialize all Kalman filter parameters.
| init | initial value of the constant | |
| eCv | initial estimate covariance | |
| pCv | process covariance | |
| mCv | measurment covariance | |
| tol | tolerance for input values [%], -1 for no input filtering |
| int tlConst< T >::init | ( | T | init, | |
| float | pCv, | |||
| int | tol = -1 | |||
| ) | [inline] |
(Re)initialize the constant, that is, set the most significant Kalman filter parameter (process covariance).
| init | initial value of the constant | |
| pCv | process covariance | |
| tol | tolerance for input values [%], -1 for no input filtering |
| int tlConst< T >::init | ( | T | init, | |
| float | eCv, | |||
| float | pCv, | |||
| float | mCv, | |||
| int | tol = -1 | |||
| ) | [inline] |
(Re)initialize the constant, that is, set all Kalman filter parameters.
| init | initial value of the constant | |
| eCv | initial estimate covariance | |
| pCv | process covariance | |
| mCv | measurment covariance | |
| tol | tolerance for input values [%], -1 for no input filtering |
| int tlConst< T >::setVal | ( | T | init | ) | [inline] |
Set the current best estimate for the constant value; the value is cast to the template type.
| init | value to reset the constant to |
| int tlConst< T >::setParam | ( | float | pCv, | |
| int | tol = -1 | |||
| ) | [inline] |
Set the most significant Kalman filter parameter (process covariance).
| pCv | process covariance | |
| tol | tolerance for input values [%], -1 for no input filtering |
| int tlConst< T >::setParam | ( | float | eCv, | |
| float | pCv, | |||
| float | mCv, | |||
| int | tol = -1 | |||
| ) | [inline] |
Set all Kalman filter parameters.
| eCv | initial estimate covariance | |
| pCv | process covariance | |
| mCv | measurment covariance | |
| tol | tolerance for input values [%], -1 for no input filtering |
| int tlConst< T >::setTol | ( | int | tol | ) | [inline] |
Set the tolerance on input values. Values that do are not within tolerance [%] of the current value will not be taken into account.
| tol | tolerance for input values [%] -1 disables input filtering |
| int tlConst< T >::update | ( | T | input | ) | [inline] |
Update the constant with new data.
| input | new input to the constant |
| int tlConst< T >::getTol | ( | ) | [inline] |
Return the tolerance filter for input values [%].
| int tlConst< T >::getVal | ( | ) | [inline] |
Return the current best estimate for the constant value; the value is cast to the template type.
| int tlConst< T >::getNext | ( | ) | [inline] |
Return the current best prediction for the next constant value; the value is cast to the template type.
| template< typename T > float tlConst< T >::getState | ( | ) | [inline] |
Return the actual best estimate for the constant value; the value is NOT cast to the template type.
| float tlConst< T >::getEstimate | ( | ) | [inline] |
Return the actual best prediction for the next constant value; the value is NOT cast to the template type.