MAVLink Protocol Version

The current MAVLink version is 2.2. The minor version numbers (after the dot) range from 1-255.

MAVLink Type Enumerations

MAV_AUTOPILOT

Micro air vehicle / autopilot classes. This identifies the individual model.

Value Field Name Description
0 MAV_AUTOPILOT_GENERIC Generic autopilot, full support for everything
1 MAV_AUTOPILOT_PIXHAWK PIXHAWK autopilot, http://pixhawk.ethz.ch
2 MAV_AUTOPILOT_SLUGS SLUGS autopilot, http://slugsuav.soe.ucsc.edu
3 MAV_AUTOPILOT_ARDUPILOTMEGA ArduPilotMega / ArduCopter, http://diydrones.com
4 MAV_AUTOPILOT_OPENPILOT OpenPilot, http://openpilot.org
5 MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY Generic autopilot only supporting simple waypoints
6 MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY Generic autopilot supporting waypoints and other simple navigation commands
7 MAV_AUTOPILOT_GENERIC_MISSION_FULL Generic autopilot supporting the full mission command set
8 MAV_AUTOPILOT_INVALID No valid autopilot, e.g. a GCS or other MAVLink component
9 MAV_AUTOPILOT_PPZ PPZ UAV - http://nongnu.org/paparazzi
10 MAV_AUTOPILOT_UDB UAV Dev Board
11 MAV_AUTOPILOT_FP FlexiPilot

MAV_TYPE

Value Field Name Description
0 MAV_TYPE_GENERIC Generic micro air vehicle.
1 MAV_TYPE_FIXED_WING Fixed wing aircraft.
2 MAV_TYPE_QUADROTOR Quadrotor
3 MAV_TYPE_COAXIAL Coaxial helicopter
4 MAV_TYPE_HELICOPTER Normal helicopter with tail rotor.
5 MAV_TYPE_ANTENNA_TRACKER Ground installation
6 MAV_TYPE_GCS Operator control unit / ground control station
7 MAV_TYPE_AIRSHIP Airship, controlled
8 MAV_TYPE_FREE_BALLOON Free balloon, uncontrolled
9 MAV_TYPE_ROCKET Rocket
10 MAV_TYPE_GROUND_ROVER Ground rover
11 MAV_TYPE_SURFACE_BOAT Surface vessel, boat, ship
12 MAV_TYPE_SUBMARINE Submarine
13 MAV_TYPE_HEXAROTOR Hexarotor
14 MAV_TYPE_OCTOROTOR Octorotor
15 MAV_TYPE_TRICOPTER Octorotor
16 MAV_TYPE_FLAPPING_WING Flapping wing

MAV_MODE_FLAG

These flags encode the MAV mode.

Value Field Name Description
128 MAV_MODE_FLAG_SAFETY_ARMED 0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly.
64 MAV_MODE_FLAG_MANUAL_INPUT_ENABLED 0b01000000 remote control input is enabled.
32 MAV_MODE_FLAG_HIL_ENABLED 0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational.
16 MAV_MODE_FLAG_STABILIZE_ENABLED 0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around.
8 MAV_MODE_FLAG_GUIDED_ENABLED 0b00001000 guided mode enabled, system flies waypoints / mission items.
4 MAV_MODE_FLAG_AUTO_ENABLED 0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation.
2 MAV_MODE_FLAG_TEST_ENABLED 0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations.
1 MAV_MODE_FLAG_CUSTOM_MODE_ENABLED 0b00000001 Reserved for future use.

MAV_MODE_FLAG_DECODE_POSITION

These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not.

Value Field Name Description
128 MAV_MODE_FLAG_DECODE_POSITION_SAFETY First bit: 10000000
64 MAV_MODE_FLAG_DECODE_POSITION_MANUAL Second bit: 01000000
32 MAV_MODE_FLAG_DECODE_POSITION_HIL Third bit: 00100000
16 MAV_MODE_FLAG_DECODE_POSITION_STABILIZE Fourth bit: 00010000
8 MAV_MODE_FLAG_DECODE_POSITION_GUIDED Fifth bit: 00001000
4 MAV_MODE_FLAG_DECODE_POSITION_AUTO Sixt bit: 00000100
2 MAV_MODE_FLAG_DECODE_POSITION_TEST Seventh bit: 00000010
1 MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE Eighth bit: 00000001

MAV_STATE

Value Field Name Description
0 MAV_STATE_UNINIT Uninitialized system, state is unknown.
MAV_STATE_BOOT System is booting up.
MAV_STATE_CALIBRATING System is calibrating and not flight-ready.
MAV_STATE_STANDBY System is grounded and on standby. It can be launched any time.
MAV_STATE_ACTIVE System is active and might be already airborne. Motors are engaged.
MAV_STATE_CRITICAL System is in a non-normal flight mode. It can however still navigate.
MAV_STATE_EMERGENCY System is in a non-normal flight mode. It lost control over parts or over the whole airframe. It is in mayday and going down.
MAV_STATE_POWEROFF System just initialized its power-down sequence, will shut down now.

MAVLink Commands (MAV_CMD)

MAVLink Messages

HEARTBEAT ( #0 )

The heartbeat message shows that a system is present and responding. The type of the MAV and Autopilot hardware allow the receiving system to treat further messages from this system appropriate (e.g. by laying out the user interface based on the autopilot).

Field Name Type Values Description
type uint8_t MAV_TYPE Type of the MAV (quadrotor, helicopter, etc., up to 15 types, defined in MAV_TYPE ENUM)
autopilot uint8_t MAV_AUTOPILOT Autopilot type / class. defined in MAV_AUTOPILOT ENUM
base_mode uint8_t System mode bitfield, see MAV_MODE_FLAGS ENUM in mavlink/include/mavlink_types.h
custom_mode uint32_t A bitfield for use for autopilot-specific flags.
system_status uint8_t MAV_STATE System status flag, see MAV_STATE ENUM
mavlink_version uint8_t_mavlink_version MAVLink version