Using R or Python to directly manage pixhawk flight logs?


I am new here, please forgive me if this is not the right place to ask this question.

I have a fleet of 6 hexacopters that have 10+ log files from test flights and operations. I have downloaded the flight logs via mavlink onto my computer, and have 6 folders (one for the flight logs of each copter).

I’m wondering if there is a method to manipulate these data to generate a report that shows the history of motor performance (average RPM for each motor for each flight), or battery voltage draw (average V draw per minute), or even average waypoint error for each flight. Essentially, I’d like to have full access to plot these data to generate a graph that had waypoint error on the y axis and # of satellites on the x.

I come from a statistics and environmental datascience background, R is my preferred language. Is python better suited to this task? I’d be grateful for any suggestions or links to existing resources.

Thank you for your help.

I would think Python is the easier choice just because there is already some tooling for it (e.g.

However, you can always just export to csv using pyulog and then import it into R to do whatever :slight_smile:.

Hi Julian,

Thank you for your response.

I was able to install the pyulab (after updating the my outdated pip) and tried to run this line in the command prompt.

C:\Users\bears>ulog2csv “C:\Users\bears\Desktop\example_log.log”

I got an error, it seems that the pyulog is intended to read a Ulog file.

Upon further searching, I have found pymavlink and mavexplorer. I’m not sure if these may be useful.

I realize I should have specified in the first message- I have very many .log files from using mission planner and pixhawks.

Thank you for your help

Ok, so you’re actually using ArduPilot and will probably find more info there: