nav_algo.navigation_helper module

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

Returns waypoints list for ideal path (no obstacles)

Returns waypoint 2m away to avoid obstacle detected at time time

Returns rectangular box given center point and direction Corners ordered ccw starting from front left

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

Returns True if boat_coords and obst_coords overlap, else False

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

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

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

Vector