Aerospace Control Framework 1.0
Public Member Functions | List of all members
IMM Class Reference

Interactive Multiple Model Filter.

#include <sc_imm.h>

Public Member Functions

 IMM ()
 Constructor.
 
 ~IMM ()
 Destructor.
 
void intialize_filter_bank (const int size_bank)
 Sets the number of models in the filter bank. More...
 
void set_filter_mode (const int n_filter, UKF_mode mode)
 Sets the filter mode. More...
 
void set_filter_parameters (const int n_filter, const double alpha, const double kappa, const double beta)
 Sets the filter parameters. More...
 
void set_integrator_time_info (double t, double dt)
 Sets the integrator time and time step. More...
 
void set_initial_values (const ml_matrix &state0, const ml_matrix &covariance0, const ml_matrix &parameter0=ml_matrix())
 Sets the initial state and covariance. More...
 
void set_noise_covariances (const int n_filter, const ml_matrix &Rp, const ml_matrix &Rm)
 Sets the noise covariance matrices. More...
 
void set_state_function (const int n_filter, state_func state_fun)
 Sets the state function. More...
 
void set_jump_function (jump_func jump_fun)
 Sets the jump function. More...
 
void set_integrator (const int n_filter, integ_func integ_fun)
 Sets the integrator function. More...
 
void set_measurement_function (const int n_filter, meas_func meas_fun)
 Sets the measurement function. More...
 
void set_context (void *context)
 Sets the context pointer for data needed by the state or measurement functions. More...
 
ml_matrix current_state (void) const
 Returns the current estimated state.
 
ml_matrix current_covariance (void) const
 Returns the current estimated covariance.
 
ml_matrix current_mode_probability (void) const
 Returns the current mode probability.
 
void update_estimate (const ml_matrix &measurement)
 Updates the current estimate. More...
 

Member Function Documentation

◆ intialize_filter_bank()

void IMM::intialize_filter_bank ( const int  bank_size)

Initializes the bank of UKF filters.

Parameters
bank_sizenumber of modes to be initialized.

◆ set_filter_mode()

void IMM::set_filter_mode ( const int  n_filter,
UKF_mode  mode 
)
Parameters
n_filterfilter to be updated
modedesired mode (from enum UKF_mode).

◆ set_filter_parameters()

void IMM::set_filter_parameters ( const int  n_filter,
const double  alpha,
const double  kappa,
const double  beta 
)
Parameters
n_filterfilter to be updated
alphausually in [.0001,1]
kappa0 for state estimation
beta2 for normally distributed data

◆ set_integrator_time_info()

void IMM::set_integrator_time_info ( double  t,
double  dt 
)
Parameters
ttime (s)
dttimestep (s)

◆ set_initial_values()

void IMM::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
n_filterfilter to be updated
state0state (nx1)
covariance0covariance (nxn)
parameter0parameter (nx1) (not used in state mode)

◆ set_noise_covariances()

void IMM::set_noise_covariances ( const int  n_filter,
const ml_matrix &  Rp,
const ml_matrix &  Rm 
)
Parameters
n_filterfilter to be updated
Rpnoise covariance matrix (nxn)
Rmmeasurement covariance matrix (mxm)

◆ set_state_function()

void IMM::set_state_function ( const int  n_filter,
state_func  state_fun 
)

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

Parameters
n_filterfilter to be updated
state_funa function pointer to a state_func function

◆ set_jump_function()

void IMM::set_jump_function ( jump_func  jump_fun)
Parameters
jump_funa function pointer to a jump_func function

◆ set_integrator()

void IMM::set_integrator ( const int  n_filter,
integ_func  integ_fun 
)

Sets the integrator function used to propagate the state.

Parameters
n_filterfilter to be updated
integ_funa function pointer to a integ_func function

◆ set_measurement_function()

void IMM::set_measurement_function ( const int  n_filter,
meas_func  meas_fun 
)
Parameters
n_filterfilter to be updated
meas_funa function pointer to a meas_func function

◆ set_context()

void IMM::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

◆ update_estimate()

void IMM::update_estimate ( const ml_matrix &  measurement)
Parameters
measurementupdated measurement vector (mx1)