ALTN: case airport is missing
This commit is contained in:
parent
05d36c1c89
commit
5d857ec338
1 changed files with 18 additions and 14 deletions
|
@ -449,20 +449,24 @@ var fplnPage = { # this one is only created once, and then updated - remember th
|
||||||
if (!fmgc.FMGCInternal.altAirportSet) {
|
if (!fmgc.FMGCInternal.altAirportSet) {
|
||||||
append(me.planList, staticText.new(me.computer, me.getText("noAltnFpln")));
|
append(me.planList, staticText.new(me.computer, me.getText("noAltnFpln")));
|
||||||
} else {
|
} else {
|
||||||
var altnApt = findAirportsByICAO(fmgc.FMGCInternal.altAirport)[0];
|
var altnApt = findAirportsByICAO(fmgc.FMGCInternal.altAirport);
|
||||||
append(me.planList, fplnItem.new({
|
if (size(altnApt) > 0) {
|
||||||
alt_cstr: nil,
|
append(me.planList, fplnItem.new({
|
||||||
alt_cstr_type: nil,
|
alt_cstr: nil,
|
||||||
fly_type: "flyBy",
|
alt_cstr_type: nil,
|
||||||
lat: altnApt.lat,
|
fly_type: "flyBy",
|
||||||
leg_bearing: courseAndDistance(findAirportsByICAO(fmgc.FMGCInternal.arrApt)[0], altnApt)[0],
|
lat: altnApt.lat,
|
||||||
leg_distance: courseAndDistance(findAirportsByICAO(fmgc.FMGCInternal.arrApt)[0], altnApt)[1],
|
leg_bearing: courseAndDistance(findAirportsByICAO(fmgc.FMGCInternal.arrApt)[0], altnApt[0])[0],
|
||||||
lon: altnApt.lon,
|
leg_distance: courseAndDistance(findAirportsByICAO(fmgc.FMGCInternal.arrApt)[0], altnApt[0])[1],
|
||||||
speed_cstr: nil,
|
lon: altnApt.lon,
|
||||||
speed_cstr_type: nil,
|
speed_cstr: nil,
|
||||||
wp_name: fmgc.FMGCInternal.altAirport,
|
speed_cstr_type: nil,
|
||||||
}, i, me.planIndex, me.computer, "blu"));
|
wp_name: fmgc.FMGCInternal.altAirport,
|
||||||
append(me.planList, staticText.new(me.computer, me.getText("altnFplnEnd")));
|
}, i, me.planIndex, me.computer, "blu"));
|
||||||
|
append(me.planList, staticText.new(me.computer, me.getText("altnFplnEnd")));
|
||||||
|
} else {
|
||||||
|
append(me.planList, staticText.new(me.computer, me.getText("noAltnFpln")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
me.basePage();
|
me.basePage();
|
||||||
|
|
Loading…
Add table
Reference in a new issue