Skip to content

Commit

Permalink
diameter instead of radius
Browse files Browse the repository at this point in the history
Acceleration for part circle calculated with radius instead of diameter. So therefore the speeds were too slow.
  • Loading branch information
arne182 authored Jul 14, 2019
1 parent aab1c80 commit 127b160
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion selfdrive/mapd/mapd_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 127b160

Please sign in to comment.