This object is in archive! 

Calculation of elevation data

Dada shared this question 7 years ago
Answered

Hi,


I'm quite confused about Locus calculates the elevation data of a track recording (that is already finished).

Not only for the total ascend/descend, but also for the minimum and maximum elevation.


Ascend/Descent

For the GPX track attached, Locus reports a total ascend of 733 m:


eb6203b511e73e3a5b1e80a81128f89e


The Online-Tool uTrack (http://utrack.crempa.net) states an elevation of 913 m for the GPX file.


I also wrote a simple script by myself, which just sums up the elevation differences of the points in the GPX and this also results in an ascend of 915m.


Where does that almost 200m difference come from?


Minimum elevation

For the GPX track attached, Locus reports a minimum elevation of 369m (see screenshot above).

Having a look at the raw data of the GPX file (which was exported from Locus) shows that the actual minimum is 366.75m:


<ele>366.75</ele>

<time>2017-05-01T12:32:34.169Z</time>


That additional 2 meters is not a huge difference, but I wonder why there actually is any difference?


Could someone please explain how Locus Maps calculates the elevation and what the correct value is?


Thanks,

Daniel

Replies (4)

photo
3

Adding up the elevation differences will produce a worthless result. Why? Because each GPS elevation measurement includes a small amount of error. For example, you may be walking along a perfectly flat road for many kilometers yet the GPS will record subtle changes in elevation:

Road elevation in meters: 500, 503, 498, 501, 505, 502, 499, 504, 503, 500, 500, 503, 501, 507, 504, 500, 506, etc

The road is perfectly flat so total ascent is 0 meters. However, adding up the elevation differences will produce a positive value for total ascent.

One way to fix this is mathematically. You apply a "smoothing function" to eliminate spurious elevation values and (hopefully) produce a realistic value for total ascent. This is what many GPS apps do.

Another way is to use a Digital Elevation Model (DEM), which is a three-dimensional model of the earth's surface (measured using radar or LIDAR). Locus Map can compare the recorded elevation values to a DEM and eliminate values that deviate significantly. Alternately, it can discard all the recorded values and use the DEM's values exclusively (this is how I use Locus Map). For more information, see "SRTM data": http://docs.locusmap.eu/doku.php?id=manual:user_guide:tools:altitude#srtm_data

As an experiment, I encourage you to import your GPS track into either Runalyze.com or Garmin Connect (a free account is required for each service). Both services use a DEM to calculate total ascent. I have found Runalyze to be the most flexible because you can choose the source of the DEM and control the amount of smoothing. In practice, Locus Map and Runalyze produce very similar results for total ascent. Here is what Runalyze reports for your GPX track:

ae7321b1b162c188c996aad4122790b1

photo
1

Thanks for your answer.

Runalyze seems very interesting to me.

I know about the inaccuracy of GPS-based elevation measurement.

The GPX file in the initial post already contains the elevation of the SRTM data, as I set up Locus to replace the GPS-measured data by SRTM using the "light altitude filter" (what should be what you mentioned as "smoothing function").

Thus I expected that the elevation values in the GPX file (as exported by Locus) were already the "smoothed" ones, which should have caused a similar elevation sum in all tools, which wasn't the case.

So I guess the cause of my confusion is that Locus only applies smoothing/filtering for the values of the statistics-screen of a track, but does not apply it when exporting the track as GPX file.

Is that correct?

photo
1

I believe you are correct. Locus Map exports the track with the recorded elevation values.


When importing a track, Locus Map offers the option to replace the elevation values using a DEM. The option is called "Fill altitude". http://docs.locusmap.eu/doku.php?id=manual:user_guide:tracks:import#import_dialog


Perhaps you can submit a new Idea for a future version of Locus Map that offers the option to "Fill altitude" when exporting a track.

photo
2

Hi guys,


When recording a route, the elevation values processed by everything you set up in "Altitude manager" are stored, not raw GPS data. These saved elevation values are exported too. However, when viewing the route details, most of the parameters are only slightly filtered for statistics and graphs, but this filtration is not exported!

Replies have been locked on this page!