TENSORUST // SKUNKWORKS
mavlink-tlog v0.1.4  ·  real frame, encoded + parsed by the crate
MAVLINK 2 ▍

WIRE BUFFER · 40 BYTES · 0xFD … CRC

AWAITING SYNC…
—
The decoder walks the buffer left to right. Each field lights up, its raw bytes resolve to a value, and the checksum is verified against the message CRC_EXTRA.
spec: MAVLink 2 packet framing · mavlink.io/en/guide/serialization

WHY CRC_EXTRA MATTERS — SAME BYTES, TWO DIALECTS

RIGHT DIALECT · GLOBAL_POSITION_INT (#33)
CRC-16/MCRF4XX( bytes[1..38] ) + seed 104
0x7419
≡ frame CRC 0x7419 · PASS
WRONG DIALECT · seed for ATTITUDE (#30)
CRC-16/MCRF4XX( bytes[1..38] ) + seed 39
0x————
 
The CRC_EXTRA seed is a hash of the message's field names and types. A receiver whose message definition disagrees by one field computes a different seed, so the very same wire bytes fail the checksum. That is how MAVLink refuses to decode a frame it would otherwise misread.

MAVLINK 2 PACKET

STX   0xFD      start
LEN   u8        payload bytes
INC   u8        incompat flags
CMP   u8        compat flags
SEQ   u8        sequence
SID   u8        system id
CID   u8        component id
MID   u24 le    message id
PAY   LEN       payload
CRC   u16 le    checksum
[SIG  13        if INC&0x01]
cite: mavlink.io/en/guide/serialization

MSG #33 PAYLOAD

time_boot_ms u32  ms
lat          i32  degE7
lon          i32  degE7
alt          i32  mm (MSL)
relative_alt i32  mm (AGL)
vx vy vz     i16  cm/s
hdg          u16  cdeg
cite: common.xml · GLOBAL_POSITION_INT

DECODE LOG

bytes emitted by mavlink_tlog::encode(V2) · verified by FrameRef::parse(Strict) · offline, no external calls