diff --git a/release/files_common b/release/files_common index 6a40da7af0..afa5b8772d 100644 --- a/release/files_common +++ b/release/files_common @@ -216,7 +216,6 @@ selfdrive/controls/lib/speed_smoother.py selfdrive/controls/lib/fcw.py selfdrive/controls/lib/long_mpc.py selfdrive/controls/lib/long_mpc_model.py -selfdrive/controls/lib/gps_helpers.py selfdrive/controls/lib/driverview.py selfdrive/controls/lib/cluster/* diff --git a/selfdrive/controls/lib/gps_helpers.py b/selfdrive/controls/lib/gps_helpers.py deleted file mode 100755 index e9e7d6c9ee..0000000000 --- a/selfdrive/controls/lib/gps_helpers.py +++ /dev/null @@ -1,19 +0,0 @@ -_RHD_REGION_MAP = [ ['AU', -54.76, -9.23, 112.91, 159.11], \ - ['IN1', 6.75, 28.10, 68.17, 97.4], \ - ['IN2', 28.09, 35.99, 72.18, 80.87], \ - ['IE', 51.42, 55.38, -10.58, -5.99], \ - ['JP1', 32.66, 45.52, 137.27, 146.02], \ - ['JP2', 32.79, 37.60, 131.41, 137.28], \ - ['JP3', 24.04, 34.78, 122.93, 131.42], \ - ['MU', -20.53, -19.98, 57.30, 57.81], \ - ['MY', 0.86, 7.36, 99.64, 119.27], \ - ['NZ', -52.61, -29.24, 166, 178.84], \ - ['UK', 49.9, 60.84, -8.62, 1.77], \ - ['ZA', -34.83, -22.13, 16.47, 32.88] ] - -def is_rhd_region(latitude, longitude): - for region in _RHD_REGION_MAP: - if region[1] <= latitude <= region[2] and \ - region[3] <= longitude <= region[4]: - return True - return False diff --git a/selfdrive/controls/tests/test_monitoring.py b/selfdrive/controls/tests/test_monitoring.py index af44dc3329..163766f40c 100644 --- a/selfdrive/controls/tests/test_monitoring.py +++ b/selfdrive/controls/tests/test_monitoring.py @@ -6,7 +6,6 @@ from selfdrive.controls.lib.driver_monitor import DriverStatus, MAX_TERMINAL_ALE _AWARENESS_PROMPT_TIME_TILL_TERMINAL, _DISTRACTED_TIME, \ _DISTRACTED_PRE_TIME_TILL_TERMINAL, _DISTRACTED_PROMPT_TIME_TILL_TERMINAL, \ _POSESTD_THRESHOLD, _HI_STD_TIMEOUT -from selfdrive.controls.lib.gps_helpers import is_rhd_region _TEST_TIMESPAN = 120 # seconds _DISTRACTED_SECONDS_TO_ORANGE = _DISTRACTED_TIME - _DISTRACTED_PROMPT_TIME_TILL_TERMINAL + 1 @@ -70,19 +69,6 @@ def run_DState_seq(driver_state_msgs, driver_car_interaction, openpilot_status, return events_from_DM, DS class TestMonitoring(unittest.TestCase): - # -1. rhd parser sanity check - def test_rhd_parser(self): - cities = [[32.7, -117.1, 0],\ - [51.5, 0.129, 1],\ - [35.7, 139.7, 1],\ - [-37.8, 144.9, 1],\ - [32.1, 41.74, 0],\ - [55.7, 12.69, 0]] - result = [] - for city in cities: - result.append(int(is_rhd_region(city[0],city[1]))) - self.assertEqual(result,[int(city[2]) for city in cities]) - # 0. op engaged, driver is doing fine all the time def test_fully_aware_driver(self): events_output = run_DState_seq(always_attentive, always_false, always_true, always_false)[0]