diff --git a/public_html/formatter.js b/public_html/formatter.js index 8d6dca9..d25460b 100644 --- a/public_html/formatter.js +++ b/public_html/formatter.js @@ -6,7 +6,7 @@ var DEGREES='\u00b0' var UP_TRIANGLE='\u25b2'; // U+25B2 BLACK UP-POINTING TRIANGLE var DOWN_TRIANGLE='\u25bc'; // U+25BC BLACK DOWN-POINTING TRIANGLE -var TrackDirections = ["North","Northeast","East","Southeast","South","Southwest","West","Northwest"]; +var TrackDirections = ["North","NE","East","SE","South","SW","West","NW"]; var UnitLabels = { 'altitude': { metric: "m", imperial: "ft", nautical: "ft"}, @@ -31,7 +31,7 @@ function format_track_brief(track) { return ""; } - return Math.round(track); + return Math.round(track) + DEGREES; } // track in degrees (0..359) @@ -54,7 +54,7 @@ function format_altitude_brief(alt, vr, displayUnits) { return "ground"; } - alt_text = Math.round(convert_altitude(alt, displayUnits)) + NBSP; + alt_text = Math.round(convert_altitude(alt, displayUnits)).toLocaleString() + NBSP; // Vertical Rate Triangle var verticalRateTriangle = ""; @@ -80,7 +80,7 @@ function format_altitude_long(alt, vr, displayUnits) { return "on ground"; } - alt_text = Math.round(convert_altitude(alt, displayUnits)) + NBSP + get_unit_label("altitude", displayUnits); + alt_text = Math.round(convert_altitude(alt, displayUnits)).toLocaleString() + NBSP + get_unit_label("altitude", displayUnits); if (vr > 128) { return UP_TRIANGLE + NBSP + alt_text; @@ -142,12 +142,16 @@ function format_distance_brief(dist, displayUnits) { } // dist in meters -function format_distance_long(dist, displayUnits) { +function format_distance_long(dist, displayUnits, fixed) { if (dist === null) { return "n/a"; } - var dist_text = convert_distance(dist, displayUnits).toFixed(1) + NBSP + get_unit_label("distance", displayUnits); + if (typeof fixed === 'undefined') { + fixed = 1; + } + + var dist_text = convert_distance(dist, displayUnits).toFixed(fixed) + NBSP + get_unit_label("distance", displayUnits); return dist_text; } diff --git a/public_html/index.html b/public_html/index.html index e5e9d6d..fb0c5a1 100644 --- a/public_html/index.html +++ b/public_html/index.html @@ -171,7 +171,7 @@ - AirFrames.org Link + AirFrames.org @@ -310,15 +310,15 @@ Speed () Vertical Rate () Distance () - Track + Heading Msgs Age RSSI Latitude Longitude Data Source - Airframes.org Link - FlightAware Link + Airframes.org + FlightAware Photos diff --git a/public_html/script.js b/public_html/script.js index 840d601..ed2d4f4 100644 --- a/public_html/script.js +++ b/public_html/script.js @@ -692,7 +692,7 @@ function createSiteCircleFeatures() { font: '10px Helvetica Neue, sans-serif', fill: new ol.style.Fill({ color: '#000' }), offsetY: -8, - text: format_distance_long(distance, DisplayUnits) + text: format_distance_long(distance, DisplayUnits, 0) }) }); @@ -802,7 +802,7 @@ function refreshSelected() { } else { $('#selected_callsign').text('n/a'); } - $('#selected_flightaware_link').html(getFlightAwareModeSLink(selected.icao, selected.flight, "FlightAware.com Link")); + $('#selected_flightaware_link').html(getFlightAwareModeSLink(selected.icao, selected.flight, "FlightAware.com")); if (selected.registration !== null) { $('#selected_registration').text(selected.registration);