Update NAC displays. Add RC
This commit is contained in:
parent
12151ed8f5
commit
ea7a2c1c09
|
@ -225,3 +225,52 @@ function format_data_source(source) {
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function format_nac_p (value) {
|
||||||
|
switch (value) {
|
||||||
|
case 0:
|
||||||
|
return "EPU ≥ 18.52 km";
|
||||||
|
case 1:
|
||||||
|
return "EPU < 18.52 km";
|
||||||
|
case 2:
|
||||||
|
return "EPU < 7.408 km";
|
||||||
|
case 3:
|
||||||
|
return "EPU < 3.704 km";
|
||||||
|
case 4:
|
||||||
|
return "EPU < 1852 m";
|
||||||
|
case 5:
|
||||||
|
return "EPU < 926 m";
|
||||||
|
case 6:
|
||||||
|
return "EPU < 555.6 m";
|
||||||
|
case 7:
|
||||||
|
return "EPU < 185.2 m";
|
||||||
|
case 8:
|
||||||
|
return "EPU < 92.6 m";
|
||||||
|
case 9:
|
||||||
|
return "EPU < 30 m";
|
||||||
|
case 10:
|
||||||
|
return "EPU < 10 m";
|
||||||
|
case 11:
|
||||||
|
return "EPU < 3 m";
|
||||||
|
default:
|
||||||
|
return "n/a";
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function format_nac_v (value) {
|
||||||
|
switch (value) {
|
||||||
|
case 0:
|
||||||
|
return "Unknown or 10 m/s";
|
||||||
|
case 1:
|
||||||
|
return "< 10 m/s";
|
||||||
|
case 2:
|
||||||
|
return "< 3 m/s";
|
||||||
|
case 3:
|
||||||
|
return "< 1 m/s";
|
||||||
|
case 4:
|
||||||
|
return "< 0.3 m/s";
|
||||||
|
default:
|
||||||
|
return "n/a";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -592,7 +592,7 @@
|
||||||
<span title="Navigation accuracy category of the velocity (95% bound on velocities).">NAC<sub>V</sub></span>:
|
<span title="Navigation accuracy category of the velocity (95% bound on velocities).">NAC<sub>V</sub></span>:
|
||||||
</div>
|
</div>
|
||||||
<div class="infoData infoRowFluid fourColumnSection2">
|
<div class="infoData infoRowFluid fourColumnSection2">
|
||||||
<span id="selected_nac_p">n/a</span>
|
<span id="selected_nac_v">n/a</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="infoRowLine">
|
<div class="infoRowLine">
|
||||||
|
@ -603,7 +603,14 @@
|
||||||
<span id="selected_nic_baro">n/a</span>
|
<span id="selected_nic_baro">n/a</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- </div> -->
|
<div class="infoRowLine">
|
||||||
|
<div class="infoHeading infoRowFluid fourColumnSection1">
|
||||||
|
RC:
|
||||||
|
</div>
|
||||||
|
<div class="infoData infoRowFluid fourColumnSection2">
|
||||||
|
<span id="selected_rc">n/a</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -29,6 +29,7 @@ function PlaneObject(icao) {
|
||||||
this.nav_heading = null;
|
this.nav_heading = null;
|
||||||
this.nav_modes = null;
|
this.nav_modes = null;
|
||||||
this.nav_qnh = null;
|
this.nav_qnh = null;
|
||||||
|
this.rc = null;
|
||||||
|
|
||||||
this.nac_p = null;
|
this.nac_p = null;
|
||||||
this.nac_v = null;
|
this.nac_v = null;
|
||||||
|
@ -446,7 +447,7 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
|
||||||
"track_rate", "mag_heading", "true_heading", "mach",
|
"track_rate", "mag_heading", "true_heading", "mach",
|
||||||
"roll", "nav_altitude", "nav_heading", "nav_modes",
|
"roll", "nav_altitude", "nav_heading", "nav_modes",
|
||||||
"nac_p", "nac_v", "nic_baro", "sil_type", "sil",
|
"nac_p", "nac_v", "nic_baro", "sil_type", "sil",
|
||||||
"nav_qnh", "baro_rate", "geom_rate",
|
"nav_qnh", "baro_rate", "geom_rate", "rc",
|
||||||
"squawk", "category", "version"];
|
"squawk", "category", "version"];
|
||||||
|
|
||||||
for (var i = 0; i < fields.length; ++i) {
|
for (var i = 0; i < fields.length; ++i) {
|
||||||
|
|
|
@ -249,7 +249,6 @@ function initialize() {
|
||||||
|
|
||||||
// to make the infoblock responsive
|
// to make the infoblock responsive
|
||||||
$('#sidebar_container').on('resize', function() {
|
$('#sidebar_container').on('resize', function() {
|
||||||
console.log('sidebar resize', $('#sidebar_canvas').width());
|
|
||||||
if ($('#sidebar_container').width() < 500) {
|
if ($('#sidebar_container').width() < 500) {
|
||||||
$('#selected_infoblock').addClass('infoblock-container-small');
|
$('#selected_infoblock').addClass('infoblock-container-small');
|
||||||
} else {
|
} else {
|
||||||
|
@ -1037,16 +1036,15 @@ function refreshSelected() {
|
||||||
$('#selected_nic_baro').text("not cross-checked");
|
$('#selected_nic_baro').text("not cross-checked");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (selected.nac_p == null) {
|
|
||||||
$('#selected_nac_p').text("n/a");
|
$('#selected_nac_p').text(format_nac_p(selected.nac_p));
|
||||||
|
$('#selected_nac_v').text(format_nac_v(selected.nac_v));
|
||||||
|
if (selected.rc == null) {
|
||||||
|
$('#selected_rc').text("n/a");
|
||||||
} else {
|
} else {
|
||||||
$('#selected_nac_p').text(selected.nac_p);
|
$('#selected_rc').text(format_distance_long(selected.rc, DisplayUnits));
|
||||||
}
|
|
||||||
if (selected.nac_v == null) {
|
|
||||||
$('#selected_nac_v').text("n/a");
|
|
||||||
} else {
|
|
||||||
$('#selected_nac_v').text(selected.nac_v);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected.sil == null || selected.sil_type == null) {
|
if (selected.sil == null || selected.sil_type == null) {
|
||||||
$('#selected_sil').text("n/a");
|
$('#selected_sil').text("n/a");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue