Why your GPS track is longer than the walk you took
GPS noise makes almost every recorded walk too long. Why that happens, why two apps disagree, and how cleaning a track takes the extra out.
· Malik · 7 min read
You and a friend walk the same loop, side by side, the whole way. At the end, your phone says 8.4 km and theirs says 8.9 km. A watch says something else again. Nobody took a detour. So which one is right?
Usually none of them exactly, and most of them too long. Every position a phone reports is off by a few metres, and joined up, those small errors turn into distance you never covered. Taking that extra out again is a good part of the work on walker, the walk, hike and ride tracker I make for Android, and what I learnt there holds for any app. Once you see how the extra gets in, the differences stop being a mystery.
A phone knows where you are only roughly
Your phone works out where you are from satellite signals, again and again as you move. Each answer is a fix: one position the phone reports, and a good guess rather than an exact point. Under open sky, a phone's GPS is typically accurate to within about 5 metres. Near buildings, bridges and trees it gets worse, because the signals are blocked or bounce off walls before they reach you.
If you could see every fix your phone recorded, they would not sit neatly on the path. They would be scattered a few metres to either side of it, and the scatter shifts from one second to the next.
Zig-zags add up
An app measures distance by joining the fixes with straight lines and adding up their lengths. If the fixes wobble left and right of the path you walked or ran, the line joining them wobbles too. A wobbly line is almost always longer than a straight one: each step of it is the long side of a triangle, as Figure 1 shows.
Researchers at the University of Salzburg tested this. A volunteer walked around a square 10 metres on a side, 25 times, taking a reading at a mark every metre. Measured by GPS, the 1-metre steps came out at 1.2 metres on average, and the 5-metre steps at 5.6. That is 10 to 20 per cent too long, on a course where the true answer was known. Their paper shows why: when fixes are recorded often, measurement error makes a GPS distance longer than the real one on average.
It works the other way too. Record a fix only now and then, and the straight lines cut the corners of every bend, which makes the distance shorter. Smoothing a track too hard cuts them too, as Figure 2 shows. How often an app records decides which effect wins.
Standing still adds distance
The wobble does not stop when you do. Sit down for lunch, or wait at a crossing on a run, and the fixes keep drifting around you. Every small jump is joined to the next, and each one counts as distance you never covered.
A short break adds little. A long one can draw a whole scribble. On a bike ride I recorded, I stopped for more than two hours with the phone lying still, yet its fixes kept wandering, up to about 60 metres apart.
Why two apps disagree
Put all of this together and two apps have plenty of room to disagree. Two phones, or a phone and a watch, have different GPS chips and antennas, and they sit in different pockets. One app records a fix every second, another every few seconds: more fixes mean more wobble, fewer mean more cut corners. And each app decides for itself which fixes to throw away, how much to smooth the line, and what to do while you stand still.
Fitness services say as much. Strava's help pages, for example, say that each device records different location data, and name the recording interval, signal strength and GPS hardware as the reasons. A gap between two apps is normal, and two phones can both be working well and still disagree.
How cleaning takes the extra out
Getting closer to the true distance means taking the wobble out before adding anything up. This is what walker does with a recorded track. Other apps do similar things, each in its own way.
Leave out fixes that can't be right
walker ignores a fix whose accuracy is worse than the threshold in Settings → Recording → GPS accuracy threshold, 20 m unless you change it. A fix far outside its stated accuracy, such as a jump no walker could make, is treated as a glitch and dropped.
Use more than the position
Besides your position, the GPS chip measures how fast and in which direction you are moving. Its errors are separate from the position's, so it helps keep the line on course between the scattered fixes. Where the phone allows it, walker also reads the signal from each satellite, on top of the position the phone worked out from them.
Judge the whole track at once
After the walk, walker looks at the track from start to finish together, so each fix is judged against the ones before and after it. When a few fixes in a row show you standing still, walker treats that stretch as one spot, and a lunch break then adds next to nothing.
You see both
walker keeps both versions. In an activity, Cleaned shows the smoothed track and its totals, and Raw shows what the phone recorded. The totals in your history are the cleaned ones.
One real ride
Take the bike ride with the long stop, measured every way walker can:
- The raw track, the phone's own fixes joined up: 6.39 km.
- walker's cleaned track: 6.25 km.
- Cleaned from the fixes alone, without the signals from each satellite: 6.19 km.
- The phone's measured speed, added up over the time: 6.13 km.
Nobody measured this ride with a tape, so there is no exact answer. But the last three figures, one of them from the speed alone, agree within 2 per cent of each other. The raw track is 2 to 4 per cent longer than all of them.
Cleaning can go wrong too. walker's first attempt at using the signals from each satellite put this ride at 6.98 km, longer than the raw track. It trusted those signals too much, and their slowly wandering errors pulled the track from side to side. Once I weighted them more carefully, the ride came back in line with the others. The lesson holds for any app: extra data only helps if you know how much to believe it. This ride, seen from the developer's side, is in cleaning GPS tracks with a factor graph.
What you can do
- Allow for a gap between devices. Your phone and a friend's will rarely agree exactly, and that is normal.
- Mind your breaks. If your app has an auto-pause, keep it on. walker's Auto-pause pauses after 15 seconds of standing still. Otherwise, pause by hand for a long stop.
- Expect more error under trees and between buildings. Blocked and bouncing signals mean more wobble, and more extra distance.
- Trust a cleaned figure over a raw one. If your app shows both, the cleaned one is usually closer to what you walked.
- Use a known distance to check. A marked trail or a signposted route tells you how far off your app runs.
Height has this problem too, and more of it: see why every app shows a different elevation gain.
GPS will never measure a walk to the metre. But once you know where the extra distance comes from, you know which number to believe, and why your friend's app says something else.