From 127b16077e02dc05318d10232fc42ab95fc69e38 Mon Sep 17 00:00:00 2001 From: Arne Schwarck Date: Sun, 14 Jul 2019 20:39:14 +0200 Subject: [PATCH] diameter instead of radius Acceleration for part circle calculated with radius instead of diameter. So therefore the speeds were too slow. --- selfdrive/mapd/mapd_helpers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/mapd/mapd_helpers.py b/selfdrive/mapd/mapd_helpers.py index f363810b904652..82364dde75cc67 100644 --- a/selfdrive/mapd/mapd_helpers.py +++ b/selfdrive/mapd/mapd_helpers.py @@ -253,7 +253,7 @@ def max_speed_ahead(self, current_speed_limit, lat, lon, heading, lookahead): a = 111132.954*math.cos(float(latmax+latmin)/360*3.141592)*float(lonmax-lonmin) else: circle = circle_through_points([way.way.nodes[0].lat,way.way.nodes[0].lon,1], [way.way.nodes[1].lat,way.way.nodes[1].lon,1], [way.way.nodes[-1].lat,way.way.nodes[-1].lon,1]) - a = 111132.954*math.cos(float(latmax+latmin)/360*3.141592)*float(circle[2]) + a = 111132.954*math.cos(float(latmax+latmin)/360*3.141592)*float(circle[2])*2 speed_ahead = np.sqrt(1.6075*a) min_dist = 999.9 for w in way_pts: