summaryrefslogtreecommitdiff
path: root/src/com/benburwell/planes/data/Aircraft.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/benburwell/planes/data/Aircraft.java')
-rw-r--r--src/com/benburwell/planes/data/Aircraft.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/com/benburwell/planes/data/Aircraft.java b/src/com/benburwell/planes/data/Aircraft.java
index 71ee5b5..e0ca449 100644
--- a/src/com/benburwell/planes/data/Aircraft.java
+++ b/src/com/benburwell/planes/data/Aircraft.java
@@ -15,6 +15,8 @@ public class Aircraft implements Comparable<Aircraft> {
private String callsign = "";
private String squawk = "";
private long packetCount = 0;
+ private double track;
+ private double groundSpeed;
public Aircraft(String hexIdent) {
this.hexIdent = hexIdent;
@@ -37,6 +39,12 @@ public class Aircraft implements Comparable<Aircraft> {
if (packet.getSquawk() != null && !packet.getSquawk().isEmpty()) {
this.callsign = packet.getSquawk();
}
+ if (packet.getTrack() != null) {
+ this.track = packet.getTrack();
+ }
+ if (packet.getGroundSpeed() != null) {
+ this.groundSpeed = packet.getGroundSpeed();
+ }
}
public Position getCurrentPosition() {
@@ -59,6 +67,14 @@ public class Aircraft implements Comparable<Aircraft> {
return this.hexIdent;
}
+ public double getTrack() {
+ return this.track;
+ }
+
+ public double getGroundSpeed() {
+ return this.groundSpeed;
+ }
+
@Override
public int compareTo(Aircraft that) {
return this.getHexIdent().compareTo(that.getHexIdent());