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();