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: i16
Roll angle in degrees.
pitch: i16
Pitch angle in degrees.
yaw: i16
Yaw angle in degrees.
height: i16
Height above launch point in cm
barometer: f32
Barometer measurement in cm (height?)
battery: u8
Battery level as percentage.
time_of_flight: u16
Not sure what this actually is - Tello docs says “time of flight distance in cm”
motor_time: u16
The time the motors have been active for, in seconds.
temperature_low: i16
Minimum temperature, Celsius.
temperature_high: i16
Maximum 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 Freeze for TelloState
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