Fixed gate passing algorithm

boats now must pass through the correct way. This works for start in-race and finish gates
Refactored yacht algorithm code for better readability
Logging function added or seeing mark roundings occur

tags: #story[1124] #pair[hyi25, wmu16]
This commit is contained in:
William Muir
2017-08-08 15:58:13 +12:00
parent ed0a783374
commit b0e7dddaf3
2 changed files with 131 additions and 48 deletions
@@ -193,7 +193,7 @@ public class GeoUtility {
* @param point the point to be tested
* @return true if the point is on the RHS of the line
*/
private static Boolean isClockwise(GeoPoint v1, GeoPoint v2, GeoPoint point) {
public static Boolean isClockwise(GeoPoint v1, GeoPoint v2, GeoPoint point) {
return getBearingDiff(getBearing(v1, v2), getBearing(v1, point)) < 180;
}