pub struct NavState {
pub t_j2000_s: f64,
pub position_ecef_m: [f64; 3],
pub velocity_ecef_mps: [f64; 3],
pub attitude_body_to_ecef: Mat3,
pub accel_bias_mps2: [f64; 3],
pub gyro_bias_rps: [f64; 3],
}Expand description
Navigation state used by the ECEF strapdown mechanizer.
Fields§
§t_j2000_s: f64State time in seconds since J2000 on the caller’s GNSS time scale.
position_ecef_m: [f64; 3]IMU position in ECEF meters.
velocity_ecef_mps: [f64; 3]IMU velocity in ECEF meters per second.
attitude_body_to_ecef: Mat3Direction cosine matrix from body axes to ECEF axes.
accel_bias_mps2: [f64; 3]Closed-loop accelerometer bias estimate in m/s^2.
gyro_bias_rps: [f64; 3]Closed-loop gyroscope bias estimate in rad/s.
Implementations§
Sourcepub fn new(
t_j2000_s: f64,
position_ecef_m: [f64; 3],
velocity_ecef_mps: [f64; 3],
attitude_body_to_ecef: Mat3,
) -> Result<Self, InertialError>
pub fn new( t_j2000_s: f64, position_ecef_m: [f64; 3], velocity_ecef_mps: [f64; 3], attitude_body_to_ecef: Mat3, ) -> Result<Self, InertialError>
Build a navigation state with zero IMU biases.
Sourcepub fn with_biases(
self,
accel_bias_mps2: [f64; 3],
gyro_bias_rps: [f64; 3],
) -> Result<Self, InertialError>
pub fn with_biases( self, accel_bias_mps2: [f64; 3], gyro_bias_rps: [f64; 3], ) -> Result<Self, InertialError>
Return this state with closed-loop IMU bias estimates.
Sourcepub fn validate(&self) -> Result<(), InertialError>
pub fn validate(&self) -> Result<(), InertialError>
Validate finite state fields and a nondegenerate attitude matrix.
Sourcepub fn attitude_quaternion_body_to_ecef(
&self,
) -> Result<AttitudeQuaternion, InertialError>
pub fn attitude_quaternion_body_to_ecef( &self, ) -> Result<AttitudeQuaternion, InertialError>
Body-to-ECEF attitude as a unit quaternion.
Sourcepub fn attitude_yaw_pitch_roll_rad(&self) -> [f64; 3]
pub fn attitude_yaw_pitch_roll_rad(&self) -> [f64; 3]
Body-to-ECEF attitude as yaw, pitch, and roll angles in radians.
Trait Implementations§
Auto Trait Implementations§
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.