GeometryEnricher heading-delta fallback #29

Open
opened 2026-08-31 17:14:45 +02:00 by robert · 0 comments
robert commented 2026-08-31 17:14:45 +02:00 (Migrated from git.butzei.de)

Goal

The always-available last resort: derive turns from the shape of the track alone.

Acceptance criteria

  • Heading change computed between consecutive simplified segments
  • Over 25 degrees classified a turn, over 70 degrees a sharp turn, left and right distinguished
  • Clusters of small deltas merged so a curve does not emit a burst of cues
  • No street names - the watch shows distance and arrow only
  • Works entirely offline with no dependencies
  • Output compared against a BRouter cue sheet on a known route and the differences documented

Files

  • companion/.../route/enrich/GeometryEnricher.kt

Update — 2026-09-01: this is the default path, so it has to be less crude

D13 makes online enrichment opt-in, and BRouter needs a separate install plus segment files — so
until #64 lands, the geometric heuristic is what most new users actually get (D27).

As originally specified, heading delta above 25° between consecutive 5 m segments fires on every
curve, roundabout and switchback, while staying silent at junctions where the rider continues
straight.

  • Headings compared over a ±20 m window, not between consecutive 5 m segments
  • A turn must complete within a short distance — a sweeping bend is not a cue
  • Switchbacks and roundabouts do not each produce a fistful of cues
  • Cues emitted at NAV_CUE_CONFIDENCE = 0, and shown as guesses in the library and in #55
  • Fixtures include a winding descent and a roundabout, with hand-checked expected cue counts

It still cannot see junctions — nothing without map data can. That is why it is tier 3 and why its
cues are labelled.

## Goal The always-available last resort: derive turns from the shape of the track alone. ## Acceptance criteria - [ ] Heading change computed between consecutive simplified segments - [ ] Over 25 degrees classified a turn, over 70 degrees a sharp turn, left and right distinguished - [ ] Clusters of small deltas merged so a curve does not emit a burst of cues - [ ] No street names - the watch shows distance and arrow only - [ ] Works entirely offline with no dependencies - [ ] Output compared against a BRouter cue sheet on a known route and the differences documented ## Files - `companion/.../route/enrich/GeometryEnricher.kt` ## Update — 2026-09-01: this is the default path, so it has to be less crude D13 makes online enrichment opt-in, and BRouter needs a separate install plus segment files — so until #64 lands, the geometric heuristic is what most new users actually get (D27). As originally specified, heading delta above 25° between consecutive 5 m segments fires on every curve, roundabout and switchback, while staying silent at junctions where the rider continues straight. - [ ] Headings compared over a **±20 m window**, not between consecutive 5 m segments - [ ] A turn must **complete within a short distance** — a sweeping bend is not a cue - [ ] Switchbacks and roundabouts do not each produce a fistful of cues - [ ] Cues emitted at `NAV_CUE_CONFIDENCE = 0`, and shown as guesses in the library and in #55 - [ ] Fixtures include a winding descent and a roundabout, with hand-checked expected cue counts It still cannot see junctions — nothing without map data can. That is why it is tier 3 and why its cues are labelled.
Sign in to join this conversation.
No description provided.