Flight Log Analysis
This topic outlines approaches and software packages that can be used to analyze PX4 flight logs.
Reporting Flights
Flight Reporting explains how to download a log and report/discuss issues about a flight with the development team.
Structured Analysis
Before analyzing a flight log it is important to establish its context:
If the analysis is done after a malfunction, did the log capture the crash or did it stop mid-air?
Did all controllers track their references? The easiest way to establish this is to compare attitude roll and pitch rates to their set points.
Does the sensor data look valid? Was there very strong vibration (a reasonable threshold for strong vibration is anything with a peak-to-peak of more than 2-3 m/s/s).
If the root cause is not specific to the vehicle make sure to report it with a link to the log file (and video if one exists) on the PX4 issue tracker.
Ruling Out Power Failures
If a log file ends mid-air, two main causes are possible: a power failure or a hard fault of the operating system.
On autopilots based on the STM32 series, hard faults of the operating system are logged to the SD card. These are located on the top level of the SD card and named fault_date.log, e.g. fault_2017_04_03_00_26_05.log. Please always check for the presence of this file if a flight log ends abruptly.
Analysis Tools
Flight Review (Online Tool)
Flight Review is the successor of Log Muncher. It is used in combination with the new ULog logging format.
Key features:
Web based, great for end-users.
User can upload, load and then share report with others.
Interactive plots.
See Log Analysis using Flight Review for an introduction.
pyulog
pyulog is a python package to parse ULog files, along with a set of command-line scripts to extract/display ULog information and convert them to other file formats.
Key features:
Python library for parsing ULog files. Base library used by a number of other ULog analysis and visualisation tools.
Scripts to extract/display ULog information:
ulog_info: display information from an ULog file.
ulog_messages: display logged messages from an ULog file.
ulog_params: extract parameters from an ULog file.
Scripts to convert ULog files to other formats:
ulog2csv: convert ULog to (several) CSV files.
ulog2kml: convert ULog to (several) KML files.
All scripts are installed as system-wide applications (i.e. they be called on the command line - provided Python is installed), and support the -h
flag for getting usage instructions. For example:
Below we see the kind of information exported from a sample file using ulog_info.
pyFlightAnalysis
pyFlightAnalysis is a cross-platform PX4 flight log (ULog) visual analysis tool, inspired by FlightPlot.
Key features:
Dynamic filter for displaying data
3D visualization for attitude and position of drone
Easily replay with pyqtgraph's ROI (Region Of Interest)
Python based, cross-platform.
FlightPlot
FlightPlot is a desktop based tool for log analysis. It can be downloaded from FlightPlot Downloads (Linux, MacOS, Windows).
Key features:
Java based, cross-platform.
Intuitive GUI, no programming knowledge required.
Supports both new and old PX4 log formats (.ulg, .px4log, .bin)
Allows saving plots as images.
PX4Tools
PX4Tools is a log analysis toolbox for the PX4 autopilot written in Python. The recommended installation procedure is to use anaconda3. See px4tools github page for details.
Key features:
Easy to share, users can view notebooks on Github (e.g. 15-09-30 Kabir Log.ipynb)
Python based, cross platform, works witn anaconda 2 and anaconda3
iPython/ jupyter notebooks can be used to share analysis easily
Advanced plotting capabilities to allow detailed analysis
MAVGCL
MAVGCL is an in-flight log analyzer for PX4. It can also be used in offline mode with downloaded uLog files.
Key features:
Realtime data acquisition (50ms sampling, 100ms rolling display) based on MAVLink messages or ULOG data over MAVLink
Timechart annotated by messages (MAVLink and ULog) and parameter changes (MAVLink only)
XY Analysis for selected key-figures
3D View (vehicle and observer perspective)
MAVLink inspector (reporting raw MAVLink messages)
Offline-mode: Import of key-figures from PX4Log/ULog (file or last log from device via WiFi)
Java based. Known to work on macOS and Ubuntu.
And many more ...
PlotJuggler
PlotJuggler is a Qt5 desktop application that allows users to easily visualize and analyze data expressed in the form of time series.
It supports ULog files (.ulg) since version 2.1.4.
Key features:
Intuitive drag&drop interface.
Arrange your data in multiple plots, tabs or windows.
Once you arranged your data, save it into a "Layout" file and reload it multiple times.
Process your data inside PlotJuggler itself, using custom "data transformations".
Source code and downloads are available on Github.
Data Comets
Data Comets is a interactive PX4 flight log analysis tool that allows you to encode flight data onto the flight path, filter and brush the data by time - and much more!
You can use the online version of the tool for small log files (< 32Mb), or run it locally in order to analyze longer flights.
Last updated