Round range rings labels. Add commas to altitudes. Change Track to Heading and add degree symbol. Remove the work Link from links
This commit is contained in:
parent
e4a94aa574
commit
4cbb1ab437
|
@ -6,7 +6,7 @@ var DEGREES='\u00b0'
|
||||||
var UP_TRIANGLE='\u25b2'; // U+25B2 BLACK UP-POINTING TRIANGLE
|
var UP_TRIANGLE='\u25b2'; // U+25B2 BLACK UP-POINTING TRIANGLE
|
||||||
var DOWN_TRIANGLE='\u25bc'; // U+25BC BLACK DOWN-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 = {
|
var UnitLabels = {
|
||||||
'altitude': { metric: "m", imperial: "ft", nautical: "ft"},
|
'altitude': { metric: "m", imperial: "ft", nautical: "ft"},
|
||||||
|
@ -31,7 +31,7 @@ function format_track_brief(track) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return Math.round(track);
|
return Math.round(track) + DEGREES;
|
||||||
}
|
}
|
||||||
|
|
||||||
// track in degrees (0..359)
|
// track in degrees (0..359)
|
||||||
|
@ -54,7 +54,7 @@ function format_altitude_brief(alt, vr, displayUnits) {
|
||||||
return "ground";
|
return "ground";
|
||||||
}
|
}
|
||||||
|
|
||||||
alt_text = Math.round(convert_altitude(alt, displayUnits)) + NBSP;
|
alt_text = Math.round(convert_altitude(alt, displayUnits)).toLocaleString() + NBSP;
|
||||||
|
|
||||||
// Vertical Rate Triangle
|
// Vertical Rate Triangle
|
||||||
var verticalRateTriangle = "<span class=\"verticalRateTriangle\">";
|
var verticalRateTriangle = "<span class=\"verticalRateTriangle\">";
|
||||||
|
@ -80,7 +80,7 @@ function format_altitude_long(alt, vr, displayUnits) {
|
||||||
return "on ground";
|
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) {
|
if (vr > 128) {
|
||||||
return UP_TRIANGLE + NBSP + alt_text;
|
return UP_TRIANGLE + NBSP + alt_text;
|
||||||
|
@ -142,12 +142,16 @@ function format_distance_brief(dist, displayUnits) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// dist in meters
|
// dist in meters
|
||||||
function format_distance_long(dist, displayUnits) {
|
function format_distance_long(dist, displayUnits, fixed) {
|
||||||
if (dist === null) {
|
if (dist === null) {
|
||||||
return "n/a";
|
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;
|
return dist_text;
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a href="http://www.airframes.org/" onclick="document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;" class="link rightLink">
|
<a href="http://www.airframes.org/" onclick="document.getElementById('horrible_hack').submit.call(document.getElementById('airframes_post')); return false;" class="link rightLink">
|
||||||
AirFrames.org Link
|
AirFrames.org
|
||||||
</a>
|
</a>
|
||||||
<span id="selected_photo_link" class="link"></span>
|
<span id="selected_photo_link" class="link"></span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -310,15 +310,15 @@
|
||||||
<td id="speed" onclick="sortBySpeed();">Speed (<span class="speedUnit"></span>)</td>
|
<td id="speed" onclick="sortBySpeed();">Speed (<span class="speedUnit"></span>)</td>
|
||||||
<td id="vert_rate" onclick="sortByVerticalRate();">Vertical Rate (<span class="verticalRateUnit"></span>)</td>
|
<td id="vert_rate" onclick="sortByVerticalRate();">Vertical Rate (<span class="verticalRateUnit"></span>)</td>
|
||||||
<td id="distance" onclick="sortByDistance();">Distance (<span class="distanceUnit"></span>)</td>
|
<td id="distance" onclick="sortByDistance();">Distance (<span class="distanceUnit"></span>)</td>
|
||||||
<td id="track" onclick="sortByTrack();">Track</td>
|
<td id="track" onclick="sortByTrack();">Heading</td>
|
||||||
<td id="msgs" onclick="sortByMsgs();">Msgs</td>
|
<td id="msgs" onclick="sortByMsgs();">Msgs</td>
|
||||||
<td id="seen" onclick="sortBySeen();">Age</td>
|
<td id="seen" onclick="sortBySeen();">Age</td>
|
||||||
<td id="rssi" onclick="sortByRssi();">RSSI</td>
|
<td id="rssi" onclick="sortByRssi();">RSSI</td>
|
||||||
<td id="lat" onclick="sortByLatitude();">Latitude</td>
|
<td id="lat" onclick="sortByLatitude();">Latitude</td>
|
||||||
<td id="lon" onclick="sortByLongitude();">Longitude</td>
|
<td id="lon" onclick="sortByLongitude();">Longitude</td>
|
||||||
<td id="data_source" onclick="sortByDataSource();">Data Source</td>
|
<td id="data_source" onclick="sortByDataSource();">Data Source</td>
|
||||||
<td id="airframes_mode_s_link">Airframes.org Link</td>
|
<td id="airframes_mode_s_link">Airframes.org</td>
|
||||||
<td id="flightaware_mode_s_link">FlightAware Link</td>
|
<td id="flightaware_mode_s_link">FlightAware</td>
|
||||||
<td id="flightaware_photo_link">Photos</td>
|
<td id="flightaware_photo_link">Photos</td>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
@ -692,7 +692,7 @@ function createSiteCircleFeatures() {
|
||||||
font: '10px Helvetica Neue, sans-serif',
|
font: '10px Helvetica Neue, sans-serif',
|
||||||
fill: new ol.style.Fill({ color: '#000' }),
|
fill: new ol.style.Fill({ color: '#000' }),
|
||||||
offsetY: -8,
|
offsetY: -8,
|
||||||
text: format_distance_long(distance, DisplayUnits)
|
text: format_distance_long(distance, DisplayUnits, 0)
|
||||||
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -802,7 +802,7 @@ function refreshSelected() {
|
||||||
} else {
|
} else {
|
||||||
$('#selected_callsign').text('n/a');
|
$('#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) {
|
if (selected.registration !== null) {
|
||||||
$('#selected_registration').text(selected.registration);
|
$('#selected_registration').text(selected.registration);
|
||||||
|
|
Loading…
Reference in a new issue