Skip to main content

Module ulog

Module ulog 

Source
Expand description

PX4 ULog flight logs (.ulg).

A ULog file describes its own messages: format definitions (F) give each topic’s fields, subscriptions (A) give a topic and instance a message id, and data messages (D) carry that id and the fields packed end to end. One pass over the file reads the definitions and records where each subscription’s data messages start (crate::formats::indexed); each topic and instance is then a table decoded from a map of the file. Parameters, logged text and info messages are read in the same pass: the first two as tables of their own, info and parameters on the Info tab.

Every length is bounded: a message by its 16-bit size and the file’s end, a field list by MAX_COLUMNS, nesting by MAX_DEPTH, the text kept by its counts. A corrupt stretch is passed over to the next sync marker and counted.

Structs§

Index
What one pass over a ULog file found.
Topic
A subscription: a topic’s instance and where its data messages start.

Constants§

LOGGED
The table of the log’s text messages, and of its parameters.
MAGIC
The first seven bytes of every ULog file; the eighth is its version.
MAX_COLUMNS
Columns one topic may make, nested types and arrays of them flattened.
PARAMETERS

Functions§

index
Index the ULog file in data: one pass, start to end.
looks_like
Whether head, the first bytes of a file, begins a ULog file.