25 #ifndef INCLUDED_FlexibleKalmanCorrect_h_GUID_354B7B5B_CF4F_49AF_7F71_A4279BD8DA8C
26 #define INCLUDED_FlexibleKalmanCorrect_h_GUID_354B7B5B_CF4F_49AF_7F71_A4279BD8DA8C
39 template <
typename StateType,
typename MeasurementType>
70 Eigen::LDLT<types::SquareMatrix<m>>
denom;
93 P - (PHt * denom.solve(PHt.transpose()));
100 OSVR_KALMAN_DEBUG_OUTPUT(
101 "error covariance scale",
107 if (!newP.array().allFinite()) {
115 state_.setErrorCovariance(newP);
119 state_.setErrorCovariance((newP + newP.transpose()) / 2.);
124 state_.postCorrect();
133 typename MeasurementType>
134 inline CorrectionInProgress<StateType, MeasurementType>
136 MeasurementType &meas) {
167 #endif // INCLUDED_FlexibleKalmanCorrect_h_GUID_354B7B5B_CF4F_49AF_7F71_A4279BD8DA8C
bool finishCorrection(bool cancelIfNotFinite=true)
That's as far as we go here before you choose to continue.
Eigen::Matrix< Scalar, n, 1 > Vector
A vector of length n.
typename FilterType::State StateType
Given a filter type, get the state type.
typename detail::Dimension_impl< T >::type Dimension
Eigen::Matrix< Scalar, n, n > SquareMatrix
A square matrix, n x n.
Eigen::LDLT< types::SquareMatrix< m > > denom
types::SquareMatrix< n > P
State error covariance.
typename FilterType::ProcessModel ProcessModelType
Given a filter type, get the process model type.
static const types::DimensionType n
Dimension of state.
CorrectionInProgress< StateType, MeasurementType > beginCorrection(StateType &state, ProcessModelType &processModel, MeasurementType &meas)
types::Vector< m > deltaz
Measurement residual/delta z/innovation.
bool stateCorrectionFinite
Is the state correction free of NaNs and +- infs?
static const types::DimensionType m
Dimension of measurement.
types::Vector< n > stateCorrection
Corresponding state change to apply.
types::Matrix< n, m > PHt
The kalman gain stuff to not invert (called P12 in TAG)
std::size_t DimensionType
Type for dimensions.
Eigen::Matrix< Scalar, m, n > Matrix
A matrix with rows = m, cols = n.