navi/backend/services
Matt 5894be6d03 fix(offroute): Auto vehicle eligibility — 3-tier paved+flat snap discriminator
Vehicle skips the off-network gate (PR #8), so Auto would pick vehicle for any
Valhalla-snappable point. Add a 3-tier eligibility check before Auto probes
vehicle:
  <=5m            -> on the road, vehicle always ok
  5m..100m        -> vehicle ok only if snapped road is paved AND terrain is flat
  >100m           -> vehicle not ok
Rationale: aggressive 100m snapping in wilderness can route from the wrong start
point; only paved+flat (urban/suburban) earns the grace zone.

- _locate_on_network now returns road_class.
- _is_terrain_flat samples DEM at center + 4 cardinals (FLAT_SAMPLE_RADIUS_M),
  flat if max-min < FLAT_TERRAIN_DELTA_M; DEM errors -> False (conservative).
- _vehicle_eligible implements the 3 tiers; _route_auto drops vehicle from the
  probe order unless BOTH endpoints are eligible.
- 5 new tests cover the tiers; existing probe-iteration tests stub _vehicle_eligible.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 01:29:03 +00:00
..
navi_admin fix: include navi-offroute (8428) in navi-admin fleet list 2026-05-23 23:17:23 -06:00
navi_config Add navi-admin service (extraction #7) (#7) 2026-05-22 21:21:00 -06:00
navi_contacts Add navi-admin service (extraction #7) (#7) 2026-05-22 21:21:00 -06:00
navi_geo shared: promote dem.py to shared/ (prep for navi-offroute) (#9) 2026-05-22 22:42:47 -06:00
navi_landclass Add navi-admin service (extraction #7) (#7) 2026-05-22 21:21:00 -06:00
navi_offroute fix(offroute): Auto vehicle eligibility — 3-tier paved+flat snap discriminator 2026-05-25 01:29:03 +00:00
navi_places decouple: move /api/wiki-rewrite logic from recon to navi-places 2026-05-23 21:12:27 -06:00
navi_traffic Add navi-admin service (extraction #7) (#7) 2026-05-22 21:21:00 -06:00