From 7dc095c87ae62e02b1e36edabd5da8123766c6d3 Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Sat, 19 Nov 2016 15:37:24 -0500 Subject: Make plane triangular --- src/com/benburwell/planes/data/Aircraft.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/com/benburwell/planes/data/Aircraft.java') 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 { 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 { 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 { 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()); -- cgit v1.2.3