I have just completed my implementation of of using the MAVLink XML to setup decom tables to process the MAVLink 1.0 stream.  In the process of checking out the decom process I noticed that Messige ID 25 is not properly populated.   Looking at the attached file 07201700.lis  which is a hex dump of some message ID 25 frames you will see that fields satellite_prn, satellite_used, and satellite_elevation are not properly populated.  Fields satellite_azimuth and sattellite_snr are suspect,  The attached file 25.lis is an excerpt from the MAVLink header file defining message ID 25.  I checked it and it matches the MAVLink XML message definition.  This message ID is useful in determining the geometry of the GPS fix.

Thanks,

Warren

Views: 943

Attachments:

Reply to This

Replies to This Discussion

Our gps drivers do not provide values for all fields that exist in the MAVlink message.  I don't remember off the top of my head, but I don't think we are decoding any quality metrics other than the fix type, number of satellites used in the fix, and hdop, pdop and vdop.  Very few users are interested in things like the satellite elevations and azimuths, and adding that capability would take resources from other things.

If it is important for your use you can always branch the code and modify your branch.  You could submit a patch for this for inclusion in the trunk which may or may not get incorporated based on the resources it consumes.

Hi Doug,

Thanks for your explanation.  I am just trying to make sure that I am processing the telemetry data correctly, and not missing something.  The data in this packet is useful in understanding the geometry of the fix, but it is not necessary for my usage of the system.

Thanks,

Warren

Hi Warren,

 

Could you please tell me how to get the .lis files? I'm trying to parse the Mavlink 1.0 packages as you have done, but can not figure out what structure do these packages have. Would be very appreciated if you could let me know where I can get such info.

Thanks,

Hieu.

 

Hi Hieu,

I simply captured the binary data stream from the COM Port.  Then I wrote a quick program to sync up to the MAVLink frames.  One output of of this program is to provide a hex dump of each MAVLink frame.  I annotated the .lis file to show you the frame sync byte and where the message ID is located.  I use the XML file  to define the decom tables that I use to process each MAVLink frame.   Once you can sync up the frames you can apply the XML to decom the data.

I hope this helps,

Warren

Attachments:

Hi Warren,

Many thanks for your prompt response. Now I have more or less understood the structure of Mavlink messages. By the way, you have mentioned about applying the XML file to decom the data, could you tell me how to do so? I'm absolutely new with XML and C#.

Thanks,

Hieu.

Hi Hieu,

Think of the MAVLink frame as a long string of bits, ones (1) and zeros (0).  The XML defines each field as a 'C' variable.  For example uint8_t means that this field is eight (8) bits long; float means that the field is a 32 bit floating bit number.  You simply process each frame as it is identified by the message ID.

I hope this helps,

Warren

Hi Warren,

Many thanks, I'm reading on XML and C# now. It looks like the XML is a kind of database table that C# code can look at to get the info.

By the way, in the data setram I got from COM port there were some message IDs that I couldn't find their meaning. Just wonder where we can find a full description of all the message ID of APM?

 

Hieu.

 

Hi Hieu,

I believe the only place they are defined is the XML and 'C' header files.

Warren

Hi Hieu,
Would you share how to read and write mavlink1.0 data with c#?

Thank you,

Hi Warren,

Sorry for a delayed response and many thanks for your help. I could read and decode the packets from the APM.

 

Hieu.

Hi,

 

Actually I read and write the mavlink 1.0 message in VB6 (I'm a newbie in C#) but you can download the source code of the APM mission planner software, there you can find the procedure for reading and writing Mavlink 1.0 data in the Mavlink.cs.

 

Hieu.

Hieu,
Would you share how to read and write in vb instead ? I've some trouble in reading from apm planner. It just too hard to see.

Seth,

Reply to Discussion

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service