← Blog

One minute, magnified20 mThe route: 1,000 m715 fixes, joined: 1,169 m+17 % from errors of about 4 mthat wander slowly, one fix a second100 mNRoutes © OpenStreetMap contributors
The first kilometre of the Zirbenweg above Innsbruck, and a simulated walk along it: a fix every second at walking pace, each off by an error of about 4 m that wanders slowly, as a GPS error does. Joined up, the fixes come out longer than the path.
For walkers

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.

dwPathFixes joined upstep = √(d² + w²) > dExtra length on a straight walk, by time between fixesevery second+18 %every 2 s+8 %every 5 s+3.3 %every 10 s+1.5 %every 30 s+0.4 %
Figure 1. Top: a straight path, and fixes pushed a little to either side of it (made-up offsets, drawn large). Each step between two fixes is the long side of a triangle: it is longer than the distance d you walked, by more the further the fixes wobble. Bottom: a simulated straight walk at walking pace with GPS errors of about 4 m that wander slowly, recorded at different intervals. The more often an app records, the more wobble it adds per metre.

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.

Path: 456 mA fix every 30 s: 366 mSmoothed hard: 360 mShorter by 20 % and 21 %,with no GPS error at all
Figure 2. A made-up zig-zag path up a slope, with no GPS error at all. Joining a fix every 30 seconds, or averaging each point with its neighbours over half a minute, cuts across every bend, and both come out shorter than the path. This is why cleaning a track must not smooth too hard, and why one app can read shorter than another as well as longer.

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:

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

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.

walker Record walks, hikes and rides with offline maps. Nothing leaves your phone. Coming soon to Google Play.