20#include <MatrixLib/MatrixLib.h>
35typedef ml_matrix (*
state_func) (ml_matrix x,
double t,
void *context);
39typedef ml_matrix (*
meas_func) (
const ml_matrix &state,
void *context);
87 void set_initial_values (
const ml_matrix &state0,
const ml_matrix &covariance0,
const ml_matrix ¶meter0 = ml_matrix());
99 void set_state(
const ml_matrix &state0 );
119 UKF & operator= (
const UKF &u);
122 ml_matrix calculate_sigma_points (
const ml_matrix &x,
const ml_matrix &P);
125 void update_estimate_state (
const ml_matrix &measurement);
128 void update_estimate_parameter (
const ml_matrix &measurement);
138 ml_matrix *parameter;
140 ml_matrix *covariance;
143 ml_matrix *process_noise_cov;
145 ml_matrix *meas_noise_cov;
157 ml_matrix rhs_params;
181 ml_matrix *residual_covariance;
Unscented Kalman Filter class.
Definition: sc_ukf.h:73
ml_matrix current_rhs_params(void) const
Returns the current RHS parameters (only used in parameter mode).
Definition: sc_ukf.h:111
void update_estimate(const ml_matrix &measurement)
Updates the current estimate.
Definition: sc_ukf.cc:210
void set_filter_mode(UKF_mode mode)
Sets the filter mode.
Definition: sc_ukf.cc:72
void set_filter_parameters(const double alpha, const double kappa, const double beta)
Sets the filter parameters.
Definition: sc_ukf.cc:83
void set_state(const ml_matrix &state0)
Sets the current state.
Definition: sc_ukf.cc:105
void set_state_function(state_func state_fun)
Sets the state function.
Definition: sc_ukf.cc:172
ml_matrix current_covariance(void) const
Returns the current estimated covariance.
Definition: sc_ukf.h:107
ml_matrix current_state(void) const
Returns the current estimated state.
Definition: sc_ukf.h:101
void set_context(void *context)
Sets the context pointer for data needed by the state or measurement functions.
Definition: sc_ukf.cc:199
void set_integrator_time_info(double t, double dt)
Sets the integrator time and time step.
Definition: sc_ukf.cc:95
UKF()
Constructor.
Definition: sc_ukf.cc:38
ml_matrix current_parameter(void) const
Returns the current estimated parameter.
Definition: sc_ukf.h:105
ml_matrix current_residual_covariance(void) const
Returns the current residual covariance.
Definition: sc_ukf.h:109
void set_integrator(integ_func integ_fun)
Sets the integrator function.
Definition: sc_ukf.cc:181
void set_noise_covariances(const ml_matrix &Rp, const ml_matrix &Rm)
Sets the noise covariance matrices.
Definition: sc_ukf.cc:151
void set_initial_values(const ml_matrix &state0, const ml_matrix &covariance0, const ml_matrix ¶meter0=ml_matrix())
Sets the initial state and covariance.
Definition: sc_ukf.cc:117
void set_measurement_function(meas_func meas_fun)
Sets the measurement function.
Definition: sc_ukf.cc:190
ml_matrix current_residual(void) const
Returns the current residual.
Definition: sc_ukf.h:103
~UKF()
Destructor.
Definition: sc_ukf.cc:51
ml_matrix(* meas_func)(const ml_matrix &state, void *context)
A function used to provide the measurement vector.
Definition: sc_ukf.h:39
ml_matrix(* state_func)(ml_matrix x, double t, void *context)
A function used to propagate the state vector.
Definition: sc_ukf.h:35
ml_matrix(* integ_func)(state_func state_fun, ml_matrix &x, double h, double t, void *context)
A function used to integrate the state vector.
Definition: sc_ukf.h:37
UKF_mode
Determines in which state the filter operates.
Definition: sc_ukf.h:42