From f19fc737e61ccac759b529160828639fab28cf69 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Fri, 15 May 2020 23:53:33 +0100 Subject: [PATCH] Fix flightplan sequencing --- Nasal/FMGC/FMGC-b.nas | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 3c1ec6bb..229a098f 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -403,12 +403,9 @@ var ITAF = { if (FPLN.wpFlyFrom < 0) { FPLN.wpFlyFrom = 0; } - FPLN.currentCourse = getprop("/FMGC/flightplan[2]/wp[" ~ FPLN.wpFlyFrom ~ "]/course"); # Best left at getprop + FPLN.currentCourse = fmgc.wpCourse[2][FPLN.wpFlyFrom].getValue(); FPLN.wpFlyTo = FPLN.currentWPTemp + 1; - if (FPLN.wpFlyTo < 0) { - FPLN.wpFlyTo = 0; - } - FPLN.nextCourse = getprop("/FMGC/flightplan[2]/wp[" ~ FPLN.wpFlyTo ~ "]/course"); # Best left at getprop + FPLN.nextCourse = fmgc.wpCourse[2][FPLN.wpFlyTo].getValue(); FPLN.maxBankLimit = Internal.bankLimit.getValue(); FPLN.deltaAngle = math.abs(geo.normdeg180(FPLN.currentCourse - FPLN.nextCourse)); @@ -430,7 +427,7 @@ var ITAF = { Internal.lnavAdvanceNm.setValue(FPLN.turnDist); # Advance logic done by flightplan controller - if (FPLN.wp0Dist.getValue() <= FPLN.turnDist) { + if (FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue()) { flightPlanController.autoSequencing(); } }