25 #ifndef INCLUDED_OrientationConstantVelocity_h_GUID_72B09543_A2CC_458F_2973_7DFD0593F8CC 26 #define INCLUDED_OrientationConstantVelocity_h_GUID_72B09543_A2CC_458F_2973_7DFD0593F8CC 42 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
49 setNoiseAutocorrelation(orientationNoise);
51 void setNoiseAutocorrelation(
double orientationNoise = 0.1) {
61 return orient_externalized_rotation::stateTransitionMatrix(dt);
64 void predictState(State &s,
double dt) {
68 s.setErrorCovariance(Pminus);
80 auto dt3 = (dt * dt * dt) / 3;
81 auto dt2 = (dt * dt) / 2;
82 for (std::size_t xIndex = 0; xIndex < dim / 2; ++xIndex) {
83 auto xDotIndex = xIndex + dim / 2;
85 const auto mu = getMu(xDotIndex);
86 cov(xIndex, xIndex) = mu * dt3;
87 auto symmetric = mu * dt2;
88 cov(xIndex, xDotIndex) = symmetric;
89 cov(xDotIndex, xIndex) = symmetric;
90 cov(xDotIndex, xDotIndex) = mu * dt;
98 OSVR_KALMAN_DEBUG_OUTPUT(
"Time change", dt);
99 StateVector ret = orient_externalized_rotation::applyVelocity(
108 double getMu(std::size_t index)
const {
110 "Should only be passing " 111 "'i' - the main state, not " 123 #endif // INCLUDED_OrientationConstantVelocity_h_GUID_72B09543_A2CC_458F_2973_7DFD0593F8CC types::DimSquareMatrix< StateType > predictErrorCovariance(StateType const &state, ProcessModelType &processModel, double dt)
Computes P-.
Definition: FlexibleKalmanBase.h:135
StateSquareMatrix getStateTransitionMatrix(State const &, double dt) const
Also known as the "process model jacobian" in TAG, this is A.
Definition: OrientationConstantVelocity.h:59
typename detail::Dimension_impl< T >::type Dimension
Given a state or measurement, get the dimension as a std::integral_constant.
Definition: FlexibleKalmanBase.h:87
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
void setStateVector(StateVector const &state)
set xhat
Definition: OrientationState.h:120
StateSquareMatrix getSampledProcessNoiseCovariance(double dt) const
This is Q(deltaT) - the Sampled Process Noise Covariance.
Definition: OrientationConstantVelocity.h:77
StateVector computeEstimate(State &state, double dt) const
Returns a 6-element vector containing a predicted state based on a constant velocity process model...
Definition: OrientationConstantVelocity.h:97
The matrix class, also used for vectors and row-vectors.
Definition: Matrix.h:127
StateVector const & stateVector() const
xhat
Definition: OrientationState.h:122
Definition: OrientationState.h:108
A model for a 3DOF pose (with angular velocity)
Definition: OrientationConstantVelocity.h:40