mirror of
https://github.com/michaelrausch/Party-Parrots-At-Sea.git
synced 2026-05-09 14:28:43 +00:00
Minor bug fix to velocity calculation
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user