How ericliol/da20-planner works
DA20-C1 Planner is an offline-capable flight-planning training aid. Pilots enter aircraft, loading, departure and arrival details; the app computes weight-and-balance and take-off/landing performance, then presents checks and a printable sheet. Separate branches cover aircraft profiles and documentation, plus METAR/TAF lookup through an optional Worker relay. The calculation layer uses AFM data, chart/table interpolation and runway factors. Edges are limited to relationships shown in the README or SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: App.tsx App shell · WeightBalance.tsx Weight and balance view · PrintSheet.tsx Print sheet · performance.ts Performance orchestration
Components 22
Planner interface
- App shell
src/App.tsx - Weight and balance view
src/components/WeightBalance.tsx - CG envelope
src/components/Envelope.tsx - Loading table
src/components/LoadingTable.tsx - Performance view
src/components/Performance.tsx - Take-off nomogram
src/components/Nomogram.tsx - Print sheet
src/components/PrintSheet.tsx
Weight and balance
- Loading calculations
src/lib/wb.ts - AFM data
src/lib/afm.ts - Saved planner state
src/state.ts
Performance calculations
- Performance orchestration
src/lib/performance.ts - Take-off chart calculation
src/lib/takeoff.ts - Landing table calculation
src/lib/landing.ts - Chart interpolation
src/lib/interp.ts - Runway and regulatory factors
src/lib/factors.ts
Aircraft and weather
- Aircraft profiles
src/components/AircraftEditor.tsx - Aircraft documents
src/components/AircraftDocuments.tsx - Weather lookup
src/components/Weather.tsx - Weather relay client
src/lib/wx.ts - Weather relay
worker/src/index.js
Other components
- Pilot
- Aviation weather service
Connections 28
- Pilot → App shell: enters inputs
README.md - App shell → Weight and balance view: shows tab
src/App.tsx - App shell → Performance view: shows tab
src/App.tsx - App shell → Print sheet: renders
src/App.tsx - App shell → Aircraft profiles: shows tab
src/App.tsx - App shell → Aircraft documents: renders
src/App.tsx - App shell → Weather lookup: shows tab
src/App.tsx - Weight and balance view → Loading calculations: computes loading
src/components/WeightBalance.tsx - Weight and balance view → CG envelope: renders
src/components/WeightBalance.tsx - Weight and balance view → Loading table: renders
src/components/WeightBalance.tsx - Loading calculations → AFM data: uses limits
src/lib/wb.ts - App shell → Saved planner state: loads and updates
src/App.tsx - Saved planner state → Loading calculations: types loading data
src/state.ts - Performance view → Performance orchestration: calculates distances
src/components/Performance.tsx - Performance view → Take-off nomogram: renders
src/components/Performance.tsx - Performance orchestration → Take-off chart calculation: calls
src/lib/performance.ts - Performance orchestration → Landing table calculation: calls
src/lib/performance.ts - Performance orchestration → Runway and regulatory factors: applies factors
src/lib/performance.ts - Take-off chart calculation → Chart interpolation: uses guide curves
src/lib/takeoff.ts - Landing table calculation → Chart interpolation: looks up table
src/lib/landing.ts - Print sheet → CG envelope: renders
src/components/PrintSheet.tsx - Print sheet → Loading table: renders
src/components/PrintSheet.tsx - Print sheet → Take-off nomogram: renders
src/components/PrintSheet.tsx - Aircraft profiles → Saved planner state: updates profiles
src/components/AircraftEditor.tsx - Aircraft documents → AFM data: uses aircraft data
src/components/AircraftDocuments.tsx - Weather lookup → Weather relay client: requests weather
src/components/Weather.tsx - Weather relay client → Weather relay: relays request
README.md - Weather relay → Aviation weather service: fetches METAR/TAF
README.md