Add ECAM warnings for FAC / rudder system. FAC failure latching now works. Yaw damper failures added. You can now go from mechanical yaw back to alternate yaw, should your FAC recover.
This commit is contained in:
parent
1d77c5a11a
commit
aebdca0ad5
10 changed files with 446 additions and 61 deletions
|
@ -1124,6 +1124,8 @@
|
|||
<fac2 type="bool">0</fac2>
|
||||
<rtlu-1 type="bool">0</rtlu-1>
|
||||
<rtlu-2 type="bool">0</rtlu-2>
|
||||
<yaw-damper-1 type="bool">0</yaw-damper-1>
|
||||
<yaw-damper-2 type="bool">0</yaw-damper-2>
|
||||
</fctl>
|
||||
<fuel>
|
||||
<left-tank-pump-1 type="bool">0</left-tank-pump-1>
|
||||
|
@ -1194,6 +1196,7 @@
|
|||
<sec3 type="bool">0</sec3>
|
||||
<fac1 type="bool">0</fac1>
|
||||
<fac2 type="bool">0</fac2>
|
||||
<yawdamper-active type="bool">0</yawdamper-active>
|
||||
</fctl>
|
||||
<fire n="0">
|
||||
<apu>
|
||||
|
|
|
@ -144,6 +144,26 @@
|
|||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Yaw Damper 1</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/failures/fctl/yaw-damper-1</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<checkbox>
|
||||
<label>Yaw Damper 2</label>
|
||||
<halign>left</halign>
|
||||
<property>/systems/failures/fctl/yaw-damper-2</property>
|
||||
<binding>
|
||||
<command>dialog-apply</command>
|
||||
</binding>
|
||||
<live>true</live>
|
||||
</checkbox>
|
||||
|
||||
<group>
|
||||
<layout>hbox</layout>
|
||||
|
||||
|
|
|
@ -55,6 +55,10 @@ var warningNodes = {
|
|||
rtlu1Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-1-fault"),
|
||||
rtlu2Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-2-fault"),
|
||||
rtlu12Fault: props.globals.initNode("/ECAM/warnings/logic/rud-trav-lim-sys-fault"),
|
||||
fac12Fault: props.globals.initNode("/ECAM/warnings/logic/fac-12-fault"),
|
||||
fac1Fault: props.globals.initNode("/ECAM/warnings/logic/fac-1-fault"),
|
||||
fac2Fault: props.globals.initNode("/ECAM/warnings/logic/fac-2-fault"),
|
||||
yawDamper12Fault: props.globals.initNode("/ECAM/warnings/logic/yaw-damper-12-fault"),
|
||||
},
|
||||
Timers: {
|
||||
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
|
||||
|
@ -81,6 +85,8 @@ var warningNodes = {
|
|||
pack1Off: props.globals.initNode("/ECAM/warnings/timer/pack-1-off"),
|
||||
pack2Off: props.globals.initNode("/ECAM/warnings/timer/pack-2-off"),
|
||||
trimAirFault: props.globals.initNode("/ECAM/warnings/timer/trim-air-fault"),
|
||||
yawDamper1Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-1-fault"),
|
||||
yawDamper2Fault: props.globals.initNode("/ECAM/warnings/timer/yaw-damper-2-fault"),
|
||||
},
|
||||
Flipflops: {
|
||||
bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"),
|
||||
|
|
|
@ -10,7 +10,6 @@ var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1);
|
|||
var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1);
|
||||
var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
|
||||
|
||||
var fac1Node = props.globals.getNode("/controls/fctl/switches/fac1", 1);
|
||||
var state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
|
||||
var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
|
||||
var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
|
||||
|
@ -33,8 +32,6 @@ var phaseVar1 = nil;
|
|||
var phaseVarMemo = nil;
|
||||
var phaseVarMemo2 = nil;
|
||||
var phaseVarMemo3 = nil;
|
||||
var dualFailFACActive = 1;
|
||||
var emerConfigFACActive = 1;
|
||||
var gear_agl_cur = nil;
|
||||
var numberMinutes = nil;
|
||||
var timeNow = nil;
|
||||
|
@ -103,8 +100,6 @@ var messages_priority_3 = func {
|
|||
dualFail.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFail);
|
||||
|
||||
dualFailFACActive = 1; # reset FAC local variable
|
||||
}
|
||||
|
||||
if (dualFail.active == 1) {
|
||||
|
@ -144,7 +139,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(dualFailRadio);
|
||||
}
|
||||
|
||||
if (dualFailFACActive == 1 and dualFailFAC.clearFlag == 0) {
|
||||
if (getprop("/systems/fctl/fac1-healthy-signal") == 0 and dualFailFAC.clearFlag == 0) {
|
||||
dualFailFAC.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(dualFailFAC);
|
||||
|
@ -959,7 +954,7 @@ var messages_priority_3 = func {
|
|||
ECAM_controller.warningReset(emerconfigFuelG2);
|
||||
}
|
||||
|
||||
if (emerConfigFACActive == 1 and emerconfigFAC.clearFlag == 0) {
|
||||
if (getprop("/systems/fctl/fac1-healthy-signal") == 0 and emerconfigFAC.clearFlag == 0) {
|
||||
emerconfigFAC.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(emerconfigFAC);
|
||||
|
@ -1179,6 +1174,28 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(tcasFault);
|
||||
}
|
||||
|
||||
if (fac12Fault.clearFlag == 0 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and warningNodes.Logic.fac12Fault.getBoolValue()) {
|
||||
fac12Fault.active = 1;
|
||||
fac12FaultRud.active = 1;
|
||||
fac12FaultFac.active = 1;
|
||||
fac12FaultSuccess.active = 1;
|
||||
fac12FaultFacOff.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(fac12Fault);
|
||||
ECAM_controller.warningReset(fac12FaultRud);
|
||||
ECAM_controller.warningReset(fac12FaultFac);
|
||||
ECAM_controller.warningReset(fac12FaultSuccess);
|
||||
ECAM_controller.warningReset(fac12FaultFacOff);
|
||||
}
|
||||
|
||||
if (yawDamperSysFault.clearFlag == 0 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and phaseVar2 != 10 and warningNodes.Logic.yawDamper12Fault.getBoolValue()) {
|
||||
yawDamperSysFault.active = 1;
|
||||
yawDamperSysFaultFac.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(yawDamperSysFault);
|
||||
ECAM_controller.warningReset(yawDamperSysFaultFac);
|
||||
}
|
||||
|
||||
if (rudTravLimSysFault.clearFlag == 0 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and warningNodes.Logic.rtlu12Fault.getBoolValue()) {
|
||||
rudTravLimSysFault.active = 1;
|
||||
rudTravLimSysFaultRud.active = 1;
|
||||
|
@ -1189,6 +1206,42 @@ var messages_priority_2 = func {
|
|||
ECAM_controller.warningReset(rudTravLimSysFaultFac);
|
||||
}
|
||||
|
||||
if (fac1Fault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6) and warningNodes.Logic.fac1Fault.getBoolValue()) {
|
||||
fac1Fault.active = 1;
|
||||
fac1FaultFac.active = 1;
|
||||
fac1FaultSuccess.active = 1;
|
||||
fac1FaultFacOff.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(fac1Fault);
|
||||
ECAM_controller.warningReset(fac1FaultFac);
|
||||
ECAM_controller.warningReset(fac1FaultSuccess);
|
||||
ECAM_controller.warningReset(fac1FaultFacOff);
|
||||
}
|
||||
|
||||
if (fac2Fault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6) and warningNodes.Logic.fac2Fault.getBoolValue()) {
|
||||
fac2Fault.active = 1;
|
||||
fac2FaultFac.active = 1;
|
||||
fac2FaultSuccess.active = 1;
|
||||
fac2FaultFacOff.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(fac2Fault);
|
||||
ECAM_controller.warningReset(fac2FaultFac);
|
||||
ECAM_controller.warningReset(fac2FaultSuccess);
|
||||
ECAM_controller.warningReset(fac2FaultFacOff);
|
||||
}
|
||||
|
||||
if (yawDamper1Fault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 == 9 or phaseVar2 == 6) and warningNodes.Timers.yawDamper1Fault.getValue() == 1 and !warningNodes.Logic.yawDamper12Fault.getBoolValue()) {
|
||||
yawDamper1Fault.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(yawDamper1Fault);
|
||||
}
|
||||
|
||||
if (yawDamper2Fault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 == 9 or phaseVar2 == 6) and warningNodes.Timers.yawDamper2Fault.getValue() == 1 and !warningNodes.Logic.yawDamper12Fault.getBoolValue()) {
|
||||
yawDamper2Fault.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(yawDamper2Fault);
|
||||
}
|
||||
|
||||
if (rudTravLimSys1Fault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6) and warningNodes.Logic.rtlu1Fault.getBoolValue()) {
|
||||
rudTravLimSys1Fault.active = 1;
|
||||
} else {
|
||||
|
@ -1230,14 +1283,12 @@ var messages_priority_2 = func {
|
|||
apuEmerShutdown.active = 1;
|
||||
} elsif (apuEmerShutdown.clearFlag == 1) {
|
||||
ECAM_controller.warningReset(apuEmerShutdown);
|
||||
apuEmerShutdown.isMainMsg = 1;
|
||||
}
|
||||
|
||||
if (apuEmerShutdownMast.clearFlag == 0 and getprop("controls/apu/master") and apuEmerShutdown.active == 1) {
|
||||
apuEmerShutdownMast.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(apuEmerShutdownMast);
|
||||
apuEmerShutdown.isMainMsg = 0;
|
||||
}
|
||||
|
||||
# APU AUTO SHUT DOWN
|
||||
|
@ -1245,14 +1296,12 @@ var messages_priority_2 = func {
|
|||
apuAutoShutdown.active = 1;
|
||||
} elsif (apuAutoShutdown.clearFlag == 1) {
|
||||
ECAM_controller.warningReset(apuAutoShutdown);
|
||||
apuAutoShutdown.isMainMsg = 1;
|
||||
}
|
||||
|
||||
if (apuAutoShutdownMast.clearFlag == 0 and pts.APU.masterSw.getValue() and apuAutoShutdown.active == 1) {
|
||||
apuAutoShutdownMast.active = 1;
|
||||
} else {
|
||||
ECAM_controller.warningReset(apuAutoShutdownMast);
|
||||
apuAutoShutdown.isMainMsg = 0;
|
||||
}
|
||||
|
||||
# Bleed
|
||||
|
@ -2137,6 +2186,12 @@ var messages_memo = func {
|
|||
refuelg.active = 0;
|
||||
}
|
||||
|
||||
if (systems.ADIRS.ADIRunits[0].inAlign == 1 or systems.ADIRS.ADIRunits[1].inAlign == 1 or systems.ADIRS.ADIRunits[2].inAlign == 1) {
|
||||
FWC.Logic.IRSinAlign.setValue(1);
|
||||
} else {
|
||||
FWC.Logic.IRSinAlign.setValue(0);
|
||||
}
|
||||
|
||||
if ((phaseVarMemo2 == 1 or phaseVarMemo2 == 2) and toMemoLine1.active != 1 and ldgMemoLine1.active != 1 and (systems.ADIRS.ADIRunits[0].inAlign == 1 or systems.ADIRS.ADIRunits[1].inAlign == 1 or systems.ADIRS.ADIRunits[2].inAlign == 1)) {
|
||||
irs_in_align.active = 1;
|
||||
if (getprop("ECAM/phases/timer/eng1or2-output")) {
|
||||
|
@ -2408,23 +2463,6 @@ var messages_right_memo = func {
|
|||
}
|
||||
}
|
||||
|
||||
# Listeners
|
||||
setlistener("/controls/fctl/switches/fac1", func() {
|
||||
if (dualFail.active == 0 and emerconfig.active == 0) { return; }
|
||||
|
||||
if (fac1Node.getBoolValue() and dualFail.active == 1) {
|
||||
dualFailFACActive = 0;
|
||||
} else {
|
||||
dualFailFACActive = 1;
|
||||
}
|
||||
|
||||
if (fac1Node.getBoolValue() and emerconfig.active == 1) {
|
||||
emerConfigFACActive = 0;
|
||||
} else {
|
||||
emerConfigFACActive = 1;
|
||||
}
|
||||
}, 0, 0);
|
||||
|
||||
setlistener("/engines/engine[0]/state", func() {
|
||||
if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and wowNode.getValue() == 0) {
|
||||
dualFailNode.setBoolValue(1);
|
||||
|
|
|
@ -226,12 +226,34 @@ var warnings = std.Vector.new([
|
|||
# TCAS FAULT
|
||||
var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
|
||||
# Rudder Travel Limiter
|
||||
# FAC and Rudder System
|
||||
var fac12Fault = warning.new(msg: "AUTO FLT FAC 1+2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var fac12FaultRud = warning.new(msg: "RUD WITH CARE ABV 160 KT", colour: "c"),
|
||||
var fac12FaultFac = warning.new(msg: " -FAC 1+2....OFF THEN ON", colour: "c"),
|
||||
var fac12FaultSuccess = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
|
||||
var fac12FaultFacOff = warning.new(msg: " -FAC 1+2............OFF", colour: "c"),
|
||||
var yawDamperSysFault = warning.new(msg: "AUTO FLT YAW DAMPER SYS", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var yawDamperSysFaultFac = warning.new(msg: " -FAC 1+2....OFF THEN ON", colour: "c"),
|
||||
# var rudderTrimSysFault = warning.new(msg: "AUTO FLT RUD TRIM SYS", colour: "a", aural: 1, light: 1, isMainMsg: 1), not implemented
|
||||
# var rudderTrimSysFaultFac = warning.new(msg: " -FAC 1+2....OFF THEN ON", colour: "c"),
|
||||
var rudTravLimSysFault = warning.new(msg: "AUTO FLT RUD TRV LIM SYS", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var rudTravLimSysFaultRud = warning.new(msg: "RUD WITH CARE ABV 160 KT", colour: "c", aural: 1, light: 1),
|
||||
var rudTravLimSysFaultFac = warning.new(msg: " -FAC 1+2....OFF THEN ON", colour: "c", aural: 1, light: 1),
|
||||
var rudTravLimSys1Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 1", colour: "a", isMainMsg: 1),
|
||||
var rudTravLimSys2Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 2", colour: "a", isMainMsg: 1),
|
||||
var rudTravLimSysFaultRud = warning.new(msg: "RUD WITH CARE ABV 160 KT", colour: "c"),
|
||||
var rudTravLimSysFaultFac = warning.new(msg: " -FAC 1+2....OFF THEN ON", colour: "c"),
|
||||
var fac1Fault = warning.new(msg: "AUTO FLT FAC 1 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var fac1FaultFac = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"),
|
||||
var fac1FaultSuccess = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
|
||||
var fac1FaultFacOff = warning.new(msg: " -FAC 1..............OFF", colour: "c"),
|
||||
var fac2Fault = warning.new(msg: "AUTO FLT FAC 2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
var fac2FaultFac = warning.new(msg: " -FAC 2......OFF THEN ON", colour: "c"),
|
||||
var fac2FaultSuccess = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"),
|
||||
var fac2FaultFacOff = warning.new(msg: " -FAC 2..............OFF", colour: "c"),
|
||||
|
||||
var yawDamper1Fault = warning.new(msg: "AUTO FLT YAW DAMPER 1", colour: "a", isMainMsg: 1),
|
||||
var yawDamper2Fault = warning.new(msg: "AUTO FLT YAW DAMPER 2", colour: "a", isMainMsg: 1),
|
||||
# var rudTrim1Fault = warning.new(msg: "AUTO FLT RUD TRIM1 FAULT", colour: "a", isMainMsg: 1), not implemented
|
||||
# var rudTrim2Fault = warning.new(msg: "AUTO FLT RUD TRIM2 FAULT", colour: "a", isMainMsg: 1), not implemented
|
||||
var rudTravLimSys1Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 1", colour: "a", isMainMsg: 1),
|
||||
var rudTravLimSys2Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 2", colour: "a", isMainMsg: 1),
|
||||
|
||||
# FCU fault
|
||||
var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
|
||||
|
|
|
@ -52,6 +52,7 @@ var FWC = {
|
|||
},
|
||||
Logic: {
|
||||
gnd: props.globals.getNode("/ECAM/ground-calc-immediate"),
|
||||
IRSinAlign: props.globals.initNode("/ECAM/irs-in-align", 0, "BOOL"),
|
||||
},
|
||||
Timer: {
|
||||
eng1idle: props.globals.initNode("/ECAM/phases/timer/eng1idle", 0, "INT"),
|
||||
|
|
|
@ -32,14 +32,15 @@ var FBW = {
|
|||
override: props.globals.getNode("/it-fbw/override"),
|
||||
rollBack: props.globals.getNode("/it-fbw/roll-back"),
|
||||
rollLim: props.globals.getNode("/it-fbw/roll-lim"),
|
||||
yawdamper: props.globals.getNode("/systems/fctl/yawdamper-active"),
|
||||
Computers: {
|
||||
elac1: props.globals.getNode("/systems/fctl/elac1"),
|
||||
elac2: props.globals.getNode("/systems/fctl/elac2"),
|
||||
sec1: props.globals.getNode("/systems/fctl/sec1"),
|
||||
sec2: props.globals.getNode("/systems/fctl/sec2"),
|
||||
sec3: props.globals.getNode("/systems/fctl/sec3"),
|
||||
fac1: props.globals.getNode("/systems/fctl/fac1"),
|
||||
fac2: props.globals.getNode("/systems/fctl/fac2"),
|
||||
fac1: props.globals.getNode("/systems/fctl/fac1-healthy-signal"),
|
||||
fac2: props.globals.getNode("/systems/fctl/fac2-healthy-signal"),
|
||||
},
|
||||
Failures: {
|
||||
elac1: props.globals.getNode("/systems/failures/fctl/elac1"),
|
||||
|
@ -59,6 +60,8 @@ var FBW = {
|
|||
spoilerr3: props.globals.getNode("/systems/failures/spoilers/spoiler-r3"),
|
||||
spoilerr4: props.globals.getNode("/systems/failures/spoilers/spoiler-r4"),
|
||||
spoilerr5: props.globals.getNode("/systems/failures/spoilers/spoiler-r5"),
|
||||
yawDamper1: props.globals.getNode("/systems/failures/fctl/yaw-damper-1"),
|
||||
yawDamper2: props.globals.getNode("/systems/failures/fctl/yaw-damper-2"),
|
||||
},
|
||||
Lights: {
|
||||
elac1: props.globals.getNode("/systems/fctl/lights/elac1-fault"),
|
||||
|
@ -126,6 +129,18 @@ var FBW = {
|
|||
me.Failures.sec3.setBoolValue(0);
|
||||
me.Failures.fac1.setBoolValue(0);
|
||||
me.Failures.fac2.setBoolValue(0);
|
||||
me.Failures.spoilerl1.setBoolValue(0);
|
||||
me.Failures.spoilerl2.setBoolValue(0);
|
||||
me.Failures.spoilerl3.setBoolValue(0);
|
||||
me.Failures.spoilerl4.setBoolValue(0);
|
||||
me.Failures.spoilerl5.setBoolValue(0);
|
||||
me.Failures.spoilerr1.setBoolValue(0);
|
||||
me.Failures.spoilerr2.setBoolValue(0);
|
||||
me.Failures.spoilerr3.setBoolValue(0);
|
||||
me.Failures.spoilerr4.setBoolValue(0);
|
||||
me.Failures.spoilerr5.setBoolValue(0);
|
||||
me.Failures.yawDamper1.setBoolValue(0);
|
||||
me.Failures.yawDamper2.setBoolValue(0);
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -173,22 +188,14 @@ var update_loop = func {
|
|||
}
|
||||
if (systems.ELEC.EmerElec.getBoolValue()) {
|
||||
if (lawyaw == 0 or lawyaw == 1) {
|
||||
FBW.degradeYawLaw.setValue(2);
|
||||
} elsif (fac1 and lawyaw == 2) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
}
|
||||
if (law == 0) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
}
|
||||
if (blue >= 1500 and green < 1500 and yellow < 1500) {
|
||||
if (lawyaw == 0 or lawyaw == 1) {
|
||||
FBW.degradeYawLaw.setValue(2);
|
||||
}
|
||||
if (law == 0) {
|
||||
FBW.degradeLaw.setValue(1);
|
||||
FBW.apOff = 1;
|
||||
}
|
||||
}
|
||||
if (blue < 1500 and green < 1500 and yellow >= 1500) {
|
||||
if (lawyaw == 0) {
|
||||
FBW.degradeYawLaw.setValue(1);
|
||||
|
@ -198,7 +205,7 @@ var update_loop = func {
|
|||
FBW.apOff = 1;
|
||||
}
|
||||
}
|
||||
if (!fac1 and !fac2 ) {
|
||||
if ((!fac1 and !fac2) or !FBW.yawdamper.getValue() or (blue >= 1500 and green < 1500 and yellow < 1500)) {
|
||||
if (lawyaw == 0 or lawyaw == 1) {
|
||||
FBW.degradeYawLaw.setValue(2);
|
||||
}
|
||||
|
|
|
@ -346,11 +346,60 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac1-healthy">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac1 eq 1
|
||||
/systems/failures/fctl/fac1 eq 0
|
||||
<test logic="OR">
|
||||
/systems/electrical/bus/ac-ess ge 110
|
||||
/systems/electrical/bus/dc-ess-shed ge 25
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac1-healthy-latch-set">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/gear/gear[0]/wow eq 0
|
||||
/controls/fctl/switches/fac1 eq 1
|
||||
/systems/fctl/fac1-healthy eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac1-healthy-latch-reset">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac1 eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac1-healthy-latch">
|
||||
<default value="/systems/fctl/fac1-healthy-latch"/>
|
||||
<test value="1">
|
||||
/systems/fctl/fac1-healthy-latch-set eq 1
|
||||
</test>
|
||||
<test value="0">
|
||||
/systems/fctl/fac1-healthy-latch-reset eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac1-healthy-signal">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/fctl/fac1-healthy eq 1
|
||||
<test logic="OR">
|
||||
/systems/fctl/fac1-healthy-latch eq 0
|
||||
/gear/gear[0]/wow eq 1
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/lights/fac1-fault">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac1 eq 1
|
||||
/systems/fctl/fac1 eq 0
|
||||
/systems/fctl/fac1-healthy-signal eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -358,9 +407,56 @@
|
|||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac1 eq 1
|
||||
/systems/failures/fctl/fac1 eq 0
|
||||
/systems/electrical/bus/ac-ess ge 110
|
||||
/systems/electrical/bus/dc-ess-shed ge 25
|
||||
/systems/fctl/fac1-healthy eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac2-healthy">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac2 eq 1
|
||||
/systems/failures/fctl/fac2 eq 0
|
||||
<test logic="OR">
|
||||
/systems/electrical/bus/ac-2 ge 110
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac2-healthy-latch-set">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac2 eq 1
|
||||
/systems/fctl/fac2-healthy eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac2-healthy-latch-reset">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac2 eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac2-healthy-latch">
|
||||
<default value="/systems/fctl/fac2-healthy-latch"/>
|
||||
<test value="1">
|
||||
/gear/gear[0]/wow eq 0
|
||||
/systems/fctl/fac2-healthy-latch-set eq 1
|
||||
</test>
|
||||
<test value="0">
|
||||
/systems/fctl/fac2-healthy-latch-reset eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/fac2-healthy-signal">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/fctl/fac2-healthy eq 1
|
||||
<test logic="OR">
|
||||
/systems/fctl/fac2-healthy-latch eq 0
|
||||
/gear/gear[0]/wow eq 1
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -368,7 +464,7 @@
|
|||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac2 eq 1
|
||||
/systems/fctl/fac2 eq 0
|
||||
/systems/fctl/fac2-healthy-signal eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -376,9 +472,7 @@
|
|||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/fctl/switches/fac2 eq 1
|
||||
/systems/failures/fctl/fac2 eq 0
|
||||
/systems/electrical/bus/ac-2 ge 110
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
/systems/fctl/fac2-healthy eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -1338,7 +1432,7 @@
|
|||
<test logic="AND" value="1">
|
||||
/systems/failures/fctl/rtlu-1 eq 0
|
||||
/systems/electrical/bus/dc-ess ge 25
|
||||
/systems/fctl/fac1 eq 1
|
||||
/systems/fctl/fac1-healthy-signal eq 1
|
||||
<test logic="OR">
|
||||
<test logic="AND">
|
||||
/systems/fmgc/cas-compare/cas-reject-1 eq 0
|
||||
|
@ -1357,7 +1451,7 @@
|
|||
<test logic="AND" value="1">
|
||||
/systems/failures/fctl/rtlu-2 eq 0
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
/systems/fctl/fac2 eq 1
|
||||
/systems/fctl/fac2-healthy-signal eq 1
|
||||
<test logic="OR">
|
||||
<test logic="AND">
|
||||
/systems/fmgc/cas-compare/cas-reject-2 eq 0
|
||||
|
|
|
@ -296,7 +296,8 @@
|
|||
|
||||
<switch name="hydraulics/elevator-trim/rate">
|
||||
<default value="0.125"/>
|
||||
<test value="0.25">
|
||||
<test logic="OR" value="0.25">
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
</test>
|
||||
</switch>
|
||||
|
@ -333,6 +334,40 @@
|
|||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/yawdamper-1-active">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/fctl/fac1-healthy-signal eq 1
|
||||
/systems/hydraulic/green-psi ge 1500
|
||||
<test logic="OR">
|
||||
/systems/navigation/adr/operating-1 eq 1
|
||||
/systems/navigation/adr/operating-3 eq 1
|
||||
</test>
|
||||
/systems/failures/fctl/yaw-damper-1 eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/yawdamper-2-active">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/fctl/fac2-healthy-signal eq 1
|
||||
/systems/hydraulic/yellow-psi ge 1500
|
||||
<test logic="OR">
|
||||
/systems/navigation/adr/operating-2 eq 1
|
||||
/systems/navigation/adr/operating-3 eq 1
|
||||
</test>
|
||||
/systems/failures/fctl/yaw-damper-2 eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/systems/fctl/yawdamper-active">
|
||||
<default value="0"/>
|
||||
<test logic="OR" value="1">
|
||||
/systems/fctl/yawdamper-1-active eq 1
|
||||
/systems/fctl/yawdamper-2-active eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="hydraulics/rudder/trim-autopilot">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="/controls/flight/rudder-trim">
|
||||
|
@ -351,11 +386,11 @@
|
|||
<test logic="OR" value="1">
|
||||
<test logic="AND">
|
||||
/systems/electrical/bus/dc-ess ge 25
|
||||
/systems/fctl/fac1 eq 1
|
||||
/systems/fctl/fac1-healthy-signal eq 1
|
||||
</test>
|
||||
<test logic="AND">
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
/systems/fctl/fac2 eq 1
|
||||
/systems/fctl/fac2-healthy-signal eq 1
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
|
|
@ -321,6 +321,19 @@
|
|||
<rate_limit sense="incr">0.2</rate_limit> <!-- 5 seconds -->
|
||||
</actuator>
|
||||
|
||||
<actuator name="/ECAM/warnings/timer/yaw-damper-1-fault">
|
||||
<description>Timer for the ECAM system</description>
|
||||
<input>/ECAM/warnings/logic/yaw-damper-1-fault</input>
|
||||
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
|
||||
<rate_limit sense="incr">0.2</rate_limit> <!-- 5 seconds -->
|
||||
</actuator>
|
||||
|
||||
<actuator name="/ECAM/warnings/timer/yaw-damper-2-fault">
|
||||
<description>Timer for the ECAM system</description>
|
||||
<input>/ECAM/warnings/logic/yaw-damper-2-fault</input>
|
||||
<rate_limit sense="decr">100</rate_limit> <!-- Instant -->
|
||||
<rate_limit sense="incr">0.2</rate_limit> <!-- 5 seconds -->
|
||||
</actuator>
|
||||
</channel>
|
||||
|
||||
<channel name="ECAM">
|
||||
|
@ -1239,7 +1252,7 @@
|
|||
/systems/electrical/bus/dc-ess-shed ge 25
|
||||
/systems/electrical/bus/ac-1 ge 110
|
||||
/systems/fctl/fac1-rtlu-avail eq 0
|
||||
/systems/fctl/fac1 eq 1
|
||||
/systems/fctl/fac1-healthy-signal eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -1251,7 +1264,7 @@
|
|||
/systems/electrical/bus/dc-2 ge 25
|
||||
/systems/electrical/bus/ac-2 ge 110
|
||||
/systems/fctl/fac2-rtlu-avail eq 0
|
||||
/systems/fctl/fac2 eq 1
|
||||
/systems/fctl/fac2-healthy-signal eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
|
@ -1278,6 +1291,152 @@
|
|||
/ECAM/warnings/logic/rud-trav-lim-sys-fault eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/fac-12-fault">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/electrical/bus/dc-ess-shed ge 25
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
/systems/fctl/fac1-healthy-signal eq 0
|
||||
/systems/fctl/fac2-healthy-signal eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/fac-1-fault">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/navigation/adr/operating-1 eq 1
|
||||
/systems/navigation/adr/operating-3 eq 1
|
||||
/systems/electrical/bus/dc-ess-shed ge 25
|
||||
/systems/electrical/bus/ac-1 ge 110
|
||||
/systems/fctl/fac1-healthy-signal eq 0
|
||||
/systems/fctl/fac2-healthy-signal eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/fac-2-fault">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/navigation/adr/operating-2 eq 1
|
||||
/systems/navigation/adr/operating-3 eq 1
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
/systems/electrical/bus/ac-2 ge 110
|
||||
/systems/fctl/fac1-healthy-signal eq 1
|
||||
/systems/fctl/fac2-healthy-signal eq 0
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-1-fault-eng-start">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/engines/engine[1]/cutoff-switch eq 0 <!-- opposite side -->
|
||||
/systems/hydraulic/green-psi lt 1500
|
||||
/ECAM/timer/ground-calc eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-1-fault-green">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/hydraulic/green-psi lt 1500
|
||||
/ECAM/warning-phase eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-1-fault-adr">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/navigation/adr/operating-1 eq 0
|
||||
/systems/navigation/adr/operating-3 eq 0
|
||||
<test logic="OR">
|
||||
/ECAM/warning-phase eq 1
|
||||
/ECAM/warning-phase eq 10
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-1-fault">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/navigation/adr/operating-1 eq 1
|
||||
/systems/navigation/adr/operating-3 eq 1
|
||||
/systems/electrical/bus/dc-ess-shed ge 25
|
||||
/systems/electrical/bus/ac-1 ge 110
|
||||
/ECAM/warnings/logic/yaw-damper-1-fault-eng-start eq 0
|
||||
/ECAM/warnings/logic/yaw-damper-1-fault-green eq 0
|
||||
/ECAM/warnings/logic/yaw-damper-1-fault-adr eq 0
|
||||
/ECAM/irs-in-align eq 0
|
||||
/systems/fctl/yawdamper-1-active eq 0
|
||||
/systems/fctl/fac1-healthy-signal eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-2-fault-eng-start">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/controls/engines/engine[0]/cutoff-switch eq 0 <!-- opposite side -->
|
||||
/systems/hydraulic/yellow-psi lt 1500
|
||||
/ECAM/timer/ground-calc eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-2-fault-yellow">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/hydraulic/yellow-psi lt 1500
|
||||
/ECAM/warning-phase eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-2-fault-adr">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/navigation/adr/operating-2 eq 0
|
||||
/systems/navigation/adr/operating-3 eq 0
|
||||
<test logic="OR">
|
||||
/ECAM/warning-phase eq 1
|
||||
/ECAM/warning-phase eq 10
|
||||
</test>
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-2-fault">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/systems/navigation/adr/operating-2 eq 1
|
||||
/systems/navigation/adr/operating-3 eq 1
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
/systems/electrical/bus/ac-2 ge 110
|
||||
/ECAM/warnings/logic/yaw-damper-2-fault-eng-start eq 0
|
||||
/ECAM/warnings/logic/yaw-damper-2-fault-yellow eq 0
|
||||
/ECAM/warnings/logic/yaw-damper-2-fault-adr eq 0
|
||||
/ECAM/irs-in-align eq 0
|
||||
/systems/fctl/yawdamper-2-active eq 0
|
||||
/systems/fctl/fac2-healthy-signal eq 1
|
||||
</test>
|
||||
</switch>
|
||||
|
||||
<switch name="/ECAM/warnings/logic/yaw-damper-12-fault">
|
||||
<default value="0"/>
|
||||
<test logic="AND" value="1">
|
||||
/ECAM/irs-in-align eq 0
|
||||
<test logic="OR">
|
||||
/systems/navigation/adr/operating-1 eq 1
|
||||
/systems/navigation/adr/operating-2 eq 1
|
||||
/systems/navigation/adr/operating-3 eq 1
|
||||
</test>
|
||||
<test logic="OR">
|
||||
/systems/electrical/bus/dc-ess-shed ge 25
|
||||
/systems/electrical/bus/ac-1 ge 110
|
||||
/systems/electrical/bus/dc-2 ge 25
|
||||
/systems/electrical/bus/ac-2 ge 110
|
||||
</test>
|
||||
/ECAM/warnings/logic/yaw-damper-1-fault-green eq 0
|
||||
/ECAM/warnings/logic/yaw-damper-2-fault-yellow eq 0
|
||||
/ECAM/warnings/logic/yaw-damper-1-fault eq 1
|
||||
/ECAM/warnings/logic/yaw-damper-2-fault eq 1
|
||||
</test>
|
||||
</switch>
|
||||
</channel>
|
||||
|
||||
</system>
|
||||
|
|
Loading…
Reference in a new issue