Skip to content

Auto-insert intermediate nav-waypoints between selected waypoints #234

@msupino

Description

@msupino

When the user builds a route by picking just the start and end (or by typing two distant codes via the multi-token search in #223), the planner could detect nav-waypoints that sit close to the great-circle line between them and offer to insert them.

Use case

CVFR flights in Israel hop through published reporting points. A pilot picking LLHZ → HADRA expects the route to thread through BAZRA, DEROR, SHARO automatically rather than having to type each one. This mirrors the way airline FMSes auto-fill enroute waypoints when given just an origin and destination.

Proposed behaviour

  • When a leg is added (drop second waypoint, or multi-token search builds a route), scan navWP for points whose perpendicular distance to the leg's great-circle is below a small threshold (e.g. 2 NM) and whose along-track position is between the two endpoints
  • Show those candidates in a small chip / dropdown next to the leg with an 'add' click — opt-in, not automatic, so the user keeps control over the route
  • Optional: a modifier (e.g. Shift-click drop, or a toggle 'snap-route') that adds them all without confirmation

Scope

  • Detection logic in interact.js or a new helper
  • UI hook: chip / dropdown rendered next to the leg arrow (uses the existing drawLegArrow location)
  • No new data: uses the already-loaded navWP array
  • Should respect Show Navigation Waypoints toggle — if the layer is off, the user is explicitly ignoring nav-WPs and shouldn't be auto-suggested

Edge cases

  • Very long leg (e.g. cross-country) with dozens of candidates — cap the list at a reasonable count
  • User clicks somewhere off-route and types a custom name → don't trigger
  • Reverse-route case: same logic, just the leg endpoints are reversed

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions