Struct tello_edu::TelloState
source · pub struct TelloState {
pub roll: i16,
pub pitch: i16,
pub yaw: i16,
pub height: i16,
pub barometer: f32,
pub battery: u8,
pub time_of_flight: u16,
pub motor_time: u16,
pub temperature_low: i16,
pub temperature_high: i16,
pub velocity: Vector3<i16>,
pub acceleration: Vector3<f32>,
}Expand description
The live state of the drone.
Fields§
§roll: i16Roll angle in degrees.
pitch: i16Pitch angle in degrees.
yaw: i16Yaw angle in degrees.
height: i16Height above launch point in cm
barometer: f32Barometer measurement in cm (height?)
battery: u8Battery level as percentage.
time_of_flight: u16Not sure what this actually is - Tello docs says “time of flight distance in cm”
motor_time: u16The time the motors have been active for, in seconds.
temperature_low: i16Minimum temperature, Celsius.
temperature_high: i16Maximum temperature, Celsius.
velocity: Vector3<i16>Velocity, cm⁻¹
acceleration: Vector3<f32>Acceleration, cms⁻²
Implementations§
source§impl TelloState
impl TelloState
sourcepub fn from_message(s: &str) -> Result<TelloState>
pub fn from_message(s: &str) -> Result<TelloState>
Parses a state string received from the drone.
Example message: “mid:-1;x:-100;y:-100;z:-100;mpry:-1,-1,-1;pitch:0;roll:0;yaw:-3;vgx:0;vgy:0;vgz:1;templ:58;temph:60;tof:71;h:50;bat:82;baro:-57.14;time:14;agx:17.00;agy:-4.00;agz:-956.00;”
Trait Implementations§
source§impl Debug for TelloState
impl Debug for TelloState
source§impl Default for TelloState
impl Default for TelloState
source§fn default() -> TelloState
fn default() -> TelloState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl RefUnwindSafe for TelloState
impl Send for TelloState
impl Sync for TelloState
impl Unpin for TelloState
impl UnwindSafe for TelloState
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