GpxFix Blog

Repairing a Workout Using a Reference GPX File

By on . Last updated .

Sometimes the best source of truth for a broken recording is not your own file, it is someone else's. A race organizer's published course, a training partner's clean recording of the same route, or your own GPX from a previous lap of the same trail can all be used as a reference to repair a track that lost signal, wandered off course, or recorded a section badly. This post covers when that approach makes sense and how GpxFix uses a reference file to fix it.

When you would reach for a reference file

  • Your watch dropped a section entirely. A tunnel, a dense forest, or a battery restart left a gap in your track with no coordinates at all for several minutes.
  • The route organizer already published the course. Trail races and organized rides, UTMB among them, often provide an official GPX of the exact course, which is more reliable than trying to reconstruct your own missing section from scratch.
  • Someone else recorded the same route cleanly. A training partner's file from the same run, or your own recording of the same trail from an earlier date, works just as well as an official course file.
  • Your GPS drifted rather than dropped out. The track never went missing, but it wanders 50 meters off the actual road or trail for a stretch, a pattern common in urban canyons or under thick tree cover.

Two different repairs, both using a reference file

Filling a missing segment

When your file has a genuine gap, no track points at all for a stretch of time, GpxFix looks at the reference file's points for that same time range and extracts the matching section. Because the reference file was recorded on the actual course you were following, the inserted points follow the real route rather than a straight line guess between where you lost signal and where you picked it back up. Speed and distance for the reconstructed section come from the reference track directly.

Pulling a wandering track back onto the route

When your file has points the whole way through but they drift off the real path, GpxFix's smooth toward reference mode compares every point in your track against the reference line. Any point that has drifted more than 10 meters from the reference is pulled back toward it, GPS speed spikes are detected and snapped onto the reference line rather than left as outliers, and a final smoothing pass removes any residual jitter so the corrected track does not look artificially stitched together.

What makes a good reference file

  • Same physical route: the closer the reference course matches what you actually ran, rode, or hiked, the better the repair. A reference that shortcuts a switchback you took will import that shortcut into your file.
  • Reasonable time alignment for gap filling: when filling a missing time-based gap, GpxFix matches by the corresponding time range, so a reference recorded at roughly the same pace as your own activity produces the most natural result. A race organizer's course file or a same-day training partner's recording both work well for this.
  • Clean GPS itself: a reference file that has its own spikes or drift will pass those problems into your repaired track, so it helps to run the reference through a quick GPS check first if you are unsure of its quality.
Scenario: your watch battery died 8km into a 15km trail race that a course GPX was published for.
Workflow with GpxFix:
  1. Upload your own recording as the file to fix.
  2. Upload the race organizer's official course GPX as the reference file.
  3. Run the repair, GpxFix identifies the missing section after 8km and fills it using the matching portion of the official course.
  4. Review the map to confirm the reconstructed section follows the actual trail, then download the completed file.
If you were tracking heart rate, the reconstructed section will have no HR data of its own, GpxFix can estimate a plausible heart rate curve for that stretch based on pace and elevation change, the same way it does for any other missing-heart-rate gap.

How this differs from automatic gap reconstruction

GpxFix can also rebuild a missing section without any reference file at all, by using your own out-and-back or repeated-loop data from elsewhere in the same activity. A reference file is the better option whenever you have access to a genuinely separate, reliable recording of the same course, since it repairs the gap using real data rather than inferring a route from the shape of your own track.

Frequently asked questions

Does the reference file need to be from the exact same day?

No, but it should follow the same physical route. A reference recorded on a different day at a similar pace works well for filling a missing time-based gap.

Can I use a reference file just to clean up drift, without any missing sections?

Yes. The smooth toward reference mode works on tracks that have no gaps at all, it corrects position drift and speed spikes by pulling the track back onto the reference line.

What file types can I use as the reference?

GpxFix accepts GPX, FIT, and TCX files as the reference upload, the same formats it accepts for the activity you are repairing.

Got a broken recording and a reference file for the same route? Upload both to GpxFix and let it match the good data to the gap. Related reading: restoring missing GPS data.

Share to