Skip to content

fix: multiple Garmin devices, Locus route timestamps, waypoint distances - #38

Merged
haraldh merged 2 commits into
masterfrom
fix/multi-device-and-course-points
Oct 21, 2026
Merged

haraldh merged 2 commits into
masterfrom
fix/multi-device-and-course-points

Conversation

@haraldh

@haraldh haraldh commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Three fixes from the open issues.

  • Multiple Garmin devices (Improve app behavior when using multiple garmin devices #15, Irritating error message if more than one Garmin device found gimporter#14): each connected device reported its own result and the last answer won, so a watch without gimporter showed "not installed" although the Edge next to it had the app. The best result of all devices is shown now.
  • "Invalid course" on the Edge after saving (Invalid track on Garmin Edge #36): Locus Map writes route times relative to 1970-01-01. Since 20.1.0 parses fractional seconds, these times reached the FIT file before the FIT epoch. Such times are now moved to start at the FIT epoch, keeping the durations. Checked with the GPX from the issue: timestamps 0..11402 s.
  • Waypoints all at the end in "Up Ahead" (Waypoints not exported correctly to FIT? #14): course points from GPX waypoints had no distance. They now take distance and timestamp of the nearest track point and are written in course order. Checked with the files from the issue: distances 1151/2025/3061 m instead of none.
  • Found on the way: a waypoint without <type> crashed the conversion (CoursePoint.valueOf(null)).

TestCourseFit decodes the written FIT and checks distances and timestamps; 2 of its 3 tests fail without the fix. All 73 unit tests pass.

Fixes #15
Fixes #36
Fixes #14

🤖 Generated with Claude Code

… that has it

Each connected device reported its own result, and the last one to answer
won: a watch without gimporter showed "not installed" although the Edge
next to it had the app. The best result of all devices is shown now.

Fixes #15
Fixes gimportexportdevs/gimporter#14
- Locus Map writes route times relative to 1970-01-01. Since the time
  parser handles fractional seconds (20.1.0), these times reached the FIT
  file as they are, before the FIT epoch; the Edge opened the course but
  rejected it once saved ("invalid course"). Times before the FIT epoch
  are now moved so the course starts at it, keeping the durations.
- GPX waypoints became course points without a distance, so devices showed
  them all at the end of the course in "Up Ahead". Each now takes the
  distance and timestamp of the nearest track point, in course order.
- A waypoint without <type> crashed the conversion (CoursePoint.valueOf
  with null).

TestCourseFit decodes the written FIT to check both.

Fixes #36
Fixes #14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invalid track on Garmin Edge Improve app behavior when using multiple garmin devices Waypoints not exported correctly to FIT?

1 participant