1
0
Fork 0

Merge branch 'dev' into 3D

This commit is contained in:
Jonathan Redpath 2021-11-25 20:41:14 +00:00
commit 7dd290ae33
3 changed files with 125 additions and 57 deletions

View file

@ -3,7 +3,7 @@
# props.nas: # props.nas:
var dualFailNode = props.globals.initNode("/ECAM/dual-failure-enabled", 0, "BOOL"); var dualFailNode = props.globals.initNode("/ECAM/warnings/logic/eng/dual-failure", 0, "BOOL");
var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1); var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1);
var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1); var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1);
@ -1920,7 +1920,7 @@ var messages_priority_2 = func {
} }
# GEN 1 FAULT # GEN 1 FAULT
if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) {
gen1fault.active = 1; gen1fault.active = 1;
if (!warningNodes.Flipflops.gen1FaultOnOff.getValue()) { if (!warningNodes.Flipflops.gen1FaultOnOff.getValue()) {
gen1faultGen.active = 1; gen1faultGen.active = 1;
@ -1950,7 +1950,7 @@ var messages_priority_2 = func {
} }
# GEN 2 FAULT # GEN 2 FAULT
if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) {
gen2fault.active = 1; gen2fault.active = 1;
if (!warningNodes.Flipflops.gen2FaultOnOff.getValue()) { if (!warningNodes.Flipflops.gen2FaultOnOff.getValue()) {
gen2faultGen.active = 1; gen2faultGen.active = 1;
@ -3642,19 +3642,3 @@ var messages_right_memo = func {
adirs_switch.active = 0; adirs_switch.active = 0;
} }
} }
setlistener("/engines/engine[0]/state", func() {
if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and !pts.Fdm.JSBsim.Position.wow.getBoolValue()) {
dualFailNode.setBoolValue(1);
} else {
dualFailNode.setBoolValue(0);
}
}, 0, 0);
setlistener("/engines/engine[1]/state", func() {
if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and !pts.Fdm.JSBsim.Position.wow.getBoolValue()) {
dualFailNode.setBoolValue(1);
} else {
dualFailNode.setBoolValue(0);
}
}, 0, 0);

View file

@ -141,39 +141,11 @@
</test> </test>
</switch> </switch>
<switch name="/ECAM/phases/phase-calculation/engine-1-off">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/phases/timer/eng1idle-output eq 0
/controls/engines/engine[0]/cutoff-switch eq 1
</test>
<test logic="OR">
/ECAM/timer/ground-calc eq 1
/ECAM/phases/timer/eng1idle eq 0
</test>
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/engine-2-off">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/phases/timer/eng2idle-output eq 0
/controls/engines/engine[1]/cutoff-switch eq 1
</test>
<test logic="OR">
/ECAM/timer/ground-calc eq 1
/ECAM/phases/timer/eng2idle eq 0
</test>
</test>
</switch>
<switch name="/ECAM/phases/phase-calculation/engines-1-2-not-running"> <switch name="/ECAM/phases/phase-calculation/engines-1-2-not-running">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/ECAM/phases/phase-calculation/engine-1-off eq 1 /ECAM/warnings/logic/eng/JE1NORUN eq 1
/ECAM/phases/phase-calculation/engine-2-off eq 1 /ECAM/warnings/logic/eng/JE2NORUN eq 1
</test> </test>
</switch> </switch>

View file

@ -1500,10 +1500,80 @@
<channel name="Electrical Warnings" execrate="16"> <channel name="Electrical Warnings" execrate="16">
<switch name="/ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle-input">
<default value="0"/>
<test logic="OR" value="1">
/engines/engine[0]/n2-actual ge 59.4
</test>
</switch>
<actuator name="/ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle">
<input>/ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle-input</input>
<rate_limit sense="incr">0.03333333333</rate_limit> <!-- 31 -->
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<actuator name="/ECAM/warnings/logic/eng/eng-1-fire-btn-timer-31">
<input>/controls/engines/engine[0]/fire-btn</input>
<rate_limit sense="incr">0.03225806451</rate_limit> <!-- 31 -->
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<switch name="/ECAM/warnings/logic/eng/JE1NORUN">
<default value="0"/>
<test logic="OR" value="1">
/controls/engines/engine[0]/cutoff-switch eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/engine-1-core-speed-abv-idle ne 1
<test logic="OR">
/engines/engine[0]/n2-actual lt 59.4
/ECAM/timer/ground-calc eq 1
/controls/engines/engine[0]/fire-btn eq 0
/ECAM/warnings/logic/eng/eng-1-fire-btn-timer-31 ne 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle-input">
<default value="0"/>
<test logic="OR" value="1">
/engines/engine[0]/n2-actual ge 59.4
</test>
</switch>
<actuator name="/ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle">
<input>/ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle-input</input>
<rate_limit sense="incr">0.03333333333</rate_limit> <!-- 31 -->
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<actuator name="/ECAM/warnings/logic/eng/eng-2-fire-btn-timer-31">
<input>/controls/engines/engine[1]/fire-btn</input>
<rate_limit sense="incr">0.03225806451</rate_limit> <!-- 31 -->
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<switch name="/ECAM/warnings/logic/eng/JE2NORUN">
<default value="0"/>
<test logic="OR" value="1">
/controls/engines/engine[1]/cutoff-switch eq 1
<test logic="AND">
/ECAM/warnings/logic/eng/engine-2-core-speed-abv-idle ne 1
<test logic="OR">
/engines/engine[1]/n2-actual lt 59.4
/ECAM/timer/ground-calc eq 1
/controls/engines/engine[1]/fire-btn eq 0
/ECAM/warnings/logic/eng/eng-2-fire-btn-timer-31 ne 1
</test>
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/gen-1-inop"> <switch name="/ECAM/warnings/logic/gen-1-inop">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/engines/engine[0]/state eq 3 /ECAM/warnings/logic/eng/JE1NORUN eq 0
/systems/electrical/relay/gen-1-glc/contact-pos eq 0 /systems/electrical/relay/gen-1-glc/contact-pos eq 0
</test> </test>
</switch> </switch>
@ -1571,7 +1641,7 @@
<switch name="/ECAM/warnings/logic/gen-2-inop"> <switch name="/ECAM/warnings/logic/gen-2-inop">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/engines/engine[1]/state eq 3 /ECAM/warnings/logic/eng/JE2NORUN eq 0
/systems/electrical/relay/gen-2-glc/contact-pos eq 0 /systems/electrical/relay/gen-2-glc/contact-pos eq 0
</test> </test>
</switch> </switch>
@ -1824,7 +1894,7 @@
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/ECAM/timer/ground-calc eq 0 /ECAM/timer/ground-calc eq 0
/ECAM/dual-failure-enabled eq 0 /ECAM/warnings/logic/eng/dual-failure eq 0
<test logic="OR"> <test logic="OR">
<test logic="AND"> <test logic="AND">
<test logic="OR"> <test logic="OR">
@ -1871,7 +1941,7 @@
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/ECAM/timer/ground-calc eq 0 /ECAM/timer/ground-calc eq 0
/ECAM/dual-failure-enabled eq 0 /ECAM/warnings/logic/eng/dual-failure eq 0
<test logic="OR"> <test logic="OR">
<test logic="AND"> <test logic="AND">
<test logic="OR"> <test logic="OR">
@ -2763,6 +2833,48 @@
</test> </test>
</switch> </switch>
<switch name="/ECAM/warnings/logic/eng/dual-failure-5-sec-input">
<default value="0"/>
<test logic="AND" value="1">
/engines/engine[0]/n2-actual lt 59.4
/engines/engine[1]/n2-actual lt 59.4
</test>
</switch>
<actuator name="/ECAM/warnings/logic/eng/dual-failure-5-sec">
<input>/ECAM/warnings/logic/eng/dual-failure-5-sec-input</input>
<rate_limit sense="incr">0.5</rate_limit>
<rate_limit sense="decr">100</rate_limit>
</actuator>
<actuator name="/ECAM/warnings/logic/eng/eng-2-fire-btn-timer">
<input>/controls/engines/engine[1]/fire-btn</input>
<rate_limit sense="incr">0.1</rate_limit>
<rate_limit sense="decr">1.0</rate_limit>
</actuator>
<switch name="/ECAM/warnings/logic/eng/dual-failure">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/timer/ground-calc eq 0
<test logic="OR">
/ECAM/warnings/logic/eng/eng-2-fire-btn-timer eq 1
/controls/engines/engine[1]/fire-btn eq 0
</test>
<test logic="OR">
<test logic="AND">
/controls/engines/engine[0]/fire-btn eq 1
/controls/engines/engine[1]/fire-btn eq 1
</test>
<test logic="AND">
/controls/engines/engine[0]/cutoff-switch eq 1
/controls/engines/engine[1]/cutoff-switch eq 1
</test>
/ECAM/warnings/logic/eng/dual-failure-5-sec eq 1
</test>
</test>
</switch>
<switch name="/ECAM/warnings/logic/eng/eng-1-fail-cond-set-input"> <switch name="/ECAM/warnings/logic/eng/eng-1-fail-cond-set-input">
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
@ -2829,7 +2941,7 @@
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
/engines/engine[0]/n2-actual ge 59.4 /engines/engine[0]/n2-actual ge 59.4
/ECAM/dual-failure-enabled eq 1 /ECAM/warnings/logic/eng/dual-failure eq 1
</test> </test>
</switch> </switch>
@ -2837,7 +2949,7 @@
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
/engines/engine[1]/n2-actual ge 59.4 /engines/engine[1]/n2-actual ge 59.4
/ECAM/dual-failure-enabled eq 1 /ECAM/warnings/logic/eng/dual-failure eq 1
</test> </test>
</switch> </switch>
@ -2902,7 +3014,7 @@
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/ECAM/phases/timer/acconfig-running eq 0 /ECAM/phases/timer/acconfig-running eq 0
/ECAM/dual-failure-enabled eq 0 /ECAM/warnings/logic/eng/dual-failure eq 0
<test logic="OR"> <test logic="OR">
<test logic="AND"> <test logic="AND">
<test logic="OR"> <test logic="OR">
@ -2923,7 +3035,7 @@
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/ECAM/phases/timer/acconfig-running eq 0 /ECAM/phases/timer/acconfig-running eq 0
/ECAM/dual-failure-enabled eq 0 /ECAM/warnings/logic/eng/dual-failure eq 0
<test logic="OR"> <test logic="OR">
<test logic="AND"> <test logic="AND">
<test logic="OR"> <test logic="OR">