mavlink是一个用于资源和带宽受限的二进制遥测协议
支持多播传输(multicast transmission)
支持稳定的点对点传输重发(point-to-point tetransmission) 比如mission protocol parameter protocol
mavlink_versionV1.0 2013年发布
mvalink_versionV2.0 2017年发布
V2.0极大地简化了传输
V2.0向下兼容V1.0
v2.0
//mavlink_V1.0
uint8_t magic; ///< protocol magic marker
uint8_t len; ///< Length of payload
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; ///< ID of message in payload
uint8_t payload[max 255]; ///< A maximum of 255 payload bytes
uint16_t checksum; ///< X.25 CRC
//mavlinkg_V2.0
uint8_t magic; ///< protocol magic marker
uint8_t len; ///< Length of payload
uint8_t incompat_flags; ///< flags that must be understood(NEW)
uint8_t compat_flags; ///< flags that can be ignored if not understood(NEW)
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(由8bit 扩展到24bit)
uint8_t msgid 8:15; ///< middle 8 bits of the ID of the message(NEW)
uint8_t msgid 16:23; ///< last 8 bits of the ID of the message (NEW)
uint8_t target_sysid; ///< Optional field for point-to-point messages, used for payload else(NEW 可选)
uint8_t target_compid; ///< Optional field for point-to-point messages, used for payload else(NEW 可选)
uint8_t payload[max 253]; ///< A maximum of 253 payload bytes
uint16_t checksum; ///< X.25 CRC
uint8_t signature[13]; ///< Signature which allows ensuring that the link is tamper-proof(NEW 可选)
mavlink的消息序列化(serialization)使用stable sorting algorithm 算法,避免重复排序
Mavlink是建立在高速率数据流的混合网络上, data sources(Drones) -- data sinks(GCS)
Multicast Streams 接收遥测数据( telemetry streams ),通常有机载计算机、地面站、还有云端系统
Guaranteed Delivery ,像mission、parameters数据,为了确保安全,需要点对点传输
version handsharking(地面站和飞控 版本握手信息)
[148] common/mavlink_msg_autopilot_version.h 定义发送版本信息
[76] common/mavlink_msg_commandl_long/int.h QGC用(commonID 519)MAV_CMD_REQUEST_PROTOCOL_VERSION发送握手信息
[300] common/mavlink_msg_protocol_version.h Drone response
scripts 可以使用pymavlink(https://mavlink.io/en/getting_started/examples_scripts.html)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。