Files
SamandClaude Sonnet 4.6 393eade8eb feat(apps): Trip Odometer 1.1 — return-to-home, avg speed, min altitude
Builds on 1.0 (already in main). New in 1.1:

- Return to home: records the position of the first GPS fix after Start
  and shows straight-line distance + cardinal bearing back to that point
  each poll. Home is persisted in wada.store (trip_home_lat_e6/lon_e6)
  so reopening mid-trip keeps the original departure point. Clears on Reset.
- Average speed: total_km / elapsed_s × 3600, live tile beside max speed.
- Min altitude: tracked alongside current altitude, persisted via
  wada.store ("trip_minalt"). Clears on Reset.
- Speed derivation: when GPS speed_kmh is absent (non-M9 boards) speed is
  derived from successive fixes; avg speed stays ≤ max speed by construction.
- Layout proportional to screen height: rows fill the space between the speed
  block and the button bar — no overflow on T-Deck (320×240) or V4 (240×276).
- requires: sdk_ext (sys.gps is an ext-SDK function; errors on 2 MB V4 otherwise).

Harness: realistic fixtures (step × 0.0002° ≈ 22 m/2 s ≈ 40 km/h), home
persistence asserted, avg ≤ max by construction in all non-M9 scenarios.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-15 18:55:28 +02:00
..