pub struct StrapdownState {
pub latitude: f64,
pub longitude: f64,
pub altitude: f64,
pub velocity_north: f64,
pub velocity_east: f64,
pub velocity_down: f64,
pub attitude: Rotation3<f64>,
pub coordinate_convention: bool,
}
Expand description
Basic structure for holding the strapdown mechanization state in the form of position, velocity, and attitude.
Attitude is stored in matrix form (rotation or direction cosine matrix) and position and velocity are stored as vectors. The order or the states depends on the coordinate system used. The struct does not care, but the coordinate system used will determine which functions you should use. Default is NED but nonetheless must be assigned. For computational simplicity, latitude and longitude are stored as radians.
Fields§
§latitude: f64
Latitude in radians
longitude: f64
Longitude in radians
altitude: f64
Altitude in meters
velocity_north: f64
Velocity north in m/s (NED frame)
velocity_east: f64
Velocity east in m/s (NED frame)
velocity_down: f64
Velocity down in m/s (NED frame)
attitude: Rotation3<f64>
Attitude as a rotation matrix (unchanged)
coordinate_convention: bool
Coordinate convention used for the state vector (NED or ENU; NED is true by default)
Implementations§
Source§impl StrapdownState
impl StrapdownState
Sourcepub fn new(
latitude: f64,
longitude: f64,
altitude: f64,
velocity_north: f64,
velocity_east: f64,
velocity_down: f64,
attitude: Rotation3<f64>,
in_degrees: bool,
ned: bool,
) -> StrapdownState
pub fn new( latitude: f64, longitude: f64, altitude: f64, velocity_north: f64, velocity_east: f64, velocity_down: f64, attitude: Rotation3<f64>, in_degrees: bool, ned: bool, ) -> StrapdownState
Create a new StrapdownState from explicit position and velocity components, and attitude
§Arguments
latitude
- Latitude in radians or degrees (seein_degrees
).longitude
- Longitude in radians or degrees (seein_degrees
).altitude
- Altitude in meters.velocity_north
- North velocity in m/s.velocity_east
- East velocity in m/s.velocity_down
- Down velocity in m/s.attitude
- Rotation3attitude matrix. in_degrees
- If true, angles are provided in degrees and will be converted to radians.ned
- If true, the coordinate convention is NED (North, East, Down), otherwise ENU (East, North, Up).
Trait Implementations§
Source§impl Clone for StrapdownState
impl Clone for StrapdownState
Source§fn clone(&self) -> StrapdownState
fn clone(&self) -> StrapdownState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StrapdownState
impl Debug for StrapdownState
Source§impl Default for StrapdownState
impl Default for StrapdownState
Source§impl From<&StrapdownState> for DVector<f64>
impl From<&StrapdownState> for DVector<f64>
Source§fn from(state: &StrapdownState) -> Self
fn from(state: &StrapdownState) -> Self
Converts a reference to StrapdownState to a DVector
Source§impl From<&StrapdownState> for Vec<f64>
impl From<&StrapdownState> for Vec<f64>
Source§fn from(state: &StrapdownState) -> Self
fn from(state: &StrapdownState) -> Self
Converts a reference to StrapdownState to a Vec
Source§impl From<StrapdownState> for DVector<f64>
impl From<StrapdownState> for DVector<f64>
Source§fn from(state: StrapdownState) -> Self
fn from(state: StrapdownState) -> Self
Converts a StrapdownState to a DVector
Source§impl From<StrapdownState> for Vec<f64>
impl From<StrapdownState> for Vec<f64>
Source§fn from(state: StrapdownState) -> Self
fn from(state: StrapdownState) -> Self
Converts a StrapdownState to a Vec
Source§impl TryFrom<&[f64]> for StrapdownState
impl TryFrom<&[f64]> for StrapdownState
impl Copy for StrapdownState
Auto Trait Implementations§
impl Freeze for StrapdownState
impl RefUnwindSafe for StrapdownState
impl Send for StrapdownState
impl Sync for StrapdownState
impl Unpin for StrapdownState
impl UnwindSafe for StrapdownState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
self
from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.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>
self
from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.