nav_algo.navigation_helper module¶
-
nav_algo.navigation_helper.
assessCollision
(obst_point, obst_point_2, time, boat=<module 'nav_algo.boat' from '/Users/courtneymcbeth/Desktop/CUSail/raspberrypi/nav_algo/boat.py'>)¶ Checks if collision occurs. Returns new waypoint if collision, else None
obst_point: position of obstacle at time 0 obst_point_2: position of obstacle at time time time: time between detection of obst_point and obst_point_2
-
nav_algo.navigation_helper.
buoy_offset
(start_point, buoy, dist)¶
-
nav_algo.navigation_helper.
check_overlap
(box_coords, obst_coords, axis)¶
-
nav_algo.navigation_helper.
collisionAvoidance
(buoy_waypoints, boat=<module 'nav_algo.boat' from '/Users/courtneymcbeth/Desktop/CUSail/raspberrypi/nav_algo/boat.py'>)¶ Returns waypoints list for ideal path (no obstacles)
-
nav_algo.navigation_helper.
collisionWaypoint
(time, boat=<module 'nav_algo.boat' from '/Users/courtneymcbeth/Desktop/CUSail/raspberrypi/nav_algo/boat.py'>)¶ Returns waypoint 2m away to avoid obstacle detected at time time
-
nav_algo.navigation_helper.
endurance
(waypoints, opt_dist, offset)¶
-
nav_algo.navigation_helper.
find_inner_outer_points
(start_point, end_point, dist, flag)¶
-
nav_algo.navigation_helper.
getRectangleBox
(center, theta)¶ Returns rectangular box given center point and direction Corners ordered ccw starting from front left
-
nav_algo.navigation_helper.
getVelocity
(point_before, point_after, t)¶ Returns velocity of object during time interval t as [speed, theta]
point_before: center of object at time 0 point_after: center of object at time t t: time interval
-
nav_algo.navigation_helper.
isCollision
(boat_coords, obst_coords)¶ Returns True if boat_coords and obst_coords overlap, else False
-
nav_algo.navigation_helper.
newSailingAngle
(boat, target)¶ TODO Determines the best angle to sail at.
The sailboat follows a locally optimal path (maximize vmg while minimizing directional changes) until the global optimum is “better” (based on the hysterisis factor).
- Returns
The best angle to sail (in the global coordinate system).
- Return type
float
-
nav_algo.navigation_helper.
optAngle
(boat_to_target, boat, right)¶ TODO Determines the best angle to sail on either side of the wind.
The “best angle” maximizes the velocity made good toward the target.
- Parameters
right (bool) – True if evaluating the right side of the wind, False for left.
- Returns
The best angle to sail (in the global coordinate system). float: The velocity made good at the best angle.
- Return type
float
-
nav_algo.navigation_helper.
polar
(angle, boat)¶ Evaluates the polar diagram for a given angle relative to the wind.
- Parameters
angle (float) – A potential boat heading relative to the absolute wind direction.
boat (BoatController) – The BoatController (either sim or real)
- Returns
A unit boat velocity vector in the global coordinate system.
- Return type
-
nav_algo.navigation_helper.
precisionNavigation
(waypoints, offset=5.0, side_length=50.0, boat=<module 'nav_algo.boat' from '/Users/courtneymcbeth/Desktop/CUSail/raspberrypi/nav_algo/boat.py'>)¶
-
nav_algo.navigation_helper.
search
(waypoints, scalar=3, constant=5.752220392306214, boat=<module 'nav_algo.boat' from '/Users/courtneymcbeth/Desktop/CUSail/raspberrypi/nav_algo/boat.py'>)¶
-
nav_algo.navigation_helper.
stationKeeping
(waypoints, circle_radius, state, opt_angle=45, boat=<module 'nav_algo.boat' from '/Users/courtneymcbeth/Desktop/CUSail/raspberrypi/nav_algo/boat.py'>)¶
-
nav_algo.navigation_helper.
unitVector
(coords)¶