Skip to main content

How Guru Maps counts your climb

· 8 min read
Evgen Bodunov
Founder of Guru Maps

Climb is the number many of us check first after a hike. It sounds simple: add up every meter you went up. It turns out that "add up every meter" is exactly where things go wrong.

In May we went rafting down the Dunajec. A river only flows downhill: about 90 meters in four and a half hours. Guru Maps said we had climbed 1,065 meters.

Here is how Guru Maps counts elevation gain, why that happened, and what we changed in the next update.

Where the altitude comes from​

The barometer. Most modern phones have one. It measures air pressure, which drops as you go up: about 1 hPa for every 8 meters. It notices a change of a few tens of centimeters, but it does not know your actual height, and the air pressure also changes with the weather. So Guru Maps takes the GPS altitude at the moment GPS is most accurate and lines the barometer up with it. All the ups and downs come from the barometer.

GPS. If there is no barometer, we use GPS altitude. GPS measures height much worse than position, so we skip points where the phone reports a vertical accuracy worse than 10 meters.

Elevation data. Routes you plan in Guru Maps get their heights from elevation maps. Those heights are already smooth, so we count them as they are. The same goes for tracks imported from other apps that don't say how accurate their altitude is.

The altitude is lightly smoothed. That is the line you see on the Altitude chart, and the lowest and highest points in the track statistics.

Why adding up every rise doesn't work​

A barometer never sits perfectly still. Even when you stand still, it wobbles by 10–50 cm from one second to the next. On a bike, wind and speed change the pressure around the phone. Every wobble has a small up part, and the old method added every up part to Climb and every down part to Descent.

Here is a calm float on the Wkra, a flat river that dropped about 2 meters in five hours:

8085900500:001:002:003:004:005:006:007:00altitude, mclimb counted so far, m749
barometerbeforenow

Climb on the whole float: 74 m before, 9 m now.

Thousands of wobbles of a few centimeters added up to 74 meters. : the altitude stays within a meter, and every small rise, in orange, went into Climb. The 9 meters that are still counted are the weather: the air pressure dropped during the first three hours, and to a barometer a slow drop in pressure looks exactly like a slow climb.

Water is even worse. Every centimeter of water above the phone adds about 1 hPa, which is as much as 8 meters of altitude. On the Dunajec the phone kept getting dipped into the river, and once it went for a swim together with its owner:

3403600:350:400:450:500:551:001:051:101:15altitude, m
GPS altitudebarometer

Climb in these forty minutes: 120 m before, 18 m now.

GPS altitude goes down smoothly with the river. The barometer jumps by 5–12 m every time the phone gets wet. Every jump was counted twice: once as climb and once as descent. Over four and a half hours that made 1,065 meters.

What we changed​

Two simple rules.

1. Look at the last 30 seconds, not at every reading. Quick wobbles cancel each other out. Because we average over time, not over points, a track recorded every second and a track recorded every few seconds now behave the same. Before, a track recorded every second picked up much more noise.

2. Count in steps of at least 3 meters. Guru Maps remembers the last height it counted. Climb grows only when the averaged altitude gets 3 meters above that height, and Descent only when it gets 3 meters below it. Anything in between is ignored. When a step is counted, it is counted in full: a 4.2 m rise adds 4.2 m, not 3.

This is what it looks like on ten minutes of a real climb to the Trzy Korony in the Pieniny:

67067568068569045464748495051525354minaltitude, m
altitude as recordedaverage over the last 30 sheights that were counted
Average overStep

In these ten minutes: climb 18 m, descent 9 m.

Climb on whole recordings, before and with these rules
Wkra74 → 9 m
Dunajec1,065 → 71 m
Durmitor1,707 → 189 m
Trzy Korony580 → 512 m
Wielki Staw995 → 805 m
Monte Iverta2,265 → 2,046 m

Around minute 46, the altitude dips by about 3 meters and comes back. The average barely moves, so nothing is counted. At the top of the bump near minute 47.5, the count stops about 3 meters short of the peak. That is the price of the new rule; more on that below. After minute 49 the trail really goes down by 10 meters, and that is counted as descent.

Try the rules yourself. , and these ten minutes are counted the old way. , and the Dunajec goes almost quiet, but the climb to the Trzy Korony drops below the 511 meters between its bottom and its top. is where we stopped.

Before and after​

Here is the climb on some of our own recordings, counted the old way and the new way:

RecordingWhat we knowBeforeNow
Rafting on the Wkra, 5 hflat river, about 2 m down74 m9 m
Rafting on the Dunajec, 4.5 honly downhill, about 90 m; the phone got wet1,065 m71 m
Hike in Durmitor162 m between the lowest and the highest point1,707 m189 m
Climb to the Trzy Koronysteady climb from 444 m to 955 m580 m512 m
Hike to Wielki Staw Polskifrom 992 m up to 1,760 m and down to 1,307 m995 m805 m
Loop over Monte Iverta, 11 ha long day in the mountains2,265 m2,046 m

The climb to the Trzy Korony is the easiest to check: it goes almost only up, so the climb can't be much more than the 511 meters between the bottom and the top. It used to be 580; now it is 512.

What it costs​

No method is free. Here is what the new one gives up:

  • Up to 3 meters at every top and every bottom. If you turn back 2.9 meters above the last counted height, those 2.9 meters are not counted. On a long mountain day this is about 2%.
  • The live number lags a little. While recording, Climb grows in steps and catches up about half a minute after you stop climbing.
  • Slow weather changes still count. A pressure drop of 1 hPa looks like an 8-meter climb. The weather usually changes the pressure by 1–2 hPa over a few hours.
  • Under water the barometer can't be trusted. The Dunajec still shows 71 meters of climb.

We also tried smarter options, for example correcting the barometer with GPS all the time, the way some sports watches do. On our recordings it fixed a few meters of weather drift but added 2–8% to long mountain hikes: GPS altitude can wander for minutes. So we kept the simple rule.

Slope got the same treatment​

Slope, along with the Uphill and Downhill distances, is now measured over at least 2 meters of movement. When you stand still for 30 seconds, the starting point moves with you, so barometer drift during a break no longer turns into a steep slope on your first step. Slow, steep climbs now get their slope, and their color on the map, right.

We also fixed gray gaps in the slope coloring of tracks on the map that appeared in version 6.3.1.

Your older tracks​

Tracks you record after the update use the new method. When you open an older track, its statistics and charts are recalculated the new way too, so the climb may come out lower than you remember. That's the noise going away, not your effort.

Why other apps show a different number​

There is no single "true" climb. Apps and watches use different sensors, different smoothing and different steps, and elevation maps give their own answer. A difference of a few percent between two apps is normal. What matters more is that the number doesn't grow while you stand still or float down a river.

The new counting comes in the next update of Guru Maps for iOS and Android. If a track's climb still looks wrong to you, send it to us. Real recordings are how we found all of this. Enjoy the climb! ⛰️