OSVR-Core
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
osvr::kalman::SigmaPointCorrectionApplication< State, Measurement > Class Template Reference

Public Types

using StateVec = types::DimVector< State >
 
using StateSquareMatrix = types::DimSquareMatrix< State >
 
using MeasurementVec = types::DimVector< Measurement >
 
using MeasurementSquareMatrix = types::DimSquareMatrix< Measurement >
 
using AugmentedStateVec = types::Vector< AugmentedStateDim >
 
using AugmentedStateCovMatrix = types::SquareMatrix< AugmentedStateDim >
 
using SigmaPointsGen = AugmentedSigmaPointGenerator< AugmentedStateDim, n >
 
using Reconstruction = ReconstructedDistributionFromSigmaPoints< m, SigmaPointsGen >
 
using TransformedSigmaPointsMat = typename Reconstruction::TransformedSigmaPointsMat
 
using GainMatrix = types::Matrix< n, m >
 

Public Member Functions

 SigmaPointCorrectionApplication (State &s, Measurement &m, SigmaPointParameters const &params=SigmaPointParameters())
 
bool finishCorrection (bool cancelIfNotFinite=true)
 Finish computing the rest and correct the state. More...
 

Static Public Member Functions

static AugmentedStateVec getAugmentedStateVec (State const &s, Measurement const &m)
 
static AugmentedStateCovMatrix getAugmentedStateCov (State const &s, Measurement &meas)
 
static TransformedSigmaPointsMat transformSigmaPoints (State const &s, Measurement &meas, SigmaPointsGen const &sigmaPoints)
 Transforms sigma points by having the measurement class compute the estimated measurement for a state whose state vector we update to each of the sigma points in turn. More...
 
static MeasurementSquareMatrix computeInnovationCovariance (State const &s, Measurement &meas, Reconstruction const &recon)
 
static StateVec computeStateCorrection (Reconstruction const &recon, MeasurementVec const &deltaz, Eigen::LDLT< MeasurementSquareMatrix > const &pvvDecomp)
 

Public Attributes

Statestate
 
Measurement & measurement
 
SigmaPointsGen sigmaPoints
 
TransformedSigmaPointsMat transformedPoints
 
Reconstruction reconstruction
 
MeasurementSquareMatrix innovationCovariance
 aka Pvv
 
Eigen::LDLT< MeasurementSquareMatrixPvvDecomp
 
types::Vector< m > deltaz
 reconstructed mean measurement residual/delta z/innovation
 
StateVec stateCorrection
 
bool stateCorrectionFinite
 

Static Public Attributes

static const types::DimensionType n = types::Dimension<State>::value
 
static const types::DimensionType m
 
static const types::DimensionType AugmentedStateDim = n + m
 state augmented with measurement noise mean
 
static const types::DimensionType NumSigmaPoints
 

Member Function Documentation

§ finishCorrection()

template<typename State, typename Measurement>
bool osvr::kalman::SigmaPointCorrectionApplication< State, Measurement >::finishCorrection ( bool  cancelIfNotFinite = true)
inline

Finish computing the rest and correct the state.

Parameters
cancelIfNotFiniteIf the new error covariance is detected to contain non-finite values, should we cancel the correction and not apply it?
Returns
true if correction completed

Logically state.errorCovariance() - K * Pvv * K.transpose(), but considering just the second term, we can replace K with its definition (Pxv Pvv^-1), distribute the transpose on the right over the product, then pull out Pvv^-1 * Pvv * (Pvv^-1).transpose() as "B", leaving Pxv B Pxv.transpose()

Since innovationCovariance aka Pvv is symmetric, (Pvv^-1).transpose() = Pvv^-1. Left multiplication gives Pvv B = Pvv * Pvv^-1 * Pvv * Pvv^-1 whose right hand side is the Pvv-sized identity, and that is in a form that allows us to use our existing LDLT decomp of Pvv to solve for B then evaluate the full original expression.

§ getAugmentedStateVec()

template<typename State, typename Measurement>
static AugmentedStateVec osvr::kalman::SigmaPointCorrectionApplication< State, Measurement >::getAugmentedStateVec ( State const &  s,
Measurement const &  m 
)
inlinestatic

assuming measurement noise is zero mean

§ transformSigmaPoints()

template<typename State, typename Measurement>
static TransformedSigmaPointsMat osvr::kalman::SigmaPointCorrectionApplication< State, Measurement >::transformSigmaPoints ( State const &  s,
Measurement &  meas,
SigmaPointsGen const &  sigmaPoints 
)
inlinestatic

Transforms sigma points by having the measurement class compute the estimated measurement for a state whose state vector we update to each of the sigma points in turn.

Member Data Documentation

§ m

template<typename State, typename Measurement>
const types::DimensionType osvr::kalman::SigmaPointCorrectionApplication< State, Measurement >::m
static
Initial value:
=
types::Dimension<Measurement>::value

§ NumSigmaPoints

template<typename State, typename Measurement>
const types::DimensionType osvr::kalman::SigmaPointCorrectionApplication< State, Measurement >::NumSigmaPoints
static
Initial value:
=
SigmaPointsGen::NumSigmaPoints

The documentation for this class was generated from the following file: