![]() |
WarpTwin
Documentation for WarpTwin models and classes.
|
Generic, templated EKF measurement update class. More...
#include <EkfMeasurementUpdate.hpp>
Public Member Functions | |
| EkfMeasurementUpdate (Measurements< N, M, O > &measurement_ref) | |
| Constructor. | |
| int16 | generateResidual (floating_point time, const std::array< floating_point, N > &state_minus, const std::array< floating_point, O > &obs_state, const std::array< floating_point, M > &measurement, std::array< floating_point, M > *residual) |
| Function to generate the residual from the current state. | |
| int16 | runUpdate (floating_point time, const std::array< floating_point, N > &state_minus, const clockwerk::Matrix< N, N > &cov_minus, const std::array< floating_point, O > &obs_state, const std::array< floating_point, M > &residual, std::array< floating_point, N > *state_plus, clockwerk::Matrix< N, N > *cov_plus) |
| Function to perform state measurement update in EKF. | |
| void | setMeasurementNoiseMatrix (const clockwerk::Matrix< M, M > &R) |
| Set the R matrix for the measurement update. | |
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. Same as the number of noise states. O - The number of observer states used to support measurement generation
The measurement update is performed based on the Joseph formulation of the Kalman update for numerical stability. Symmetry is enforced every step.
The measurement update enforces positive diagonal on the covariance matrix prior to processing. If the matrix has any items below the minimum epsilon on the diagonal, the minimum epsilon is enforced.
Author: James Tabony james.nosp@m..tab.nosp@m.ony@a.nosp@m.ttx..nosp@m.tech / Alex Reynolds
| warpos::EkfMeasurementUpdate< N, M, O >::EkfMeasurementUpdate | ( | Measurements< N, M, O > & | measurement_ref | ) |
Constructor.
| int16 warpos::EkfMeasurementUpdate< N, M, O >::generateResidual | ( | floating_point | time, |
| const std::array< floating_point, N > & | state_minus, | ||
| const std::array< floating_point, O > & | obs_state, | ||
| const std::array< floating_point, M > & | measurement, | ||
| std::array< floating_point, M > * | residual ) |
Function to generate the residual from the current state.
| [in] | time | The reference time |
| [in] | state_minus | The system prior to measurement update |
| [in] | obs_state | The observer state ar the reference time |
| [in] | measurement | The actual measurement derived from the sensors |
| [out] | residual | Implicit return of the difference (actual measurement - expected measurement) |
| int16 warpos::EkfMeasurementUpdate< N, M, O >::runUpdate | ( | floating_point | time, |
| const std::array< floating_point, N > & | state_minus, | ||
| const clockwerk::Matrix< N, N > & | cov_minus, | ||
| const std::array< floating_point, O > & | obs_state, | ||
| const std::array< floating_point, M > & | residual, | ||
| std::array< floating_point, N > * | state_plus, | ||
| clockwerk::Matrix< N, N > * | cov_plus ) |
Function to perform state measurement update in EKF.
| [in] | time | The reference time |
| [in] | state_minus | The system state prior to measurement update |
| [in] | cov_minus | The system covariance prior to measurement update |
| [in] | obs_state | The observer state at the reference time |
| [in] | residual | The difference (actual measurement - expected measurement) |
| [out] | state_plus | Implicit return of the state of the system after measurement update |
| [out] | cov_plus | Implicit return of the covariance of the system after measurement update |
|
inline |
Set the R matrix for the measurement update.
| R | The measurement noise matrix to set |