Skip to main content

flightdx

Deterministic ArduPilot flight-log anomaly detection. Layer 1 of the AI Log Analyzer portfolio project — see AI-LOG-ANALYZER-SPEC.md (in Rahul website/plans/) for the full 5-layer plan (this repo is Layer 1; RAG, agent orchestration, and eval land in later layers, likely as additions to this same repo).

Data policy: no operational/employer flight logs in this repo, ever. Use public ArduPilot sample logs or your own personal (non-defense) test flights only. See AI-LOG-ANALYZER-SPEC.md and FOCUS.md for why.

Why the LLM never sees the raw log

flightdx parses a .bin/.log dataflash file into a normalized ParsedLog, then runs pure-function detectors over it to produce a compact IncidentTimeline. That timeline — not the raw log — is what later layers hand to an LLM. Reasons: token cost, hallucination risk, and having a ground-truth layer that's independent of the model so the model can be measured against it in Layer 4.

Setup

python -m venv .venv
.venv\Scripts\activate
pip install -e .[dev]

Run

flightdx path\to\log.bin

Test

pytest

Detector tests use synthetic fixtures (plain dicts), not real log files — see tests/test_detectors.py. Real-log validation against the "10 real logs" done-when criteria in the spec is a separate, later step.

Layout

  • src/flightdx/schema.py — Evidence / Incident / IncidentTimeline / ParsedLog. This is the stable contract every later layer builds on.
  • src/flightdx/parsers/dataflash.py — pymavlink-based .bin parser → ParsedLog. ULog (.ulg, via pyulog) parser lands here too once dataflash is validated on real logs.
  • src/flightdx/detectors/ — one pure function per failure mode, each unit-tested. Currently: vibration.py (VIBE + accel clipping), errors.py (ERR/EV decoding). Still to add: EKF innovations, GPS glitches, power/battery, motor asymmetry (RCOU saturation), attitude divergence, mode-change timeline.
  • src/flightdx/cli.py — flightdx log.bin prints the incident timeline.

Known gaps (own these before calling Layer 1 done)

  • Thresholds in vibration.py are placeholders — starting points from general ArduPilot guidance, not verified against current docs or tuned from field data. Fix before the Layer-4 eval numbers mean anything.
  • SUBSYS_NAMES in errors.py is incomplete and may be stale — cross-check against the firmware version actually producing your test logs.
  • No real logs tested yet. Next step: either source personal (non-defense) ArduPilot logs, or generate them via SITL (reproducible, and lets you construct known-failure scenarios on purpose — useful for the Layer-4 labeled eval set later, not just Layer 1).
  • Detectors so far: vibration + errors only. EKF/GPS/power/motors/attitude/mode-timeline are in the spec but not yet built.

Metadata

Release files for flightdx 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flightdx 0.1.0
File Size Uploaded
flightdx-0.1.0.tar.gz 53.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flightdx 0.1.0
File Interpreter ABI Platform
flightdx-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 106.7 kB

Release files / flightdx-0.1.0.tar.gz

Download URL flightdx-0.1.0.tar.gz
Size 53.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f719a263d2acf488f52cb52ef0f670c341fc671a4d4c6b0a87340861e9569016
BLAKE2b-256 checksum
How to use checksums
33c5ee4ef9d7fe07f5238bab911349eb007017fc5abacaea166f12af6a506621
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / flightdx-0.1.0-py3-none-any.whl

Download URL flightdx-0.1.0-py3-none-any.whl
Size 52.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5404e608fb4cee0637c0a67c7039e88407558732f0dd5929c94bd5dd000df875
BLAKE2b-256 checksum
How to use checksums
cbdb3e115c0c3c7fa634819883df972bd0e4f80b88f66cd1702f04c0ddf68a07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page