1
0
Fork 0

FPLN: Missed approach shown in blue (green in go-around); L6 now shows runway code. R1 shows departure elevation and V1 speed. General formatting and spacing improved. Track now displayed on the first missed approach waypoint

This commit is contained in:
legoboyvdlp R 2020-05-15 00:51:52 +01:00
parent 85a34eeb54
commit 60a18632f4

View file

@ -35,15 +35,15 @@ var fplnItem = {
if (me.wp != nil) {
if (me.wp.wp_name != "DISCONTINUITY") {
if (me.index == fmgc.flightPlanController.currentToWptIndex.getValue() - 1 and fmgc.flightPlanController.fromWptTime != nil) {
me.assembledStr[0] = fmgc.flightPlanController.fromWptTime ~ " ";
me.assembledStr[0] = fmgc.flightPlanController.fromWptTime ~ " ";
} else {
me.assembledStr[0] = "---- ";
me.assembledStr[0] = "---- ";
}
if (me.index == fmgc.flightPlanController.currentToWptIndex.getValue()) {
me.assembledStr[1] = "BRG" ~ me.getBrg();
} elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() + 1)) {
me.assembledStr[1] = "TRK" ~ me.getTrack();
me.assembledStr[1] = "BRG" ~ me.getBrg() ~ " ";
} elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() + 1) or me.index == (fmgc.flightPlanController.arrivalIndex[me.plan] + 1)) {
me.assembledStr[1] = "TRK" ~ me.getTrack() ~ " ";
} else {
me.assembledStr[1] = nil;
}
@ -62,7 +62,11 @@ var fplnItem = {
me.spd = me.getSpd();
me.alt = me.getAlt();
me.dist = me.getDist();
return [me.spd ~ "/" ~ me.alt, " " ~ me.dist ~ "NM ", me.colour];
if (canvas_mcdu.myFpln[me.computer].scroll - me.index == 0) {
return [me.spd ~ "/" ~ me.alt, " " ~ me.dist ~ "NM ", me.colour];
} else {
return [me.spd ~ "/" ~ me.alt, " " ~ me.dist ~ " ", me.colour];
}
} else {
return [nil, nil, "ack"];
}
@ -84,13 +88,19 @@ var fplnItem = {
return sprintf("%03.0f", math.round(me.trk));
},
getSpd: func() {
return "---";
if (me.index == 0 and getprop("FMGC/internal/v1-set")) {
return sprintf("%3.0f", math.round(getprop("FMGC/internal/v1")));
} else {
return "---";
}
},
getAlt: func() {
if (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1) and fmgc.flightPlanController.fromWptAlt != nil) {
return " " ~ fmgc.flightPlanController.fromWptAlt;
if (me.index == 0 and left(me.wp.wp_name, 4) == getprop("/FMGC/internal/dep-arpt") and fmgc.flightPlanController.flightplans[me.plan].departure != nil) {
return sprintf("%6.0f", math.round(fmgc.flightPlanController.flightplans[me.plan].departure.elevation * M2FT));
} elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1) and fmgc.flightPlanController.fromWptAlt != nil) {
return " " ~ fmgc.flightPlanController.fromWptAlt;
} else {
return "-----";
return "------";
}
},
getDist: func() {
@ -261,12 +271,15 @@ var fplnPage = { # this one is only created once, and then updated - remember th
createPlanList: func() {
me.planList = [];
if (me.temporaryFlagFpln) {
for (var i = 0; i < me.plan.getPlanSize(); i += 1) {
append(me.planList, fplnItem.new(me.plan.getWP(i), i, me.planIndex, me.computer, "yel"));
}
colour = "yel";
} else {
for (var i = 0; i < me.plan.getPlanSize(); i += 1) {
append(me.planList, fplnItem.new(me.plan.getWP(i), i, me.planIndex, me.computer));
colour = "grn";
}
for (var i = 0; i < me.plan.getPlanSize(); i += 1) {
if (!me.temporaryFlagFpln and i > fmgc.flightPlanController.arrivalIndex[me.planIndex] and getprop("/FMGC/status/phase") != 6) {
append(me.planList, fplnItem.new(me.plan.getWP(i), i, me.planIndex, me.computer, "blu"));
} else {
append(me.planList, fplnItem.new(me.plan.getWP(i), i, me.planIndex, me.computer, colour));
}
}
append(me.planList, staticText.new(me.computer, me.getText("fplnEnd")));
@ -281,9 +294,9 @@ var fplnPage = { # this one is only created once, and then updated - remember th
if (size(me.outputList) >= 1) {
me.L1 = me.outputList[0].updateLeftText();
me.C1 = me.outputList[0].updateCenterText();
me.C1[1] = "TIME ";
me.C1[1] = "TIME ";
me.R1 = me.outputList[0].updateRightText();
me.R1[1] = "SPD/ALT ";
me.R1[1] = "SPD/ALT ";
} else {
me.L1 = [nil, nil, "ack"];
me.C1 = [nil, nil, "ack"];
@ -328,16 +341,21 @@ var fplnPage = { # this one is only created once, and then updated - remember th
},
destInfo: func() {
if (me.plan.getWP(fmgc.flightPlanController.arrivalIndex[me.planIndex]) != nil) {
me.L6 = [left(me.plan.getWP(fmgc.flightPlanController.arrivalIndex[me.planIndex]).wp_name, 4), " DEST", "wht"];
var destName = split("-", me.plan.getWP(fmgc.flightPlanController.arrivalIndex[me.planIndex]).wp_name);
if (size(destName) == 2) {
me.L6 = [destName[0] ~ destName[1], " DEST", "wht"];
} else {
me.L6 = [destName, " DEST", "wht"];
}
} else {
me.L6 = ["----", " DEST", "wht"];
}
me.C6 = ["---- ", "TIME ", "wht"];
if (fmgc.flightPlanController.arrivalDist != nil) {
me.C6 = ["---- " ~ int(fmgc.flightPlanController.arrivalDist), "TIME DIST", "wht"];
me.R6 = [sprintf("%4.0f", int(fmgc.flightPlanController.arrivalDist)) ~ " --.-", "DIST EFOB", "wht"];
} else {
me.C6 = ["---- ----", "TIME DIST", "wht"];
me.R6 = ["---- --.-", "DIST EFOB", "wht"];
}
me.R6 = ["--.-", "EFOB", "wht"];
},
update: func() {
#me.basePage();