Public Member Functions

UKF Class Reference

Unscented Kalman Filter.

List of all members.

Public Member Functions

 UKF ()
 Constructor.
 ~UKF ()
 Destructor.
void set_filter_mode (UKF_mode mode)
 Sets the filter mode.
void set_filter_parameters (const double alpha, const double kappa, const double beta)
 Sets the filter parameters.
void set_integrator_time_info (double t, double dt)
 Sets the integrator time and time step.
void set_initial_values (const ml_matrix &state0, const ml_matrix &covariance0, const ml_matrix &parameter0=ml_matrix())
 Sets the initial state and covariance.
void set_noise_covariances (const ml_matrix &Rp, const ml_matrix &Rm)
 Sets the noise covariance matrices.
void set_state_function (state_func state_fun)
 Sets the state function.
void set_integrator (integ_func integ_fun)
 Sets the integrator function.
void set_measurement_function (meas_func meas_fun)
 Sets the measurement function.
void set_context (void *context)
 Sets the context pointer for data needed by the state or measurement functions.
ml_matrix current_state (void) const
 Returns the current estimated state.
ml_matrix current_residual (void) const
 Returns the current residual.
ml_matrix current_parameter (void) const
 Returns the current estimated parameter.
ml_matrix current_covariance (void) const
 Returns the current estimated covariance.
ml_matrix current_residual_covariance (void) const
 Returns the current residual covariance.
ml_matrix current_rhs_params (void) const
 Returns the current RHS parameters (only used in parameter mode).
void update_estimate (const ml_matrix &measurement)
 Updates the current estimate.

Member Function Documentation

void UKF::set_filter_mode ( UKF_mode  mode )
Parameters:
modedesired mode (from enum UKF_mode).
void UKF::set_filter_parameters ( const double  alpha,
const double  kappa,
const double  beta 
)
Parameters:
alphausually in [.0001,1]
kappa0 for state estimation
beta2 for normally distributed data
void UKF::set_integrator_time_info ( double  t,
double  dt 
)
Parameters:
ttime (s)
dttimestep (s)
void UKF::set_initial_values ( const ml_matrix &  state0,
const ml_matrix &  covariance0,
const ml_matrix &  parameter0 = ml_matrix() 
)

Sets the initial state, parameter and covariance.

Parameters:
state0state (nx1)
covariance0covariance (nxn)
parameter0parameter (nx1) (not used in state mode)
void UKF::set_noise_covariances ( const ml_matrix &  Rp,
const ml_matrix &  Rm 
)
Parameters:
Rpnoise covariance matrix (nxn)
Rmmeasurement covariance matrix (mxm)
void UKF::set_state_function ( state_func  state_fun )

Sets the state function, which is the right hand side of the state update.

Parameters:
state_funa function pointer to a state_func function
void UKF::set_integrator ( integ_func  integ_fun )

Sets the integrator function used to propagate the state.

Parameters:
integ_funa function pointer to a integ_func function
void UKF::set_measurement_function ( meas_func  meas_fun )
Parameters:
meas_funa function pointer to a meas_func function
void UKF::set_context ( void *  context )

Sets the context pointer that will be passed in to the other functions.

Parameters:
*contexta function pointer to a meas_func function
void UKF::update_estimate ( const ml_matrix &  measurement )
Parameters:
measurementupdated measurement vector (mx1)