GPX ride recording including heart rate #20

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

Goal

Record the ride so it can be exported and re-imported into komoot or Strava.

Acceptance criteria

  • Track points written incrementally, so a crash loses at most a few seconds
  • Heart rate from HR_BPM embedded using the standard Garmin TrackPointExtension namespace
  • Elevation included where available
  • Paused segments handled sensibly (separate track segments)
  • Resulting file validates and re-imports into komoot cleanly

Files

  • companion/.../ride/GpxRecorder.kt

Update — 2026-09-01: heart rate arrives batched, and gaps stay gaps

Heart rate now reaches the phone as a batched HR_SAMPLES message every 5 s, with a watch-side
buffer that survives a Bluetooth dropout (#66, D31).

  • Decode batched samples using their base_timestamp, not arrival time — a drained backlog is
    minutes old and must land at the right point in the track
  • Dropout gaps written as gaps, never interpolated
  • Backlog arriving after the ride has been paused or stopped still lands correctly
## Goal Record the ride so it can be exported and re-imported into komoot or Strava. ## Acceptance criteria - [ ] Track points written incrementally, so a crash loses at most a few seconds - [ ] Heart rate from `HR_BPM` embedded using the standard Garmin TrackPointExtension namespace - [ ] Elevation included where available - [ ] Paused segments handled sensibly (separate track segments) - [ ] Resulting file validates and re-imports into komoot cleanly ## Files - `companion/.../ride/GpxRecorder.kt` ## Update — 2026-09-01: heart rate arrives batched, and gaps stay gaps Heart rate now reaches the phone as a batched `HR_SAMPLES` message every 5 s, with a watch-side buffer that survives a Bluetooth dropout (#66, D31). - [ ] Decode batched samples using their `base_timestamp`, not arrival time — a drained backlog is minutes old and must land at the right point in the track - [ ] **Dropout gaps written as gaps, never interpolated** - [ ] Backlog arriving after the ride has been paused or stopped still lands correctly
Sign in to join this conversation.
No description provided.