Next turn, then-turn, remaining distance and ETA #33
Labels
No labels
area:companion
area:docs
area:shared
area:tooling
area:watchapp
blocker
kind:chore
kind:feature
kind:spike
kind:test
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Blocks
Depends on
#36 Escalating turn vibration, off-route and route-complete patterns
robert/PedalPebble
#39 Unit tests: snapping on out-and-back routes, off-route hysteresis
robert/PedalPebble
#71 Voice turn announcements from the phone
robert/PedalPebble
#26 CueSheetEnricher interface and canonical direction enum
robert/PedalPebble
#31 Navigation engine: windowed snapping to the route polyline
robert/PedalPebble
Reference
robert/PedalPebble#33
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
The payoff of owning the cue sheet: information no live third-party relay could give us.
Acceptance criteria
NAV_THEN_TURNNAV_REMAIN_Mis remaining route distanceNAV_ETA_Sderived from a rolling average speed, and stable rather than jitteryNAV_STATEset to finishedFiles
companion/.../route/nav/NavEngine.ktClosed by PR #119 (
area/nav-engine). NewNavEngine/NavUpdate/NextCue/RollingSpeedAverageincompanion/core/.../route/nav/NavEngine.kt, consuming #31'sRouteSnapand the route's ownCuelist directly — no new position tracking or distance-along-route computation, everything falls out of the axis those two already share.cue.distanceAlongRouteMeters - riderSnap.distanceAlongRouteMeters— never straight-line.RouteSnap.distanceAlongRouteMetersonly ever advances by construction).>= 0.RollingSpeedAverage— a 30s moving-time-only window, deliberately neitherAverageAccumulator(a whole-ride mean gets less responsive over time, exactly wrong for ETA) norSpeedPipeline's 3s GPS-jitter smoothing (tuned for a live readout, still swings too hard for a stable ETA). ExcludesSTOPPEDsamples entirely (mirrorsAvgHrAccumulator/AvgCadenceAccumulator) so an ETA holds steady at a red light instead of ballooning.FINISHEDis sticky for the engine's lifetime, specifically to prevent oscillation from ordinary closest-point-projection wobble on the final segment (tested directly: a later fix reporting a smaller distance-along-route does not un-finish the engine).shared/message_keys.json'snavgroup already declaresperiod_ms: 1000, mirroring #40'smap-group convention.NavEngineitself does no rate limiting.NAV_THEN_TURN/nextCueare plain nullable Kotlin, not a fabricated sentinel, when fewer than the needed cues remain ahead — matches the established "unavailable is never a fabricated value" rule.Deliberately does not produce
NO_ROUTEorOFF_ROUTE—NavProgressStateonly ever alternatesON_ROUTE/FINISHED; composing the fullNAV_STATEwire enum with #32's off-route detection is left to a later layer, matchingRouteSnap's own scoping precedent.Real verification: genuine
./gradlew :companion:core:test --rerun-tasks, full:companion:coresuite green,NavEngineTest5/5 including a real jittery-speed-to-stable-ETA test (settled values within 2s of each other vs. a ~400s naive instantaneous swing) and the FINISHED-latch-against-backward-noise case.This closes part of #39's remaining scope (distance-to-turn/ETA) — #39 still needs #32 for the hysteresis half.
43 issues closed.