From dcb660cfe5c6dfcae7d99ed3f7155b6543601ae7 Mon Sep 17 00:00:00 2001 From: Fmstrat Date: Wed, 13 Oct 2021 21:33:25 -0400 Subject: [PATCH] Added stopped_speed_threshold to support slow movement --- fittrackee/workouts/utils_gpx.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fittrackee/workouts/utils_gpx.py b/fittrackee/workouts/utils_gpx.py index 84ec47f1..56cc8c83 100644 --- a/fittrackee/workouts/utils_gpx.py +++ b/fittrackee/workouts/utils_gpx.py @@ -42,7 +42,7 @@ def get_gpx_data( gpx_data['uphill'] = hill.uphill gpx_data['downhill'] = hill.downhill - mv = parsed_gpx.get_moving_data() + mv = parsed_gpx.get_moving_data(stopped_speed_threshold=0.1) gpx_data['moving_time'] = timedelta(seconds=mv.moving_time) gpx_data['stop_time'] = ( timedelta(seconds=mv.stopped_time) + stopped_time_between_seg @@ -105,8 +105,8 @@ def get_gpx_info( if update_map_data: map_data.append([point.longitude, point.latitude]) segment_max_speed = ( - segment.get_moving_data().max_speed - if segment.get_moving_data().max_speed + segment.get_moving_data(stopped_speed_threshold=0.1).max_speed + if segment.get_moving_data(stopped_speed_threshold=0.1).max_speed else 0 )