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: