Minor bug fix to velocity calculation

This commit is contained in:
William Muir
2017-08-16 17:23:14 +12:00
parent 1d4ab0e1fa
commit 07a39722fb
@@ -297,7 +297,6 @@ public class GameState implements Runnable {
Double trueWindAngle = Math.abs(windDirection - yacht.getHeading()); Double trueWindAngle = Math.abs(windDirection - yacht.getHeading());
Double boatSpeedInKnots = PolarTable.getBoatSpeed(getWindSpeedKnots(), trueWindAngle); Double boatSpeedInKnots = PolarTable.getBoatSpeed(getWindSpeedKnots(), trueWindAngle);
Double maxBoatSpeed = GeoUtility.knotsToMMS(boatSpeedInKnots); Double maxBoatSpeed = GeoUtility.knotsToMMS(boatSpeedInKnots);
System.out.println(maxBoatSpeed);
// TODO: 15/08/17 remove magic numbers from these equations. // TODO: 15/08/17 remove magic numbers from these equations.
if (yacht.getSailIn()) { if (yacht.getSailIn()) {
if (velocity < maxBoatSpeed - 500) { if (velocity < maxBoatSpeed - 500) {