From f45a7d61a5878de831f542709b1343118bcc6902 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Fri, 16 Jun 2017 10:40:22 +0100 Subject: [PATCH] Include AP modes in info window. --- public_html/index.html | 10 ++++++++-- public_html/planeObject.js | 3 ++- public_html/script.js | 7 ++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/public_html/index.html b/public_html/index.html index 6a99d14..2c60ce1 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -217,8 +217,14 @@
-
Alt setting:
-
+
AP modes:
+
+
Alt setting:
+
+
+ +
+
ADS-B:
diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 684a3f0..906de1e 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -23,6 +23,7 @@ function PlaneObject(icao) { this.roll = null; this.intent_alt = null; this.intent_heading = null; + this.intent_modes = null; this.alt_setting = null; this.baro_rate = null; this.geom_rate = null; @@ -430,7 +431,7 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) { var fields = ["altitude", "alt_geom", "gs", "ias", "tas", "track", "track_rate", "mag_heading", "true_heading", "mach", - "roll", "intent_alt", "intent_heading", + "roll", "intent_alt", "intent_heading", "intent_modes", "alt_setting", "baro_rate", "geom_rate", "flight", "squawk", "category", "version"]; diff --git a/public_html/script.js b/public_html/script.js index c6d2cc8..2dea753 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -961,7 +961,12 @@ function refreshSelected() { $('#selected_alt_setting').text(selected.alt_setting.toFixed(1) + " hPa"); } $('#selected_intent_alt').text(format_altitude_long(selected.intent_alt, 0, DisplayUnits)); - $('#selected_intent_heading').text(format_track_long(selected.intent_heading)) + $('#selected_intent_heading').text(format_track_long(selected.intent_heading)); + if (selected.intent_modes == null) { + $('#selected_intent_modes').text("n/a"); + } else { + $('#selected_intent_modes').text(selected.intent_modes.join()); + } if (selected.version == null) { $('#selected_version').text('none');