A pure-Go reader, writer, and analysis library for the PX4 ULog format. It reads file-defined schemas dynamically, with reflection and generics available as optional conveniences for Go types.
go get github.com/sunfish-robotics/ulogThe package documentation contains executable examples for the common workflows:
- stream dynamically typed records without materialising the complete log;
- decode selected formats into typed Go structs;
- write records from typed Go structs;
- load a file into column-oriented datasets and export individual datasets as CSV with
pkg/dataset; and - convert datasets to Apache Arrow or Parquet with
pkg/columnar.
ULog F format messages remain authoritative. FormatFor[T], Decode[T], and Register[T] provide optional typed adapters without requiring a matching Go struct to read a file. Numeric arrays and nested formats use flattened paths such as q[0] and position.x. Character arrays remain one string-valued field; scalar char and uint8_t arrays remain byte-valued. Typed string fields declare their wire width explicitly with a tag such as ulog:"name,char[80]".
The root ulog and pkg/dataset packages use only the Go standard library. Importing pkg/columnar adds Apache Arrow.
Wire codecs have golden-byte tests. A committed file written by pyulog is read during ordinary Go tests, while a separate pinned CI job verifies both directions semantically:
Go writer → pyulog reader
Go writer → pyulog rewrite → Go reader
The pinned environment, test implementation, fixture, and provenance live together under tests.
- ULog version 1 writing and forward-compatible header and flag-bit reading
- dynamic primitive, fixed-array, and nested-format data
- streaming and eager reads
- typed and dynamic writing
- information and multi-information, parameters and defaults, logging, and dropouts
- CSV, Arrow record batches, and Parquet output
Appended data sections are rejected rather than silently misread. Multi-information, default-parameter, and tagged-log writing are available at the lower-level pkg/wire boundary but do not yet have root-package writer conveniences.
This project is released under the Apache License, Version 2.0.