diff --git a/public_html/formatter.js b/public_html/formatter.js index 2aca7df..191364b 100644 --- a/public_html/formatter.js +++ b/public_html/formatter.js @@ -92,6 +92,17 @@ function format_altitude_long(alt, vr, displayUnits) { } } +// alt ground/airborne +function format_onground (alt) { + if (alt === null) { + return "n/a"; + } else if (alt === "ground") { + return "on ground"; + } else { + return "airborne"; + } +} + // alt in feet function convert_altitude(alt, displayUnits) { if (displayUnits === "metric") { diff --git a/public_html/index.html b/public_html/index.html index 14d4789..9156d14 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -272,13 +272,13 @@
- n/a - n/a + n/a + n/a
-
Registration:
+
Registration:
n/a
@@ -325,7 +325,7 @@
- Air/Ground Status: + Air/Ground Status:
n/a @@ -477,7 +477,7 @@
- Nav Altitude: + Altitude:
n/a @@ -485,7 +485,7 @@
- Nav Modes: + Modes:
n/a @@ -493,7 +493,7 @@
- Nav Heading: + Heading:
n/a @@ -501,7 +501,7 @@
- Nav QNH: + QNH:
n/a @@ -549,7 +549,7 @@
- Category: + Category:
n/a @@ -557,7 +557,7 @@
- Last Seen: + Last Seen:
n/a diff --git a/public_html/script.js b/public_html/script.js index a2b6d91..7732ea5 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -930,6 +930,8 @@ function refreshSelected() { $("#selected_altitude").text(format_altitude_long(selected.altitude, selected.vert_rate, DisplayUnits)); + $('#selected_onground').text(format_onground(selected.altitude)); + if (selected.squawk === null || selected.squawk === '0000') { $('#selected_squawk').text('n/a'); } else {