Elevation Correction

by pkan

Downloads: 64,344 (30) • Reviews: 11

Version:

1.9

Updated:

Nov 29, 2017

Elevation correction plugin

Elevation correction plugin

Postby pkan » Fri Sep 14, 2007 4:10 pm

Edit: The description and the download link, as well as the discussions in this thread, refer the first public version of the plugin. An updated version with several new features is now available and is described in a separate thread.

Elevation correction plugin

Author: pkan (contact by PM)

Download: Version 1.0 (September 14, 2007)

Home page: http://hem.bredband.net/b419940/ElevationCorrectionPlugin.html

Installation:

To install, unzip the downloaded zip file in the SportTracks plugin directory, e.g., C:\Program Files\Zone Five Software\SportTracks 2.0\Plugins.

Description:

This plugin corrects the elevation of GPS tracks using SRTM elevation data, which is automatically downloaded from the official NASA FTP server. The plugin can also download enhanced SRTM data from Viewfinder Panoramas where available. There is an option to automatically correct data at import, and an option to download elevation data covering all activities in the logbook, so that no further downloads will be needed to correct the activities.

To correct an activity, select "Apply elevation correction" from the Edit activity menu. To undo the correction, select "Undo elevation correction" from the Edit activity menu. If multiple activities are selected, the correction will be applied to all of them.

To correct all the activities in the logbook, the easiest way is probably to go to the Activity Reports view, group by category, select the top level (My Activities), and select "Apply elevation correction" from the Edit activity menu. Depending on the size of the logbook, the correction can take some time, and SportTracks will not respond to user interaction while the data is processed. (The delay is mostly due to unnecessary work done by the SportTracks core when activity data is updated, and is expected to be significantly reduced by optimizations in later SportTracks releases.)

Caveats:

The quality of the correction will depend on the quality of the elevation data used. SRTM is freely available, covers most of the Earth between 56 °S to 60 °N, and is usually fairly good, but it is not perfect:
- Outside the United States, the resolution is 3 arc seconds (about 90 m in the North-South direction, less in the East-West direction), which means that terrain features on a smaller scale than this are not captured. For the United States, 1 arc second (30 m) data is available.
- The elevation data may contain some measurement noise. The 3 arc second data is more averaged and hence less susceptible to noise than the 1 arc second data.
- The elevation data is with respect to the reflective surface, which may be vegetation, man-made features or bare earth. This may be a problem in some areas.
- The data contains voids (no-data areas), particularly in mountainous regions. If voids are encountered, the plugin will notify the user, who may cancel or accept the correction anyway, letting SportTracks interpolate to fill in the blanks.

Viewfinder Panoramas offers SRTM elevation data with the voids filled, mostly using topographic maps, for many montainous regions. There is also data for some areas north of 60 °N, which are not covered by SRTM. In addition 1 arc second data is available for some regions, mainly the Alps, where SRTM only offers 3 arc second data.

Some other things to keep in mind:
- Bridges and tunnels cannot be correctly handled by grid-based digital elevation models such as SRTM.
- The plugin is mainly intended for correction of data from units which measure elevation using GPS. For units with a barometric altimeter (e.g., Garmin Edge), the original data will probably be better.

Planned enhancements:
- Elevation correction for routes.
- Importing custom elevation data. This will be useful for users who have access to better elevation data than SRTM. In the United States, the National Elevation Dataset, which can be downloaded from the USGS Seamless Data Distribution System is typically better than SRTM.
- Progress indicator when processing multiple activities.
Last edited by pkan on Mon Oct 15, 2007 4:51 pm, edited 1 time in total.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby cohomarkus » Fri Sep 14, 2007 8:30 pm

Thanks pkan,
worked perfectly first time!
cheers,
mark
cohomarkus
Donated!
Donated!
 
Posts: 18
Joined: Tue Nov 22, 2005 8:38 pm
Location: Hobart, Australia

Postby Meven » Sat Sep 15, 2007 12:31 am

worked perfectly to me too :!:

Nice works pkan :wink:
Meven
Contributor!
Contributor!
 
Posts: 930
Joined: Sun Mar 11, 2007 4:56 am
Location: France

Postby WheresWaldo » Sat Sep 15, 2007 8:39 am

All I can say is Wow, this is a fantastic Plugin, and the ability to undo the correction was a good thing too!

Fortunately for me I am in NA so I can use the 1 arc second data, but when the USGS SDDS becomes available in the plugin they have data from 1 arc second to 1/3 and even 1/9 arc seconds for much of NA. I would love to see you allow an option on which dataset to correct with instead of forcing one or another.

Like I said before, great plugin. Now I have to play with my climbing ranges even more to make sure I have them set up properly.
WheresWaldo
 
Posts: 37
Joined: Fri May 11, 2007 7:47 pm

Postby patrick_schere » Sat Sep 15, 2007 9:25 am

Thank you! Perfect! I finally have the correct elevation data! :D
patrick_schere
Donated!
Donated!
 
Posts: 62
Joined: Thu Jul 12, 2007 11:25 am
Location: Hamburg, Germany

Postby wirebook » Sat Sep 15, 2007 4:50 pm

Works great, thanks!
wirebook
Donated!
Donated!
 
Posts: 21
Joined: Fri Aug 10, 2007 4:23 pm

Postby gerhard » Sun Sep 16, 2007 4:11 pm

The plugin works great.
There is just one thing I wish: To be able to see the the difference between the GPS and the SRTM elevation. As there are no custom graphs (yet?) the difference can be put in the PowerTrack if it is empty.

Just one observation where GPS elevation can be better than SRTM elevation: Very hilly terrain, that varies more than the resolution of SRTM sampling.
* If you run around hills (as most trails go...) then the SRTM elevation estimates too much elevation changes on the track
* If you run up and down hills, then SRTM will not account for all elevation
gerhard
Contributor!
Contributor!
 
Posts: 1798
Joined: Mon Nov 27, 2006 7:07 pm
Location: Sweden

Postby TomasR » Mon Sep 17, 2007 1:50 am

And a Q which perhaps everyone interested in this plugin would like to have answered but have not idea to ask right now:

If you make use of height data from a map file (served by GDAL) what resolution of height data can we expect? Of course the resolution will be differ with the map but for, say, Swedish RIK-maps...
TomasR
Donated!
Donated!
 
Posts: 296
Joined: Mon Dec 12, 2005 1:31 pm
Location: Stockholm, Sweden

Postby pkan » Mon Sep 17, 2007 12:45 pm

WheresWaldo wrote:I would love to see you allow an option on which dataset to correct with instead of forcing one or another.

When custom DEMs (Digital Elevation Models) are implemented, there will probably be a list of available DEMs (including standard 1 and 3 arc second SRTM and Viewfinder Panoramas 1 and 3 arc second SRTM) where you can move DEMs up and down to change priorities. The plugin will then use the first one that covers each activity.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby pkan » Mon Sep 17, 2007 1:12 pm

gerhard wrote:There is just one thing I wish: To be able to see the the difference between the GPS and the SRTM elevation. As there are no custom graphs (yet?) the difference can be put in the PowerTrack if it is empty.

Personally I'd find graphs of GPS and SRTM elevation side by side mildly interesting, and graphs of GPS and all possible corrected elevations (SRTM1, SRTM3, Viewfinder Panoramas 1 and 3 arc seconds, and custom DEMs) side by side more interesting, but frankly I don't see much point in looking at the difference between GPS and SRTM, except possibly evaluating GPS elevation accuracy by regarding SRTM as truth, which is really outside the scope of the elevation correction plugin. And I don't want to add complexity to the interface for a feature that I don't find very useful or think that enough users will find useful. But I could send you a copy of the code to extract the saved GPS elevation data for corrected activities so that you can do whatever you want with it in your MiscPlugin.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby pkan » Mon Sep 17, 2007 1:24 pm

Monshi wrote:If you make use of height data from a map file (served by GDAL) what resolution of height data can we expect? Of course the resolution will be differ with the map but for, say, Swedish RIK-maps...

Using GDAL you can import custom DEMs in a variety of formats, and the quality of the correction will obviously depend on the quality of the DEM. But raster maps such as RIK are just georeferenced images and don't contain any elevation data (except for contours in the image, which cannot be easily or reliably extracted), so they can't be used for elevation correction. GDAL won't stop you from using the data, but you'd just end up interpreting color numbers as elevation, which is clearly nonsense.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby RonMar » Mon Sep 17, 2007 10:12 pm

Many thanks for this pluin.

I'm not sure the resulting elevations are correct or not, but they are constant for the same location and in relation to one another. This mean when I return to the start, the start and finish are the same. The same when I pass any other point more than once.

This is a great improvement! It makes the elevation graph much more useful to me.

Ron
RonMar
Donated!
Donated!
 
Posts: 3
Joined: Thu Sep 13, 2007 2:08 pm

Postby ViDi0T » Tue Sep 18, 2007 12:03 am

When using this plug in, should elevation track smoothing be turned off for the most accurate results?
ViDi0T
Donated!
Donated!
 
Posts: 119
Joined: Sun Jun 17, 2007 11:53 pm
Location: Calgary, Canada

Postby nvDolfan » Tue Sep 18, 2007 2:19 pm

While downloading all the elevation data it died about half way through and could no longer connect to the server. I tried again later and had no problems. Where is the elevation data stored so that I can delete it, and try again to see if I can duplicate it?
Running with a ForeRunner 305
FTP/HTML Export Plugin
nvDolfan
Donated!
Donated!
 
Posts: 22
Joined: Tue Aug 15, 2006 5:52 am
Location: Atlanta, GA

Postby pkan » Tue Sep 18, 2007 3:48 pm

ViDi0T wrote:When using this plug in, should elevation track smoothing be turned off for the most accurate results?

When choosing whether to use elevation smoothing, and if so how much, you'll have to factor in the quality of the raw elevation data as well as how it interacts with grade calculations and climb zones, and this gets complicated enough that I can't offer any general advice. You'll just have to see what works best for the ways you're using SportTracks. Others may be able to share their experiences.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby pkan » Tue Sep 18, 2007 4:08 pm

nvDolfan wrote:While downloading all the elevation data it died about half way through and could no longer connect to the server. I tried again later and had no problems. Where is the elevation data stored so that I can delete it, and try again to see if I can duplicate it?

I've had occasional failed downloads for Viewfinder Panoramas data when testing but never for standard SRTM data. Since you only need to download each SRTM tile once, having to try again in case a download fails shouldn't be a big deal. The downloaded elevation data is stored in the Application Data folder, right next to SportTracks downloaded map files. On my computer the path is C:\Documents and Settings\All Users\Application Data\ZoneFiveSoftware\SportTracks\2.0\Web Files\SRTM Tiles.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby WheresWaldo » Thu Sep 20, 2007 5:03 pm

pkan, again marvelous work on this plugin. I have a question. Is it possible to allow this plugin to retrieve elevation data for a created route?

I posted this same question in the enchancements forum since I wasn't sure where to ask.
WheresWaldo
 
Posts: 37
Joined: Fri May 11, 2007 7:47 pm

Postby gerhard » Thu Sep 20, 2007 5:19 pm

WheresWaldo wrote:pkan, again marvelous work on this plugin. I have a question. Is it possible to allow this plugin to retrieve elevation data for a created route?

I posted this same question in the enchancements forum since I wasn't sure where to ask.

For now, using "My Friends Activities" is better, then you will see the elevation in a chart for the routes you create, without a new version of the plugin as well.
gerhard
Contributor!
Contributor!
 
Posts: 1798
Joined: Mon Nov 27, 2006 7:07 pm
Location: Sweden

Postby pkan » Thu Sep 20, 2007 5:40 pm

WheresWaldo wrote:Is it possible to allow this plugin to retrieve elevation data for a created route?

If you're talking about elevation for manually created routes in activities then this already works, except that SportTracks doesn't handle things correctly since all track points are set to the same time. But the track point times can be changed using gerhard's MiscPlugin.

Routes in the sense of the Routes view currently can't be corrected by the plugin, but are on the list of planned enhancements.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby gerhard » Thu Sep 20, 2007 6:06 pm

pkan wrote:But I could send you a copy of the code to extract the saved GPS elevation data for corrected activities so that you can do whatever you want with it in your MiscPlugin.

I have done a separate plugin that puts the original elevation in the Power track (if it is empty). The important piece of code is from pkan's plugin.

It is separate from MiscPlugin, but a link is on the MiscPlugin page. A separate page here:
http://hem.bredband.net/gerhardnospam/i ... alysis.htm
gerhard
Contributor!
Contributor!
 
Posts: 1798
Joined: Mon Nov 27, 2006 7:07 pm
Location: Sweden

Elevation Correction in New Zealand not working

Postby Riku_Ratsumies » Tue Sep 25, 2007 7:33 pm

Gidday Pkan,

your plugin does does not appear under the edit activity menu for any of the the activities I've done in New Zealand - funnily enough, those couple of runs I've done in Australia and in Europe are working ok. Does that mean that the SRTM data is not available for New Zealand?

Cheers,
Riku
Riku_Ratsumies
Donated!
Donated!
 
Posts: 7
Joined: Wed Mar 28, 2007 10:58 pm
Location: New Zealand

Postby FLP » Wed Sep 26, 2007 3:31 am

Hello,
nice plugin but a little problem when using proxy.
The plugin doesn't use Sporttracks settings and is not able to download elevation data when behind proxy.
FLP
 
Posts: 1
Joined: Fri Apr 28, 2006 10:00 am

Re: Elevation Correction in New Zealand not working

Postby pkan » Wed Sep 26, 2007 4:51 pm

Riku_Ratsumies wrote:your plugin does does not appear under the edit activity menu for any of the the activities I've done in New Zealand - funnily enough, those couple of runs I've done in Australia and in Europe are working ok. Does that mean that the SRTM data is not available for New Zealand?

No, it means that I made a mistake when I extracted metadata for the Islands subdirectory of the NASA FTP site. :oops: This affects New Zealand and a few small islands, see here for details. It will be fixed in the next release.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby pkan » Wed Sep 26, 2007 5:24 pm

FLP wrote:nice plugin but a little problem when using proxy.
The plugin doesn't use Sporttracks settings and is not able to download elevation data when behind proxy.

I have implemented support for proxies using SportTracks settings based on a code snippet I got from admin, though I had to make some small adjustments since the plugin is doing ftp using a WebClient and SportTracks is doing http using a WebResponse. Unfortunately I haven't been able to do any testing at all. If you PM me we might be able to work out some way of finding out exactly what goes wrong and hopefully fix it. If anyone else has any suggestions on how I could test proxies myself or is willing to help out testing I'm very interested.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Proxy

Postby nvDolfan » Wed Sep 26, 2007 5:32 pm

Your plugin worked fine for me for behind my proxy using the default SportTrack settings (This is behind my work proxy). At home, I use no proxy. It took a while to start downloading, but then it finally started going. I can help do some additional testing if you would like.
Cheers
-Chris
Running with a ForeRunner 305
FTP/HTML Export Plugin
nvDolfan
Donated!
Donated!
 
Posts: 22
Joined: Tue Aug 15, 2006 5:52 am
Location: Atlanta, GA

Next

Return to Elevation Correction

Who is online

Users browsing this forum: No registered users and 2 guests