pub struct ExtendedKalmanFilter<const N: usize, const M: usize, Model> {
pub x: [f32; N],
pub p: [[f32; N]; N],
pub q: [[f32; N]; N],
pub r: [[f32; M]; M],
pub model: Model,
}Expand description
Extended Kalman filter with compile-time dimensions and a user EkfModel.
Measurement dimension M must be ≤ 16. Covariance update uses P ← (I − KH) P.
Fields§
§x: [f32; N]State estimate
p: [[f32; N]; N]State covariance P (N×N)
q: [[f32; N]; N]Process noise covariance Q (N×N)
r: [[f32; M]; M]Measurement noise covariance R (M×M)
model: ModelNonlinear process / measurement model
Implementations§
Source§impl<const N: usize, const M: usize, Model: EkfModel<N, M>> ExtendedKalmanFilter<N, M, Model>
impl<const N: usize, const M: usize, Model: EkfModel<N, M>> ExtendedKalmanFilter<N, M, Model>
Sourcepub fn new(
x0: [f32; N],
p0: [[f32; N]; N],
q: [[f32; N]; N],
r: [[f32; M]; M],
model: Model,
) -> Self
pub fn new( x0: [f32; N], p0: [[f32; N]; N], q: [[f32; N]; N], r: [[f32; M]; M], model: Model, ) -> Self
Create an EKF with initial state, covariances, and model.
Trait Implementations§
Source§impl<const N: usize, const M: usize, Model: Clone> Clone for ExtendedKalmanFilter<N, M, Model>
impl<const N: usize, const M: usize, Model: Clone> Clone for ExtendedKalmanFilter<N, M, Model>
Source§fn clone(&self) -> ExtendedKalmanFilter<N, M, Model>
fn clone(&self) -> ExtendedKalmanFilter<N, M, Model>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<const N: usize, const M: usize, Model: Copy> Copy for ExtendedKalmanFilter<N, M, Model>
Source§impl<const N: usize, const M: usize, Model: Debug> Debug for ExtendedKalmanFilter<N, M, Model>
impl<const N: usize, const M: usize, Model: Debug> Debug for ExtendedKalmanFilter<N, M, Model>
Source§impl<const N: usize, const M: usize, Model: PartialEq> PartialEq for ExtendedKalmanFilter<N, M, Model>
impl<const N: usize, const M: usize, Model: PartialEq> PartialEq for ExtendedKalmanFilter<N, M, Model>
impl<const N: usize, const M: usize, Model: PartialEq> StructuralPartialEq for ExtendedKalmanFilter<N, M, Model>
Auto Trait Implementations§
impl<const N: usize, const M: usize, Model> Freeze for ExtendedKalmanFilter<N, M, Model>where
Model: Freeze,
impl<const N: usize, const M: usize, Model> RefUnwindSafe for ExtendedKalmanFilter<N, M, Model>where
Model: RefUnwindSafe,
impl<const N: usize, const M: usize, Model> Send for ExtendedKalmanFilter<N, M, Model>where
Model: Send,
impl<const N: usize, const M: usize, Model> Sync for ExtendedKalmanFilter<N, M, Model>where
Model: Sync,
impl<const N: usize, const M: usize, Model> Unpin for ExtendedKalmanFilter<N, M, Model>where
Model: Unpin,
impl<const N: usize, const M: usize, Model> UnsafeUnpin for ExtendedKalmanFilter<N, M, Model>where
Model: UnsafeUnpin,
impl<const N: usize, const M: usize, Model> UnwindSafe for ExtendedKalmanFilter<N, M, Model>where
Model: UnwindSafe,
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
Mutably borrows from an owned value. Read more