Telemetry data to Raspberry Pi

I am a novice with this system, so please forgive any questions that might be obvious…

I am trying to query Pixhawk telemetry data from my Raspberry Pi Model B using the instructions on this page: … a-mavlink/

I have gotten the link up and running with MAVProxy as instructed, but I am not sure where to go from here. What I am trying to do is have a python script running on my Raspberry Pi that is able to query the state of the vehicle (compass heading), and save it to a file on the Raspberry Pi. I know the Pixhawk can log data, but I am hoping to get the data over to the python script on the RPI so that I can get it time stamped and correlated with the other data that my RPI script is collect from peripherals.

I am still trying to understand MAVProxy, but it seems that I can’t run DroneKit-python commands in scripts on the RPI unless they are run from a script launched within MAVProxy. Is this correct?

Any help would be appreciated. Thanks.


I am trying to do the exact same thing you are.
Did you manage to figure this out?
I would love to hear how you did it.

I believe I have figured it out. Once you obtain your vehicle class, you can call the “attitude” method. It will return tilt, bank and yaw. The latter is supposed to be the heading (compass combined with accelerometer).