1
0
Fork 0

Fix the CLR button, and fix distance calculation. Needs to neglect discontinuitites still, that broke agagin

This commit is contained in:
legoboyvdlp R 2020-03-07 15:20:20 +00:00
parent 185f3d48eb
commit 470b2fbcc1
2 changed files with 3 additions and 5 deletions

View file

@ -389,7 +389,9 @@ var flightPlanController = {
courseDistanceFromPrev = waypointHashStore.courseAndDistanceFrom(geoPosPrev);
wpCoursePrev[n][wpt].setValue(courseDistanceFromPrev[0]);
wpDistancePrev[n][wpt].setValue(courseDistanceFromPrev[1]);
me._arrivalDist += 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") {
me._arrivalDist += courseDistanceFromPrev[1];
}
} else {
# use PPOS for the first waypoint
wpCoursePrev[n][wpt].setValue(courseDistanceFrom[0]);

View file

@ -298,10 +298,6 @@ var fplnPage = { # this one is only created once, and then updated - remember th
}
},
pushButtonLeft: func(index) {
if (left(me.L6[0], 4) == getprop("/FMGC/internal/dep-arpt") and size(getprop("/MCDU[" ~ me.computer ~ "]/scratchpad")) > 0) {
notAllowed(me.computer);
return;
}
if (index == 6) {
if (fmgc.flightPlanController.temporaryFlag[me.computer]) {
fmgc.flightPlanController.destroyTemporaryFlightPlan(me.computer, 0);