Open source tool that builds per-aircraft maintenance and operations records from PX4 ULogs (feedback welcome)

Hi all,

I have been building an open source workbench for small civil fleets. It builds maintenance and operations records from the flight logs operators already have. I would like feedback from people who work with ULogs every day.

What it does with a ULog:

  • Reads it through pyulog and stores one flight record per log, under an aircraft key you give, in a local SQLite file. The raw log is not kept.
  • Refuses a log that pyulog marks as damaged, with a one-sentence reason, and stores nothing from it. Damage pyulog cannot see is read as written, so a stored flight is not proof of a sound log. The release notes give measured numbers for this.
  • Builds a per-aircraft and fleet “Draft records summary for the operator’s own review”. It sets what the tool holds against the three record keeping points of EU 2019/947 UAS.SPEC.050(1)(g): training (never held), maintenance, and operations with unusual occurrences (at most “partly”, since it holds no occurrence report written by a person). It decides nothing.
  • Puts every ledger entry and flight record into a SHA-256 hash chain as it is written. If you keep the printed head outside the store, a later check reports whether the records up to that head are unchanged, not that they are true.

It also reads ArduPilot DataFlash .bin logs. It runs on your own machine: Python 3.12 or later, FastAPI, SQLite, Apache-2.0, no account.

Live demo (static, built by CI from main, which was v0.6.6 at commit c23e82a when I posted this; 7 synthetic aircraft and 2 real aircraft from public logs, each labelled): UAS Sustainment Workbench
Code and README: GitHub - tornidomaroc-web/uas-sustainment-workbench: Open-source maintenance and readiness tool for small civil unmanned aircraft fleets, driven by PX4 and ArduPilot flight logs. · GitHub

The README shows how to load your own logs into a store of their own, kept apart from the demo data.

Recent releases fixed defects found by testing damaged and crafted ULogs. The v0.6.6 notes list the seven known defects that remain; two of them carry measured figures and two more point to the figures in earlier notes. The README steps have been run by hand on Windows only (PowerShell, cmd and Git Bash). CI runs the test suite on Linux and Windows, and nothing has been run on macOS. If a line fails for you, please tell me your shell and Python version.

Honesty note: I wrote this with an AI coding assistant. Verification was done by a separate session of the same assistant, not by a human reviewer. That is one more reason I am asking here.

What would help most:

  1. Run it on one of your own logs and tell me what it got wrong
  2. Point me to log shapes from real firmware versions that you think would break it
  3. Tell me which records you actually keep today and which ones you never get around to

Issues are open on GitHub, and replies here are welcome too.

Thanks for reading.

Hi,

Welcome to the Dronecode community, and thanks for sharing the project.

I reviewed the repository documentation, including the known limitations and the ULog corruption tests. I particularly appreciate the distinction you make between record integrity and the truth of the underlying flight data.

One area I would be interested in exploring is evidence traceability.

Since the workbench stores derived flight records rather than the original ULogs, have you considered recording the SHA-256 hash of each original input file, together with the parser version and extraction configuration?

That could allow an operator to retain the raw log separately while preserving a verifiable link between the original flight evidence and the maintenance record derived from it.

A second question concerns damaged or partially readable logs.

Would it be useful to distinguish between a log that is fully rejected and one that is accepted with explicitly documented uncertainty, without allowing uncertain fields to influence maintenance calculations?

I also noticed your documented limitations around missing aircraft identity, incomplete logging, and unavailable component telemetry. These seem particularly important when such records are later used for independent technical review.

We are working on evidence and assurance infrastructure for autonomous systems at PAMILANGA LIMITED, so the boundary between operational records, source provenance, and reproducible incident reconstruction is of particular interest.

I haven’t independently run your test suite yet, but I would be interested in a focused technical exchange around these questions.

Best regards,
Yiğitcan Öztürk
PAMILANGA LIMITED

Hi Yiğitcan,

Thank you for reading the documentation so closely, and for two very useful questions.

On traceability, you found a real gap. Today the workbench keeps a derived flight record per log, not the log. The upload is copied to a temporary file, read once and removed. It stores no hash of the original file, no parser name or version, and no workbench version or commit beside a record. Every stored flight record and ledger entry is linked into a SHA-256 hash chain, so an edit made directly in the database file shows up when the chain is verified. That chain is computed over the derived record, not the original file. The readers take no extraction setting: what shapes a record is the reader code and the library version installed, and the workbench does not check the pyulog version when it runs. Your idea is now tracked here: Store the SHA-256 of each ingested log file, with the reader and library versions, in its flight record · Issue #147 · tornidomaroc-web/uas-sustainment-workbench · GitHub

On damaged logs, a log is either stored or refused today. A refused log stores nothing, and the refusal says its flight is left out of the counts. Damage that pyulog marks is refused. Damage inside a message that still frames is not seen, because neither a ULog nor a DataFlash log carries a checksum, so such a value is read as written. Inside a stored record each value is either known or marked unknown with the reason in plain words, so a missing value never reads as zero. Unknown values are not dropped from the arithmetic silently; each case has a stated rule. There is no tier for a log that is readable but suspect. While checking your question I also found a defect: a flight with an unknown flight time adds a cycle but no hours, which undercounts hours toward hour-based limits. Both points are here: Mark a stored flight record whose log is readable but suspect, and say how each figure treats it · Issue #148 · tornidomaroc-web/uas-sustainment-workbench · GitHub

The three limits you mention are documented in LIMITS.md: only the flight controller is identified, a log does not always cover a whole flight, and public logs carry no battery identity and almost no ESC telemetry.

If you get a chance to run it on one of your own logs, I would be glad to hear what it gets wrong. Happy to continue here or on the issues, where others can follow too.

Thanks again,
Abdelfettah

A correction to my first post, since I can no longer edit it. A few sentences there claim more than the repository shows:

  1. The title says the tool builds maintenance and operations records from ULogs. More precisely, it reads logs into flight records, keeps a ledger of the maintenance work you enter by hand, and from both works out what is due and drafts a records summary for your own review.
  2. A log that pyulog marks as damaged is refused and nothing is stored, but the reason is not always one sentence: some damaged logs are still refused with a raw or empty reason (issue #128).
  3. Nothing in the repository records a hand run of the README steps, so please read that sentence as unconfirmed. What is recorded: CI runs lint, strict types and the test suite on Linux and Windows, and there is no recorded run on macOS.
  4. The honesty note should read: the code is written with an AI coding assistant, as the Co-Authored-By lines in the commit history show. No person has reviewed it, and no pull request carries a GitHub review.

Sorry for the imprecision.

Useful thread, appreciated.

Hi Abdelfettah,

Thank you for the detailed response and for documenting both suggestions in issues #147 and #148.

I especially appreciate that your follow-up review uncovered the unknown-flight-time accounting defect, now tracked separately in #152.

That illustrates an important distinction: an unknown measurement should not silently become zero when it affects maintenance decisions.

For #147, I think retaining the original file hash together with the reader and library versions would provide a useful foundation for reproducible extraction, while keeping the raw logs under the operator’s control.

For #148 and #152, it may be worth distinguishing the observed log span from verified flight time, and explicitly propagating uncertainty to any affected hour-based maintenance limits.

One possible acceptance criterion would be that missing flight time can never make a maintenance item appear confidently serviceable when the available evidence does not support that conclusion.

I appreciate the transparency in your documentation and the willingness to turn community feedback into actionable issues.

I would be happy to continue the technical discussion through the GitHub issues.

Best regards,
Yiğitcan Öztürk
PAMILANGA LIMITED