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.binparser →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.binprints the incident timeline.
Known gaps (own these before calling Layer 1 done)
- Thresholds in
vibration.pyare 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_NAMESinerrors.pyis 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.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flightdx-0.1.0.tar.gz.
File metadata
- Download URL: flightdx-0.1.0.tar.gz
- Upload date:
- Size: 53.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f719a263d2acf488f52cb52ef0f670c341fc671a4d4c6b0a87340861e9569016
|
|
| MD5 |
2d14c4b5e89c36c19bdec4a099fc8a29
|
|
| BLAKE2b-256 |
33c5ee4ef9d7fe07f5238bab911349eb007017fc5abacaea166f12af6a506621
|
File details
Details for the file flightdx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: flightdx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 52.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5404e608fb4cee0637c0a67c7039e88407558732f0dd5929c94bd5dd000df875
|
|
| MD5 |
a4a9a43cef90db1d55796eae5b80357e
|
|
| BLAKE2b-256 |
cbdb3e115c0c3c7fa634819883df972bd0e4f80b88f66cd1702f04c0ddf68a07
|