First-person navigation: course-up pitched camera, maneuver banner and compact strip

Merged
FC
20d ago
+2757-100

Summary

First-person navigation: an app-controlled, course-up, pitched follow camera driven only by accepted native fixes, an original directional puck, a maneuver banner, a compact bottom strip, traveled/remaining route rendering and one cased arrow through the next junction.

native snapshot (+ Kotlin tests)
  upcoming/following maneuvers (ids per routeRevision; type, modifier, street, roundabout exit, coordinate, gap)
  progress offset · snapped position + alignment · speed/course + accuracies · monotonic fix time
camera (pure planner + tests)
  intent: follow | free | overview   (pan → free at gesture start; Ricentra → one 500 ms move)
  per mode: walk ~30° / bike ~45° / car ~50° pitch; puck anchored low between banner and strip
  turn framing 8 / 10 / 12 s ahead; circular bearing filter; hold bearing when stopped
screen
  banner: glyph · big distance · street + action · reserved "Poi …"/status row
  strip: arrival time (estimate, no traffic) · remaining · voice · overview · Interrompi; "Stima sospesa" when position is lost
  route: traveled thin/muted · remaining brand line · cased junction arrow; driving shows one-way arrows, hides business labels
transit: walking camera on access/transfer/final walks (trace only, no turn instructions)

Deferred: 3D buildings, compass heading for walking, lane guidance.

Evidence

Android 16 emulator, replayed 1 Hz traces (walk, bike, drive, day/night, transit access walk), screen recordings + screenshots:

CheckResult
Puck vs target anchor (steady)median 0.08–0.19 %, p95 0.16–0.66 % of screen height (target ±3 %)
Turn framing startbike 10.2 s (10 s window), car 12.4–13.4 s (12 s window); unit tests within one fix for every mode
30 s stationarybearing and zoom stable, no look-ahead
359° → 1°short path, < 8° per fix
Panfollow cancelled in 61–74 ms; reroutes do not move the camera while free
Degraded fixeslook-ahead stops, grey ring puck, "Guida in pausa · Ultima indicazione"
  • bun run verify: typecheck, zero-warning lint, 531 tests. :avoid-navigation:testDebugUnitTest: 87 tests. Rust harness not run (no cargo).
  • Not covered: physical GPS course/speed, frame pacing on the Pixel, screen-off, voice timing, battery, TalkBack/large text by eye.

Merge Danger

Door: two-way

Blast Radius: navigation

Navigation camera, panel and native snapshot; browsing map unaffected (navigation exit restores north-up and flat).


Summary by cubic

Implements first-person road navigation: an app-controlled, course-up, pitched follow camera driven only by accepted native fixes, with a maneuver banner, compact bottom strip, traveled/remaining route rendering and an original directional puck. The native snapshot now carries structured maneuvers and kinematics, and the camera runs as follow, free, or overview without fixes or reroutes ever reclaiming it.

Native snapshot

  • Upcoming and following maneuvers carry raw OSRM type, modifier, roundabout exit, street, coordinate and the gap between them; ids are tied to the route revision and change on reroute.
  • Route progress is measured on the same bridged geometry the interface draws, alongside the snapped position with an alignment state and speed/course with accuracies and monotonic fix time.
  • Payloads never contain null or NaN, and unknown maneuver types keep the supplied text with a neutral glyph rather than a guessed turn.

Camera and screen

  • A pan enters free at gesture start, Ricentra restores the follow pose in one 500 ms move — re-fitting the current leg during a transit ride or wait — and overview frames the remaining route once, north-up and flat.
  • Pitch, zoom and puck anchor are per mode (walk ~30°, bike ~45°, car ~50°); turn framing starts 8/10/12 s ahead with circular bearing filtering, and the bearing holds when stopped. When the provider omits speed or course, the planner estimates them for presentation only, bounded by fix accuracy and a maximum interval, with no motion from stationary jitter.
  • The banner shows the glyph, distance, street and action, with status in its own pill below so a warning is never hidden by the following-maneuver row; the strip shows estimated arrival, remaining time and distance, voice, overview and Stop. Banner and strip heights are fixed so the camera anchor never jumps.
  • The traveled route renders thin and muted under the active remaining line, with one cased arrow through the next junction; driving and cycling hide generic business labels, and driving shows one-way chevrons including reverse one-way roads.
  • Cycling and driving draw at the snapped route position with a bounded look-ahead that stops on degraded fixes, while walking keeps the real offset; leaving guidance returns the browsing map to north-up and flat on the next issued camera command.

Transit access, transfer, and final walks use the walking camera; 3D buildings, walking compass heading and lane guidance remain deferred.

Summary by CodeRabbit

  • New Features

    • Added first-person road guidance with mode-specific camera framing, a live position marker, route progress styling, and maneuver cues.
    • Added compact guidance controls for recentering, viewing the route overview, muting voice guidance, and managing the trip.
    • Improved maneuver details, signal and location information, and transit walking guidance.
  • Documentation

    • Added guidance behavior and Android emulator findings, with notes on what still requires physical-device validation.