AeroCoder

MAVLink Protocol Simulator

22 MICROSERVICES

Step through every MAVLink protocol message by message, with real MAVLink 2 frames, timeouts and retries

Core & connection

Missions, params & files

Flight control

Payloads

Status & safety

Message layouts, CRC_EXTRA and enums come from the official MAVLink common.xml.

Heartbeat / Connection

spec

Every component broadcasts HEARTBEAT, normally at 1 Hz. It is how systems discover each other on a link, learn what kind of vehicle or component is there, and detect when a link drops.

step 1/6 · t = 0 ms

5 frames · 105 bytes

TIMEGCSsys 255 · comp 190Autopilotsys 1 · comp 1
0 msHEARTBEATseq 0 · broadcast20 msNew vehicle: sysid 1 (PX4 quadrotor). Start requesting paramet…320 msHEARTBEATseq 0 · broadcast1.02 sHEARTBEATseq 1 · broadcast1.32 sHEARTBEATseq 1 · broadcast2.02 sHEARTBEATseq 2 · broadcast

HEARTBEAT

id 0

Autopilot (1/1) → broadcast · seq 0

Autopilot announces itself: a PX4 quadrotor in Position mode, standing by.

Fields (wire order)

FieldValue

custom_mode

uint32_t

196608

type

uint8_t

2

MAV_TYPE_QUADROTOR

autopilot

uint8_t

12

MAV_AUTOPILOT_PX4

base_mode

uint8_t

81

MAV_MODE_FLAG_CUSTOM_MODE_ENABLED | MAV_MODE_FLAG_STABILIZE_ENABLED | MAV_MODE_FLAG_MANUAL_INPUT_ENABLED

system_status

uint8_t

3

MAV_STATE_STANDBY

mavlink_version

uint8_t

3

Fields are sorted by type size on the wire; EXT fields are MAVLink 2 extensions. Hover a field for its definition.

MAVLink 2 frame

header

payload

crc

FD09000000010100000000000300020C510303CE72

21 bytes on the wire: 10 header + 9 payload + 2 CRC.

How Heartbeat / Connection works

  • HEARTBEAT is broadcast; it has no target fields.
  • sysid + compid in the frame header identify the sender. A GCS conventionally uses sysid 255.
  • type and autopilot tell the receiver how to interpret the rest (e.g. PX4 custom_mode encoding).
  • A component is considered lost after several missed heartbeats (a few seconds).
  • mavlink_version is 3 for MAVLink 1.0 and newer.