Calculation of upwind downwind leg given a boat, wind and next mark now works. created GeometryUtils class

Can accurately calculate if a boat is going upwind or downward using a line function for the wind vector from the gate and the boat position from the gate.

Requires knowledge of the next mark which requires the boat to have passed a mark. This could be fixed by extracting the leg number from the race status packet and mapping these to gates in an initalisation step

tags: #story[956]
This commit is contained in:
William Muir
2017-05-24 14:57:22 +12:00
parent 89464e033e
commit 1cac7cc189
7 changed files with 200 additions and 30 deletions
@@ -161,4 +161,8 @@ public class MarkGroup extends Group {
idArray[i++] = mark.getId();
return idArray;
}
public Mark getMainMark() {
return mainMark;
}
}