pub struct AltitudeEstimate {
pub altitude_m: f32,
pub velocity_mps: f32,
pub attitude: UnitQuaternion<f32>,
}Expand description
The vehicle’s current vertical state as the AltitudeController consumes it, taken from
VehicleState per its frame contract: altitude and climb rate are
z up, attitude is NED world → FRD body.
§Examples
use stable_flight::controllers::AltitudeEstimate;
use stable_flight::nalgebra::UnitQuaternion;
// 9.5 m, sinking slowly, level.
let estimate = AltitudeEstimate {
altitude_m: 9.5,
velocity_mps: -0.1,
attitude: UnitQuaternion::identity(),
};Fields§
§altitude_m: f32Estimated altitude in meters, up positive.
velocity_mps: f32Estimated vertical velocity in m/s, up positive.
attitude: UnitQuaternion<f32>Estimated attitude, as VehicleState::attitude. Only the
tilt (cos roll · cos pitch) is used, for tilt compensation; yaw is ignored, an inverted
attitude gets no thrust, and a non-finite attitude counts as level.
Trait Implementations§
Source§impl Clone for AltitudeEstimate
impl Clone for AltitudeEstimate
impl Copy for AltitudeEstimate
Source§impl Debug for AltitudeEstimate
impl Debug for AltitudeEstimate
Source§impl PartialEq for AltitudeEstimate
impl PartialEq for AltitudeEstimate
impl StructuralPartialEq for AltitudeEstimate
Auto Trait Implementations§
impl Forget for AltitudeEstimate
impl Freeze for AltitudeEstimate
impl Move for AltitudeEstimate
impl RefUnwindSafe for AltitudeEstimate
impl Send for AltitudeEstimate
impl Sync for AltitudeEstimate
impl Unpin for AltitudeEstimate
impl UnsafeUnpin for AltitudeEstimate
impl UnwindSafe for AltitudeEstimate
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,
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.