From 9ceecda94a6dcbb8bab03d1afa081d76b6e9f7a9 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Sat, 9 Apr 2022 07:25:40 +0200 Subject: [PATCH] fix some stuff implement some of the changes in https://github.com/wiedehopf/tar1090/pull/173 by getsnoopy --- README-query.md | 6 +++--- html/config.js | 2 +- html/defaults.js | 2 +- html/formatter.js | 25 +++++++++++-------------- html/index.html | 12 ++++++------ html/script.js | 6 +++--- 6 files changed, 25 insertions(+), 28 deletions(-) diff --git a/README-query.md b/README-query.md index 1ffb9c0..9b80713 100644 --- a/README-query.md +++ b/README-query.md @@ -12,10 +12,10 @@ - icao=icao - selects and isolates the selected plane(s). Separate multiple with commas. - noIsolation - show other planes and not only the ones selected by ?icao -- icaoFilter=hex1,hex2,hex3 - Only show the mentioned hex ids, no other aircraft will ever be displayed +- icaoFilter=hex1,hex2,hex3 - Only show the mentioned hex IDs, no other aircraft will ever be displayed - reg=registration - Direct link to specific aircraft registration(s). Separate multiple with commas. ?icao is preferred as this option takes longer to load. -- filterAltMin=500 - filter minimum altitute to 500ft -- filterAltMax=5000 - filter maximum altitute to 5000ft +- filterAltMin=500 - filter minimum altitute to 500 ft +- filterAltMax=5000 - filter maximum altitute to 5000 ft - filterCallSign=^(UAL|DAL) - filter callsign to United or Deleta - filterType=B738 - filter to aircraft type B738 aka 737-800 - filterDescription=L2J - filter aircraft by description diff --git a/html/config.js b/html/config.js index 403d42a..98ad6fe 100644 --- a/html/config.js +++ b/html/config.js @@ -10,7 +10,7 @@ //MessageRateInTitle = false; // -- Output Settings ------------------------------------- -// The DisplayUnits setting controls whether nautical (ft, NM, knots), +// The DisplayUnits setting controls whether nautical (ft, nmi, kts), // metric (m, km, km/h) or imperial (ft, mi, mph) units are used in the // plane table and in the detailed plane info. Valid values are // "nautical", "metric", or "imperial". diff --git a/html/defaults.js b/html/defaults.js index 786ccc1..d16c315 100644 --- a/html/defaults.js +++ b/html/defaults.js @@ -17,7 +17,7 @@ let PlaneCountInTitle = false; let MessageRateInTitle = false; // -- Output Settings ------------------------------------- -// The DisplayUnits setting controls whether nautical (ft, NM, knots), +// The DisplayUnits setting controls whether nautical (ft, nmi, kts), // metric (m, km, km/h) or imperial (ft, mi, mph) units are used in the // plane table and in the detailed plane info. Valid values are // "nautical", "metric", or "imperial". diff --git a/html/formatter.js b/html/formatter.js index 52d9ae8..e3fa51c 100644 --- a/html/formatter.js +++ b/html/formatter.js @@ -4,6 +4,7 @@ let NBSP='\u00a0'; let NNBSP='\u202f'; let DEGREES='\u00b0' +let ENDASH='\u2013'; let UP_TRIANGLE='\u25b2'; // U+25B2 BLACK UP-POINTING TRIANGLE let DOWN_TRIANGLE='\u25bc'; // U+25BC BLACK DOWN-POINTING TRIANGLE let EM_QUAD = '\u2001'; @@ -13,32 +14,28 @@ let TrackDirectionArrows = ["\u21e7","\u2b00","\u21e8","\u2b02","\u21e9","\u2b03 let UnitLabels = { 'altitude': { metric: "m", imperial: "ft", nautical: "ft"}, - 'speed': { metric: "km/h", imperial: "mph", nautical: "kt" }, - 'distance': { metric: "km", imperial: "mi", nautical: "NM" }, + 'speed': { metric: "km/h", imperial: "mph", nautical: "kts" }, + 'distance': { metric: "km", imperial: "mi", nautical: "nmi" }, 'verticalRate': { metric: "m/s", imperial: "ft/min", nautical: "ft/min" }, - 'distanceShort': {metric: "m", imperial: "ft", nautical: "m"} + 'distanceShort': { metric: "m", imperial: "ft", nautical: "m" } }; let aircraftCategories = { 'A0': 'Unspecified powered aircraft', - 'A1': 'Light (< 15 500 lbs.)', - 'A2': 'Small (15 500 to 75 000 lbs.)', - 'A3': 'Large (75 000 to 300 000 lbs.)', + 'A1': `Light (< 15${NNBSP}500${NBSP}lbs)`, + 'A2': `Small (15${NNBSP}500 to 75${NNBSP}000${NBSP}lbs)`, + 'A3': `Large (75${NNBSP}000 to 300${NNBSP}000${NBSP}lbs)`, 'A4': 'High Vortex Large(aircraft such as B-757)', - 'A5': 'Heavy (> 300 000 lbs.)', - 'A6': 'High Performance ( > 5 g acceleration and > 400kts)', + 'A5': `Heavy (> 300${NNBSP}000${NBSP}lbs)`, + 'A6': `High Performance (> 5${NBSP}g acceleration and > 400${NBSP}kts)`, 'A7': 'Rotorcraft', 'B0': 'Unspecified unpowered aircraft or UAV or spacecraft', 'B1': 'Glider/sailplane', - 'B2': 'Lighter-than-Air', - 'B3': 'Parachutist/Skydiver', - 'B4': 'Ultralight/hang-glider/paraglider', - 'B5': 'Reserved', 'B6': 'Unmanned Aerial Vehicle', 'B7': 'Space/Trans-atmospheric vehicle', 'C0': 'Unspecified ground installation or vehicle', - 'C1': 'Surface Vehicle - Emergency Vehicle', - 'C2': 'Surface Vehicle - Service Vehicle', + 'C1': `Surface Vehicle ${ENDASH} Emergency Vehicle`, + 'C2': `Surface Vehicle ${ENDASH} Service Vehicle`, 'C3': 'Fixed Ground or Tethered Obstruction' }; diff --git a/html/index.html b/html/index.html index 8638188..e803e08 100644 --- a/html/index.html +++ b/html/index.html @@ -77,7 +77,7 @@
n/a
-
+