Originally Posted by
wphamilton
In that case instead of adding up all of the delta's it would be more accurate to:
1. Determine the altitudes of all local minima and maxima of elevations.
1a. I would smooth the data first, but that's not necessarily required
1b. Just graph the elevations and choose the tops of humps and bottom of valleys
2. Sum local maxima minus the sum of local minima
2a. the same number of each
2b. start from a local minimum if we're interested in amount climbed.
local maximum is the point where the ride shifts from going up to going down, and vice versa for the minimum.
Adding the deltas is OK if that's all the information you have, but it will always build up errors from rounding and measurement variations, especially when it's already smoothed (such as the .4m increments).
I suspect that what Garmin does is this:
Receives the current altitude.
Compares that to the last recorded altitude.
If difference is less than 0.4m the last recorded altitude is written as the current altitude
If the difference is more than 0.4m then the current altitude is written.
This eliminates small variations which you might get riding on a flat road. For example, consider the following 10 seconds of elevation data:
23.4, 23.5, 23.6, 23.5, 23.6, 23.4, 23.3, 23.4, 23.5, 23.6
Garmin will record this as:
23.4, 23.4, 23.4, 23.4, 23.4, 23.4, 23.4, 23.4, 23.4, 23.4
Only when the elevation gets above 23.8 or below 23.0 will the recorded data change.
By recording data like this Garmin is reducing minor variations and effectively smoothing the data.
Any rounding errors will actually work themselves out. If you start a climb at 25m and end at 135m Garmin should always give you 110m elevation gain as long as each elevation data point is greater than or equal to the previous point.
If we look at what strava is doing consider this set of elevation data:
23.4, 23.5, 23.6, 23.7, 23.8, 23.9, 24.0, 24.1, 24.2, 24.3
We can see there is a total of 1.0m elevation gain but because of the way Strava is adding things up, because the difference between each point is less than 0.15m Strava discards the data so Strava would report this set as 0m elevation gain.
Garmin would record this as something like this:
23.4, 23.4, 23.4, 23.4, 23.8, 23.8, 23.8, 23.8, 24.2, 24.2
This would give a total gain of 0.8m. Sure it's off by 0.2m but due to this method the error would only ever be +/- 0.4m regardless of the size of the hill (in theory).