diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 84d6ba8d..87895b81 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -991,7 +991,12 @@ var ManagedSPD = maketimer(0.25, func { } } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > (FMGCInternal.clbSpdLimAlt + 20)) { FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; - FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); + + if (constraintSpeed != nil and constraintSpeed != 0) { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? math.min(mng_alt_mach, ktsToMach(constraintSpeed)) : math.min(mng_alt_spd, constraintSpeed); + } else { + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; + } } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude > (FMGCInternal.desSpdLimAlt + 20)) { if (FMGCInternal.decel) { FMGCInternal.mngKtsMach = 0;