mavlink v1.0のChecksumの計算

mavgenerate.pyで生成したMAV_LINK_MESSAGE_CRCS 
これをCRC_EXTRAとして用いればいいのかな?

27:#define MAVLINK_MESSAGE_CRCS {50, 124, 137, 0, 237, 217, 104, 119, 117, 0, 0, 89, 0, 0, 0, 0, 0, 0, 0, 137, 214, 159, 220, 168, 24, 23, 170, 144, 67, 115, 39, 246, 185, 104, 237, 244, 222, 212, 9, 254, 230, 28, 28, 132, 221, 232, 11, 153, 41, 39, 78, 196, 132, 0, 15, 3, 0, 0, 0, 0, 0, 167, 183, 119, 191, 118, 148, 21, 0, 243, 124, 0, 0, 38, 20, 158, 152, 143, 0, 0, 14, 106, 49, 22, 143, 140, 5, 150, 0, 231, 183, 63, 54, 47, 0, 0, 0, 0, 0, 0, 175, 102, 158, 208, 56, 93, 138, 108, 32, 185, 84, 34, 174, 124, 237, 4, 76, 128, 56, 116, 134, 237, 203, 250, 87, 203, 220, 25, 226, 46, 29, 223, 85, 6, 229, 203, 1, 195, 109, 168, 181, 47, 72, 131, 127, 0, 103, 154, 178, 200, 134, 219, 208, 188, 84, 22, 19, 21, 134, 0, 78, 68, 189, 127, 154, 21, 21, 144, 1, 234, 73, 181, 22, 83, 167, 138, 234, 240, 47, 189, 52, 174, 229, 85, 159, 186, 72, 0, 0, 0, 0, 92, 36, 71, 98, 120, 0, 0, 0, 0, 134, 205, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 69, 101, 50, 202, 17, 162, 0, 0, 0, 0, 0, 208, 207, 0, 0, 0, 163, 105, 151, 35, 150, 179, 0, 0, 0, 0, 0, 90, 104, 85, 95, 130, 184, 81, 8, 204, 49, 170, 44, 83, 46, 0}

テスト用データ

STX: 0xFE
LEN: 0x09 = 9 bytes
SEQ: 0x9C = 156
SYS: 01 (target system ID)
COMP: 01 (target component ID)
MSG: 00 (message id =0)
Payload: 00 00 00 00 02 03 51 03 03
Checksum: AB 1D

チェックサムの計算では0xFEは無視する
bytearray([0x09, 0x9C, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x51, 0x03, 0x03])

Mavlinkのフォーマットはこれを参考に
Koubâa, Anis, et al. "Micro air vehicle link (mavlink) in a nutshell: A survey." IEEE Access 7 (2019): 87658-87680.

f:id:seinzumtode:20210805235328p:plain

f:id:seinzumtode:20210805235420p:plain



メモ(COMMAND_LONGについて)
f:id:seinzumtode:20210805235341p:plain
f:id:seinzumtode:20210805235352p:plain