diff --git a/sunnypilot/navd/navigation_helpers/nav_instructions.py b/sunnypilot/navd/navigation_helpers/nav_instructions.py index 6459c785cb..9d4ea000e9 100644 --- a/sunnypilot/navd/navigation_helpers/nav_instructions.py +++ b/sunnypilot/navd/navigation_helpers/nav_instructions.py @@ -114,7 +114,7 @@ class NavigationInstructions: self.coord.latitude = current_lat self.coord.longitude = current_lon distance = self.coord.distance_to(progress['next_turn']['location']) - if distance <= 100: + if distance <= 30.0: modifier = progress['next_turn']['modifier'] return str(modifier) return 'none' diff --git a/sunnypilot/navd/navigation_helpers/tests/test_mapbox.py b/sunnypilot/navd/navigation_helpers/tests/test_mapbox.py index 2c025bd407..1e477604ad 100644 --- a/sunnypilot/navd/navigation_helpers/tests/test_mapbox.py +++ b/sunnypilot/navd/navigation_helpers/tests/test_mapbox.py @@ -61,7 +61,7 @@ class TestMapbox: if self.route['steps']: turn_lat = self.route['steps'][1]['location'].latitude turn_lon = self.route['steps'][1]['location'].longitude - close_lat = turn_lat - 0.0008 # 80 ish meters before the turn + close_lat = turn_lat - 0.00025 # slightly before the turn if self.progress and self.progress.get('next_turn'): expected_turn = self.progress['next_turn']['modifier'] upcoming_close = self.nav.get_upcoming_turn_from_progress(self.progress, close_lat, turn_lon)