From 3b428d1e1a4b5b901541bc21dfbcb28bce36c43b Mon Sep 17 00:00:00 2001 From: Josh Davidson Date: Fri, 30 Jul 2021 12:24:39 -0400 Subject: [PATCH] FMGC: Fix localizer not capturing if on course too close to beam --- Nasal/FMGC/FMGC-b.nas | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 7a746608..46b439d7 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -763,13 +763,13 @@ var ITAF = { Radio.locDeflTemp = Radio.locDefl.getValue(); Radio.signalQualityTemp = Radio.signalQuality.getValue(); if (abs(Radio.locDeflTemp) <= 0.95 and Radio.locDeflTemp != 0 and Radio.signalQualityTemp >= 0.99) { - if (Radio.locDeflTemp >= 0 and Internal.navHeadingErrorDegTemp <= 0) { + if (abs(Radio.locDeflTemp[Input.radioSelTemp]) <= 0.25) { me.activateLoc(); - } else if (Radio.locDeflTemp < 0 and Internal.navHeadingErrorDegTemp >= 0) { + } else if (Radio.locDeflTemp[Input.radioSelTemp] >= 0 and Internal.navHeadingErrorDegTemp[Input.radioSelTemp] <= 0) { me.activateLoc(); - } - - if (t != 1) { # Do not do this if loop calls it + } else if (Radio.locDeflTemp[Input.radioSelTemp] < 0 and Internal.navHeadingErrorDegTemp[Input.radioSelTemp] >= 0) { + me.activateLoc(); + } else if (t != 1) { # Do not do this if loop calls it if (Output.lat.getValue() != 2) { me.updateLnavArm(0); me.updateLocArm(1);