Raw data from ArduPilot using Mission Planner? [hacking Mission Planner]

724 views
Skip to first unread message

Sean Hudson

unread,
Nov 27, 2014, 1:22:45 PM11/27/14
to drones-...@googlegroups.com
Hello,

Background:
I am attempting to read the raw telemetry data from my Ardupilot chipset by decoupling Mission Planner's transmission/receiving of the data from the GUI so I can build a custom interface.

[Ardupilot] --- transmits telemetry --- is received by ---> [Mission Planner] --- parses and displays data on ---> [GUI]

I would like to separate this before Mission Planner, and just get a package of raw data that I can parse for my own use. Values I am seeking: altitude, pitch, yaw, x/y/z G or directions, GPS location... Essentially everything that is used to put together the main MP screen.

I am using Ardupilot as a tracking device for an off-road vehicle, because the chipset was available to me, and Mission Planner is open source.

Problem:
I am having difficulty finding where the mission planner software receives the telemetry data, so what I'm wondering is:
 - does anyone have experience with intercepting the telemetry data
 - if not, could you suggest some techniques I could use to find the transfer point from antenna to MP
 - I do not have experience with desktop application development so I am unaware of what to investigate first... this is a huge project!

Tried so far:
I have stepped through the MP software and found on MainV2.cs :: SerialThread() possibly does the data reading with comPort.readPacket() but there is a lot of code in readPacket parent class I do not understand (parent class is MAVLinkInterface.cs).
I was also investigating the MainV2 :: PluginThread() for what the Plugins are, but I'm unable to figure out how it relates to the Ardupilot as of yet.

There was a piece of code that I discovered late the other night, but I failed to write down it's location (double dang...), but it was a hashtable of the values I was seeking: altitude, pitch, yaw, x/y/z G or directions, that sort of data


Any help or tips is greatly appreciated!!

Sean

Craig Elder

unread,
Nov 27, 2014, 1:55:27 PM11/27/14
to drones-discuss

I suggest you read about the MAVlink message definitions and look at the tlogs that Mission Planner creates. You will find the raw data you are looking for in those messages and can then extract or display the data as you wish.

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Evan Slatyer

unread,
Nov 27, 2014, 7:22:41 PM11/27/14
to drones-...@googlegroups.com
Hi Sean,

There are two easier ways to go about this.

One is to use MAVProxy, which is already set up for sharing out the data. If appropriate, you can just grab the MAVProxy console and modify it to suit your needs (that's what I did for my ground station). If that's not suitable then you can write a new interface that still uses the MAVProxy internals.

The other option is to write your own MAVLink reader. The MAVLink protocol is not very difficult to implement in C or C++ (especially if you only want a few messages) and the 3DR radios just appear as serial ports.

Cheers,
Evan
Reply all
Reply to author
Forward
0 new messages