Choose a Data Logging Format for PX4 Autopilots
R2026bPX4® provides onboard logging capabilities to support flight analysis and algorithm development. The two logging workflows supported from Simulink® are:
ULog Logging — PX4's native log format, supported with a dedicated Simulink block, designed for efficient recording and review of flight data.
MDF (Measurement Data Format) Logging — A standardized binary format (
.mf4) widely used in automotive and aerospace for logging large, time-synchronized datasets. MDF is designed for sequential logging on MCUs and is ideal for embedded signal logging. MDF file logging provides an efficient alternative to MAT‑file logging for capturing internal Simulink signals and algorithm states, while supporting large, time‑synchronized datasets with minimal runtime overhead.
MDF File Logging Overview
MDF (Measurement Data Format) is a standardized binary format widely used in automotive and aerospace industries. Key advantages of MDF include:
Standardization — Well-defined, standardized format with broad industry adoption.
Use Case Fit — Designed for sequential logging on MCUs, making it ideal for embedded signal logging on autopilots.
Tool Support — Supported by tools such as Vehicle Network Toolbox and Simulation Data Inspector for easy adoption.
Logging Format Comparison
| Workflow | File Format | Description | Simulink Support | Key Features | Best For |
|---|---|---|---|---|---|
| ULog | .ulg | PX4-native log format for system and flight data. | Yes (Simulink block) | Efficient, supported by PX4 tools, widely used | Flight data analysis, sensor debugging, and estimator review using the PX4 ecosystem. Provides a unified view of existing (sensor_accel, etc.) and custom Simulink signals. Commonly used apps: FlightLog Analyser (UAV Toolbox), PX4 Flight Review, PlotJuggler. |
| MDF | .mf4 | Industry-standard, high-performance measurement logging for recording custom Simulink signals. | Yes (from Configuration Parameters) | Standardized, high speed, metadata-rich, extensible | Logging custom or algorithmic signals, advanced engineering analysis, and direct MATLAB integration. |
When to Use Each Format
| Format | When to Use | Complexity | Notes |
|---|---|---|---|
| uLog | Analyze with third-party uLog tools, log PX4 and Simulink signals together | High | Requires custom uORB message and firmware rebuild |
| MDF | Log internal MATLAB/Simulink signals | Low | Easiest and most recommended approach. Supports logging internal MATLAB and Simulink signals to an MDF (.mf4) file. |