pub struct TrackState {
pub frame: TrackCoordinateFrame,
pub t_s: f64,
pub position_m: Vec<f64>,
pub velocity_m_s: Vec<f64>,
pub covariance: Vec<Vec<f64>>,
}Expand description
State of a no-IMU constant-velocity track filter.
Fields§
§frame: TrackCoordinateFrameCartesian frame of the state and covariance.
t_s: f64Epoch in seconds in the caller’s monotonic time base.
position_m: Vec<f64>Position components in metres.
velocity_m_s: Vec<f64>Velocity components in metres per second.
covariance: Vec<Vec<f64>>Covariance over [position, velocity].
Implementations§
Source§impl TrackState
impl TrackState
Sourcepub fn new(
frame: TrackCoordinateFrame,
t_s: f64,
position_m: Vec<f64>,
velocity_m_s: Vec<f64>,
covariance: Vec<Vec<f64>>,
) -> Result<Self, TrackError>
pub fn new( frame: TrackCoordinateFrame, t_s: f64, position_m: Vec<f64>, velocity_m_s: Vec<f64>, covariance: Vec<Vec<f64>>, ) -> Result<Self, TrackError>
Build and validate one track state.
Sourcepub fn state_dimension(&self) -> usize
pub fn state_dimension(&self) -> usize
Return the full state dimension.
Sourcepub fn state_vector(&self) -> Vec<f64>
pub fn state_vector(&self) -> Vec<f64>
Return [position, velocity] as an owned vector.
Sourcepub fn position_covariance_m2(&self) -> Vec<Vec<f64>>
pub fn position_covariance_m2(&self) -> Vec<Vec<f64>>
Return the leading position covariance block.
Sourcepub fn position_covariance3_m2(&self) -> Result<[[f64; 3]; 3], TrackError>
pub fn position_covariance3_m2(&self) -> Result<[[f64; 3]; 3], TrackError>
Return the 3D position covariance block.
Sourcepub fn position3_m(&self) -> Result<[f64; 3], TrackError>
pub fn position3_m(&self) -> Result<[f64; 3], TrackError>
Return the 3D position vector.
Sourcepub fn velocity3_m_s(&self) -> Result<[f64; 3], TrackError>
pub fn velocity3_m_s(&self) -> Result<[f64; 3], TrackError>
Return the 3D velocity vector.
Sourcepub fn validate(&self) -> Result<(), TrackError>
pub fn validate(&self) -> Result<(), TrackError>
Validate vector dimensions, finiteness, and covariance.
Trait Implementations§
Source§impl Clone for TrackState
impl Clone for TrackState
Source§fn clone(&self) -> TrackState
fn clone(&self) -> TrackState
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 moreSource§impl Debug for TrackState
impl Debug for TrackState
Source§impl PartialEq for TrackState
impl PartialEq for TrackState
Source§fn eq(&self, other: &TrackState) -> bool
fn eq(&self, other: &TrackState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TrackState
Auto Trait Implementations§
impl Freeze for TrackState
impl RefUnwindSafe for TrackState
impl Send for TrackState
impl Sync for TrackState
impl Unpin for TrackState
impl UnsafeUnpin for TrackState
impl UnwindSafe for TrackState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.