GPX ride recording including heart rate #20
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.
Reference
robert/PedalPebble#20
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
Record the ride so it can be exported and re-imported into komoot or Strava.
Acceptance criteria
HR_BPMembedded using the standard Garmin TrackPointExtension namespaceFiles
companion/.../ride/GpxRecorder.ktUpdate — 2026-09-01: heart rate arrives batched, and gaps stay gaps
Heart rate now reaches the phone as a batched
HR_SAMPLESmessage every 5 s, with a watch-sidebuffer that survives a Bluetooth dropout (#66, D31).
base_timestamp, not arrival time — a drained backlog isminutes old and must land at the right point in the track
Closed by PR #111 (merged). GpxWriter (pure, :companion:core) writes incrementally, embeds heart rate under Garmin's real TrackPointExtension/v1 namespace and element shape (verified against the published XSD, BeatsPerMinute_t enforced as a real range constraint), and GpxRecorder turns MovementState.STOPPED/MOVING transitions into real track-segment seams -- a stop closes the current trkseg, the first moving fix after opens a new one.
Honest gaps, not silently faked: elevation support is fully built and tested in GpxWriter/GpxRecorder, but GpsFix/LocationFix (#17/#19) carry no altitude field at all despite Location.getAltitude() existing on the platform -- a real, separate gap flagged for those types, not fixed here. HR stays nullable end-to-end since nothing in companion/ produces a live bpm yet (confirmed via grep) -- the capability is real and tested, just unfed, matching #65's own pattern.
Real round-trip validation: a two-segment, elevation+HR-bearing recording written by GpxWriter and re-imported through the project's own GpxImporter (#24), asserting lat/lon/elevation/timestamps match exactly -- a genuine consistency proof between the read and write sides, not just well-formed-XML checking.
Verified for real: ./gradlew :companion:core:test (20 new tests, 0 failures), ./gradlew :companion:assembleDebug (RideService/RideGpxFiles Android wiring compiles).