Merge branch 'master' into storyD-3D

This commit is contained in:
Joseph Gardner
2017-09-14 16:39:55 +12:00
11 changed files with 23 additions and 13 deletions
@@ -32,7 +32,7 @@ public class NewPolars {
public static void addPolars(double trueWindSpeed, Bearing trueWindAngle, double boatSpeed){
double tws = trueWindSpeed;
double bs = boatSpeed;
double twa = trueWindAngle.degrees();
double twa = trueWindAngle.degrees() + 180;
if (!polars.containsKey(tws)){
polars.put(tws, new TreeMap<>());
}
@@ -29,12 +29,14 @@ public class CommandFactory {
}
switch(action.getBoatAction()) {
case AUTO_PILOT: return new VMGCommand(race, boat);
case VMG: return new VMGCommand(race, boat);
case TACK_GYBE: return new TackGybeCommand(race, boat);
case UPWIND: return new WindCommand(race, boat, true);
case DOWNWIND: return new WindCommand(race, boat, false);
case SAILS_OUT: return new SailsCommand(race, boat, true);
case SAILS_IN: return new SailsCommand(race, boat, false);
case ZOOM_IN: return null;
case ZOOM_OUT: return null;
default: throw new CommandConstructionException("Could not create command for BoatAction: " + action + ". Unknown BoatAction.");
}