template<int n_states, int n_inputs, int n_measurements>
class mrs_lib::UKF< n_states, n_inputs, n_measurements >
Implementation of the Unscented Kalman filter [3].
The Unscented Kalman filter (abbreviated UKF, [3]) is a variant of the Kalman filter, which may be used for state filtration or estimation of non-linear systems as opposed to the Linear Kalman Filter (which is implemented in LKF). The UKF tends to be more accurate than the simpler Extended Kalman Filter, espetially for highly non-linear systems. However, it is generally less stable than the LKF because of the extra matrix square root in the sigma points calculation, so it is recommended to use LKF for linear systems.
The UKF C++ class itself is templated. This has its advantages and disadvantages. Main disadvantage is that it may be harder to use if you're not familiar with C++ templates, which, admittedly, can get somewhat messy, espetially during compilation. Another disadvantage is that if used unwisely, the compilation times can get much higher when using templates. The main advantage is compile-time checking (if it compiles, then it has a lower chance of crashing at runtime) and enabling more effective optimalizations during compilation. Also in case of Eigen, the code is arguably more readable when you use aliases to the specific Matrix instances instead of having Eigen::MatrixXd and Eigen::VectorXd everywhere.
Template Parameters
n_states
number of states of the system (length of the vector).
n_inputs
number of inputs of the system (length of the vector).
n_measurements
number of measurements of the system (length of the vector).
This constructor should not be used if applicable. If used, the main constructor has to be called afterwards, otherwise the UKF object is invalid (not initialized).