Unit tests: speed smoothing, CSC wraparound, distance accumulation #22
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.
Depends on
#17 Speed pipeline: smoothing, stop clamping, distance, moving average
robert/PedalPebble
Reference
robert/PedalPebble#22
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
Lock in the arithmetic that is painful to debug on a bike.
Acceptance criteria
Files
companion/src/test/Closed by PR #103 (merged): audited, not rewritten. Speed smoothing/stop clamp, CSC wraparound, bad-accuracy rejection, and source-handover-including-no-source were all already genuinely covered by #69/#17/#18/#19's PRs tonight (SpeedPipelineTest, GpsQualityTest, CscMeasurementTest, WheelSpeedTrackerTest, StopDetectorTest) \u2014 confirmed by reading each test, not assumed, no duplicates added.\n\nThe one real gap \u2014 "distance accumulation tested against a known GPX with a hand-checked total" against the live-ride SpeedPipeline.onGpsFix path specifically (different from RealWorldFixtureTest's import-time computeRouteMetrics path on the same file) \u2014 filled with SpeedPipelineGpxReplayTest: replays the real ~119km Havelchaussee fixture's raw 2795 points (bypassing RDP simplification, using each point's real recorded timestamp) through onGpsFix one at a time. Result: 119,020.29m vs the ~119,020.29m ground truth \u2014 about 3.5mm off. Tight tolerance justified, not padded: independently confirmed via a companion Python script that this specific ride has zero confirmed-stop events anywhere (no two consecutive points are ever slower than 0.8 m/s apart), so moving distance and raw distance are the same quantity for this fixture specifically \u2014 documented as fixture-specific, not a general claim.\n\nVerified for real:
:companion:core:test/:companion:pebble:testand:companion:core:koverVerify(coverage floor holds) all green.