Closed thot1 closed 4 years ago
I suppose you mean two track point, not waypoints, right? If that's the case I think this should be fixed with a37b6228ce84249e120035297014ce104d7ba5b0.
Hi! My Tomtom runner watch sometimes also produces multiple trackpoints per second. I was just about to propose the same bugfix ;)
Could you please create a release that contains this fix?
In case it helps for regression testing, I attached a stripped version of a gpx file that throws the FloatDivisionByZero error when calling get_moving_data() of gpxpy 1.4.0
@mjb6 1.4.1
with that fixed was already released. But I also released 1.4.2
now.
If the same timestamp is set in two consecutive waypoints, a division by zero results.
In file gpx.py 896 timedelta = point.time - previous.time # =0 918 speeds_and_distances.append((distance / mod_utils.total_seconds(timedelta), distance, )
Ok, I admit that my sports watch has probably made a mistake :-)