The Data Analysis system in Mission Planner provides tools for loading, visualizing, and analyzing flight log data from ArduPilot vehicles. This system handles high-rate DataFlash logs (.bin, .log) and telemetry logs (.tlog), providing deep insights into vehicle performance, sensor health, and flight events.
The data analysis architecture bridges raw log streams with interactive visualization components. The LogBrowse class Log/LogBrowse.cs39-41 serves as the primary controller, coordinating between the DFLogBuffer ExtLibs/Utilities/DFLogBuffer.cs18-19 parser and UI elements like ZedGraph and GMap.
The following diagram maps the logical data flow to the specific classes and utilities responsible for log processing.
Sources: Log/LogBrowse.cs39-65 ExtLibs/Utilities/DFLog.cs16-17 ExtLibs/Utilities/DFLogBuffer.cs18-25 ExtLibs/Utilities/BinaryLog.cs17-18
The LogBrowse interface provides a multi-pane view for log exploration. It uses DFLogBuffer to manage large files by indexing message offsets ExtLibs/Utilities/DFLogBuffer.cs33-38
ZedGraph to plot message fields Log/LogBrowse.cs30 It supports DataModifer logic Log/LogBrowse.cs68-77 for real-time scaling (*, /), offsetting (+, -), and bitmasking (&) of log data Log/LogBrowse.cs133-164MyDataGridView Log/LogBrowse.designer.cs62 displays raw log entries, allowing users to jump to specific lines Log/LogBrowse.cs184-203DFLogScript allows users to run complex math expressions (e.g., lowpass, delta, wrap_360) against log fields using the mxparser library ExtLibs/Utilities/DFLogScript.cs142-188For details, see Log Browsing.
The engine handles the transition from binary streams to structured objects. It supports both legacy ASCII logs and modern binary logs.
| Class | Responsibility | Key Method/Property |
|---|---|---|
BinaryLog | Handles low-level HEAD_BYTE detection (0xA3 0x95) and binary-to-ASCII conversion. | ReadMessage() ExtLibs/Utilities/BinaryLog.cs123 |
DFLogBuffer | Manages file streams, line indexing, and caching of message offsets. | setlinecount() ExtLibs/Utilities/DFLogBuffer.cs96 |
DFLog | Maintains the logformat dictionary and handles GPS-based time synchronization. | FindMessageOffset() ExtLibs/Utilities/DFLog.cs107-111 |
DFItem | A struct representing a single log line with metadata. | msgtype, time, instance ExtLibs/Utilities/DFLog.cs31-77 |
Sources: ExtLibs/Utilities/DFLog.cs31-151 ExtLibs/Utilities/DFLogBuffer.cs18-57 ExtLibs/Utilities/BinaryLog.cs17-20
Mission Planner integrates elevation services to analyze vehicle height relative to the ground. This involves processing SRTM and GeoTiff data to generate elevation profiles.
For details, see Terrain Data.
The system supports retrieving logs directly from the flight controller via MAVLink and replaying telemetry logs (.tlog).
LogDownloadMavLink class Log/LogDownloadMavLink.cs15-16 manages the request and reception of log chunks using MainV2.comPort.GetLogList() Log/LogDownloadMavLink.cs80 and GetLog() Log/LogDownloadMavLink.cs205MavlinkLog re-reads telemetry packets to reconstruct vehicle state Log/MavlinkLog.cs118-156 It can also convert these logs to KML format for visualization in Google Earth Log/MavlinkLog.cs53-62For details, see Log Download and Telemetry Playback.
Logs can be exported to external formats for advanced scientific analysis:
MatLab utility converts DataFlash logs into .mat files ExtLibs/Utilities/MatLab.cs17LogBrowse context menu Log/LogBrowse.designer.cs87-106Sources: Log/LogBrowse.cs99-106 ExtLibs/Utilities/MatLab.cs17-20 Log/LogDownloadMavLink.cs205-214