Removed the parser from queing packets incorrectly. Used the marker boat location packets to get the live updates of the marker positions and implemented the markers being updated much like the boats currently are. This means the course more closely resembles the actual intended course design.

#story[820]
This commit is contained in:
Kusal Ekanayake
2017-04-29 20:10:39 +12:00
parent 1e1e482b79
commit 1d28334346
9 changed files with 103 additions and 66 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ public class EventTest {
@Test
public void testBoatHeading() throws Exception {
Boat boat = new Boat("testBoat");
Event event = new Event(1231242.2, boat, new SingleMark("mark1", 142.5, 122.1), new SingleMark("mark2", 121.9,99.2), 0);
Event event = new Event(1231242.2, boat, new SingleMark("mark1", 142.5, 122.1, 1), new SingleMark("mark2", 121.9,99.2, 2), 0);
assertEquals(event.getBoatHeading(), 228.0266137055349, 1e-15);
}
@@ -31,7 +31,7 @@ public class EventTest {
@Test
public void testDistanceBetweenMarks() throws Exception {
Boat boat = new Boat("testBoat");
Event event = new Event(1231242.2, boat, new SingleMark("mark1", 142.5, 122.1), new SingleMark("mark2", 121.9,99.2), 0);
Event event = new Event(1231242.2, boat, new SingleMark("mark1", 142.5, 122.1, 1), new SingleMark("mark2", 121.9,99.2, 2), 0);
assertEquals(event.getDistanceBetweenMarks(), 339059.653830461, 1e-15);
}
@@ -16,8 +16,8 @@ public class MarkTest {
@Before
public void setUp() throws Exception {
this.singleMark1 = new SingleMark("testMark_SM1", 12.23234, -34.342);
this.singleMark2 = new SingleMark("testMark_SM2", 12.23239, -34.352);
this.singleMark1 = new SingleMark("testMark_SM1", 12.23234, -34.342, 1);
this.singleMark2 = new SingleMark("testMark_SM2", 12.23239, -34.352, 2);
this.gateMark = new GateMark("testMark_GM", MarkType.OPEN_GATE, singleMark1, singleMark2, singleMark1.getLatitude(), singleMark2.getLongitude());
}