29 #define _USE_MATH_DEFINES
61 void InitSystem(
int n_states,
int n_outputs,
const mat& Q,
const mat& R);
67 virtual colvec
f(
const colvec &x,
const colvec &u);
73 virtual colvec
h(
const colvec &x);
105 void UKalmanf(
const colvec& z,
const colvec& u);
Implemetation of the Unscented Kalman filter. This class needs to be derived.
Definition: ukf.h:42
colvec * GetCurrentEstimatedOutput()
Get current estimated output.
Definition: ukf.cpp:229
virtual colvec f(const colvec &x, const colvec &u)
Define model of your system.
Definition: ukf.cpp:57
void UKalmanf(const colvec &u)
Do the extended Kalman iteration step-by-step while simulating the system. Simulating the system is d...
Definition: ukf.cpp:87
colvec * GetCurrentState()
Get current simulated true state.
Definition: ukf.cpp:213
colvec * GetCurrentOutput()
Get current simulated true output. This is analogous to the measurements.
Definition: ukf.cpp:218
colvec z_
Output matrix, by simulation, true value.
Definition: ukf.h:153
void InitSystem(int n_states, int n_outputs, const mat &Q, const mat &R)
Tell me how many states and outputs you have!
Definition: ukf.cpp:20
int nStates_
Number of the states.
Definition: ukf.h:149
UKF()
Constructor, nothing happens here.
Definition: ukf.cpp:10
void InitSystemStateCovariance(const mat &P0)
Initialize the system state covariance. Must be called after InitSystem. If not called,...
Definition: ukf.cpp:79
int nOutputs_
Number of outputs.
Definition: ukf.h:150
colvec * GetCurrentEstimatedState()
Get current estimated state. This is analogous to the filtered measurements.
Definition: ukf.cpp:223
virtual colvec h(const colvec &x)
Define the output model of your system.
Definition: ukf.cpp:64
colvec x_
State vector, by simulaiton, true value.
Definition: ukf.h:152
void InitSystemState(const colvec &x0)
Initialize the system states. Must be called after InitSystem. If not called, system state is initial...
Definition: ukf.cpp:71
~UKF()
Destructur, nothing happens here.
Definition: ukf.cpp:15