-
Notifications
You must be signed in to change notification settings - Fork 20
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
FIT waypoints with no elevation data converted to NaN but should be 0 #15
Comments
Hi Matt - thanks for raising this! I was not aware the schema did not support nan, although this makes sense. Aware that the way you've solved the issue may be appropriate for your needs and when riding at sea level, however I fear hard coding NaN elevations to zero could really screw up some ride data (e.g. elevation totals calculated on Strava, Garmin Connect, and other platforms) if this issue were to occur at altitude. For example, if a device mistakenly records NaN elevation for a point at altitude (e.g. 2000m), but the points around it capture the altitude, then hardcoding the NaN to zero could artificially create 2000m elevation gain from one point to another. Do you think there are other ways to solve this? For example, not coding an elevation field to the specific track point (rather than coding a NaN value). |
Hi, thanks for responding.
I think you make a valid point. I didn't realize the elevation parameter was optional. But looking now I see in your function docstring that the What do you think about this patch to my PR. I interpret what you're suggesting to be something like this. Basically I only provide the elevation param if it's a valid number and not
Thanks. |
I've verified this works @dodo-saba. It doesn't add
|
My Wahoo Elemnt Roam frequently takes a long time to calculate elevation. This is probably because they indicate that using barometric pressure to calculate elevation is impacted by riding near large bodies of water [0]. I live on an isthmus surrounded by water and it can sometimes take up to 15 minutes to calculate my elevation. Thus the elevation data on my rides may contain waypoints with no elevation data when I start riding.
In these situations, the empty waypoint elevation data in the FIT file unfortunately becomes
nan
when fit2gpx converts it to GPX. This is not supported in the schema, which says<ele></ele>
should be a decimal [1]. An example of a waypoint elevation showingnan
:I think
fit2gpx
should instead represent these unknown elevation points with 0 rather thannan
.I'll open a PR to resolve.
The text was updated successfully, but these errors were encountered: