Adding end coords to get test running gain
#story[20]
This commit is contained in:
@@ -30,6 +30,8 @@ public class Leg {
|
||||
this.startGPSCoordinate = start;
|
||||
this.endGPSCoordinate = end;
|
||||
this.legNumber = number;
|
||||
calculateStart();
|
||||
calculateEnd();
|
||||
this.distance = calculateDistance();
|
||||
}
|
||||
|
||||
@@ -153,12 +155,18 @@ public class Leg {
|
||||
|
||||
private void calculateStart() {
|
||||
//TO DO: Make this function set the start node as halfway between the two markers
|
||||
this.startGPSCoordinate = startMarker1;
|
||||
if (startMarker1 != null) {
|
||||
this.startGPSCoordinate = startMarker1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void calculateEnd() {
|
||||
//TO DO: Make this function set the end node as halfway between the two markers
|
||||
this.endGPSCoordinate = endMarker1;
|
||||
if (endMarker1 != null) {
|
||||
this.endGPSCoordinate = endMarker1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ public abstract class Race implements Runnable {
|
||||
protected int boatsFinished = 0;
|
||||
protected long totalTimeElapsed;
|
||||
|
||||
|
||||
protected int scaleFactor;
|
||||
|
||||
private int SLEEP_TIME = 100; //time in milliseconds to pause in a paced loop
|
||||
@@ -70,6 +71,7 @@ public abstract class Race implements Runnable {
|
||||
|
||||
protected void initialiseBoats() {
|
||||
System.out.println("boat initialisation");
|
||||
|
||||
Leg startLeg = legs.get(0);
|
||||
Leg copyLeg = startLeg.createCopy();
|
||||
ArrayList<GPSCoordinate> startPositions = getSpreadStartingPositions();
|
||||
|
||||
Reference in New Issue
Block a user