← Blog

0 km1 km2 km3 km4 km5 km6 kmTrue heightGPS heightClimb countedtrue height: 28 mevery GPS rise: 361 mrises over 8 m: 116 mGPS height here driftsslowly, about 6 m either way
A made-up 6 km walk with about 30 m of real climb, and a GPS height that drifts slowly around it. Adding up every rise of the GPS height counts far more climb; counting only rises of 8 m or more, as walker does, takes most of it out.
For walkers

Why every app shows a different elevation gain

Same hike, three different climbs. Why GPS height, the barometer, terrain maps and sea level all disagree, and which figure to trust.

· Malik · 8 min read

The sign on a summit gives one height. Your phone, if it shows the raw GPS height, gives another. In Germany the phone's figure is tens of metres higher, on every summit, all day. The sign is right. The phone measures from a different zero, and that is only one of the ways a height can go wrong.

Distance is hard enough to measure. Height is harder. Elevation gain, which adds up every rise along the way, is an estimate built from sources that each go wrong in a way of their own, and which of them an app trusts decides the figure you see.

walker, the walk, hike and ride tracker I make for Android, puts several of them together. An early version counted 109 m of climb on a flat walk. The reasons are the ones that make two apps disagree about a real climb.

GPS is weakest at height

GPS finds your position from satellites spread across the sky. For left and right, forward and back, they surround you on all sides. For up and down, they don't: every satellite is above the horizon, and none is below your feet. So GPS pins down your height less well than your position. Vertical errors are typically one and a half to three times the horizontal ones.

The error also wanders slowly. On the phone I test with, GPS height is steady from one second to the next, but drifts by up to about 15 metres either way over a few minutes. You don't see it in the moment. It shows up over a whole walk.

Small wobbles become big climbs

Elevation gain adds up every rise along the way and ignores every fall. That is exactly what makes it sensitive to noise. If the height drifts up 10 m and back down while you walk or run along a perfectly flat path, the rise counts as 10 m of climbing. The fall doesn't take it back.

Over a few hours, these phantom climbs add up. That is how the early version of walker got to 109 m on a flat walk. With heavier smoothing and a higher threshold, the same walk counts 33 m. Still not zero, but a lot closer. Where to draw that line is up to each app.

Thresholds and smoothing

Every app has to decide how much of a rise to believe. Each smooths the heights differently, and may count a climb only once it passes a threshold. Strava, for example, counts a climb only once it rises consistently by more than 10 m without good barometer data, or 2 m with it, and says that its thresholds and smoothing may differ from other platforms and devices. walker smooths the height over about half a minute and counts a rise once it clears 8 m.

These are all reasonable choices, and they give different answers. A high threshold ignores noise but also misses the small ups and downs of a rolling path. A low one catches every hump, and some that aren't there. The smaller the real climb, the more of the total comes down to these choices. Smoothing and thresholds only tame the noise. Doing better takes a second source of height.

The barometer drifts with the weather

Many watches and some phones have one: a barometer. Air pressure falls as you climb, and near sea level it falls by a steady small amount for every 8 metres of height, so a barometer can turn the air around you into a height, without the satellites.

The catch is the weather. Air pressure also changes when a front passes, with no change in your height at all. After a sudden change, such as a cold front, an altimeter can read many tens of metres off. That is why hikers with a barometric altimeter reset it at a known height, such as a signposted junction or a summit.

A barometer is good for the shape of a climb, then, and poor on its own for the absolute height. Over a long day, weather that changes slowly can add or take away climb unless something corrects for it. Some apps sidestep the problem and ignore the recorded height altogether.

A terrain map is only as good as the map

These apps take your track and read the height of each point from a terrain map, a map of how high the ground is. That works well where the map is good, and it has traps too.

The first is what the map measured. Some worldwide terrain maps record the top of whatever is there, roofs and treetops included, and not the ground beneath: a surface model, as it is called. The Copernicus map, a common one, is one of these. Walk through a forest and it may put you on the canopy, as Figure 1 shows.

YouBare ground: climb 32 mSurface model: climb 60 mHeights stretched 6×
Figure 1. A made-up walk of 1.2 km through a forest. The bare ground, as a laser-scanned model shows it, and a surface model in 30 m squares that follows the treetops. Read from the surface model, the climb, counted from rises of 8 m or more, comes out far higher, though you walked on the ground the whole way.

The second is anything that leaves the ground. A map of the ground puts you down in the valley under a bridge, or on top of the hill above a tunnel. The third is your position. If the track is a few metres off on a steep slope, the height read from the map is wrong by more. And even a perfect map on a perfect track disagrees with the raw GPS height, because the two count from different zeros.

"Sea level" is not what GPS measures

This last twist changes the height you see, not the climb, and it is the one from the summit sign.

GPS measures height above a smooth, mathematical shape of the Earth, the ellipsoid. Android, for example, reports altitude "above the WGS84 reference ellipsoid". Maps and summit signs give height above sea level. Sea level follows gravity. It is a lumpy surface called the geoid, and it sits up to about 85 m above the ellipsoid in some places and up to about 106 m below it in others.

In Germany, sea level lies about 36 to 50 m above the ellipsoid, so an app that shows the raw GPS height there reads tens of metres too high, all day. The climb is not affected, because over one walk every height is off by almost the same amount. But the summit height won't match the sign. Figure 2 shows the three surfaces.

GPS heightAbove sea level36–50 m in GermanyGroundSea level (geoid)EllipsoidNot to scaleWorldwide the gap runs from +85 m to −106 m
Figure 2. A cross-section, not to scale. GPS measures your height from the ellipsoid, a smooth mathematical shape. Maps and summit signs measure it from sea level, the lumpy surface called the geoid. In Germany sea level lies 36 to 50 m above the ellipsoid, so the GPS height is that much higher.

How walker puts it together

walker tries to use each source for what it does well, and to let the others catch what it gets wrong.

Height above sea level

walker carries a worldwide model of sea level inside the app and converts every height to height above sea level, the height a map or a summit sign gives. The elevation chart says Above sea level.

The barometer

Where the phone has a barometer, walker lets it draw the shape of the climb when it cleans a track, and lets the GPS height settle where that shape sits and how it drifts with the weather. The barometer gives the shape; GPS keeps it from drifting away. The developer's side of this is in cleaning GPS tracks with a factor graph.

The ground

You can download a terrain map for a map region, from the Terrain row under that region in Map packs. It comes from Mapterhorn, an open collection of elevation data. In Germany it is built from the states' surveys of the bare ground, measured by laser, and Austria, Switzerland and other countries have national terrain models too. Elsewhere it falls back to the Copernicus map of the surface. walker also draws its hillshading and contour lines from it, as contour lines and hillshading on the phone explains.

With a terrain map, walker holds your height just above the ground, where a phone in your hand or pocket is. It lets go on bridges and in tunnels. It lets go in buildings and on stairs, and wherever the barometer says you have left the ground. Where GPS and the map disagree by a lot, it leaves the map out for that part of the walk. The elevation chart then shows You as a line over The ground, so a bridge shows up as a gap between them.

On a flat bike ride I recorded, with a phone that has no barometer, the raw GPS height put me about 45 m above the ground, which is the geoid again. Cleaned with a terrain map, the middle of all my height readings was 1.0 m above the ground, and the climb came out at 0 m, as flat as the ground. Without the terrain map, cleaning counted 8 m.

What you can do

Distance has the problem too, in a milder form: see why your GPS track is longer than the walk you took.

Which figure to trust comes down to where it came from. GPS height alone deserves the least: it wanders, and on a flat walk or run the wander is most of the climb it reports. A barometer or a map of the bare ground is worth more, and only a height above sea level can match a summit sign. Two apps that disagree have usually both added up faithfully from different sources.

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