Emit adsb version in json & faup1090. Show it in skyview.
This commit is contained in:
parent
17c8265ce8
commit
e3c8c91852
4 changed files with 38 additions and 3 deletions
public_html
|
@ -219,6 +219,8 @@
|
|||
<div>
|
||||
<div class="infoHeading infoRowFluid fourColumnSection1">Alt setting:</div>
|
||||
<div class="infoData infoRowFluid fourColumnSection2"><span id="selected_alt_setting"/></div>
|
||||
<div class="infoHeading infoRowFluid fourColumnSection1">ADS-B:</div>
|
||||
<div class="infoData infoRowFluid fourColumnSection2"><span id="selected_version"/></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ function PlaneObject(icao) {
|
|||
this.alt_setting = null;
|
||||
this.baro_rate = null;
|
||||
this.geom_rate = null;
|
||||
this.version = null;
|
||||
|
||||
this.prev_position = null;
|
||||
this.position = null;
|
||||
|
@ -468,6 +469,8 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
|
|||
this.squawk = data.squawk;
|
||||
if (typeof data.category !== "undefined")
|
||||
this.category = data.category;
|
||||
if (typeof data.version !== "undefined")
|
||||
this.version = data.version;
|
||||
|
||||
if (typeof data.lat !== "undefined") {
|
||||
this.position = [data.lon, data.lat];
|
||||
|
|
|
@ -939,9 +939,21 @@ function refreshSelected() {
|
|||
$('#selected_true_heading').text(format_track_long(selected.true_heading));
|
||||
$('#selected_ias').text(format_speed_long(selected.ias, DisplayUnits));
|
||||
$('#selected_tas').text(format_speed_long(selected.tas, DisplayUnits));
|
||||
$('#selected_mach').text(selected.mach.toFixed(3));
|
||||
$('#selected_roll').text(selected.roll.toFixed(2));
|
||||
$('#selected_track_rate').text(selected.track_rate.toFixed(2));
|
||||
if (selected.mach == null) {
|
||||
$('#selected_mach').text('n/a');
|
||||
} else {
|
||||
$('#selected_mach').text(selected.mach.toFixed(3));
|
||||
}
|
||||
if (selected.roll == null) {
|
||||
$('#selected_roll').text('n/a');
|
||||
} else {
|
||||
$('#selected_roll').text(selected.roll.toFixed(1));
|
||||
}
|
||||
if (selected.track_rate == null) {
|
||||
$('#selected_track_rate').text('n/a');
|
||||
} else {
|
||||
$('#selected_track_rate').text(selected.track_rate.toFixed(2));
|
||||
}
|
||||
$('#selected_geom_rate').text(format_vert_rate_long(selected.geom_rate, DisplayUnits));
|
||||
if (selected.alt_setting == null) {
|
||||
$('#selected_alt_setting').text("n/a");
|
||||
|
@ -950,6 +962,18 @@ function refreshSelected() {
|
|||
}
|
||||
$('#selected_intent_alt').text(format_altitude_long(selected.intent_alt, 0, DisplayUnits));
|
||||
$('#selected_intent_heading').text(format_track_long(selected.intent_heading))
|
||||
|
||||
if (selected.version == null) {
|
||||
$('#selected_version').text('none');
|
||||
} else if (selected.version == 0) {
|
||||
$('#selected_version').text('v0 (DO-260)');
|
||||
} else if (selected.version == 1) {
|
||||
$('#selected_version').text('v1 (DO-260A)');
|
||||
} else if (selected.version == 2) {
|
||||
$('#selected_version').text('v2 (DO-260B)');
|
||||
} else {
|
||||
$('#selected_version').text('v' + selected.version);
|
||||
}
|
||||
}
|
||||
|
||||
function refreshHighlighted() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue