ECAM: many fixes to THR LVR ABV IDLE, STALL, and fixes when there was an electrical failure
This commit is contained in:
parent
59b6196e4c
commit
e51dab2e3b
6 changed files with 100 additions and 55 deletions
|
@ -12,7 +12,6 @@ var leftOverflow = props.globals.initNode("/ECAM/warnings/overflow-left", 0, "B
|
|||
var rightOverflow = props.globals.initNode("/ECAM/warnings/overflow-right", 0, "BOOL");
|
||||
var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
|
||||
|
||||
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
|
||||
|
||||
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
|
||||
var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL")];
|
||||
|
@ -76,6 +75,7 @@ var warningNodes = {
|
|||
greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"),
|
||||
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"),
|
||||
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"),
|
||||
flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"),
|
||||
},
|
||||
Timers: {
|
||||
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
|
||||
|
@ -389,6 +389,7 @@ var ECAM_controller = {
|
|||
m.active = 0;
|
||||
}
|
||||
}
|
||||
me._ready = 1;
|
||||
},
|
||||
clear: func() {
|
||||
hasCleared = 0;
|
||||
|
@ -479,7 +480,7 @@ var ECAM_controller = {
|
|||
};
|
||||
|
||||
setlistener("/systems/electrical/bus/dc-ess", func {
|
||||
if (dc_ess.getValue() < 25) {
|
||||
if (systems.ELEC.Bus.dcEss.getValue() < 25) {
|
||||
ECAM_controller.reset();
|
||||
}
|
||||
}, 0, 0);
|
||||
|
|
|
@ -55,7 +55,7 @@ var messages_priority_3 = func {
|
|||
}
|
||||
|
||||
# FCTL FLAPS NOT ZERO
|
||||
if (flap_not_zero.clearFlag == 0 and phaseVar3 == 6 and pts.Controls.Flight.flapsInput.getValue() != 0 and pts.Instrumentation.Altimeter.indicatedFt.getValue() > 22000) {
|
||||
if (flap_not_zero.clearFlag == 0 and warningNodes.Logic.flapNotZero.getBoolValue()) {
|
||||
flap_not_zero.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(flap_not_zero);
|
||||
|
@ -95,7 +95,7 @@ var messages_priority_3 = func {
|
|||
if (allEngFail.clearFlag == 0 and dualFailNode.getBoolValue()) {
|
||||
allEngFail.active = 1;
|
||||
|
||||
if (allEngFailElec.clearFlag == 0 and getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0) {
|
||||
if (allEngFailElec.clearFlag == 0 and systems.ELEC.Source.EmerGen.relayPos.getValue() == 0) {
|
||||
allEngFailElec.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(allEngFailElec);
|
||||
|
@ -136,7 +136,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(allEngFailAPU);
|
||||
}
|
||||
|
||||
if (allEngFailLevers.clearFlag == 0 and (pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01 or pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01)) {
|
||||
if (allEngFailLevers.clearFlag == 0 and (pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01 or pts.Controls.Engines.Engine.throttleLever[1].getValue() > 0.01)) {
|
||||
allEngFailLevers.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(allEngFailLevers);
|
||||
|
@ -181,7 +181,7 @@ var messages_priority_3 = func {
|
|||
}
|
||||
|
||||
# ENG ABV IDLE
|
||||
if (eng1ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 1 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng1ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT
|
||||
if (eng1ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 2 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng1ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT
|
||||
eng1ThrLvrAbvIdle.active = 1;
|
||||
if (eng1ThrLvrAbvIdle2.clearFlag == 0) {
|
||||
eng1ThrLvrAbvIdle2.active = 1;
|
||||
|
@ -193,7 +193,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(eng1ThrLvrAbvIdle2);
|
||||
}
|
||||
|
||||
if (eng2ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 1 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng2ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT
|
||||
if (eng2ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 2 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng2ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT
|
||||
eng2ThrLvrAbvIdle.active = 1;
|
||||
if (eng2ThrLvrAbvIdle2.clearFlag == 0) {
|
||||
eng2ThrLvrAbvIdle2.active = 1;
|
||||
|
@ -815,7 +815,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(emerconfigGen3);
|
||||
}
|
||||
|
||||
if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0 and emerconfigManOn.clearFlag == 0) {
|
||||
if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 0 and emerconfigManOn.clearFlag == 0) {
|
||||
emerconfigManOn.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(emerconfigManOn);
|
||||
|
@ -1182,7 +1182,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(dcBusBatFault);
|
||||
}
|
||||
|
||||
if (!(systems.ELEC.EmerElec.getValue() and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) {
|
||||
if (!(systems.ELEC.EmerElec.getValue() and !systems.ELEC.Source.EmerGen.relayPos.getValue()) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) {
|
||||
dcBusEssShed.active = 1;
|
||||
dcBusEssShedExtract.active = 1;
|
||||
dcBusEssShedIcing.active = 1;
|
||||
|
@ -1192,7 +1192,7 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(dcBusEssShedIcing);
|
||||
}
|
||||
|
||||
if (!(systems.ELEC.EmerElec.getValue() and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) {
|
||||
if (!(systems.ELEC.EmerElec.getValue() and !systems.ELEC.Source.EmerGen.relayPos.getValue()) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) {
|
||||
acBusEssShed.active = 1;
|
||||
if (!systems.ELEC.EmerElec.getValue()) {
|
||||
acBusEssShedAtc.active = 1;
|
||||
|
@ -2614,7 +2614,7 @@ var messages_right_memo = func {
|
|||
rat.colour = "g";
|
||||
}
|
||||
|
||||
if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and !pts.Gear.wow[1].getValue()) {
|
||||
if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and !pts.Gear.wow[1].getValue()) {
|
||||
emer_gen.active = 1;
|
||||
} else {
|
||||
emer_gen.active = 0;
|
||||
|
|
|
@ -121,6 +121,7 @@ var ELEC = {
|
|||
volts: props.globals.getNode("/systems/electrical/sources/emer-gen/output-volt"),
|
||||
hertz: props.globals.getNode("/systems/electrical/sources/emer-gen/output-hertz"),
|
||||
voltsRelay: props.globals.getNode("/systems/electrical/relay/emer-glc/output"),
|
||||
relayPos: props.globals.getNode("/systems/electrical/relay/emer-glc/contact-pos"),
|
||||
},
|
||||
Ext: {
|
||||
volts: props.globals.getNode("/systems/electrical/sources/ext/output-volt"),
|
||||
|
|
|
@ -229,6 +229,14 @@
|
|||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/phases/monostable/phase-8">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/ECAM/warning-phase eq 8
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
</channel>
|
||||
|
||||
</system>
|
||||
|
|
|
@ -1692,11 +1692,17 @@
|
|||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/stall/phase-8-output eq 0
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/stall/phase-8-output eq 0
|
||||
/ECAM/phases/monostable/phase-8 eq 0
|
||||
</test>
|
||||
/ECAM/warning-phase eq 7
|
||||
</test>
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/stall/phase-4-output eq 0
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/stall/phase-4-output eq 0
|
||||
/ECAM/warnings/logic/stall/phase-4 eq 0
|
||||
</test>
|
||||
/ECAM/warning-phase eq 5
|
||||
</test>
|
||||
</test>
|
||||
|
@ -1715,18 +1721,14 @@
|
|||
/ECAM/warning-phase eq 5
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/stall/phase-8">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/ECAM/warning-phase eq 8
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/stall/phase-flipflop-reset">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/ECAM/warnings/logic/stall/phase-5-output eq 0
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/stall/phase-5-output eq 0
|
||||
/ECAM/warnings/logic/stall/phase-5 eq 0
|
||||
</test>
|
||||
/ECAM/warning-phase eq 6
|
||||
</test>
|
||||
</switch>
|
||||
|
@ -1805,11 +1807,18 @@
|
|||
<switch name="/ECAM/warnings/logic/eng/ground-retard">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/ECAM/timer/ground-calc eq 0
|
||||
/ECAM/warning-phase eq 6
|
||||
/ECAM/warning-phase eq 7
|
||||
/ECAM/timer/ground-calc eq 1
|
||||
/ECAM/warnings/logic/eng/ground-spoilers-output eq 1
|
||||
/ECAM/phases/monostable/phase-8-output eq 1
|
||||
<test logic="AND">
|
||||
<test logic="OR">
|
||||
/ECAM/warning-phase eq 6
|
||||
/ECAM/warning-phase eq 7
|
||||
</test>
|
||||
<test logic="AND">
|
||||
/ECAM/phases/monostable/phase-8 eq 0
|
||||
/ECAM/phases/monostable/phase-8-output eq 0
|
||||
</test>
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -1924,12 +1933,15 @@
|
|||
<test logic="AND" value="1">
|
||||
/ECAM/warnings/logic/eng/eng-1-tla-abv-6-output eq 1
|
||||
/engines/engine[0]/state eq 3
|
||||
/engines/engine[1]/state eq 3
|
||||
<test logic="OR">
|
||||
/ECAM/warnings/logic/eng/eng-2-reverse-output eq 1
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/eng/eng-2-reverse eq 1
|
||||
/ECAM/warnings/logic/eng/eng-1-retard-case-2-fall-output eq 0
|
||||
<test logic="AND">
|
||||
/engines/engine[1]/state eq 3
|
||||
<test logic="OR">
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/eng/eng-2-reverse eq 1
|
||||
/ECAM/warnings/logic/eng/eng-1-retard-case-2 eq 0
|
||||
/ECAM/warnings/logic/eng/eng-1-retard-case-2-fall-output eq 0
|
||||
</test>
|
||||
/ECAM/warnings/logic/eng/eng-2-reverse-output eq 1
|
||||
</test>
|
||||
</test>
|
||||
</test>
|
||||
|
@ -1940,12 +1952,15 @@
|
|||
<test logic="AND" value="1">
|
||||
/ECAM/warnings/logic/eng/eng-1-tla-abv-6-2-output eq 1
|
||||
/engines/engine[0]/state eq 3
|
||||
/engines/engine[1]/state eq 3
|
||||
<test logic="OR">
|
||||
/ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/eng/eng-2-reverse-fall eq 0
|
||||
/ECAM/warnings/logic/eng/eng-2-tla-idle eq 1
|
||||
<test logic="AND">
|
||||
/engines/engine[1]/state eq 3
|
||||
<test logic="OR">
|
||||
/ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/eng/eng-2-reverse-fall eq 0
|
||||
/ECAM/warnings/logic/eng/eng-2-reverse eq 0
|
||||
/ECAM/warnings/logic/eng/eng-2-tla-idle eq 1
|
||||
</test>
|
||||
</test>
|
||||
</test>
|
||||
</test>
|
||||
|
@ -1954,14 +1969,17 @@
|
|||
<switch name="/ECAM/warnings/logic/eng/eng-2-retard-case-1">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1
|
||||
/engines/engine[0]/state eq 3
|
||||
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1
|
||||
/engines/engine[1]/state eq 3
|
||||
<test logic="OR">
|
||||
/ECAM/warnings/logic/eng/eng-1-reverse-output eq 1
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/eng/eng-1-reverse eq 1
|
||||
/ECAM/warnings/logic/eng/eng-2-retard-case-2-fall-output eq 0
|
||||
<test logic="AND">
|
||||
/engines/engine[0]/state eq 3
|
||||
<test logic="OR">
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/eng/eng-1-reverse eq 1
|
||||
/ECAM/warnings/logic/eng/eng-2-retard-case-2 eq 0
|
||||
/ECAM/warnings/logic/eng/eng-2-retard-case-2-fall-output eq 0
|
||||
</test>
|
||||
/ECAM/warnings/logic/eng/eng-1-reverse-output eq 1
|
||||
</test>
|
||||
</test>
|
||||
</test>
|
||||
|
@ -1970,14 +1988,17 @@
|
|||
<switch name="/ECAM/warnings/logic/eng/eng-2-retard-case-2">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1
|
||||
/engines/engine[0]/state eq 3
|
||||
/ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1
|
||||
/engines/engine[1]/state eq 3
|
||||
<test logic="OR">
|
||||
/ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/eng/eng-1-reverse-fall eq 0
|
||||
/ECAM/warnings/logic/eng/eng-1-tla-idle eq 1
|
||||
<test logic="AND">
|
||||
/engines/engine[0]/state eq 3
|
||||
<test logic="OR">
|
||||
/ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1
|
||||
<test logic="AND">
|
||||
/ECAM/warnings/logic/eng/eng-1-reverse-fall eq 0
|
||||
/ECAM/warnings/logic/eng/eng-1-reverse eq 0
|
||||
/ECAM/warnings/logic/eng/eng-1-tla-idle eq 1
|
||||
</test>
|
||||
</test>
|
||||
</test>
|
||||
</test>
|
||||
|
@ -2302,6 +2323,20 @@
|
|||
/gear/gear[2]/position-norm eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/fctl/flaps-not-zero">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/ECAM/warning-phase eq 6
|
||||
/controls/flight/flaps-input ne 0
|
||||
<test logic="OR">
|
||||
/systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 22000
|
||||
/systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 22000
|
||||
/systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 22000
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
</channel>
|
||||
|
||||
<channel name="Hydraulic" execrate="16">
|
||||
|
|
|
@ -303,7 +303,7 @@
|
|||
<output>ECAM/warnings/altitude-alert/gear-downlocked-output</output>
|
||||
</flipflop>
|
||||
|
||||
<!-- falling edge detector - take inverse of following -->
|
||||
<!-- falling edge detector - switch and output both false -->
|
||||
<flipflop>
|
||||
<type>monostable</type>
|
||||
<inverted type="bool">true</inverted>
|
||||
|
@ -311,9 +311,9 @@
|
|||
<value>4.5</value>
|
||||
</time>
|
||||
<S>
|
||||
<property>ECAM/phases/monostable/phase-8</property>
|
||||
<property>/ECAM/phases/monostable/phase-8</property>
|
||||
</S>
|
||||
<output>ECAM/phases/monostable/phase-8-output</output>
|
||||
<output>/ECAM/phases/monostable/phase-8-output</output>
|
||||
</flipflop>
|
||||
|
||||
<flipflop>
|
||||
|
@ -902,7 +902,7 @@
|
|||
<value>1.0</value>
|
||||
</time>
|
||||
<S>
|
||||
<property>/ECAM/warnings/logic/stall/phase-8</property>
|
||||
<property>/ECAM/phases/monostable/phase-8</property>
|
||||
</S>
|
||||
<output>/ECAM/warnings/logic/stall/phase-8-output</output>
|
||||
</flipflop>
|
||||
|
|
Loading…
Reference in a new issue