diff --git a/html/formatter.js b/html/formatter.js index e3fa51c..8ab765a 100644 --- a/html/formatter.js +++ b/html/formatter.js @@ -163,7 +163,7 @@ function format_onground (alt) { // alt in feet function convert_altitude(alt, displayUnits) { if (displayUnits === "metric") { - return alt * 0.3048; // feet to metres + return alt * 0.3048; // feet to meters } return alt; @@ -195,7 +195,7 @@ function format_speed_long(speed, displayUnits) { // speed in knots function convert_speed(speed, displayUnits) { if (displayUnits === "metric") { - return speed * 1.852; // knots to kilometres per hour + return speed * 1.852; // knots to kilometers per hour } else if (displayUnits === "imperial") { return speed * 1.151; // knots to miles per hour @@ -204,7 +204,7 @@ function convert_speed(speed, displayUnits) { return speed; } -// dist in metres +// dist in meters function format_distance_brief(dist, displayUnits) { if (dist == null) { return ""; @@ -213,7 +213,7 @@ function format_distance_brief(dist, displayUnits) { return convert_distance(dist, displayUnits).toFixed(1); } -// dist in metres +// dist in meters function format_distance_long(dist, displayUnits, fixed) { if (dist == null) { return "n/a"; @@ -238,24 +238,24 @@ function format_distance_short (dist, displayUnits) { return dist_text; } -// dist in metres +// dist in meters function convert_distance(dist, displayUnits) { if (displayUnits === "metric") { - return (dist / 1000); // metres to kilometres + return (dist / 1000); // meters to kilometres } else if (displayUnits === "imperial") { - return (dist / 1609); // metres to miles + return (dist / 1609); // meters to miles } - return (dist / 1852); // metres to nautical miles + return (dist / 1852); // meters to nautical miles } -// dist in metres -// converts metres to feet or just returns metres +// dist in meters +// converts meters to feet or just returns metres function convert_distance_short(dist, displayUnits) { if (displayUnits === "imperial") { - return (dist / 0.3048); // metres to feet + return (dist / 0.3048); // meters to feet } - return dist; // just metres + return dist; // just meters } // rate in ft/min diff --git a/html/geomag2020.js b/html/geomag2020.js index 88c36fa..12c8461 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 kilometres or set default of 0 + let alt = (h / 3280.8399) || 0, // convert h (in feet) to kilometers or set default of 0 time = decimalDate(date), dt = time - epoch, rlat = deg2rad(glat), diff --git a/html/script.js b/html/script.js index 341225e..7b759dd 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 metres + filterMaxRange *= 1852; // convert from nmi to meters 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' metres + // 'radius' meters utils.make_geodesic_circle = function (center, radius, points) { const angularDistance = radius / 6378137.0; const lon1 = center[0] * Math.PI / 180.0; @@ -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 _metres_, you can specify a list of altitudes + // NB: altitudes are in _meters_, 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 metres at this point + // alt is in meters at this point alt = Math.round(egm96.ellipsoidToEgm96(pos[1], pos[0], alt)); }