主要内容

Choose a Data Logging Format for PX4 Autopilots

R2026b

PX4® 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

WorkflowFile FormatDescriptionSimulink SupportKey FeaturesBest For
ULog.ulgPX4-native log format for system and flight data.Yes (Simulink block)Efficient, supported by PX4 tools, widely usedFlight 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.mf4Industry-standard, high-performance measurement logging for recording custom Simulink signals.Yes (from Configuration Parameters)Standardized, high speed, metadata-rich, extensibleLogging custom or algorithmic signals, advanced engineering analysis, and direct MATLAB integration.

When to Use Each Format

FormatWhen to UseComplexityNotes
uLogAnalyze with third-party uLog tools, log PX4 and Simulink signals togetherHighRequires custom uORB message and firmware rebuild
MDFLog internal MATLAB/Simulink signalsLowEasiest and most recommended approach. Supports logging internal MATLAB and Simulink signals to an MDF (.mf4) file.

See Also

Topics