MAVLink 2 truncates any zero-filled bytes at the end of the payload before the message is sent and sets the packet len field appropriately (MAVLink 1 always sends all bytes).MAVLink reorders the message fields in the payload for over-the-wire transmission (from the order in the original XML Message Definitions).The payload field contains the message data.The msgid (message id) field identifies the specific message encoded in the packet.Messages are encoded within the MAVLink packet:
MAVLink does not include information about the message structure in the payload itself (in order to reduce overhead)! Instead the sender and receiver must share a common understanding of the meaning, order and size of message fields in the over-the-wire format. This might include, for example, a flag to indicate that a packet should be treated as "high priority" (such a messages could be handled by any MAVLink implementation because packet format and structure is not affected).Ī MAVLink implementation can safely ignore flags it doesn't understand in the compat_flags field. The packet is signed (a signature has been appended to the packet).Ĭompatibility flags are used to indicate features won't prevent a MAVLink library from handling the packet (even if the feature is not understood). Supported incompatibility flags include (at time of writing): Flag This includes any feature that affects the packet format/ordering.Ī MAVLink implementation must discard a packet if it does not understand any flag in the incompat_flags field. Incompatibility flags are used to indicate features that a MAVLink library must support in order to be able to handle the packet.
Indicates length of the following payload section (fixed for a particular message).
It is primarily intended for developers who are creating/maintaining a MAVLink generator This topic provides detailed information about about MAVLink packet serialization, including the over-the-wire formats for MAVLink v1 and v2 packets, the ordering of fields in the message payload, and the CRC_EXTRA used for ensuring that the sender and reciever share a compatible message definition.