码迷,mamicode.com
首页 > 其他好文 > 详细

mavlink 笔记1

时间:2017-06-21 21:02:38      阅读:170      评论:0      收藏:0      [点我收藏+]

标签:sed   wiki   field   ber   tps   rect   pil   evel   loss   

Packet Anatomy

This is the anatomy of one packet. It is inspired by the CAN and SAE AS-4 standards.

技术分享


Byte Index Content Value Explanation
0 Packet start sign v1.0: 0xFE (v0.9: 0x55) Indicates the start of a new packet.
1 Payload length 0 - 255 Indicates length of the following payload.
2 Packet sequence 0 - 255 Each component counts up his send sequence. Allows to detect packet loss
3 System ID 1 - 255 ID of the SENDING system. Allows to differentiate different MAVs on the same network.
4 Component ID 0 - 255 ID of the SENDING component. Allows to differentiate different components of the same system, e.g. the IMU and the autopilot.
5 Message ID 0 - 255 ID of the message - the id defines what the payload “means” and how it should be correctly decoded.
6 to (n+6) Data (0 - 255) bytes Data of the message, depends on the message id.
(n+7) to (n+8) Checksum (low byte, high byte) ITU X.25/SAE AS-4 hash, excluding packet start sign, so bytes 1..(n+6) Note: The checksum also includes MAVLINK_CRC_EXTRA (Number computed from message fields. Protects the packet from decoding a different version of the same packet but with different variables).
    • The checksum is the same as used in ITU X.25 and SAE AS-4 standards (CRC-16-CCITT), documented in SAE AS5669A. Please see the MAVLink source code for a documented C-implementation of it. LINK TO CHECKSUM
    • The minimum packet length is 8 bytes for acknowledgement packets without payload
    • The maximum packet length is 263 bytes for full payload

mavlink 笔记1

标签:sed   wiki   field   ber   tps   rect   pil   evel   loss   

原文地址:http://www.cnblogs.com/qiyuexin/p/7061525.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!