diff --git a/html/formatter.js b/html/formatter.js index 5095f7c..52d9ae8 100644 --- a/html/formatter.js +++ b/html/formatter.js @@ -166,7 +166,7 @@ function format_onground (alt) { // alt in feet function convert_altitude(alt, displayUnits) { if (displayUnits === "metric") { - return alt * 0.3048; // feet to meters + return alt * 0.3048; // feet to metres } return alt; @@ -198,7 +198,7 @@ function format_speed_long(speed, displayUnits) { // speed in knots function convert_speed(speed, displayUnits) { if (displayUnits === "metric") { - return speed * 1.852; // knots to kilometers per hour + return speed * 1.852; // knots to kilometres per hour } else if (displayUnits === "imperial") { return speed * 1.151; // knots to miles per hour @@ -207,7 +207,7 @@ function convert_speed(speed, displayUnits) { return speed; } -// dist in meters +// dist in metres function format_distance_brief(dist, displayUnits) { if (dist == null) { return ""; @@ -216,7 +216,7 @@ function format_distance_brief(dist, displayUnits) { return convert_distance(dist, displayUnits).toFixed(1); } -// dist in meters +// dist in metres function format_distance_long(dist, displayUnits, fixed) { if (dist == null) { return "n/a"; @@ -241,24 +241,24 @@ function format_distance_short (dist, displayUnits) { return dist_text; } -// dist in meters +// dist in metres function convert_distance(dist, displayUnits) { if (displayUnits === "metric") { - return (dist / 1000); // meters to kilometers + return (dist / 1000); // metres to kilometres } else if (displayUnits === "imperial") { - return (dist / 1609); // meters to miles + return (dist / 1609); // metres to miles } - return (dist / 1852); // meters to nautical miles + return (dist / 1852); // metres to nautical miles } -// dist in meters -// converts meters to feet or just returns meters +// dist in metres +// converts metres to feet or just returns metres function convert_distance_short(dist, displayUnits) { if (displayUnits === "imperial") { - return (dist / 0.3048); // meters to feet + return (dist / 0.3048); // metres to feet } - return dist; // just meters + return dist; // just metres } // rate in ft/min diff --git a/html/geomag2020.js b/html/geomag2020.js index 12c8461..88c36fa 100644 --- a/html/geomag2020.js +++ b/html/geomag2020.js @@ -159,7 +159,7 @@ function geoMagFactory(wmm) { return date.getUTCFullYear() + (date.valueOf() - Date.UTC(year, 0)) / msInYear; } - let alt = (h / 3280.8399) || 0, // convert h (in feet) to kilometers or set default of 0 + let alt = (h / 3280.8399) || 0, // convert h (in feet) to kilometres or set default of 0 time = decimalDate(date), dt = time - epoch, rlat = deg2rad(glat), diff --git a/html/images/alt_legend_feet.svg b/html/images/alt_legend_ft.svg similarity index 82% rename from html/images/alt_legend_feet.svg rename to html/images/alt_legend_ft.svg index 2de16dc..1b92a20 100644 --- a/html/images/alt_legend_feet.svg +++ b/html/images/alt_legend_ft.svg @@ -1,4 +1,4 @@ - + @@ -14,7 +14,7 @@ - alt_legend_feet + Altitude Legend (ft) @@ -22,59 +22,50 @@ - - + - - - - - - - - @@ -82,18 +73,16 @@ - - - - - - - - - - - - + + + + + + + + + + diff --git a/html/images/alt_legend_meters.svg b/html/images/alt_legend_m.svg similarity index 78% rename from html/images/alt_legend_meters.svg rename to html/images/alt_legend_m.svg index a1ea927..2284455 100644 --- a/html/images/alt_legend_meters.svg +++ b/html/images/alt_legend_m.svg @@ -1,4 +1,4 @@ - + @@ -14,7 +14,7 @@ - alt_Legend_meters + Altitude Legend (m) @@ -22,44 +22,37 @@ - - + - - - - - - @@ -75,21 +68,16 @@ - - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/html/script.js b/html/script.js index 35b7de9..2132cda 100644 --- a/html/script.js +++ b/html/script.js @@ -722,7 +722,7 @@ function initPage() { if (value = usp.getFloat('filterMaxRange')) { filterMaxRange = value; } - filterMaxRange *= 1852; // convert from nmi to meters + filterMaxRange *= 1852; // convert from nmi to metres if (value = usp.getFloat('mapOrientation')) { @@ -1714,7 +1714,7 @@ function startPage() { // Make a LineString with 'points'-number points // that is a closed circle on the sphere such that the // great circle distance from 'center' to each point is - // 'radius' meters + // 'radius' metres utils.make_geodesic_circle = function (center, radius, points) { const angularDistance = radius / 6378137.0; const lon1 = center[0] * Math.PI / 180.0; @@ -4263,7 +4263,7 @@ function invertMap(evt){ } function loadLegend() { - let baseLegend = (DisplayUnits === 'metric') ? 'images/alt_legend_meters.svg' : 'images/alt_legend_feet.svg'; + let baseLegend = (DisplayUnits === 'metric') ? 'images/alt_legend_m.svg' : 'images/alt_legend_ft.svg'; jQuery.get(baseLegend, function (data) { jQuery('#altitude_chart_button').css("background-image", createLegendUrl(data)); @@ -6073,7 +6073,7 @@ function drawUpintheair() { // wget -O /usr/local/share/tar1090/html/upintheair.json \ // 'http://www.heywhatsthat.com/api/upintheair.json?id=XXXX&refraction=0.25&alts=3048,9144' // - // NB: altitudes are in _meters_, you can specify a list of altitudes + // NB: altitudes are in _metres_, you can specify a list of altitudes // if (!calcOutlineData) return; @@ -7400,7 +7400,7 @@ function coordsForExport(plane) { if (seg.ground) { alt = "ground"; } else if (alt != null && egmLoaded) { - // alt is in meters at this point + // alt is in metres at this point alt = Math.round(egm96.ellipsoidToEgm96(pos[1], pos[0], alt)); }