Max & Min altitude #5
Conversation
There was a problem hiding this comment.
Here's a question that I don't know the answer to... Is every TCX file guaranteed to have ns:AltitudeMeters? If not, or if the list can possibly be empty, then taking the max of an empty list will fail (and dividing by len(altitude) in altitude_avg will also fail).
Do you know what the spec says? It might be best to just assume that altitude_points can be empty, in which case we should check for that and return zero in these 2 methods and altitude_avg.
|
I have not seen a TCX file without altitude yet. In fact, I do not see any special problem here. |
|
Here's an example: https://forums.garmin.com/showthread.php?220362-Export-to-TCX-Where-s-the-Elevation-Data&s=df7adbf1a3b64d568435d93c0967b1d0 My original files had altitude data, but when I exported them from that service, it had been stripped, so it would be nice not to break in those cases. In any case, I agree with doing it as a separate PR. This one looks good. 👍 |
|
👍 |
Max and Min altitude were missing.