From bd96d40e4eb88f69fad0e5f60605c63ac19446d9 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Mon, 29 Jun 2015 10:47:29 +0100 Subject: [PATCH] Display aircraft with mlat-derived positions with a different row color. --- public_html/planeObject.js | 10 ++++++++++ public_html/script.js | 6 ++++-- public_html/style.css | 1 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 1a7fd4b..eec7971 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -297,6 +297,16 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) { this.squawk = data.squawk; if (typeof data.category !== "undefined") this.category = data.category; + + this.position_from_mlat = false + if (typeof data.mlat !== "undefined") { + for (var i = 0; i < data.mlat.length; ++i) { + if (data.mlat[i] === "lat" || data.mlat[i] == "lon") { + this.position_from_mlat = true; + break; + } + } + } }; PlaneObject.prototype.updateTick = function(receiver_timestamp, last_timestamp) { diff --git a/public_html/script.js b/public_html/script.js index 06d2691..f375550 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -632,8 +632,10 @@ function refreshTableInfo() { } else { TrackedAircraft++; var classes = "plane_table_row"; - - if (tableplane.position !== null) + + if (tableplane.position_from_mlat) + classes += " mlat"; + else if (tableplane.position !== null) classes += " vPosition"; if (tableplane.icao == SelectedPlane) classes += " selected"; diff --git a/public_html/style.css b/public_html/style.css index 0f098f2..ff8868c 100644 --- a/public_html/style.css +++ b/public_html/style.css @@ -22,6 +22,7 @@ div#loader { z-index: 99; position: absolute; left: 0; top: 0; bottom: 0; right: #tableinfo, #sudo_buttons { font-size: x-small; font-family: monospace; } .vPosition { font-weight: bold; background-color: #d5ffd5; } +.mlat { font-weight: bold; background-color: #d5d5ff; } .squawk7500 { font-weight: bold; background-color: #ff5555; } .squawk7600 { font-weight: bold; background-color: #00ffff; } .squawk7700 { font-weight: bold; background-color: #ffff00; }