13#ifndef __SCControl__sc_ukf_2__
14#define __SCControl__sc_ukf_2__
20#include <MatrixLib/MatrixLib.h>
24typedef ml_matrix (*
state_func) (ml_matrix x,
double t,
void *context);
26typedef ml_matrix (*
integ_func) (
state_func state_fun, ml_matrix &x,
double h,
double t,
void *context);
28typedef ml_matrix (*propagate_func) (
const ml_matrix &state,
void *context);
30typedef ml_matrix (*meas_2_func) (
const ml_matrix &state,
void *context);
51 void weight_matrix(
void);
52 bool has_propagate_function =
false;
71 void set_mean(
const ml_matrix & m) { this->m = m; }
77 void set_filter_parameters(
double alpha,
double kappa,
double beta){ this->alpha = alpha; this->kappa = kappa; this->beta = beta;}
Definition: sc_ukf_2.h:33
ml_matrix get_mean(void)
Get the mean value.
Definition: sc_ukf_2.h:93
ml_matrix get_residual(void)
Get the measurement residual.
Definition: sc_ukf_2.h:97
void set_integrator_time_step(double dT)
Set the integrator time step.
Definition: sc_ukf_2.h:79
void update(void)
Perform a measurement update.
Definition: sc_ukf_2.cc:73
void set_integrator(integ_func integ_fun)
Set the integrator function.
Definition: sc_ukf_2.h:83
void predict(void)
Perform a prediction.
Definition: sc_ukf_2.cc:28
void * ctx_rhs
The context pointer provided to the propagate and right hand side functions.
Definition: sc_ukf_2.h:107
void set_state_covariance(const ml_matrix &q)
Set the state covariance.
Definition: sc_ukf_2.h:67
void set_filter_parameters(double alpha, double kappa, double beta)
Set the UKF parameters.
Definition: sc_ukf_2.h:77
void set_mean(const ml_matrix &m)
Set the mean value.
Definition: sc_ukf_2.h:71
void set_measurement_covariance(const ml_matrix &r)
Set the measurement covariance.
Definition: sc_ukf_2.h:69
void set_measurement_function(meas_2_func meas_fun)
Set the measurement function.
Definition: sc_ukf_2.h:85
UKF2(void)
Constructor.
Definition: sc_ukf_2.cc:12
void initialize(void)
Initialize the filter.
Definition: sc_ukf_2.cc:23
void * ctx_meas
The context pointer provided to the measurement functions.
Definition: sc_ukf_2.h:109
void set_context_rhs(void *context)
Set the context pointer for data needed by the state functions.
Definition: sc_ukf_2.h:89
integ_func integ_fp
The integrator used to propagate the state.
Definition: sc_ukf_2.h:101
void set_measurement(const ml_matrix &y)
Set the measurement.
Definition: sc_ukf_2.h:73
meas_2_func meas_fp
The measurement function.
Definition: sc_ukf_2.h:103
void set_propagate_function(propagate_func propagate_fun)
Set the measurement function.
Definition: sc_ukf_2.h:87
~UKF2()
Destructor.
Definition: sc_ukf_2.cc:18
ml_matrix get_covariance(void)
Get the covariance.
Definition: sc_ukf_2.h:95
void set_state_function(state_func state_fun)
Set the state function.
Definition: sc_ukf_2.h:81
propagate_func propagate_fp
The propagate function.
Definition: sc_ukf_2.h:105
void set_covariance(const ml_matrix &p)
Set the covariance.
Definition: sc_ukf_2.h:75
state_func state_fp
The state propagation right hand side.
Definition: sc_ukf_2.h:99
void set_context_meas(void *context)
Set the context pointer for data needed by the measurement functions.
Definition: sc_ukf_2.h:91
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