Fix GPS Drift in GPX and FIT Files: Remove Spikes
By TrailBlender
What Causes GPS Drift and Tunnel Gaps?
GPS drift happens when your device records coordinates that don't match your actual position. Instead of a smooth line following the road, your track zigzags across buildings, rivers, and fields. Tunnels are the worst offenders — your device loses satellite signal entirely and either stops recording or guesses wildly.
Common causes of GPS drift in cycling:
- Tunnels and underpasses — Complete signal loss, creating gaps or straight lines between entry and exit points.
- Urban canyons — Tall buildings reflect GPS signals, causing multipath errors that place you on the wrong street.
- Dense tree cover — Forest canopy weakens satellite signals, especially on narrow trails.
- Wrist-mounted GPS — Watches have smaller antennas than head units, making them more susceptible to drift.
- Cold starts — If you start riding before the device acquires a full satellite fix, the first few minutes of data may be wildly inaccurate.
How GPS Drift Ruins Your Data
GPS drift doesn't just make your map look ugly — it corrupts your metrics:
- Inflated distance — A spike that places you 500m off the road and back adds 1 km of fake distance. Multiple spikes can inflate a 50 km ride to 55 km or more.
- Wrong average speed — Extra distance with the same elapsed time means Strava calculates a higher average speed than reality.
- Missed segments — If your GPS track doesn't follow the road through a segment, Strava can't match it. You did the effort but get no segment time.
- Broken elevation profile — GPS altitude is noisy. Spikes in position also create spikes in elevation, inflating your climbing total.
The Hard Way: Manual Coordinate Editing
You could open the GPX file in a text editor and hunt for coordinates that are obviously wrong. Look for trackpoints where latitude or longitude jumps suddenly, delete them, and hope the gap isn't too large.
For tunnel gaps, you'd need to interpolate — calculate intermediate coordinates between the tunnel entry and exit, spacing them by time. This requires understanding GPS coordinate math and getting the timestamps exactly right.
Even for a single tunnel on a single ride, this can take 30+ minutes. If your route has multiple tunnels or urban sections, it's hours of work.
The Easy Way: Fix with TrailBlender
TrailBlender finds position spikes automatically and lets you remove them. It runs on your computer, so the file isn't uploaded anywhere.
- Open your file in TrailBlender — it accepts both GPX and FIT formats.
- Run Spike Detection — Click Detect Spikes and move the sensitivity slider between Conservative and Aggressive. Detected points are highlighted on the map.
- Review the detected points — Each one is listed with its location and estimated speed. Untick any you want to keep.
- Remove the spikes — The selected points are deleted. They are not replaced, so no coordinates are invented, and you can undo the edit.
- Check the results — Look at the map and charts to confirm the track follows the road and the distance looks right.
- Export the fixed file — Save as GPX or FIT. The export checks Strava compatibility and warns you about problems such as missing timestamps.
What it can't do: Spike detection finds points that jump away from the track. It does not fill a tunnel gap or smooth the line, because it never creates new coordinates. If your whole file is damaged rather than just drifting, see GPX file repair for Garmin files.
Reducing GPS Drift on Future Rides
- Wait for satellite lock — Before starting your ride, let the device show "GPS ready" or a strong signal indicator. Don't start moving during the cold start.
- Use a head unit over a watch — Handlebar-mounted devices have better antennas and clearer sky view than wrist devices.
- Enable multi-band GPS — Newer devices (Garmin Edge 1040, Wahoo ROAM v2) support multi-band GNSS for better accuracy in difficult conditions.
- Record at 1-second intervals — "Smart recording" mode skips data points, making drift harder to detect and fix. Use every-second recording for the cleanest data.
- Mount the GPS away from your body — On a bike, a stem mount gives better satellite reception than a position hidden behind your hands.
Checked 19 October 2026: the GPX 1.1 schema allows latitude values from −90° to 90°. A point can be within these bounds and still be a GPS spike; compare it with the surrounding track before removing it.
Sources
Frequently Asked Questions
How do I fix GPS drift in a GPX file?
Open the file in TrailBlender, run Spike Detection, review the flagged points and remove them. TrailBlender deletes points that jump away from your route; it doesn't smooth the track or move points back onto the road.
Can TrailBlender fill a tunnel gap?
No. TrailBlender doesn't create coordinates, so a tunnel gap stays a gap. It can remove the wild points a device records around a tunnel, which can reduce an inflated distance, but it won't draw a path through the tunnel.
Will fixing GPS drift change my Strava segment times?
It can. Removing GPS spikes changes the distance and speed Strava calculates from your track, so segment matches and times can change after you re-upload the file.
My watch shows 52 km but Strava shows 56 km — is that GPS drift?
Very likely. A 4 km discrepancy on a 52 km ride (about 8%) is a classic sign of GPS drift. Your watch calculates distance in real time with some smoothing, while Strava recalculates from raw GPS coordinates. Remove the GPS spikes in the file and the distance should move closer to what your watch displayed.
Does GPS drift affect indoor trainer rides?
Not normally. Indoor rides use speed and power from the trainer, not GPS. If you see GPS drift on what should be a stationary indoor ride, your device was recording GPS indoors by mistake. Switch GPS off for indoor activities on the device.
Related Guides
GPX File Repair: Remove GPS Spikes, Trim Errors
Free GPX file repair for Garmin files: find and remove GPS spikes, trim bad data, export a clean GPX or FIT. Runs on your computer; limits explained.
scenarioGarmin Died Mid-Ride? Recover and Merge It
Yes, your Garmin saved the ride until it died. Find the .FIT file, recover it via Garmin Connect or USB, and merge it with your second recording.
tutorialTrim Warmup & Cooldown from GPX Before Strava Upload
Trim warmup and cooldown from your GPX before uploading to Strava. Cut the start and end on a map, keep clean stats, export in minutes.