From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-21-2014 07:38 AM
Thanks for replying
Now I can see data like this FE 09 4E 01 01 00 00 00 00 00 02 03 51 04 03 1C 7F
Still trying to understand how this becomes flight data but I found this website which talks about it.
http://eastbay-rc.blogspot.com/2013/04/mavlink-protocol-notes-packet-decoding.html
02-21-2014 12:28 PM
yep. take a look here.
explains the packet structure.
02-24-2014 11:27 AM
Hey guys, I was able to get this far. I'm not sure how to binary operations like logic shifts in Labview so I used a boolean array to represent the checksum.
However, it is not displaying what the MAVlink calculated as a checksum. I might be understanding the protocol wrong.....
02-24-2014 02:29 PM
Hey I dont know if this helps but founds this vi for calulating checksum.
http://diydrones.com/forum/topics/mavlink-1-0-checksum-protocol
02-26-2014 12:24 PM
Yea, I looked at that, for some reason, it doesn't compute the correct checksum..
I'm re-writing mine today, so we'll see if I succeed.
02-26-2014 04:16 PM
It works!!!. I found my main program to be catching the wrong checksum values. I need to see what the heck is going on there.
But this simple VI works. I need to make an array table for the CRC_EXTRA byte to add at the end of payload data.
02-27-2014 11:56 AM
Heres what I got so far which seems to work at least reading heartbeat. Now I need to find out how to convert the payload data to useful values via labview
any Ideas?
Thanks
02-28-2014 06:03 PM
It looks like all you have left to do is pull out those 9 data bytes from each message and convert the hex to a decimal, then apply whatever scale factor applies.
03-03-2014 10:17 AM
Thanks Karl
It pobbley would of took me two weeks to figure that out.
Quick question and I think maxmus083 stated talking about this. How would you be able to produce the right CRC values to check the checksum?
I know that the common.h contains which extra checksum value to use for exmaple Heartbeat (MAVLINK_MESSAGE_LENGTHS) 9 = 50 (MAVLINK_MESSAGE_CRCS) . How would I appached which value to use if some Mavlink Messages have the same lengths(blue)?
#define MAVLINK_MESSAGE_LENGTHS {9,31,12,0,14,28,3,32,0,0,0,6,0,0,0,0,0,0,0,0,20,2,25,23,30,101,22,26,16,14,28,32,28,28,22,22,21,6,6,37,4,4,2,2,.....}
#define MAVLINK_MESSAGE_CRCS
{50,124,137,0,237,217,104,119,0,0,0,89,0,0,0,0,0,0,0,0,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,......}
03-03-2014 11:51 AM
the CRC extra is added by message ID alone. so each array field number corresponds with the message ID.
so for heart beat, which is 00, corresponds with number 50 for crc extra, which in hex is 32.
there are total of 255 possible message ID's, and you will find that the array below is also 255 fields long.
so message id and crc looks like.
0, 1, 2, 3, 4, 5,... etc. with..
50,124,137,0,237,217,104,119,0,0,0,89,0,0,0,0,0,0,0,0,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,...... each one. get it?
hope that helps.