Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Something (scale?) wrong with elevation graphs #1241

Closed
eliotb opened this issue May 20, 2022 · 8 comments
Closed

Something (scale?) wrong with elevation graphs #1241

eliotb opened this issue May 20, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@eliotb
Copy link

eliotb commented May 20, 2022

Screenshot_20220520-211636_OpenTracks

The elevation graph does not correspond to the track, both in by time and by distance views.
Both horizontal and vertical scale of graph vs grid seem very wrong - see screenshot.
The marker pin was placed when at the highest elevation. (Pin time seems right, elevation wrong)
The track was a loop that started and finished at the same point.
When viewed in osmand, the exported track is a complete loop, and the elevation is correct. The highest point is about 480m.

The speed graph seems correct (slower uphill until the marker pin, faster downhill after marker)

To Reproduce
View graphs for any track.

If applicable:

Technical information

  • Device: samsung s9+
  • OS: /e/ OS - Android 10 - 20220406
  • OpenTracks version: v3.27.0
@eliotb eliotb added the potential bug A bug that could not (yet) be reproduced label May 20, 2022
@dennisguse
Copy link
Member

Thanks for the report.
Some things:

  • in the UI OpenTracks presents elevation as EGM2008 (more or less sea level) while the GPS/export provides WGS84.
    Most other applications present just WGS84 - so an offset is expected.
  • the marker is always shown on top and not at the computed elevation (if I remember correctly).

Anyhow, the elevation plot should look different if you did a loop.
We apply some filtering to the elevation (as it is noisy due to GPS) - this removes the spikes, but it should look different.

Did you notice this with previous versions as well?

@eliotb
Copy link
Author

eliotb commented May 21, 2022

Screenshot_20220521-211314_OsmAnd+
here is the track opened in osmand, with elevation profile as expected

It has been a problem for a little while, sorry i cant be specific about when i first noticed it

@dennisguse dennisguse added bug Something isn't working and removed potential bug A bug that could not (yet) be reproduced labels May 21, 2022
@dennisguse
Copy link
Member

I have checked some of my recordings and some of them feel incorrect in the diagram.
They do not go back down to starting elevation although they should have.

This will need some investigation...
Problem might be in the TrackStatisticsUpdater.

@frasty
Copy link

frasty commented May 24, 2022

Just checked and the elevation graph does not correspond to the real eleavation in most of my workouts. Tbh, I find this level of graph smoothing unnecessary. Maybe it would be helpful in this regard if the y-axis could be scaled down more proprortionally to distance/time.

Screenshot_2022-05-24-14-34-50-25_8cd9656eedb0a8fea9f89ba34766622d
Screenshot_2022-05-24-14-37-00-21_8cd9656eedb0a8fea9f89ba34766622d

Compared to GPX Viewer app:
GPX Viewer

@frasty
Copy link

frasty commented May 24, 2022

As a second thought, I see that GPX Viewer shows the graphs in WGS84 proj, but the problem here is another I think, as the peak elevation differs way more than the difference between WGS84 and EGM2008.

@dennisguse
Copy link
Member

That doesn't sound good. At least the difference should be almost identical.
Might be a problem in the rendering of the diagram / scale as well.
And the smoothing might be a problem.

Anyhow, more than one thing seems to be broken.

@InvncibiltyCloak
Copy link

Hopefully this is helpful. I have compared the GPX export from OpenTracks vs the plot shown in OpenTracks GUI and the two definitely do not match at all.

I ran the GPX through Python to get the plot shown, so there is no other software mucking with the elevation data in the GPX. The trail was a there and back, so the final elevation should approximately match start elevation (other than not starting the track immediately).

Because the Python plot appears to be correct, OpenTracks appears to be recording the correct data, it is just displaying it incorrectly. Hope this helps narrow things down.

I have seen the same result for multiple hikes, where the there-and-back hike ends at an elevation very different from the start elevation. They typically end somewhere close to the average elevation during the hike, (which to me suggests a problem in the filtering).

Screenshot_20220610-131632_OpenTracks
plot

@dennisguse dennisguse pinned this issue Jun 11, 2022
@dennisguse
Copy link
Member

Found the problem: for the diagrams only, we have some code that smoothes the altitude.
And that doesn't work properly.

Removing the smoothing solves the issue.
image

dennisguse added a commit that referenced this issue Jun 11, 2022
…GPS-reported value.

Was only used for statistics in exports.

Follow-up to #1241.
@dennisguse dennisguse unpinned this issue Jun 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants