Fixed wake scale for realistic speeds.

#story[21]
This commit is contained in:
Connor Taylor-Brown
2017-03-27 20:59:51 +13:00
parent 3aaee1291d
commit cfbb27513d
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -21,6 +21,8 @@ public class Constants {
public static final GPSCoordinate finishLineMarker1 = new GPSCoordinate(32.317379, -64.839291);
public static final GPSCoordinate finishLineMarker2 = new GPSCoordinate(32.317257, -64.836260);
public static final double wakeScale = 10;
public static final BoatInRace[] OFFICIAL_AC35_COMPETITORS = new BoatInRace[]
{new BoatInRace("Oracle Team USA", 30.0, Color.BLUEVIOLET, "USA"),
new BoatInRace("Land Rover BAR", 23.0, Color.BLACK, "BAR"),
+2 -1
View File
@@ -4,6 +4,7 @@ import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.scene.paint.Color;
import org.geotools.referencing.GeodeticCalculator;
import seng302.Constants;
import seng302.GPSCoordinate;
import java.awt.geom.Point2D;
@@ -76,7 +77,7 @@ public class BoatInRace extends Boat {
public GPSCoordinate getWake() {
double reverseHeading = calculateHeading() - 180;
double distance = getVelocity();
double distance = Constants.wakeScale * getVelocity();
GeodeticCalculator calc = new GeodeticCalculator();
calc.setStartingGeographicPoint(