Struct bayes_estimate::estimators::ud::UDState
source · pub struct UDState<N: RealField, D: Dim>{
pub x: OVector<N, D>,
pub UD: OMatrix<N, D, D>,
/* private fields */
}
Expand description
UD State representation.
Linear representation as a state vector and ‘square root’ factorisation of the state covariance matrix. Numerically the this ‘square root’ factorisation is advantageous as conditioning for inverting is improved by the square root.
The state covariance is represented as a U.d.U’ factorisation, where U is upper triangular matrix (0 diagonal) and d is a diagonal vector. U and d are packed into a single UD Matrix, the lower Triangle ist not part of state representation.
Fields§
§x: OVector<N, D>
State vector
UD: OMatrix<N, D, D>
UD matrix representation of state covariance
Implementations§
source§impl<N: Copy + RealField, D: Dim> UDState<N, D>
impl<N: Copy + RealField, D: Dim> UDState<N, D>
sourcepub fn new(UD: OMatrix<N, D, D>, x: OVector<N, D>) -> Self
pub fn new(UD: OMatrix<N, D, D>, x: OVector<N, D>) -> Self
Create a UDState for given state dimensions.
D is the size of states vector and rows in UD.
pub fn predict<QD: Dim>( &mut self, fx: &OMatrix<N, D, D>, x_pred: &OVector<N, D>, noise: &CoupledNoise<N, D, QD> ) -> Result<N, &str>
sourcepub fn observe_innovation<ZD: Dim>(
&mut self,
s: &OVector<N, ZD>,
hx: &OMatrix<N, ZD, D>,
noise: &UncorrelatedNoise<N, ZD>
) -> Result<N, &str>
pub fn observe_innovation<ZD: Dim>( &mut self, s: &OVector<N, ZD>, hx: &OMatrix<N, ZD, D>, noise: &UncorrelatedNoise<N, ZD> ) -> Result<N, &str>
Implement observe using sequential observation updates.
Uncorrelated observations are applied sequentially in the order they appear in z.
source§impl<N: Copy + RealField, D: Dim> UDState<N, D>
impl<N: Copy + RealField, D: Dim> UDState<N, D>
Special Linear ‘hx’ observe for correlated factorised noise.
Observation predictions are made with the linear ‘hx’. This allows the observation noise to be decorrelated. Observations can then be applied for each element in the order they appear in z.
Return: Minimum ‘rcond’ of all sequential observations
source§impl<N: Copy + RealField, D: Dim> UDState<N, D>
impl<N: Copy + RealField, D: Dim> UDState<N, D>
pub fn new_predict_scratch<QD: Dim>(&self, qd: QD) -> PredictScratch<N, D, QD>
pub fn new_observe_scratch(&self) -> ObserveScratch<N, D>
pub fn predict_use_scratch<QD: Dim>( &mut self, scratch: &mut PredictScratch<N, D, QD>, x_pred: &OVector<N, D>, fx: &OMatrix<N, D, D>, noise: &CoupledNoise<N, D, QD> ) -> Result<N, &str>
pub fn observe_innovation_use_scratch<ZD: Dim>( &mut self, scratch: &mut ObserveScratch<N, D>, s: &OVector<N, ZD>, hx: &OMatrix<N, ZD, D>, noise: &UncorrelatedNoise<N, ZD> ) -> Result<N, &str>
Trait Implementations§
source§impl<N: Copy + RealField, D: Dim> KalmanEstimator<N, D> for UDState<N, D>
impl<N: Copy + RealField, D: Dim> KalmanEstimator<N, D> for UDState<N, D>
source§fn kalman_state(&self) -> Result<KalmanState<N, D>, &str>
fn kalman_state(&self) -> Result<KalmanState<N, D>, &str>
Derive the KalmanState from the UDState.
The covariance matrix X is recomposed from U.d.U’ in the UD matrix.
Auto Trait Implementations§
impl<N, D> !RefUnwindSafe for UDState<N, D>
impl<N, D> !Send for UDState<N, D>
impl<N, D> !Sync for UDState<N, D>
impl<N, D> !Unpin for UDState<N, D>
impl<N, D> !UnwindSafe for UDState<N, D>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.