Merge pull request #98 from Fmstrat/stopped_fix

Added stopped_speed_threshold to support slow movement
This commit is contained in:
Sam 2021-11-11 16:07:51 +01:00 committed by GitHub
commit 7682ccc6aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
)