Weather should affect fuel consumption #70

Closed
opened 2026-09-21 09:51:28 +02:00 by kamilkrzywda · 0 comments
Owner

Per-airport deterministic weather already exists (lib/weather.ts) but is display-only. Wire it into the simulation:

  • Wind affects fuel burn on each leg in lib/sim/movement.ts: headwind increases consumption, tailwind decreases it (bounded effect, e.g. ±10–20% — tune as needed).
  • Keep the model deterministic so unit tests can pin exact values for a given weather state.
  • If any UI shows fuel-burn previews (refuel-for-flight etc.), reflect the weather-adjusted burn there too.

Implementation notes:

  • Unit tests for the movement math with fixed weather fixtures; e2e where observable in UI. CI-only e2e per AGENTS.md.
Per-airport deterministic weather already exists (`lib/weather.ts`) but is display-only. Wire it into the simulation: - Wind affects fuel burn on each leg in `lib/sim/movement.ts`: headwind increases consumption, tailwind decreases it (bounded effect, e.g. ±10–20% — tune as needed). - Keep the model **deterministic** so unit tests can pin exact values for a given weather state. - If any UI shows fuel-burn previews (refuel-for-flight etc.), reflect the weather-adjusted burn there too. Implementation notes: - Unit tests for the movement math with fixed weather fixtures; e2e where observable in UI. CI-only e2e per AGENTS.md.
kamilkrzywda added the enhancement label 2026-09-21 09:51:28 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: OpenCode/Flight-Ops#70