Skip to main content

SkyTrace

CI PyPI Python License

Flight log analysis for PX4 (.ulg) and ArduPilot (.bin) drones: rule and anomaly detectors, an offline HTML report, a web UI, and a Q&A assistant whose every number is checked against the log. Runs fully locally (local LLM, local documentation index), with an enforced offline mode.

SkyTrace web UI: findings, timeline and the evidence plot of a finding

What it does

  • Parses PX4 ULog and ArduPilot DataFlash logs into one schema (attitude, GPS, battery, vibration, motors, position, events).
  • Detects problems with rule-based detectors (vibration and accelerometer clipping, GPS accuracy / fix / data loss, battery sag and low charge, attitude tracking, motor saturation and imbalance) and, optionally, unsupervised anomaly detection (rolling robust z-score per signal and flight mode).
  • Reports each finding with its time range, the value against its threshold and an evidence plot: a single-file HTML report that opens offline, JSON, or a terminal table.
  • Answers questions about the log ("When did the GPS fail?", "Titreşimi nasıl azaltırım?"): a LangGraph agent with tools over the parsed log, a local model by default (Ollama), and a verification step that flags every number, finding id or link that no tool returned. "Why / how to fix" questions are answered from the PX4 and ArduPilot documentation, with links to the pages used.
  • Web UI with the findings, interactive plots and the chat side by side; works on phones too.

Quick start

pip install "skytrace[web]"
skytrace analyze flight.ulg              # -> flight.html, findings in the terminal
skytrace serve                           # web UI on http://127.0.0.1:8000

The assistant needs a model. The default is local (Ollama):

ollama pull qwen2.5:7b
skytrace chat flight.ulg --ask "What went wrong in this flight?"

Optional documentation search for the assistant (downloads the PX4 and ArduPilot docs once, about 3 minutes, everything stays in data/):

ollama pull bge-m3
skytrace docs build

No log at hand? samples/ has three simulated flights (GPS loss, weak motor, low battery) and a short real VTOL flight; skytrace serve started in the repository offers them in the UI. A sample report (the weak-motor flight, HTML download) is attached to each release.

Usage

skytrace analyze flight.bin --format json -o out.json   # ArduPilot, JSON
skytrace analyze flight.ulg --ml                        # + anomaly detection
skytrace chat flight.ulg                                # interactive Q&A
skytrace chat flight.ulg --model gemini/gemini-3.5-flash  # any LiteLLM model
skytrace docs search "vibration too high"               # the documentation index
skytrace serve --port 8080
from skytrace import FlightLog, load_config
from skytrace.detectors import run_detectors

log = FlightLog.from_file("flight.ulg")
for f in run_detectors(log, load_config()).findings:
    print(f.id, f.severity, f.t_start, f.summary)

Every threshold and default is configurable (-c my.yaml overrides src/skytrace/defaults.yaml) and documented in docs/thresholds.md.

Upload page with the sample flights Chat on your own logs runs locally
Upload page Demo: chat on own logs only locally

Offline mode

SKYTRACE_MODE=offline guarantees that nothing leaves the machine: the chat and embedding models must be local, every outgoing connection except to the model server is refused (an error instead of a silent leak), and nothing is downloaded at run time. The web UI shows the mode in its status bar.

export SKYTRACE_MODE=offline        # PowerShell: $env:SKYTRACE_MODE = "offline"
skytrace serve

With Docker (Ollama + SkyTrace; the first start downloads the models):

docker compose up --build                                                  # CPU
docker compose -f docker-compose.yml -f docker-compose.gpu.yml up --build  # GPU >= 6 GB

Use the GPU override only if the model fits in GPU memory: on a 4 GB laptop GPU the split model ran ten times slower in Docker than on the CPU alone. Give Docker enough memory (Windows: memory=11GB under [wsl2] in %USERPROFILE%\.wslconfig).

The app image is also published: ghcr.io/beyzanurulu/skytrace (it expects a model server, see docker-compose.yml). An all-in-one image with the models and the documentation index inside (about 9.5 GB, built locally, not published) runs with no network at all:

skytrace docs build
docker build -f docker/Dockerfile.bundle -t skytrace:bundle .
docker run --rm --network none skytrace:bundle python eval/offline_e2e.py

Results

All numbers come from the scripts in eval/; details in eval/results/.

Detectors on 35 labelled flights (PX4 SITL with injected GPS, battery and motor faults, plus clean flights; match = same detector, IoU >= 0.3):

Detector Labelled faults Found Findings Precision Recall
GPS 8 8 8 1.00 1.00
Battery 7 7 7 1.00 1.00
Motors 8 8 223 0.10 1.00
Attitude 1 1 34 0.03 1.00
Vibration 0 – 37 0.00 –

Every fault is found, but the motor, attitude and vibration detectors also raise many findings outside the labelled fault windows (see Limitations).

Assistant on 11 questions about a log (expected tools called, every number backed by a tool output, key facts present):

Model Passed Median latency
qwen2.5:7b, local (laptop, RTX 3050 4 GB) 9 / 11 25 s
gemini-3.5-flash, cloud 11 / 11 15 s

Offline: the end-to-end check in a container with --network none passes 7 / 7 (analysis, report, documentation search, two verified answers, web API; the deliberate connection to the internet is refused, nothing else tries).

Limitations

  • Evaluation data is mostly simulated. The labelled set is PX4 SITL; 95 public Flight Review logs (real PX4 flights) were used to calibrate thresholds but are not labelled. ArduPilot parsing is tested, but no ArduPilot flight was used for calibration or evaluation.
  • Precision is low for motors and attitude (many findings outside the fault window: a failing motor disturbs the whole flight), and SITL flights trigger a one-sample accelerometer-clipping warning at landing.
  • The PX4 vibration level is not checked. A calibration on 17 real flights did not separate good from bad ones (false-alarm rate 1.00 on the test half), so the thresholds stay unset and the check is reported as skipped. ArduPilot uses the limits recommended by the ArduPilot documentation (30 / 60 m/s²), not calibrated on flights. Clipping is checked for both.
  • The local 7B model misses facts in about 1 of 5 answers and is slow on documentation questions (90-105 s on a 4 GB GPU). The verification step flags invented numbers, ids and links, but cannot judge whether a backed number is used correctly.
  • The web UI has no authentication; it is meant for localhost. Chat sessions live in memory (a restart starts them over); uploads are deleted after 24 hours.
  • Python 3.11 and 3.12 are tested; Linux and Windows.

Contributing

See CONTRIBUTING.md for the development setup, the checks and how to add a detector. Changes are listed in CHANGELOG.md.

License and sources

Apache License 2.0, see LICENSE and NOTICE.

  • tests/fixtures/sample_log_small.ulg (also samples/px4_vtol_short.ulg) is the test log of PX4/pyulog (BSD-3-Clause).

  • samples/px4_sitl_*.ulg were flown for this project in PX4 SITL.

  • skytrace docs build downloads documentation to the user's machine; none of it is part of this repository or its packages. Passages returned by the assistant link to their source page:

    Excerpts are split at headings and markup is removed; the text is otherwise unchanged.

Metadata

Release files for skytrace 1.0.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 skytrace 1.0.0
File Size Uploaded Provenance Actions
skytrace-1.0.0.tar.gz 542.5 kB With provenance Details for skytrace-1.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 676.2 kB

Release files / skytrace-1.0.0.tar.gz

Download URL skytrace-1.0.0.tar.gz
Size 542.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2f09f07fcf174f5fa0b85a528b77346a59723a0fc11e25365d76f83ae9caf994
BLAKE2b-256 checksum
How to use checksums
c148e7d49377dbbd63fbc662098fa96a76374b3efcda8ea5a337828eb6bdd080
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / skytrace-1.0.0-py3-none-any.whl

Download URL skytrace-1.0.0-py3-none-any.whl
Size 133.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4268d66073e80e82a8feaf269cd8c0b2be443490afd11d1b8e11342d57c9f7a6
BLAKE2b-256 checksum
How to use checksums
de9baa0cc8d9458313b8e803a472fd4e671ecc5fc43f354f7bfc58d25b7d174d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for skytrace 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for skytrace-1.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files Full provenance

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