MAVLink 2 Packet Format Below is the over-the-wire format for a MAVLink v2 packet. The in-memory representation might differ.
uint8_t magic; ///< protocol magic marker uint8_t len; ///< Length of payload uint8_t incompat_flags; ///< flags that must be understood uint8_t compat_flags; ///< flags that can be ignored if not understood uint8_t seq; ///< Sequence of packet uint8_t sysid; ///< ID of message sender system/aircraft uint8_t compid; ///< ID of the message sender component uint8_t msgid 0:7; ///< first 8 bits of the ID of the message uint8_t msgid 8:15; ///< middle 8 bits of the ID of the message uint8_t msgid 16:23; ///< last 8 bits of the ID of the message uint8_t payload[max 255]; ///< A maximum of 255 payload bytes uint16_t checksum; ///< CRC-16/MCRF4XX
uint8_t signature[13]; ///< Signature which allows ensuring that the link is tamper-proof (optional)