Moved speed conversion to BoatMessage class
#story[778]
This commit is contained in:
@@ -88,9 +88,7 @@ public class MockOutput implements Runnable
|
||||
*/
|
||||
public synchronized void parseBoatLocation(int sourceID, double lat, double lon, double heading, double speed){
|
||||
|
||||
int newSpeed = (int) Math.round((speed * Constants.KnotsToMetersPerSecondConversionFactor * 1000));
|
||||
|
||||
BoatLocationMessage boatLocationMessage = new BoatLocationMessage(sourceID, lat, lon, boatLocationSequenceNumber, heading, newSpeed);
|
||||
BoatLocationMessage boatLocationMessage = new BoatLocationMessage(sourceID, lat, lon, boatLocationSequenceNumber, heading, speed);
|
||||
//iterates the sequence number
|
||||
boatLocationSequenceNumber++;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Race implements Runnable {
|
||||
protected int boatsFinished = 0;
|
||||
protected long totalTimeElapsed;
|
||||
protected int scaleFactor;
|
||||
protected int PRERACE_TIME = 180000; //time in milliseconds to pause during pre-race. At the moment, 3 minutes
|
||||
protected int PRERACE_TIME = 180; //time in milliseconds to pause during pre-race. At the moment, 3 minutes
|
||||
protected boolean countdownFinish = false;
|
||||
protected boolean runRace = true;
|
||||
private int lastFPS = 20;
|
||||
@@ -202,8 +202,6 @@ public class Race implements Runnable {
|
||||
}
|
||||
}.start();
|
||||
}
|
||||
|
||||
|
||||
public void initialiseBoats() {
|
||||
Leg officialStart = legs.get(0);
|
||||
String name = officialStart.getName();
|
||||
|
||||
Reference in New Issue
Block a user