No description
- C++ 92.8%
- Python 3.6%
- CMake 2.5%
- Shell 1.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Every suite here talked to tools/mock-server, and the backend's suite signed chunks with its own code. Neither proved the pair, and that is exactly where the last three bugs lived: the mock completing orders on the wrong event, the mock dropping events that share a sequence number, and the plugin never emitting the event the backend closes a flight on. All three were invisible because every test ran against its own stand-in. This records a flight through the real recorder and uploads it through the real session to a real flyg-backend. The assertion is that the session completes, which is stronger than it looks: completion requires the server to have acked through the footer's last sequence, and it only acks a chunk whose signature it recomputed and matched. Passing means the socket authenticated, the wire format decoded, two independent implementations of SHA-256 and the key derivation agreed, and every record was stored. It skips itself unless FLYG_BACKEND_URL and FLYG_DEVICE_TOKEN are set, so it never fails a build with no backend to talk to. tools/live-backend-test.sh seeds a device and runs it. Pairing needs a browser and a passkey, so the device row is the one thing the script fakes; the upload is real. Run against a backend on this machine, a flight arrived COMPLETED and VERIFIED with its forty samples, its events and its snapshot, route included. |
||
| .github/workflows | ||
| cmake | ||
| core | ||
| docs | ||
| proto@10ff156171 | ||
| src | ||
| test | ||
| third_party | ||
| tools | ||
| .clang-format | ||
| .clang-format-ignore | ||
| .clang-tidy | ||
| .editorconfig | ||
| .gitignore | ||
| .gitmodules | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| CMakeLists.txt | ||
| CMakePresets.json | ||
| README.md | ||
flyg — X-Plane 12 plugin
flyg is the in-simulator client of the flyg platform (virtual aircraft rental/ownership, jobs, economy). It records verifiable flight tracks, streams them live with a crash-safe offline buffer, and applies platform actions (such as purchased fuel) inside X-Plane 12.
Status: pre-alpha. Requires X-Plane 12.1 or newer.
What it does
- Records every flight to a crash-safe, append-only journal on disk — no flight is lost to a network drop, backend outage, or sim crash.
- Streams live over a WebSocket with ack-based trimming, falling back to HTTPS and resuming cleanly after interruptions.
- Derives flight intelligence — phases (taxi → takeoff → … → shutdown), touchdown rate, and anomaly flags (pause, time acceleration, teleport, fuel jumps, replay, clock drift) — so nothing about a flight is a surprise.
- Applies platform fuel while parked (engines off, brake set), verifying the write and flagging aircraft that ignore it.
- Survives a simulator crash — snapshots the aircraft's configuration as you fly, then puts it back and carries on recording the same flight, with the gap declared for the backend to judge.
- Pairs to your account with a device-code flow, all from a minimal in-sim status window; everything else lives on the website.
Milestones
| Milestone | Scope | Status |
|---|---|---|
| M0 | Skeleton: build, schemas, CI, style gate, ImGui window | ✅ |
| M1 | Recorder: sampler → crash-safe journal, trackdump | ✅ |
| M2 | Auth: device-code flow + mock server | ✅ |
| M3 | Live tracking: WS streaming + offline re-upload | ✅ |
| M4 | Flight intelligence: phases, events, anomalies | ✅ |
| M5 | Fuel + jobs: set_fuel, job display |
✅ |
| M6 | Release readiness: update check, docs, packaging | ✅ |
| M7 | Orders: rental checks, fuel/payload writes, auto-start | ✅ |
| M8 | Integration: recording events close a flight, auto-stop | ✅ |
| M9 | Crash recovery: aircraft snapshots, resume an interrupted flight | ✅ |
Build
cmake --preset dev && cmake --build --preset dev # -> build/dev/flyg/lin_x64/flyg.xpl
ctest --preset dev
See docs/INSTALL.md to install and pair, and to develop against the bundled mock backend.
Documentation
- docs/PLUGIN_PLAN.md — architecture and milestones.
- docs/IMPLEMENTATION_PLAN.md — the build plan and the authoritative wire/journal schemas.
- docs/adr/ — architecture decision records.
Contributing
First-party C++ follows docs/guides/cpp-style.md,
enforced by ./tools/check-style.sh (clang-format is the hard gate). Commits use
:gitmoji: (scope): Imperative subject with no trailers. Run the full green
check — configure + build + ctest + check-style.sh — before every commit.