ULog MAVLink spectra-px4

PX4 / ULog Adapter

Standalone spectra-px4 binary for GPU-accelerated PX4 autopilot visualization — offline ULog browsing and live MAVLink telemetry in a single window.

What It Does

ULog + MAVLink workflows

Offline log browsing and live telemetry share one spectra-px4 plot stack.

PX4 adapter workflows

Offline ULog Analysis

  • Load .ulg flight logs directly
  • Browse all logged topics and fields in a tree panel
  • Drag any field onto an axes to plot it
  • Chunked series for multi-GB logs with bounded memory

Live MAVLink Telemetry

  • UDP connection to PX4 SITL or hardware autopilot
  • Real-time scrolling plots with configurable time window
  • Auto-plot groups for IMU, attitude, GPS, control outputs
  • Side-by-side with replayed log data

Build & Install

The PX4 adapter is enabled by default when its dependencies are present.

cmake -B build -DSPECTRA_USE_PX4=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build --target spectra-px4 -j$(nproc)
./build/spectra-px4 --help
Set -DSPECTRA_USE_PX4=OFF to skip building the adapter and its bundled ULog reader / MAVLink message definitions.

Command-Line Usage

FlagDescriptionDefault
--ulog FILEOpen a ULog file on launch
--host HOSTMAVLink UDP host127.0.0.1
--port PORTMAVLink UDP port14540
--connectAuto-connect to MAVLink on launchoff
--window-s SECReal-time scrolling window length30
--chunkedUse chunked line series (large logs)off
--budget BYTESMemory budget for chunked series (0 = unlimited)0

Common Workflows

Offline log inspection

# Open a single log file
./build/spectra-px4 flight.ulg

# Large log with bounded memory (~512 MB)
./build/spectra-px4 --chunked --budget 536870912 long_flight.ulg

SITL or hardware live telemetry

# Auto-connect to PX4 SITL on default UDP port
./build/spectra-px4 --connect --port 14540

# Connect to a remote autopilot
./build/spectra-px4 --connect --host 192.168.1.42 --port 14550

Mixed mode — log + live

# Open a reference log and connect live for comparison
./build/spectra-px4 --ulog reference.ulg --connect

UI Panels

ULog File Panel

Browse the topic tree of an opened ULog. Expand a topic, drag a field onto any axes, and Spectra creates a series automatically.

Live Connection Panel

Manage the MAVLink UDP link — connect, disconnect, change host / port, and see the per-topic message rate.

Auto-Plot Groups

One-click presets for common PX4 telemetry: IMU accel / gyro, attitude (roll / pitch / yaw), GPS position, motor outputs.

Standard Spectra UI

Docking, command palette, undo / redo, timeline, recording, themes, and workspace save / load all work in spectra-px4.

Related