1
0
Fork 0

Experimental support for cases like EGJJ

This commit is contained in:
legoboyvdlp R 2020-03-25 15:05:04 +00:00
parent 3aada81966
commit ea95889252
3 changed files with 14 additions and 3 deletions

View file

@ -420,7 +420,7 @@ var flightPlanController = {
wpCoursePrev[n][wpt].setValue(courseDistanceFromPrev[0]);
wpDistancePrev[n][wpt].setValue(courseDistanceFromPrev[1]);
if (me.flightplans[n].getWP(wpt - 1).wp_type != "vectors" and me.flightplans[n].getWP(wpt - 1).wp_type != "hdgToAlt" and me.flightplans[n].getWP(wpt).wp_type != "vectors" and me.flightplans[n].getWP(wpt).wp_type != "hdgToAlt" and wpt <= me.arrivalIndex[n]) {
me._arrivalDist += courseDistanceFromPrev[1];
me._arrivalDist += courseDistanceFromPrev[1]; # todo - buggy. Neglect discontinuity, and should show distance to next wpt, + distance thereafter
}
} else {
# use PPOS for the first waypoint

View file

@ -251,6 +251,9 @@ var departurePage = {
}
if (me.selectedRunway != nil) {
me._sids = me.depAirport[0].sids(me.selectedRunway.id);
if (size(me._sids) == 0) { # account for cases such as EGJJ where runway code does not match SIDS
me._sids = me.depAirport[0].sids();
}
} else {
me._sids = me.depAirport[0].sids();
}

View file

@ -309,8 +309,16 @@ var fplnPage = { # this one is only created once, and then updated - remember th
}
},
destInfo: func() {
me.L6 = [left(me.plan.getWP(fmgc.flightPlanController.arrivalIndex[me.planIndex]).wp_name, 4), " DEST", "wht"];
me.C6 = ["---- " ~ int(fmgc.flightPlanController.arrivalDist), "TIME DIST", "wht"];
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"];
} else {
me.L6 = ["----", " DEST", "wht"];
}
if (fmgc.flightPlanController.arrivalDist != nil) {
me.C6 = ["---- " ~ int(fmgc.flightPlanController.arrivalDist), "TIME DIST", "wht"];
} else {
me.C6 = ["---- ----", "TIME DIST", "wht"];
}
me.R6 = ["--.-", "EFOB", "wht"];
},
update: func() {