MAVLINK DOCUMENTATION HAS MOVED HERE! The remainder of this documentation is being migrated and deleted. Broken links, etc should be ignored - the content has either been moved or is no longer relevant.

MAVLink Micro Air Vehicle Communication Protocol

MAVLink Logo

MAVLink is a very lightweight, header-only message marshalling library for micro air vehicles.

It can pack C-structs over serial channels with high effiency and send these packets to the ground control station. It is extensively tested on the PX4, PIXHAWK, APM and Parrot AR.Drone platforms and serves there as communication backbone for the MCU/IMU communication as well as for Linux interprocess and ground link communication.

The MAVLink generator was first released early 2009 by Lorenz Meier under LGPL license. The generated output was always considered equal to the input message spec and has since been clarified to be MIT.

Message Specification

The current MAVLink Protocol Version can be looked up here: Common MAVLink Message Documentation

Message documentation is generated for all MAVLink messages automatically and always up-to-date. To get the details of a MAVLink message, please refer to the message lists below. You can additionally generate Doxygen API docs from the MAVLink source.

Protocol Internals

QGroundControl users: Although MAVLink itself does not rely on it, QGroundControl adjusts its views and settings based on the HEARTBEAT MAVLink message. QGroundControl uses this message also to track if a system is alive or if the connection broke. Therefore make sure to send a heartbeat every 60, 30, 10 or 1 second (1 Hz is recommended, but not required)

MAVLink Code and Generator

Instructions how to package MAVLink releases (developers only) can be found here:

MAVLink Ecosystem

License

Frequently Asked Questions (FAQ)

Packet Anatomy

Supported data types

MAVLink supports fixed-size integer data types, IEEE 754 single precision floating point numbers, arrays of these data types (e.g. char[10]) and the special mavlink_version field, which is added automatically by the protocol. These types are available:

  • char - Characters / strings
  • uint8_t - Unsigned 8 bit
  • int8_t - Signed 8 bit
  • uint16_t - Unsigned 16 bit
  • int16_t - Signed 16 bit
  • uint32_t - Unsigned 32 bit
  • int32_t - Signed 32 bit
  • uint64_t - Unsigned 64 bit
  • int64_t - Signed 64 bit
  • float - IEEE 754 single precision floating point number
  • double - IEEE 754 double precision floating point number
  • uint8_t_mavlink_version - Unsigned 8 bit field automatically filled on sending with the current MAVLink version - it cannot be written, just read from the packet like a normal uint8_t field
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 3.0 Unported