![]() |
ModelSpace
|
Generic, templated EKF measurement update class. More...
#include <EkfMeasurementUpdate.hpp>
Public Member Functions | |
int | generateResidualHMatrix (const std::array< T, N > &state, const std::array< T, O > &obs_state, const std::array< T, M > &measurement, CartesianVector< T, M > *residual, Matrix< T, M, N > *H) |
Function to generate residual and H matrix from current state. | |
int | updateState (const CartesianVector< T, M > &residual, const Matrix< T, M, N > &H, const std::array< T, N > &state_minus, const Matrix< T, N, N > &cov_minus, const Matrix< T, M, M > &meas_cov, std::array< T, N > *state_plus, Matrix< T, N, N > *cov_plus) |
Function to perform state measurement update in EKF. | |
int | calculateMeasurementCovariance (const Matrix< T, M, N > &H, const Matrix< T, N, N > &state_cov, const Matrix< T, M, M > &meas_cov, Matrix< T, M, M > *residual_cov) |
Function to generate covariance for measurement update evaluation. | |
Public Attributes | |
Measurements< T, N, M, O > * | measurement_ptr = nullptr |
Pointer to the measurement class to calculate the estimated measurement given the current state of the object. The measurement class should be configured to use size. | |
Measurements< T, N, M *N, O > * | H_ptr = nullptr |
Pointer to the measurement class to calculate the H matrix from the estimated spacecraft state. | |
Generic, templated EKF measurement update class.
This class performs an EKF measurement update using the current target state, an "observer state" which provides information (i.e. ground station information), and the associated measurement and H matrix functions. It requires three templated arguments, which are as follows: N - The number of target states estimated in the EKF M - The number of measurement states provided O - The number of observer states used to support measurement generation
Two "functions" which take the form of a Measurements class must also be set: The function which generates measurements, and the function which generates the H matrix.
To run the measurement update, both functions are required. The first generates measurement residuals, and the second to actuall provide the state update
int clockwerk::EkfMeasurementUpdate< T, N, M, O >::calculateMeasurementCovariance | ( | const Matrix< T, M, N > & | H, |
const Matrix< T, N, N > & | state_cov, | ||
const Matrix< T, M, M > & | meas_cov, | ||
Matrix< T, M, M > * | residual_cov | ||
) |
Function to generate covariance for measurement update evaluation.
H | The measurement sensitivity matrix for the system |
state_cov | The covariance in the system state |
meas_cov | The covariance associated with the measurement |
residual_cov | Implicit return of the expected covariance of the residual |
int clockwerk::EkfMeasurementUpdate< T, N, M, O >::generateResidualHMatrix | ( | const std::array< T, N > & | state, |
const std::array< T, O > & | obs_state, | ||
const std::array< T, M > & | measurement, | ||
CartesianVector< T, M > * | residual, | ||
Matrix< T, M, N > * | H | ||
) |
Function to generate residual and H matrix from current state.
state | The current state of the filter |
obs_state | An observer state used to generate measurements |
measurement | The actual measurement derived from sensors |
residual | Implicit return of the difference measurement - estimated measurement |
H | Implicit return of the measurement sensitivity matrix for the system |
int clockwerk::EkfMeasurementUpdate< T, N, M, O >::updateState | ( | const CartesianVector< T, M > & | residual, |
const Matrix< T, M, N > & | H, | ||
const std::array< T, N > & | state_minus, | ||
const Matrix< T, N, N > & | cov_minus, | ||
const Matrix< T, M, M > & | meas_cov, | ||
std::array< T, N > * | state_plus, | ||
Matrix< T, N, N > * | cov_plus | ||
) |
Function to perform state measurement update in EKF.
residual | The difference measurement - estimated measurement |
H | The measurement sensitivity matrix for the system |
state_minus | The system state prior to measurement update |
cov_minus | The system covariance prior to measurement update |
meas_cov | The covariance of the measurement |
state_plus | Implicit return of the state of the system after measurement update |
cov_plus | Implicit return of the covariance of the system after measurement update |