From c3cde098c221657ba523cb5cfc46b33991b8c9f9 Mon Sep 17 00:00:00 2001 From: legoboyvdlp R Date: Tue, 12 May 2020 16:57:45 +0100 Subject: [PATCH] Wing anti-ice warnings + failures --- Nasal/ECAM/ECAM-controller.nas | 7 + Nasal/ECAM/ECAM-logic.nas | 60 +++++++- Systems/a320-fwc.xml | 263 ++++++++++++++++++++++++++++++++- Systems/a320-pneumatic.xml | 31 ++-- Systems/ecam-proprules.xml | 98 ++++++++++++ 5 files changed, 438 insertions(+), 21 deletions(-) diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas index 9da6fd0f..8946eb74 100644 --- a/Nasal/ECAM/ECAM-controller.nas +++ b/Nasal/ECAM/ECAM-controller.nas @@ -43,6 +43,11 @@ var warningNodes = { bleed2LoTempBleed: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-bleed"), bleed2LoTempPack: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-pack"), bleed2WaiAvail: props.globals.initNode("/ECAM/warnings/logic/bleed-2-wai-avail"), + waiSysfault: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-sys-fault"), + waiLclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-closed"), + waiRclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-closed"), + procWaiShutdown: props.globals.initNode("/ECAM/warnings/logic/proc-wai-shutdown-output"), + waiGndFlight: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-gnd-fault"), }, Timers: { apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), @@ -62,6 +67,8 @@ var warningNodes = { eng2AiceNotClsd: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-open-output"), eng1AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-1-closed-output"), eng2AiceNotOpen: props.globals.initNode("/ECAM/warnings/timer/eng-aice-2-closed-output"), + waiLhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-left"), + waiRhiPr: props.globals.initNode("/ECAM/warnings/timer/wing-hi-pr-right"), }, Flipflops: { bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"), diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index f7951850..2aac71fa 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -1249,7 +1249,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(bleed1FaultOff); } - if (bleed1FaultPack.clearFlag == 0 and systems.PNEU.Switch.pack1.getBoolValue() and systems.PNEU.Switch.pack2.getBoolValue() and getprop("/controls/ice-protection/wing")) { + if (bleed1FaultPack.clearFlag == 0 and systems.PNEU.Switch.pack1.getBoolValue() and systems.PNEU.Switch.pack2.getBoolValue() and getprop("/ECAM/warnings/logic/wai-on")) { bleed1FaultPack.active = 1; } else { ECAM_controller.warningReset(bleed1FaultPack); @@ -1286,7 +1286,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(bleed2FaultOff); } - if (bleed2FaultPack.clearFlag == 0 and systems.PNEU.Switch.pack1.getValue() and systems.PNEU.Switch.pack2.getValue() and getprop("/controls/ice-protection/wing")) { + if (bleed2FaultPack.clearFlag == 0 and systems.PNEU.Switch.pack1.getValue() and systems.PNEU.Switch.pack2.getValue() and getprop("/ECAM/warnings/logic/wai-on")) { bleed2FaultPack.active = 1; } else { ECAM_controller.warningReset(bleed2FaultPack); @@ -1604,6 +1604,62 @@ var messages_priority_2 = func { ECAM_controller.warningReset(eng2IceOpenThrust); } + # Wing anti ice + if (wingIceSysFault.clearFlag == 0 and warningNodes.Logic.waiSysfault.getBoolValue() and (phaseVar <= 2 or phaseVar >= 9 or phaseVar == 6)) { + wingIceSysFault.active = 1; + + if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and warningNodes.Logic.procWaiShutdown.getValue() == 1) { + wingIceSysFaultXbld.active = 1; + } else { + ECAM_controller.warningReset(wingIceSysFaultXbld); + } + if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and getprop("/controls/ice-protection/wing")) { + wingIceSysFaultOff.active = 1; + } else { + ECAM_controller.warningReset(wingIceSysFaultOff); + } + + if (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) { + wingIceSysFaultIcing.active = 1; + } else { + ECAM_controller.warningReset(wingIceSysFaultIcing); + } + } else { + ECAM_controller.warningReset(wingIceSysFault); + ECAM_controller.warningReset(wingIceSysFaultXbld); + ECAM_controller.warningReset(wingIceSysFaultOff); + ECAM_controller.warningReset(wingIceSysFaultIcing); + } + + if (wingIceOpenGnd.clearFlag == 0 and warningNodes.Logic.waiGndFlight.getValue() and (phaseVar <= 2 or phaseVar >= 9)) { + wingIceOpenGnd.active = 1; + + if (pts.Gear.wow[1].getValue() and getprop("/controls/ice-protection/wing")) { + wingIceOpenGndShut.active = 1; + } else { + ECAM_controller.warningReset(wingIceOpenGndShut); + } + } else { + ECAM_controller.warningReset(wingIceOpenGnd); + ECAM_controller.warningReset(wingIceOpenGndShut); + } + + if (wingIceLHiPr.clearFlag == 0 and warningNodes.Timers.waiLhiPr.getValue() == 1 and (phaseVar <= 2 or phaseVar >= 9 or phaseVar == 6)) { + wingIceLHiPr.active = 1; + wingIceLHiPrThrust.active = 1; + } else { + ECAM_controller.warningReset(wingIceLHiPr); + ECAM_controller.warningReset(wingIceLHiPrThrust); + } + + if (wingIceRHiPr.clearFlag == 0 and warningNodes.Timers.waiRhiPr.getValue() == 1 and (phaseVar <= 2 or phaseVar >= 9 or phaseVar == 6)) { + wingIceRHiPr.active = 1; + wingIceRHiPrThrust.active = 1; + } else { + ECAM_controller.warningReset(wingIceRHiPr); + ECAM_controller.warningReset(wingIceRHiPrThrust); + } + # Eng fire if (eng1FireDetFault.clearFlag == 0 and (systems.engFireDetectorUnits.vector[0].condition == 0 or (systems.engFireDetectorUnits.vector[0].loopOne == 9 and systems.engFireDetectorUnits.vector[0].loopTwo == 9 and systems.eng1Inop.getBoolValue())) and (phaseVar == 6 or phaseVar >= 9 or phaseVar <= 2)) { eng1FireDetFault.active = 1; diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index 2d518afc..cae8aad1 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -164,14 +164,70 @@ Timer for the ECAM system /ECAM/warnings/logic/eng-aice-1-closed 100 - 0.1 + 0.1 Timer for the ECAM system /ECAM/warnings/logic/eng-aice-2-closed 100 - 0.1 + 0.1 + + + + Timer for the ECAM system + /ECAM/warnings/logic/wing-anti-ice-flipflop-set-input + 100 + 0.0285714 + + + + Timer for the ECAM system + /ECAM/warnings/timer/phase-1-input + 100 + 0.5 + + + + Timer for the ECAM system + /controls/ice-protection/wing + 100 + 0.04 + + + + Timer for the ECAM system + /ECAM/warnings/logic/wing-anti-ice-left-closed-set-input + 100 + 0.066666 + + + + Timer for the ECAM system + /ECAM/warnings/logic/wing-anti-ice-right-closed-set-input + 100 + 0.066666 + + + + Timer for the ECAM system + /ECAM/warnings/logic/proc-wai-shutdown-flipflop + 100 + 0.1 + + + + Timer for the ECAM system + /ECAM/warnings/logic/wing-hi-pr-left-input + 100 + 0.025 + + + + Timer for the ECAM system + /ECAM/warnings/logic/wing-hi-pr-right-input + 100 + 0.025 @@ -394,6 +450,17 @@ + + + + /controls/ice-protection/wing eq 1 + + /systems/pneumatics/valves/wing-ice-1 eq 1 + /systems/pneumatics/valves/wing-ice-2 eq 1 + + + + @@ -569,6 +636,198 @@ /controls/ice-protection/reng eq 1 + + + + + /gear/gear[1]/wow eq 0 + /controls/ice-protection/wing eq 1 + + + + + + + /controls/ice-protection/wing eq 1 + /ECAM/warnings/logic/bleed-1-avail eq 1 + + /systems/pneumatics/valves/wing-ice-1 eq 0 + /systems/pneumatics/psi/engine-1-psi lt 13 + + + + /ECAM/warnings/logic/wai-ground-pulse-set eq 1 + + + /gear/gear[1]/wow eq 1 + /ECAM/warnings/timer/wing-anti-ice-25 ne 1 + + + + + + + + + /controls/ice-protection/wing eq 1 + /ECAM/warnings/logic/bleed-2-avail eq 1 + + /systems/pneumatics/valves/wing-ice-2 eq 0 + /systems/pneumatics/psi/engine-2-psi lt 13 + + + + /ECAM/warnings/logic/wai-ground-pulse-set eq 1 + + + /gear/gear[1]/wow eq 1 + /ECAM/warnings/timer/wing-anti-ice-25 ne 1 + + + + + + + + + /ECAM/warning-phase eq 1 + + + + + + + /ECAM/warnings/timer/phase-1 eq 1 + + /systems/pneumatics/valves/wing-ice-1 eq 1 + /controls/ice-protection/wing eq 1 + /ECAM/warnings/logic/bleed-1-avail eq 1 + + + + + + + + /ECAM/warnings/timer/phase-1 eq 1 + + /systems/pneumatics/valves/wing-ice-2 eq 1 + /controls/ice-protection/wing eq 1 + /ECAM/warnings/logic/bleed-2-avail eq 1 + + + + + + + + /controls/ice-protection/wing eq 1 + /gear/gear[1]/wow eq 1 + /ECAM/warnings/logic/wai-on eq 1 + + + + + + + /ECAM/warning-phase eq 1 + /ECAM/warning-phase eq 10 + + + + + + + /systems/pneumatics/valves/crossbleed-valve eq 0 + /controls/engines/engine[0]/fire-btn eq 0 + /controls/engines/engine[1]/fire-btn eq 0 + /ECAM/warnings/logic/wai-ground-pulse eq 1 + /ECAM/warnings/logic/wai-ground-pulse-set eq 1 + + + /engines/engine[0]/state eq 3 + /engines/engine[1]/state ne 3 + + + /engines/engine[0]/state ne 3 + /engines/engine[1]/state eq 3 + + + + + + + + + /systems/pneumatics/valves/crossbleed-valve ne 0 + /ECAM/warnings/logic/wai-on eq 0 + + /ECAM/warnings/timer/phase-1-input eq 1 + /ECAM/warnings/timer/phase-1-pulse eq 1 + + + + + + + + /ECAM/warnings/logic/proc-wai-shutdown-output eq 1 + + + /ECAM/warnings/logic/wai-ground-pulse eq 0 + /ECAM/warnings/logic/wai-ground-pulse-set eq 0 + + + /ECAM/warnings/flipflop/wing-anti-ice-left-closed eq 1 + /ECAM/warnings/flipflop/wing-anti-ice-right-closed eq 1 + + + + + + + + + /controls/ice-protection/wing eq 1 + /ECAM/warning-phase eq 9 + + + + + + + /ECAM/warnings/logic/wing-anti-ice-flipflop-set eq 1 + + + + + + + /ECAM/warnings/flipflop/wing-anti-ice-left-closed eq 0 + /ECAM/warnings/flipflop/wing-anti-ice-right-closed eq 0 + + /ECAM/warnings/logic/wai-phase-9-pulse-input eq 0 + /ECAM/warnings/logic/wai-phase-9-pulse eq 0 + + /ECAM/warnings/logic/wing-anti-ice-gnd-fault-flipflop eq 1 + + + + + + + /ECAM/warnings/logic/wai-on eq 1 + /systems/pneumatics/psi/engine-1-psi gt 49 + + + + + + + /ECAM/warnings/logic/wai-on eq 1 + /systems/pneumatics/psi/engine-2-psi gt 49 + + diff --git a/Systems/a320-pneumatic.xml b/Systems/a320-pneumatic.xml index 7b5494b9..06deff1b 100644 --- a/Systems/a320-pneumatic.xml +++ b/Systems/a320-pneumatic.xml @@ -400,24 +400,16 @@ 100 - - - - /systems/electrical/bus/dc-ess-shed lt 25 - - /systems/pneumatics/valves/wing-ice-gnd eq 1 - /gear/gear[1]/wow eq 1 - /controls/ice-protection/wing eq 1 - - - /controls/ice-protection/wing - - + + /systems/pneumatics/valves/wing-ice-gnd eq 1 + /gear/gear[1]/wow eq 1 + /controls/ice-protection/wing eq 1 + /systems/electrical/bus/dc-ess-shed lt 25 - /systems/pneumatics/psi/engine-1-psi lt 7 + /systems/pneumatics/psi/engine-1-psi le 1 /controls/ice-protection/wing eq 1 @@ -432,7 +424,7 @@ /systems/electrical/bus/dc-ess-shed lt 25 - /systems/pneumatics/psi/engine-1-psi lt 7 + /systems/pneumatics/psi/engine-1-psi le 1 /systems/pneumatics/valves/wing-ice-1-cmd eq 0 /systems/pneumatics/valves/wing-ice-1 ne 0 @@ -449,9 +441,14 @@ + + /systems/pneumatics/valves/wing-ice-gnd eq 1 + /gear/gear[1]/wow eq 1 + /controls/ice-protection/wing eq 1 + /systems/electrical/bus/dc-ess-shed lt 25 - /systems/pneumatics/psi/engine-2-psi lt 7 + /systems/pneumatics/psi/engine-2-psi le 1 /controls/ice-protection/wing eq 1 @@ -466,7 +463,7 @@ /systems/electrical/bus/dc-ess-shed lt 25 - /systems/pneumatics/psi/engine-2-psi lt 7 + /systems/pneumatics/psi/engine-2-psi le 1 /systems/pneumatics/valves/wing-ice-2-cmd eq 0 /systems/pneumatics/valves/wing-ice-2 ne 0 diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index 96ea0946..b984a7c2 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -524,6 +524,40 @@ /ECAM/warnings/logic/apu-bleed-sw-pulse + + monostable + + + /ECAM/warnings/logic/wai-ground-pulse-set + + /ECAM/warnings/logic/wai-ground-pulse + + + + monostable + + + /ECAM/warnings/timer/phase-1-input + + /ECAM/warnings/timer/phase-1-pulse + + + + + monostable + + + /ECAM/warnings/logic/wai-phase-9-pulse-input + + /ECAM/warnings/logic/wai-phase-9-pulse + + RS @@ -588,4 +622,68 @@ /ECAM/warnings/logic/bleed-2-off-flipflop + + RS + + + /ECAM/warnings/logic/wing-anti-ice-flipflop-set + 1 + + + + /ECAM/warnings/logic/wing-anti-ice-flipflop-reset + + /ECAM/warnings/logic/wing-anti-ice-flipflop + + + + SR + + + /ECAM/warnings/logic/wing-anti-ice-left-closed-set + 1 + + + + /ECAM/warnings/logic/wing-anti-ice-left-closed-reset + + /ECAM/warnings/flipflop/wing-anti-ice-left-closed + + + + SR + + + /ECAM/warnings/logic/wing-anti-ice-right-closed-set + 1 + + + + /ECAM/warnings/logic/wing-anti-ice-right-closed-reset + + /ECAM/warnings/flipflop/wing-anti-ice-right-closed + + + + RS + + /ECAM/warnings/logic/proc-wai-shutdown-set + + + /ECAM/warnings/logic/proc-wai-shutdown-reset + + /ECAM/warnings/logic/proc-wai-shutdown-flipflop + + + + RS + + /ECAM/warnings/logic/wing-anti-ice-gnd-fault-set + + + /ECAM/warnings/logic/wing-anti-ice-flipflop-reset + + /ECAM/warnings/logic/wing-anti-ice-gnd-fault-flipflop + +