Elevation Correction

by pkan

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

Version:

1.9

Updated:

Nov 29, 2017

Elevation correction plugin

Postby ricomundy » Sun Feb 03, 2008 12:20 am

admin wrote:I'm pretty sure it was written to average the DEM data around the GPS point


I'm not talking about individual points. I'm talking about a situation with datapoints like these which comes directly from elevation that the elevation correction plugin has provided for a certain road.:

point1: elevation = 545 feet
point2: elevation = 571 feet, distance = 110 feet (+26 feet)
point3: elevation = 562 feet, distance = 132 feet (-9 feet)
point4: elevation = 598 feet, distance = 153 feet (+36 feet)
point5: elevation = 565 feet, distance = 158 feet (-33 feet)
point6: elevation = 573 feet, distance = 69 feet (+8 feet)
point7: elevation = 618 feet, distance = 227 feet (+45 feet)
point8: elevation = 662 feet, distance = 190 feet (+44 feet)

The reality of the road that this data comes from is a climb, there are no descents at all, it is consistent climbing. So I'm thinking about something that would raise the lowest data point, lower the higher ones but take into account the overall tendency which is a climb, or in other cases a descent or flat. Perhaps it could be configured to smooth things over a specified distance like .10 mile or .25

Thanks for listening
ricomundy
Donated!
Donated!
 
Posts: 20
Joined: Fri Dec 22, 2006 1:07 pm
Location: Angwin, California

Postby gerhard » Sun Feb 03, 2008 6:54 am

ricomundy wrote:What I would love to have is an averaging function that would smooth out this spike noise between points and give an elevation profile that more closely matches reality where the road flows up and down.


You can still use the averaging within ST when viewing the profile.
The smoothing unfortunately depends on the type of the activity. Could be related to category, but the configuration will be overwhelming for most users...
gerhard
Contributor!
Contributor!
 
Posts: 1747
Joined: Mon Nov 27, 2006 7:07 pm
Location: Sweden

Postby pkan » Sun Feb 03, 2008 1:11 pm

@ricomundy: What DEM are you using? In the United States, you will probably get the best results by using National Elevation Dataset data rather than the default SRTM data.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby Inqu » Wed Feb 27, 2008 1:55 am

Hello pkan,

I recently installed your plugin, and everything looks alright except the Remove, Add folder, and Add DEM buttons are greyed out.

This is on Vista x64 using SportTracks 2.0.2957. I have ran SportTracks as a regular user and Administrator with the same results.

I am having a separate issue with the GDAL plugin not showing up in Plugins, so I'm not sure if that's related to this issue or not. I thought I'd mention it since it uses the GDAL plugin for the DEM's.

Any ideas?

Mahalo!
Inqu
 
Posts: 10
Joined: Mon Feb 25, 2008 6:17 pm

Postby trell » Wed Feb 27, 2008 10:21 am

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.ThrowHelper.ThrowArgumentOutOfRangeException()
at ElevationCorrectionPlugin.Settings.SettingsPageControl.RefreshInstalledDem()
at ElevationCorrectionPlugin.Settings.SettingsPageControl..ctor()
at ElevationCorrectionPlugin.Settings.SettingsPage.CreatePageControl()
at ZoneFiveSoftware.SportTracks.UI.Controls.ViewSettingsPageAdapter.CreatePageControl()
at ZoneFiveSoftware.SportTracks.UI.ViewNavigationManager.ShowCurrentView()

plugin page of 1.2.0 in 2.0.2976
trell
 
Posts: 165
Joined: Sat May 21, 2005 2:17 pm

Postby pkan » Wed Feb 27, 2008 12:05 pm

Seems to be the same problem that was reported in another thread (which may be hard to find since it doesn't mention elevation correction in the title): http://www.zonefivesoftware.com/SportTr ... php?t=2765

I sent a version with some improvements and more debug info to icfantv who couldn't reproduce the problem with the new version. If you PM me with your email address I can send the updated version to you as well, so that you can check if it solves the problem for you. Then I'll make a public release. The new version also includes the option of excluding some devices from automatic correction at import, as requested by fishyweb above.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby pkan » Wed Feb 27, 2008 5:51 pm

The other thread I linked to may actually be very hard to find for most users, since it is in the developers forum. :)

Anyway, it turns out that you get this error the first time you run ST with the elevation correction plugin installed, and correction won't work, but next time you start ST everything will be working fine. To reproduce it you can remove the elevation correction settings from the ST preferences file, or delete the preferences file. (Be sure to save a copy if you want to experiment with this.)

I have fixed this now, and will make a new release next week. But until then restarting ST should be enough to fix the problem.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby DavidCHall » Wed Feb 27, 2008 11:57 pm

After installing both Elevation Correction and GDAL all works as expected (both setting pages as expected, elevation correction works, files were downloaded) except (in an attempt to try other formats) I cannot get past the fact that Remove, Add folder, and Add DEM are all greyed.

What am I doing wrong?

[Edit: See a similar problem (greyed buttons) posted previously (Inqu): Not sure if the responses posted are related to this issue or the next post re an exception error (trell), or both]

Will probably have to apologise later for asking a stupid question, so may as well do so now and save a second post: :oops:
DavidCHall
Donated!
Donated!
 
Posts: 870
Joined: Mon Sep 24, 2007 8:29 am
Location: Cape Town, South Africa

Postby pkan » Thu Feb 28, 2008 4:09 am

Remove DEM is enabled when you've selected a non-SRTM DEM, which cannot happen until you've added your own DEMs (or DEM folders).

Add folder and Add DEM is enabled if GDAL is available. If you have installed the GDAL plugin but Add folder and Add DEM are still greyed out then something is wrong.

The exception error (trell) is unrelated. The other greyed button problem (Inqu), which I hadn't noticed, seems similar but in this case it seems to be a pure GDAL plugin problem since the GDAL plugin doesn't show up in Plugins. In your case the GDAL plugin shows up so it doesn't seem like exactly the same thing. Are you running on Vista?
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby DavidCHall » Thu Feb 28, 2008 4:35 am

To confirm details:

1. OS is XP Pro SP2, fully patched. .NET 1, 2, 3.5 loaded, patched.
2. ST2 is 2.0.2976

GDAL shows as expected on the settings page.

Elevation Correction gave the expected eception error when run the first time only (at which point GDAL was NOT installed): Second run (with GDAL installed) was fine. [So the error cleared because of running a second time, or because GDAL was found, or both]

Remove DEM grey as expected... Elevation correction works as expected.

But Add folder and Add DEM are greyed....
DavidCHall
Donated!
Donated!
 
Posts: 870
Joined: Mon Sep 24, 2007 8:29 am
Location: Cape Town, South Africa

Postby pkan » Thu Feb 28, 2008 8:13 am

I'll get in touch with you next week and see if we can find a way to sort this out.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby DavidCHall » Thu Feb 28, 2008 8:54 am

pkan wrote:I'll get in touch with you next week and see if we can find a way to sort this out.


:D Feel free to mail me on PM and I will provide any diagnostics you may require.
DavidCHall
Donated!
Donated!
 
Posts: 870
Joined: Mon Sep 24, 2007 8:29 am
Location: Cape Town, South Africa

Postby Inqu » Thu Feb 28, 2008 2:49 pm

Hello pkan,

I got the GDAL Plugin working on a 32-bit Vista machine. On that same machine, the aforementioned buttons are still greyed out on the Elevation Correction plugin page.

Vista Business 32-bit (ignoring the 64-bit for now)
Sport Tracks 2.0.2976
GDAL Plugin 1.0.1

I have tried running as Admin and a regular user with the same results. No Error is generated in the SportTracks log.
Inqu
 
Posts: 10
Joined: Mon Feb 25, 2008 6:17 pm

Postby fishyweb » Fri Feb 29, 2008 3:13 am

I have also noticed those greyed out buttons but, not having any alternate DEMs to load, had not investigated or reported the issue. FWIW, I'm on Vista Ultimate (32 bit).
Steve
Using Garmin FR 230 for running, and Garmin Edge 820 (with cad, power and HR) for cycling
fishyweb
Donated!
Donated!
 
Posts: 155
Joined: Wed May 18, 2005 1:20 pm
Location: Oxfordshire, UK

Total climb data

Postby pappatho » Sat Mar 15, 2008 7:03 am

I am using your elevation correction with DEMs loaded. I just had done a workout on a flat loop. The elevation data shows the distance between the high point and the low point as a little over 10 ft. This matches very well with the topo map SportTracks shows as well as what the trail looks like. The issue I am seeing is I had done two loops, so I had climbed over 20 ft. The elevation map in SportTracks shows this as well. However in the summary area at the top of SportTracks the "Climb (ft)" column is showing +11/-4.
pappatho
 
Posts: 30
Joined: Tue Jan 22, 2008 10:24 pm

Postby pkan » Sun Mar 16, 2008 5:32 am

The climb values depend on the way you've set up your climb zones and the way your climb zones interact with your smoothing settings. When computing climb values, SportTracks ignores the "flat" parts of the activity. I'm pretty sure this has been discussed in other threads, which you may be able to find with the forum search function.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby pkan » Tue Mar 25, 2008 3:02 pm

I have released an updated version 1.3 of the elevation correction plugin. The original post in this thread has been updated to reflect the changes. The most important changes are:
- New option to specify sources that should be excluded from automatic correction at import, as suggested by fishyweb above.
- The problem discussed above where the plugin didn't work and generated errors the first time it was run has been fixed.
- This version works with (and requires) GDAL plugin v1.1 and higher. Hopefully this combination should solve the problems some people have had with Add folder and Add DEM grayed out. If not, both plugins have better support for troubleshooting built in.

Let me stress once more: If you're using the GDAL plugin you need to upgrade it to version 1.1.0.12 (or later) when you upgrade the elevation correction plugin to version 1.3.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Postby trell » Fri Mar 28, 2008 6:07 pm

I have the impression that the elevation is a little too high with the latest version. Happens only to me? I think it is not happening with previous versions, but little used.
for ex in st1 (tested more time) elevation is 1390, after import in st2 i got 1240 (No significant variations changing smothing only few m), then apply elevation correction the value is 1820.
trell
 
Posts: 165
Joined: Sat May 21, 2005 2:17 pm

Postby pkan » Sat Mar 29, 2008 5:48 am

trell wrote:I have the impression that the elevation is a little too high with the latest version.

There should be no difference between the latest version and previous versions. In general, the correction is only as good as the digital elevation model it is based on, cf the caveats in the plugin description. You'll have to look at the resulting elevation profile and judge for yourself whether it seems reasonable.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

Cannot add DEM source

Postby mlennox » Thu Apr 03, 2008 2:28 pm

I can no longer seem to add to the list of DEM sources in the plugin settings. I'm not sure when this stopped working, but the buttons to add DEMs or folders is greyed out now.
mlennox
 
Posts: 128
Joined: Thu Jul 27, 2006 10:02 pm

Postby mlennox » Thu Apr 03, 2008 2:36 pm

Never mind, I figured it out. New GDAL plugin. :-)
mlennox
 
Posts: 128
Joined: Thu Jul 27, 2006 10:02 pm

Postby Meven » Thu Apr 10, 2008 11:43 pm

Just putted the 1.3 because the last version work no more (didn't see it was out).

It works fine and really good ! Nice works pkan :oops:
Meven
Contributor!
Contributor!
 
Posts: 884
Joined: Sun Mar 11, 2007 4:56 am
Location: France

ICSharpCodeZip - 2 versions?

Postby texmurphy » Mon Apr 14, 2008 5:50 pm

There are two released versions of ICSharpCodeZipLib.dll currently in plugin releases:

1. With v1.1.5 of the Activity Picture Plugin (184Kb 8September2007); and
2. With v1.3.0 of the Elevation Correction Plugin (176Kb 23June2007)

I upgraded the Activity Picture Plugin recently which replaced the older ICSharpCodeZip.dll. This version breaks the Elevation Correction Plugin :evil:
texmurphy
Donated!
Donated!
 
Posts: 2076
Joined: Wed Jul 05, 2006 7:38 pm
Location: Maryland, USA

Postby TomasR » Tue Apr 15, 2008 5:01 am

O shit, another DLL-conflict :(

Since there exist support of Zip-archives in Windows API (versions?) perhaps we can go around the problem by use of them?

or can this be circumvented by setting the plugin (the reference in the project) to use specific version of a DLL? :?:

The problem is as this:
The first plugin to start/use the zip-library loads the version it finds (in the same folder). When next plugin starts it finds that the desired DLL, as far as it knows, is already loaded. Now the question is - if the latter plugin knows which version of the DLL to use, if it finds another version loaded in memory will it then try to load its specific version?

Missed a link:
http://www.codeproject.com/KB/cs/decompresswinshellapics.aspx
TomasR
Donated!
Donated!
 
Posts: 265
Joined: Mon Dec 12, 2005 1:31 pm
Location: Stockholm, Sweden

Re: ICSharpCodeZip - 2 versions?

Postby pkan » Tue Apr 15, 2008 3:21 pm

texmurphy wrote:There are two released versions of ICSharpCodeZipLib.dll currently in plugin releases:

1. With v1.1.5 of the Activity Picture Plugin (184Kb 8September2007); and
2. With v1.3.0 of the Elevation Correction Plugin (176Kb 23June2007)

I upgraded the Activity Picture Plugin recently which replaced the older ICSharpCodeZip.dll. This version breaks the Elevation Correction Plugin :evil:

In what way does the Elevation Correction Plugin break? I just downloaded v1.1.5 of the Activity Picture Plugin and installed it, and the Elevation Correction Plugin still worked fine, downloading and unzipping SRTM data as needed. I then copied the September 8 version of ICSharpCodeZipLib.dll to the Elevation Correction Plugin folder and restarted my computer just to make sure. The plugin still worked just fine.

In Visual C# there is a property Specific Version for referenced assemblies that can be set to Yes or No. I've left it at No for ICSharpCodeZip.dll, but of course I could change to Yes if that helps. Since I bundle the dll with my plugin the proper setting might be Yes. I don't know what happens if two plugins require specific but different versions of the same assembly.
pkan
Donated!
Donated!
 
Posts: 145
Joined: Fri May 12, 2006 2:26 pm
Location: Sweden

PreviousNext

Return to Elevation Correction

Who is online

Users browsing this forum: No registered users and 1 guest