Checksum calculation problem

37 views
Skip to first unread message

Bartosz

unread,
Sep 27, 2022, 10:18:56 AM9/27/22
to MAVLink
Hello, 
I have a problem with the checksum calculation, actually with some of the messages like ALTITUDE (#141).  I'm using a python script that collects for me all the frames sent by mavlink, but it doesn't collect all the information for me, due to the fact that the calculated checksum is wrong for some of them. To calculate the checksum I use the following function (this is the script for tests):
image01.png
image02.png
In this case I have a mavlink v2 frame of altitude:
Header: fd 20 00 00 e1 01 01 8d 00 00
Payload: d6 f3 8f 0c 00 00 00 00 32 a5 b8 42 00 00 c0 7f 00 00 c0 7f 00 00 c0 7f 00 00 c0 7f 00 00 c0 7f
Message CRC: e9 52
For example, for Attitude I no longer have this problem, the function counts the checksum correctly. Please help me where I am making a mistake.

Best regards
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages