diff --git a/html/formatter.js b/html/formatter.js
index fd03d20..0277010 100644
--- a/html/formatter.js
+++ b/html/formatter.js
@@ -7,6 +7,7 @@ var UP_TRIANGLE='\u25b2'; // U+25B2 BLACK UP-POINTING TRIANGLE
var DOWN_TRIANGLE='\u25bc'; // U+25BC BLACK DOWN-POINTING TRIANGLE
var TrackDirections = ["North","NE","East","SE","South","SW","West","NW"];
+var TrackDirectionArrows = ["\u21e7","\u2b00","\u21e8","\u2b02","\u21e9","\u2b03","\u21e6","\u2b01"];
var UnitLabels = {
'altitude': { metric: "m", imperial: "ft", nautical: "ft"},
@@ -44,6 +45,14 @@ function format_track_long(track) {
var trackDir = Math.floor((360 + track % 360 + 22.5) / 45) % 8;
return TrackDirections[trackDir] + ":" + NBSP + track.toFixed(1) + DEGREES;
}
+function format_track_arrow(track) {
+ if (track == null){
+ return "";
+ }
+
+ var trackDir = Math.floor((360 + track % 360 + 22.5) / 45) % 8;
+ return TrackDirectionArrows[trackDir];
+}
// alt in feet
function format_altitude_brief(alt, vr, displayUnits) {
diff --git a/html/index.html b/html/index.html
index 08857c1..e17d064 100644
--- a/html/index.html
+++ b/html/index.html
@@ -95,10 +95,10 @@
@@ -114,7 +114,7 @@
diff --git a/html/planeObject.js b/html/planeObject.js
index feaad61..c91f0c9 100644
--- a/html/planeObject.js
+++ b/html/planeObject.js
@@ -306,6 +306,7 @@ PlaneObject.prototype.updateTrack = function(now, last, serverTrack) {
alt_real: this.altitude,
speed: this.speed,
ts: now,
+ track: this.rotation,
};
this.track_linesegs.push(newseg);
this.history_size ++;
@@ -410,6 +411,7 @@ PlaneObject.prototype.updateTrack = function(now, last, serverTrack) {
alt_real: this.altitude,
speed: this.speed,
ts: now,
+ track: this.rotation,
};
this.track_linesegs.push(newseg);
this.history_size += 2;
@@ -492,6 +494,7 @@ PlaneObject.prototype.updateTrack = function(now, last, serverTrack) {
speed: this.prev_speed,
ground: on_ground,
ts: this.prev_time,
+ track: this.prev_rot,
});
this.history_size += 2;
@@ -1402,7 +1405,8 @@ PlaneObject.prototype.updateLines = function() {
NBSP + Number(seg.speed).toFixed(0).toString().padStart(3, NBSP) + " "
+ (seg.alt_real == "ground" ? ("Ground" + NBSP) : (seg.alt_real.toString().padStart(6, NBSP) + NBSP))
+ "\n"
- + "".padStart(4, NBSP) + timestamp + "".padStart(4, NBSP)
+ //+ NBSP + format_track_arrow(seg.track)
+ + "".padStart(3, NBSP) + timestamp + "".padStart(3, NBSP);
seg.label.setStyle(
new ol.style.Style({
text: new ol.style.Text({
diff --git a/html/script.js b/html/script.js
index 5c33ba1..8028d55 100644
--- a/html/script.js
+++ b/html/script.js
@@ -73,6 +73,7 @@ var lastReqestFiles = 0;
var debugCounter = 0;
var selectedPhotoCache = null;
var pathName = null;
+var icaoFilter = null;
var SpecialSquawks = {
'7500' : { cssClass: 'squawk7500', markerColor: 'rgb(255, 85, 85)', text: 'Aircraft Hijacking' },
@@ -126,6 +127,8 @@ function processAircraft(ac, init, uat) {
return;
}
*/
+ if (icaoFilter && !icaoFilter.includes(hex))
+ return;
plane = Planes[hex];
@@ -871,6 +874,10 @@ function parse_history() {
// And kick off one refresh immediately.
processURLParams();
+
+ if (!icaoFilter && globeIndex)
+ toggleTableInView(true);
+
fetchData();
updateMapSize();
@@ -928,7 +935,6 @@ function initialize_map() {
globeIndexGrid = receiverJson.globeIndexGrid;
globeIndex = 1;
globeIndexSpecialTiles = receiverJson.globeIndexSpecialTiles;
- toggleTableInView(true);
$('#dump1090_total_history_td').hide();
$('#dump1090_message_rate_td').hide();
}
@@ -1822,7 +1828,7 @@ function refreshTableInfo() {
tableplane.inView = inView(tableplane, lastRealExtent);
- if (globeIndex) {
+ if (globeIndex && !icaoFilter) {
if (inView(tableplane, lastRenderExtent) || tableplane.selected) {
tableplane.updateFeatures(now, last);
} else if (tableplane.visible) {
@@ -1830,8 +1836,7 @@ function refreshTableInfo() {
tableplane.clearLines();
tableplane.visible = false;
}
- }
- if (!globeIndex) {
+ } else {
tableplane.updateTick();
}
@@ -2652,7 +2657,7 @@ function followRandomPlane() {
}
function toggleTableInView(switchOn) {
- if (switchOn || globeIndex) {
+ if (switchOn || (globeIndex && !icaoFilter)) {
tableInView = true;
} else {
tableInView = !tableInView;
@@ -3025,6 +3030,11 @@ function highlight(evt) {
function processURLParams(){
try {
const search = new URLSearchParams(window.location.search);
+
+ icaoFilter = search.get('icaoFilter');
+ if (icaoFilter)
+ icaoFilter = icaoFilter.toLowerCase().split(',');
+
const icao = search.get('icao');
const callsign = search.get('callsign');
var zoom;