From e62e08fef1482386c2765d632614d17e3b20a4b1 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 12 May 2022 22:06:41 +0100 Subject: [PATCH] Fix that turn anticipation wouldn't work when the bearing of the previous leg is greater than 180 degrees --- Nasal/FMGC/FMGC-b.nas | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 06563963..69f9b655 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -434,13 +434,7 @@ var ITAF = { # TODO - if in HDG mode, if no distance, then crosstrack error must be less than 5nm # TODO - if in nav, no distance condition applies, but DEST course error must be less than 30 (CONFIRM) - var enableFlyBy = 0; - var maxCourseDelta = 120; - if (abs(fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWPTemp).leg_bearing - fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWPTemp + 1).leg_bearing) < maxCourseDelta) { - enableFlyBy = 1; - } - - if (enableFlyBy and FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue() and fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWPTemp).fly_type == "flyBy") { + if (abs(FPLN.deltaAngle) < 120 and FPLN.wp0Dist.getValue() <= FPLN.turnDist and !Gear.wow1.getBoolValue() and fmgc.flightPlanController.flightplans[2].getWP(FPLN.currentWPTemp).fly_type == "flyBy") { flightPlanController.autoSequencing(); } elsif (FPLN.wp0Dist.getValue() <= 0.15 and !Gear.wow1.getBoolValue()) { flightPlanController.autoSequencing();