remove yet another reverse geocoder

pull/1407/head
Willem Melching 2020-04-24 14:07:36 -07:00
parent 267ee4d73b
commit 70ae01e3cd
3 changed files with 0 additions and 34 deletions

View File

@ -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/*

View File

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

View File

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