{"action":"created","issue":{"url":"https://api.github.com/repos/tkrajina/gpxpy/issues/44","labels_url":"https://api.github.com/repos/tkrajina/gpxpy/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/tkrajina/gpxpy/issues/44/comments","events_url":"https://api.github.com/repos/tkrajina/gpxpy/issues/44/events","html_url":"https://github.com/tkrajina/gpxpy/pull/44","id":78224940,"number":44,"title":"Fix uphill/downhill calculation on missing values","user":{"login":"cajus","id":722353,"avatar_url":"https://avatars.githubusercontent.com/u/722353?v=3","gravatar_id":"","url":"https://api.github.com/users/cajus","html_url":"https://github.com/cajus","followers_url":"https://api.github.com/users/cajus/followers","following_url":"https://api.github.com/users/cajus/following{/other_user}","gists_url":"https://api.github.com/users/cajus/gists{/gist_id}","starred_url":"https://api.github.com/users/cajus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cajus/subscriptions","organizations_url":"https://api.github.com/users/cajus/orgs","repos_url":"https://api.github.com/users/cajus/repos","events_url":"https://api.github.com/users/cajus/events{/privacy}","received_events_url":"https://api.github.com/users/cajus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-05-19T19:40:43Z","updated_at":"2015-05-27T18:44:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tkrajina/gpxpy/pulls/44","html_url":"https://github.com/tkrajina/gpxpy/pull/44","diff_url":"https://github.com/tkrajina/gpxpy/pull/44.diff","patch_url":"https://github.com/tkrajina/gpxpy/pull/44.patch"},"body":"When reading a GPX file with two <ele> dropouts (None), I noticed that the uphill/downhill calculation returns very high values. The PR fixes that basically.\r\n\r\nAll in all, the calculated values still seem a little high for a random tour picked from [here](http://www.gps-tour.info/de/touren/download.106012.html?tour_action=download&format=orig&version=) - it is ~200m away from the value calculated by the GPS portal. But as long we cannot see what they did to get their values, its just a guess which result is more correct, anyway ;-)"},"comment":{"url":"https://api.github.com/repos/tkrajina/gpxpy/issues/comments/106029020","html_url":"https://github.com/tkrajina/gpxpy/pull/44#issuecomment-106029020","issue_url":"https://api.github.com/repos/tkrajina/gpxpy/issues/44","id":106029020,"user":{"login":"tkrajina","id":379243,"avatar_url":"https://avatars.githubusercontent.com/u/379243?v=3","gravatar_id":"","url":"https://api.github.com/users/tkrajina","html_url":"https://github.com/tkrajina","followers_url":"https://api.github.com/users/tkrajina/followers","following_url":"https://api.github.com/users/tkrajina/following{/other_user}","gists_url":"https://api.github.com/users/tkrajina/gists{/gist_id}","starred_url":"https://api.github.com/users/tkrajina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkrajina/subscriptions","organizations_url":"https://api.github.com/users/tkrajina/orgs","repos_url":"https://api.github.com/users/tkrajina/repos","events_url":"https://api.github.com/users/tkrajina/events{/privacy}","received_events_url":"https://api.github.com/users/tkrajina/received_events","type":"User","site_admin":false},"created_at":"2015-05-27T18:44:11Z","updated_at":"2015-05-27T18:44:11Z","body":"I'm not saying my branch is better than yours, I just wanted to create a test before merging your changes. Then I found another way to fix the same thing (13e301ac131a2f29d152534f6d9920ab3d06a65c) maybe a little simpler (but far from perfect, it would be better to filter them immediately after the declaration of get_uphill_downhill).\r\n\r\nTry this:\r\n\r\npython -m unittest test.MinidomTests.test_uphill_downhill_with_missing_values\r\n\r\n...then revert 13e301ac131a2f29d152534f6d9920ab3d06a65c and try it again, you'll see that same 200m difference.\r\n\r\nIf you can cherry-pick 7971c1d45bd4bc3887337fbb48ff879baf445f28 into your branch and fix the test -- I'll merge your PR immediately."}}