karim 9aba24978b Auto-install Lua, smooth all panels, airspace overlay + launcher region picker
FlyWithLua auto-install: bridge drops fms-sync/ui-sync/terrain-probe into
X-Plane's FlyWithLua Scripts dir on startup and self-updates (content-compare).
Graceful when no X-Plane / no FlyWithLua. /api/lua/install + status in health.
Desktop app bundles the scripts and passes LUA_SRC_DIR to the sidecar.

Smoothing: shared useEased/useEasedAngle hook (api/ease.js) with render-bail on
settle. VFR steam gauges now interpolate to 60fps instead of stepping at the
~10Hz value stream. MFD ownship no longer vibrates — position/heading eased in a
single rAF loop, follow-pan without animated-panTo pile-up (pauses on range zoom).

Airspace overlay: server/airspace.js loads per-region GeoJSON, classifies
(B/C/D/TMA/CTR/MOA/Restricted/Prohibited/Danger), bbox query, and downloads
regions on demand — FAA (US, key-free) and OpenAIP (Europe, user key). New
AIRSPACE softkey draws chart-coloured boundaries (B blue, C magenta, D dashed),
non-interactive so map-clicks still drop waypoints. Launcher gains a "Lufträume"
section to pick/download regions via the running bridge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-02 13:57:50 +02:00

X-Plane Glass Cockpit (Web)

Bring X-Plane 12 instruments — a G1000-style PFD, an MFD, and an autopilot panel — to any iPad, tablet or laptop on your network. Pure web, no app install on the tablets. Just open a browser.

 X-Plane 12          Node bridge (this repo)            your devices
 ┌──────────┐  ws    ┌────────────────────┐   ws/http   ┌──────────┐
 │ Web API  │◀──────▶│ resolves dataref    │◀───────────▶│  iPad    │
 │ :8086    │  REST  │ IDs, streams values │             │  laptop  │
 │ (local)  │        │ serves the React UI │             │  phone   │
 └──────────┘        └────────────────────┘             └──────────┘
                          binds 0.0.0.0:8080

Why a bridge?

X-Plane's built-in web server (v12.1.1+) only listens on localhost, dataref IDs change every session, and CORS blocks browsers. The bridge runs on the same PC as X-Plane, talks to it locally, and re-broadcasts everything to your LAN — to as many tablets as you like at once.

Requirements

  • X-Plane 12.1.1 or newer (the web API ships built-in; nothing to enable).
  • Node.js 18+ on the PC running X-Plane (node --version).

Setup (run these on the X-Plane PC)

cd X-PLANE-MOD
npm install        # also installs the web app's deps
npm run build      # builds the React UI into web/dist
npm start          # starts the bridge on http://0.0.0.0:8080

Open it

  1. Make sure X-Plane is running and you're in a flight.
  2. On a tablet/laptop on the same Wi-Fi, open: http://<PC-LAN-IP>:8080
    • Find the IP: macOS ipconfig getifaddr en0 · Windows ipconfig (IPv4).
  3. The status pill top-right shows X-PLANE (green) when data is flowing, NO SIM if the bridge is up but X-Plane isn't reachable, OFFLINE if the tablet can't reach the bridge.
  4. Tip: on iPad, "Add to Home Screen" → it opens full-screen like a real app.

Development (hot reload)

npm run dev:bridge   # terminal 1 — the bridge on :8080
npm run dev:web      # terminal 2 — Vite dev server with HMR (proxies to bridge)

Open the URL Vite prints. Edits to web/src/** reload instantly.

Configuration

All env vars are optional (defaults shown):

Var Default Meaning
BRIDGE_PORT 8080 Port the UI/LAN server listens on
XPLANE_HOST localhost Where X-Plane's web API is
XPLANE_PORT 8086 X-Plane web API port

Adding instruments / datarefs

Everything is driven by server/config.js:

  • DATAREFS — values streamed to the UI (alias → sim/... name).
  • WRITABLE_DATAREFS — values the UI may set (knobs/bugs).
  • COMMANDS — buttons the UI may press (mode toggles).

Add a sim/... name there, then read values.<alias> in any component. For G1000-specific gauges, add that aircraft's laminar/... or sim/cockpit2/... datarefs the same way.

Notes & limits

  • Update rate is X-Plane's (~1020 Hz) — fine for instruments, this isn't a scenery stream.
  • The autopilot buttons fire X-Plane's own commands, so the sim stays the source of truth. Mode-highlight bits (AP_BITS in AutopilotPanel.jsx) are best-effort and can differ per aircraft.
  • LAN only by design. Don't expose port 8080 to the public internet.
S
Description
X-Plane G1000 web cockpit + desktop launcher
Readme 1.1 MiB
2026-06-02 16:10:19 +02:00
Languages
JavaScript 74.9%
CSS 16.7%
Lua 2.8%
Rust 2.3%
Shell 1.9%
Other 1.4%