#[repr(C, packed(1))]pub struct TelemetryPacket {
pub timestamp_ms: u32,
pub roll: f32,
pub pitch: f32,
pub yaw: f32,
pub pos_z: f32,
pub motor_fl: f32,
pub motor_fr: f32,
pub motor_rl: f32,
pub motor_rr: f32,
pub status_flags: u8,
}Expand description
A packed, fixed-size snapshot of the vehicle state.
§Binary Layout
This struct uses #[repr(C, packed)] to ensure a stable, predictable memory layout
across different platforms. It is exactly 37 bytes (36 for data + 1 for flags).
| Field | Type | Offset |
|---|---|---|
timestamp_ms | u32 | 0 |
roll..pos_z | f32 x 4 | 4-19 |
motor_fl..rr | f32 x 4 | 20-35 |
status_flags | u8 | 36 |
Fields§
§timestamp_ms: u32System uptime in milliseconds.
roll: f32Current Euler angles (Radians).
pitch: f32§yaw: f32§pos_z: f32Vertical position (Altitude) in meters (NED frame).
motor_fl: f32Normalized motor output [0.0 - 1.0].
motor_fr: f32§motor_rl: f32§motor_rr: f32§status_flags: u8Bitmask for system status:
- Bit 0: Armed state (1 = Armed, 0 = Disarmed)
- Bit 1: Failsafe active
- Bit 2: Battery critical
Implementations§
Source§impl TelemetryPacket
impl TelemetryPacket
Trait Implementations§
Source§impl Clone for TelemetryPacket
impl Clone for TelemetryPacket
Source§fn clone(&self) -> TelemetryPacket
fn clone(&self) -> TelemetryPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TelemetryPacket
impl Debug for TelemetryPacket
impl Copy for TelemetryPacket
Auto Trait Implementations§
impl Freeze for TelemetryPacket
impl RefUnwindSafe for TelemetryPacket
impl Send for TelemetryPacket
impl Sync for TelemetryPacket
impl Unpin for TelemetryPacket
impl UnsafeUnpin for TelemetryPacket
impl UnwindSafe for TelemetryPacket
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