How anviktor2411/xp-flight-computer works
XP Flight Computer is a study-oriented flight computer for X-Plane, available as a locally served web app and as an in-simulator plugin. The main workflow is: read live simulator data, expose it to the app, identify the aircraft, and present live values or aircraft-specific performance and calculator results. The web app also provides aircraft study pages, lessons, and equation explanations; the plugin embeds shared JavaScript calculations in an X-Plane window. Edges reflect README statements or sampled/indexed references; unsampled implementation details are not inferred.
Main entry points: app.js Web app · xpfc.py Local web server · plugin.cpp Plugin lifecycle · ui.cpp Plugin window
Components 20
Simulator bridge
- Local web server
xpfc.py - Live sim data
xpfc.py - Runway data
xpfc.py
Web flight tools
- Web app
web/js/app.js - Calculators
web/js/calculators.js - Calculation core
web/js/calc.js - Aircraft profiles
web/js/aircraft.js - Airliner performance
web/js/perf.js - Live value derivation
web/js/derive.js
Study library
- Study topics
web/js/study.js - Aircraft study pages
web/js/acstudy.js - Equation explanations
web/js/explain.js
In-sim plugin
- Plugin window
plugin/src/ui.cpp - Plugin lifecycle
plugin/src/plugin.cpp - JavaScript host
plugin/src/jshost.cpp - Plugin host API
plugin/js/xphost.js
Other components
- Pilot
- Browser
- X-Plane
- Sim user
Connections 23
- Pilot → Browser: uses
README.md - Browser → Local web server: requests app
README.md - Local web server → Browser: serves app
README.md - X-Plane → Local web server: sends live data
README.md - Local web server → Live sim data: builds state
xpfc.py - Local web server → Runway data: indexes airport data
README.md - Web app → Calculators: presents tools
README.md - Calculators → Calculation core: uses calculations
README.md - Web app → Aircraft profiles: detects aircraft
README.md - Web app → Airliner performance: shows performance
README.md - Web app → Live value derivation: derives values
web/js/derive.js - Live value derivation → Calculation core: uses calculations
web/js/derive.js - Web app → Study topics: opens library
README.md - Web app → Aircraft study pages: opens aircraft page
README.md - Web app → Equation explanations: explains equations
README.md - Sim user → X-Plane: flies aircraft
README.md - Sim user → Plugin window: opens plugin
README.md - Plugin lifecycle → JavaScript host: initializes scripts
plugin/src/plugin.cpp - Plugin lifecycle → Plugin window: creates window
plugin/src/plugin.cpp - Plugin window → JavaScript host: calls functions
plugin/src/ui.cpp - Plugin lifecycle → Plugin host API: loads host API
plugin/src/plugin.cpp - Plugin lifecycle → X-Plane: reads simulator
plugin/src/plugin.cpp - Plugin window → Calculation core: shares calculations
README.md