Minimal skyview changes for nav_alt changes
This commit is contained in:
parent
f46640a5c2
commit
77c8f9aafa
|
@ -454,7 +454,7 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
|
||||||
|
|
||||||
var fields = ["alt_baro", "alt_geom", "gs", "ias", "tas", "track",
|
var fields = ["alt_baro", "alt_geom", "gs", "ias", "tas", "track",
|
||||||
"track_rate", "mag_heading", "true_heading", "mach",
|
"track_rate", "mag_heading", "true_heading", "mach",
|
||||||
"roll", "nav_altitude", "nav_heading", "nav_modes",
|
"roll", "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", "rc",
|
"nav_qnh", "baro_rate", "geom_rate", "rc",
|
||||||
"squawk", "category", "version"];
|
"squawk", "category", "version"];
|
||||||
|
@ -507,6 +507,15 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
|
||||||
this.altitude = null;
|
this.altitude = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pick a selected altitude
|
||||||
|
if ('nav_altitude_fms' in data) {
|
||||||
|
this.nav_altitude = data.nav_altitude_fms;
|
||||||
|
} else if ('nav_altitude_mcp' in data) {
|
||||||
|
this.nav_altitude = data.nav_altitude_mcp;
|
||||||
|
} else {
|
||||||
|
this.nav_altitude = null;
|
||||||
|
}
|
||||||
|
|
||||||
// Pick vertical rate from either baro or geom rate
|
// Pick vertical rate from either baro or geom rate
|
||||||
// geometric rate is generally more reliable (smoothed etc)
|
// geometric rate is generally more reliable (smoothed etc)
|
||||||
if ('geom_rate' in data) {
|
if ('geom_rate' in data) {
|
||||||
|
|
Loading…
Reference in a new issue