1
0
Fork 0

Wing anti-ice warnings + failures

This commit is contained in:
legoboyvdlp R 2020-05-12 16:57:45 +01:00
parent 48e86504e2
commit c3cde098c2
5 changed files with 438 additions and 21 deletions

View file

@ -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"),

View file

@ -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;

View file

@ -164,14 +164,70 @@
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/eng-aice-1-closed</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.1</rate_limit> <!-- 5 seconds -->
<rate_limit sense="incr">0.1</rate_limit> <!-- 10 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/eng-aice-2-closed-output">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/eng-aice-2-closed</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.1</rate_limit> <!-- 5 seconds -->
<rate_limit sense="incr">0.1</rate_limit> <!-- 10 seconds -->
</actuator>
<actuator name="/ECAM/warnings/logic/wing-anti-ice-flipflop-set">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-anti-ice-flipflop-set-input</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.0285714</rate_limit> <!-- 35 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/phase-1">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/timer/phase-1-input</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.5</rate_limit> <!-- 2 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/wing-anti-ice-25">
<description>Timer for the ECAM system</description>
<input>/controls/ice-protection/wing</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.04</rate_limit> <!-- 25 seconds -->
</actuator>
<actuator name="/ECAM/warnings/logic/wing-anti-ice-left-closed-set">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-anti-ice-left-closed-set-input</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.066666</rate_limit> <!-- 15 seconds -->
</actuator>
<actuator name="/ECAM/warnings/logic/wing-anti-ice-right-closed-set">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-anti-ice-right-closed-set-input</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.066666</rate_limit> <!-- 15 seconds -->
</actuator>
<actuator name="/ECAM/warnings/logic/proc-wai-shutdown-output">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/proc-wai-shutdown-flipflop</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.1</rate_limit> <!-- 10 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/wing-hi-pr-left">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-hi-pr-left-input</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.025</rate_limit> <!-- 40 seconds -->
</actuator>
<actuator name="/ECAM/warnings/timer/wing-hi-pr-right">
<description>Timer for the ECAM system</description>
<input>/ECAM/warnings/logic/wing-hi-pr-right-input</input>
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
<rate_limit sense="incr">0.025</rate_limit> <!-- 40 seconds -->
</actuator>
</channel>
@ -394,6 +450,17 @@
</test>
</switch>
<switch name="/ECAM/warnings/logic/wai-on">
<default value="0"/>
<test logic="AND" value="1">
/controls/ice-protection/wing eq 1
<test logic="OR">
/systems/pneumatics/valves/wing-ice-1 eq 1
/systems/pneumatics/valves/wing-ice-2 eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/bleed-1-lo-temp-xbleed">
<default value="0"/>
<test logic="AND" value="1">
@ -569,6 +636,198 @@
/controls/ice-protection/reng eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wai-ground-pulse-set">
<default value="0"/>
<test logic="AND" value="1">
/gear/gear[1]/wow eq 0
/controls/ice-protection/wing eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-left-closed-set-input">
<default value="0"/>
<test logic="AND" value="1">
/controls/ice-protection/wing eq 1
/ECAM/warnings/logic/bleed-1-avail eq 1
<test logic="OR">
/systems/pneumatics/valves/wing-ice-1 eq 0
/systems/pneumatics/psi/engine-1-psi lt 13
</test>
<test logic="OR">
<test logic="AND">
/ECAM/warnings/logic/wai-ground-pulse-set eq 1
</test>
<test logic="AND">
/gear/gear[1]/wow eq 1
/ECAM/warnings/timer/wing-anti-ice-25 ne 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-right-closed-set-input">
<default value="0"/>
<test logic="AND" value="1">
/controls/ice-protection/wing eq 1
/ECAM/warnings/logic/bleed-2-avail eq 1
<test logic="OR">
/systems/pneumatics/valves/wing-ice-2 eq 0
/systems/pneumatics/psi/engine-2-psi lt 13
</test>
<test logic="OR">
<test logic="AND">
/ECAM/warnings/logic/wai-ground-pulse-set eq 1
</test>
<test logic="AND">
/gear/gear[1]/wow eq 1
/ECAM/warnings/timer/wing-anti-ice-25 ne 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/timer/phase-1-input">
<default value="0"/>
<test value="1">
/ECAM/warning-phase eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-left-closed-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/timer/phase-1 eq 1
<test logic="AND">
/systems/pneumatics/valves/wing-ice-1 eq 1
/controls/ice-protection/wing eq 1
/ECAM/warnings/logic/bleed-1-avail eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-right-closed-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/timer/phase-1 eq 1
<test logic="AND">
/systems/pneumatics/valves/wing-ice-2 eq 1
/controls/ice-protection/wing eq 1
/ECAM/warnings/logic/bleed-2-avail eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-flipflop-set-input">
<defualt value="0"/>
<test logic="AND" value="1">
/controls/ice-protection/wing eq 1
/gear/gear[1]/wow eq 1
/ECAM/warnings/logic/wai-on eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-flipflop-reset">
<defualt value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 1
/ECAM/warning-phase eq 10
</test>
</switch>
<switch name="/ECAM/warnings/logic/proc-wai-shutdown-set">
<default value="0"/>
<test logic="AND" value="1">
/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
<test logic="OR">
<test logic="AND">
/engines/engine[0]/state eq 3
/engines/engine[1]/state ne 3 <!-- TODO this must use ENG 1 FAIL from the ECAM warning see page 2856 of ESLD -->
</test>
<test logic="AND">
/engines/engine[0]/state ne 3
/engines/engine[1]/state eq 3
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/proc-wai-shutdown-reset">
<default value="0"/>
<test logic="OR" value="1">
/systems/pneumatics/valves/crossbleed-valve ne 0
/ECAM/warnings/logic/wai-on eq 0
<test logic="AND">
/ECAM/warnings/timer/phase-1-input eq 1
/ECAM/warnings/timer/phase-1-pulse eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-sys-fault">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warnings/logic/proc-wai-shutdown-output eq 1
<test logic="AND">
<test logic="OR">
/ECAM/warnings/logic/wai-ground-pulse eq 0
/ECAM/warnings/logic/wai-ground-pulse-set eq 0
</test>
<test logic="OR">
/ECAM/warnings/flipflop/wing-anti-ice-left-closed eq 1
/ECAM/warnings/flipflop/wing-anti-ice-right-closed eq 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/wai-phase-9-pulse-input">
<default value="0"/>
<test logic="AND" value="1">
/controls/ice-protection/wing eq 1
/ECAM/warning-phase eq 9
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-gnd-fault-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/wing-anti-ice-flipflop-set eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-anti-ice-gnd-fault">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/flipflop/wing-anti-ice-left-closed eq 0
/ECAM/warnings/flipflop/wing-anti-ice-right-closed eq 0
<test logic="OR">
/ECAM/warnings/logic/wai-phase-9-pulse-input eq 0
/ECAM/warnings/logic/wai-phase-9-pulse eq 0
</test>
/ECAM/warnings/logic/wing-anti-ice-gnd-fault-flipflop eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-hi-pr-left-input">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/wai-on eq 1
/systems/pneumatics/psi/engine-1-psi gt 49 <!-- rando number -->
</test>
</switch>
<switch name="/ECAM/warnings/logic/wing-hi-pr-right-input">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/wai-on eq 1
/systems/pneumatics/psi/engine-2-psi gt 49
</test>
</switch>
</channel>
</system>

View file

@ -400,24 +400,16 @@
<rate_limit sense="decr">100</rate_limit>
</actuator>
<switch name="overwrite-wing-ice-sw">
<default value="/controls/ice-protection/wing"/>
<test logic="OR" value="0">
/systems/electrical/bus/dc-ess-shed lt 25
<test logic="AND">
<switch name="/systems/pneumatics/valves/wing-ice-1-cmd">
<default value="0"/>
<test logic="AND" value="0">
/systems/pneumatics/valves/wing-ice-gnd eq 1
/gear/gear[1]/wow eq 1
/controls/ice-protection/wing eq 1
</test>
</test>
<output>/controls/ice-protection/wing</output>
</switch>
<switch name="/systems/pneumatics/valves/wing-ice-1-cmd">
<default value="0"/>
<test logic="OR" value="0">
/systems/electrical/bus/dc-ess-shed lt 25
/systems/pneumatics/psi/engine-1-psi lt 7
/systems/pneumatics/psi/engine-1-psi le 1
</test>
<test logic="AND" value="1">
/controls/ice-protection/wing eq 1
@ -432,7 +424,7 @@
<test logic="AND" value="0.5">
<test logic="OR">
/systems/electrical/bus/dc-ess-shed lt 25
/systems/pneumatics/psi/engine-1-psi lt 7
/systems/pneumatics/psi/engine-1-psi le 1
</test>
/systems/pneumatics/valves/wing-ice-1-cmd eq 0
/systems/pneumatics/valves/wing-ice-1 ne 0
@ -449,9 +441,14 @@
<switch name="/systems/pneumatics/valves/wing-ice-2-cmd">
<default value="0"/>
<test logic="AND" value="0">
/systems/pneumatics/valves/wing-ice-gnd eq 1
/gear/gear[1]/wow eq 1
/controls/ice-protection/wing eq 1
</test>
<test logic="OR" value="0">
/systems/electrical/bus/dc-ess-shed lt 25
/systems/pneumatics/psi/engine-2-psi lt 7
/systems/pneumatics/psi/engine-2-psi le 1
</test>
<test logic="AND" value="1">
/controls/ice-protection/wing eq 1
@ -466,7 +463,7 @@
<test logic="AND" value="0.5">
<test logic="OR">
/systems/electrical/bus/dc-ess-shed lt 25
/systems/pneumatics/psi/engine-2-psi lt 7
/systems/pneumatics/psi/engine-2-psi le 1
</test>
/systems/pneumatics/valves/wing-ice-2-cmd eq 0
/systems/pneumatics/valves/wing-ice-2 ne 0

View file

@ -524,6 +524,40 @@
<output>/ECAM/warnings/logic/apu-bleed-sw-pulse</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.0</value>
</time>
<S>
<not><property>/ECAM/warnings/logic/wai-ground-pulse-set</property></not>
</S>
<output>/ECAM/warnings/logic/wai-ground-pulse</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.0</value>
</time>
<S>
<not><property>/ECAM/warnings/timer/phase-1-input</property></not>
</S>
<output>/ECAM/warnings/timer/phase-1-pulse</output>
</flipflop>
<flipflop>
<type>monostable</type>
<time>
<value>1.0</value>
</time>
<S>
<not><property>/ECAM/warnings/logic/wai-phase-9-pulse-input</property></not>
</S>
<output>/ECAM/warnings/logic/wai-phase-9-pulse</output>
</flipflop>
<!-- Bleed Low Temp -->
<flipflop>
<type>RS</type>
@ -588,4 +622,68 @@
<output>/ECAM/warnings/logic/bleed-2-off-flipflop</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<equals>
<property>/ECAM/warnings/logic/wing-anti-ice-flipflop-set</property>
<value>1</value>
</equals>
</S>
<R>
<property>/ECAM/warnings/logic/wing-anti-ice-flipflop-reset</property>
</R>
<output>/ECAM/warnings/logic/wing-anti-ice-flipflop</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<equals>
<property>/ECAM/warnings/logic/wing-anti-ice-left-closed-set</property>
<value>1</value>
</equals>
</S>
<R>
<property>/ECAM/warnings/logic/wing-anti-ice-left-closed-reset</property>
</R>
<output>/ECAM/warnings/flipflop/wing-anti-ice-left-closed</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<equals>
<property>/ECAM/warnings/logic/wing-anti-ice-right-closed-set</property>
<value>1</value>
</equals>
</S>
<R>
<property>/ECAM/warnings/logic/wing-anti-ice-right-closed-reset</property>
</R>
<output>/ECAM/warnings/flipflop/wing-anti-ice-right-closed</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/logic/proc-wai-shutdown-set</property>
</S>
<R>
<property>/ECAM/warnings/logic/proc-wai-shutdown-reset</property>
</R>
<output>/ECAM/warnings/logic/proc-wai-shutdown-flipflop</output>
</flipflop>
<flipflop>
<type>RS</type>
<S>
<property>/ECAM/warnings/logic/wing-anti-ice-gnd-fault-set</property>
</S>
<R>
<property>/ECAM/warnings/logic/wing-anti-ice-flipflop-reset</property>
</R>
<output>/ECAM/warnings/logic/wing-anti-ice-gnd-fault-flipflop</output>
</flipflop>
</PropertyList>