feat: use 'flying' mode for speeds >150mph, keep 'transit' for rail
This commit is contained in:
@@ -45,6 +45,8 @@ def _activity_type_to_travel_mode(activity_type):
|
||||
return None
|
||||
if t == 'IN_RAIL_VEHICLE':
|
||||
return 'transit'
|
||||
if t == 'IN_PASSENGER_VEHICLE' or t == 'FLYING':
|
||||
return 'flying'
|
||||
if t in VEHICLE_ACTIVITIES:
|
||||
return 'driving'
|
||||
if t in WALKING_ACTIVITIES:
|
||||
@@ -57,7 +59,7 @@ def _activity_type_to_travel_mode(activity_type):
|
||||
def _speed_to_travel_mode(max_speed_mph):
|
||||
"""Infer travel mode from maximum speed observed along a path."""
|
||||
if max_speed_mph > 150:
|
||||
return 'transit' # flight
|
||||
return 'flying'
|
||||
if max_speed_mph > 15:
|
||||
return 'driving'
|
||||
if max_speed_mph > 3:
|
||||
|
||||
Reference in New Issue
Block a user