Merge branch 'master' into new_issue#19
This commit is contained in:
@@ -269,7 +269,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
boat.getName(),
|
||||
boat.getCountry(),
|
||||
boat.getCurrentSpeed(),
|
||||
this.map.convertGPS(boat.getCurrentPosition()),
|
||||
this.map.convertGPS(boat.getPosition()),
|
||||
boat.getTimeToNextMarkFormatted(this.visualiserRace.getVisualiserRaceState().getRaceClock().getCurrentTime()),
|
||||
boat.getTimeSinceLastMarkFormatted(this.visualiserRace.getVisualiserRaceState().getRaceClock().getCurrentTime()) );
|
||||
|
||||
@@ -322,7 +322,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
}
|
||||
|
||||
//Convert position to graph coordinate.
|
||||
GraphCoordinate pos = this.map.convertGPS(boat.getCurrentPosition());
|
||||
GraphCoordinate pos = this.map.convertGPS(boat.getPosition());
|
||||
|
||||
//The x coordinates of each vertex of the boat.
|
||||
double[] x = {
|
||||
@@ -356,7 +356,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
private void drawClientBoat(VisualiserBoat boat) {
|
||||
|
||||
//Convert position to graph coordinate.
|
||||
GraphCoordinate pos = this.map.convertGPS(boat.getCurrentPosition());
|
||||
GraphCoordinate pos = this.map.convertGPS(boat.getPosition());
|
||||
|
||||
//The x coordinates of each vertex of the boat.
|
||||
double[] x = {
|
||||
@@ -390,7 +390,7 @@ public class ResizableRaceCanvas extends ResizableCanvas {
|
||||
private void drawWake(VisualiserBoat boat) {
|
||||
|
||||
//Calculate either end of wake line.
|
||||
GraphCoordinate wakeFrom = this.map.convertGPS(boat.getCurrentPosition());
|
||||
GraphCoordinate wakeFrom = this.map.convertGPS(boat.getPosition());
|
||||
GraphCoordinate wakeTo = this.map.convertGPS(boat.getWake());
|
||||
|
||||
//Draw.
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package visualiser.model;
|
||||
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
import javafx.beans.property.StringProperty;
|
||||
import javafx.scene.paint.Color;
|
||||
import network.Messages.Enums.BoatStatusEnum;
|
||||
import shared.model.Azimuth;
|
||||
@@ -102,7 +100,7 @@ public class VisualiserBoat extends Boat {
|
||||
|
||||
|
||||
//Calculate the new coordinate.
|
||||
GPSCoordinate wakeCoordinate = GPSCoordinate.calculateNewPosition(getCurrentPosition(), wakeDistanceMeters, reverseAzimuth);
|
||||
GPSCoordinate wakeCoordinate = GPSCoordinate.calculateNewPosition(getPosition(), wakeDistanceMeters, reverseAzimuth);
|
||||
|
||||
return wakeCoordinate;
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package visualiser.model;
|
||||
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.scene.paint.Color;
|
||||
@@ -228,7 +227,7 @@ public class VisualiserRaceState extends RaceState {
|
||||
|
||||
boat.setCurrentLeg(startingLeg);
|
||||
boat.setTimeAtLastMark(getRaceClock().getCurrentTime());
|
||||
boat.setCurrentPosition(new GPSCoordinate(0, 0));
|
||||
boat.setPosition(new GPSCoordinate(0, 0));
|
||||
|
||||
}
|
||||
|
||||
@@ -253,10 +252,10 @@ public class VisualiserRaceState extends RaceState {
|
||||
|
||||
if ((boat.getStatus() == BoatStatusEnum.DNF) || (boat.getStatus() == BoatStatusEnum.PRESTART) || (boat.getCurrentLeg().getLegNumber() < 0)) {
|
||||
|
||||
boat.setPosition("-");
|
||||
boat.setPlacing("-");
|
||||
|
||||
} else {
|
||||
boat.setPosition(Integer.toString(i + 1));
|
||||
boat.setPlacing(Integer.toString(i + 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user