pub struct OwnState {
pub slot: u8,
pub lat_deg: f64,
pub lon_deg: f64,
pub alt_rel_m: f64,
pub vn: f64,
pub ve: f64,
pub vd: f64,
pub armed: bool,
pub guided: bool,
pub fix_age: Option<Duration>,
}Expand description
This drone’s own state, as the host already holds it.
Fields§
§slot: u8This drone’s fleet slot.
lat_deg: f64Latitude, degrees.
lon_deg: f64Longitude, degrees.
alt_rel_m: f64Altitude relative to home, metres - the frame every setpoint uses.
vn: f64Velocity north, metres/second.
ve: f64Velocity east, metres/second.
vd: f64Velocity down, metres/second.
armed: boolWhether the flight controller reports armed.
guided: boolWhether the FC reports GUIDED. No setpoint is emitted otherwise.
fix_age: Option<Duration>How long ago the POSITION above was last refreshed by the flight controller.
Not the age of the last message of any kind: a heartbeat keeps arriving
long after a position stops, and that is exactly the case this exists to
catch. None means no position has ever been seen, treated as
infinitely stale.
Trait Implementations§
impl Copy for OwnState
impl StructuralPartialEq for OwnState
Auto Trait Implementations§
impl Freeze for OwnState
impl RefUnwindSafe for OwnState
impl Send for OwnState
impl Sync for OwnState
impl Unpin for OwnState
impl UnsafeUnpin for OwnState
impl UnwindSafe for OwnState
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