tkrajina / gpxpy

gpx-py is a python GPX parser. GPX (GPS eXchange Format) is an XML based file format for GPS tracks.
Apache License 2.0
987 stars 223 forks source link

Uphill Downhill are not accurate #252

Closed byrod closed 1 year ago

byrod commented 1 year ago

Hello I have an issue with the get_uphill_downhill()

Downhill and uphill are ok if upload my gpx on this website for example (visugpx.c*m) Uphill / Downhill : ~ +228m -230 m

With gpxinfo they are: Total uphill: 480.07m Total downhill: 259.27m

SportsTracker-Walking-20210614-60c7399c5dce230db45a63a4.zip

I didn't find any help by searching by myself, so I post here. Sorry if this is not an issue.

tkrajina commented 1 year ago

The problem is that the first few points in your track have no elevations and gpxpy is treating that as elevation=0.

I changed that now (https://github.com/tkrajina/gpxpy/commit/4ca77c1dc6e5bbf39d045d288e39af5873ba086f) and it should be fixed in the new version.

byrod commented 1 year ago

Thank you !