summaryrefslogtreecommitdiff
path: root/src/com/benburwell/planes/data/Aircraft.java
diff options
context:
space:
mode:
authorBen Burwell <ben.burwell@trifecta.com>2016-11-19 15:37:24 -0500
committerBen Burwell <ben.burwell@trifecta.com>2016-11-19 15:37:24 -0500
commit7dc095c87ae62e02b1e36edabd5da8123766c6d3 (patch)
tree0fc52de2236579972173d5caa953408a6857de29 /src/com/benburwell/planes/data/Aircraft.java
parent72a0e5eeb914a9520a3c9fa51f4ee93a794f51a7 (diff)
Make plane triangular
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());