1
0
Fork 0

Merge branch 'dev' into 3D

This commit is contained in:
legoboyvdlp R 2020-07-17 21:31:04 +01:00
commit 9ff9c5f3a6
22 changed files with 1022 additions and 241 deletions

View file

@ -556,6 +556,11 @@
<y alias="/sim/model/autopush/force-y"/> <y alias="/sim/model/autopush/force-y"/>
</tractor> </tractor>
</external_reactions> </external_reactions>
<fbw>
<yaw>
<max-deg-switch type="double">25</max-deg-switch>
</yaw>
</fbw>
<zero type="int">0</zero> <zero type="int">0</zero>
</jsbsim> </jsbsim>
</fdm> </fdm>
@ -629,6 +634,8 @@
<alpha-hld type="bool">0</alpha-hld> <alpha-hld type="bool">0</alpha-hld>
<degrade-law type="int">0</degrade-law> <degrade-law type="int">0</degrade-law>
<law type="int">0</law> <law type="int">0</law>
<degrade-yaw-law type="int">0</degrade-yaw-law>
<yaw-law type="int">0</yaw-law>
<roll-lim type="string">33</roll-lim> <roll-lim type="string">33</roll-lim>
<roll-back type="bool">0</roll-back> <roll-back type="bool">0</roll-back>
<override type="bool">0</override> <override type="bool">0</override>
@ -927,7 +934,7 @@
<!-- Smoking is bad :P --> <!-- Smoking is bad :P -->
<no-smoking-sign type="double">0.5</no-smoking-sign> <no-smoking-sign type="double">0.5</no-smoking-sign>
<seatbelt-sign type="double">0.0</seatbelt-sign> <seatbelt-sign type="double">0.0</seatbelt-sign>
<annun-test>0</annun-test> <annun-test type="int">0</annun-test>
<qnh-knb>100000</qnh-knb> <qnh-knb>100000</qnh-knb>
<strobe type="double">0.0</strobe> <strobe type="double">0.0</strobe>
<beacon type="bool">0</beacon> <beacon type="bool">0</beacon>
@ -1137,6 +1144,10 @@
<sec3 type="bool">0</sec3> <sec3 type="bool">0</sec3>
<fac1 type="bool">0</fac1> <fac1 type="bool">0</fac1>
<fac2 type="bool">0</fac2> <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> </fctl>
<fuel> <fuel>
<left-tank-pump-1 type="bool">0</left-tank-pump-1> <left-tank-pump-1 type="bool">0</left-tank-pump-1>
@ -1181,7 +1192,6 @@
<trim-valve-cabin-fwd type="bool">0</trim-valve-cabin-fwd> <trim-valve-cabin-fwd type="bool">0</trim-valve-cabin-fwd>
<x-bleed-valve type="bool">0</x-bleed-valve> <x-bleed-valve type="bool">0</x-bleed-valve>
</pneumatics> </pneumatics>
<rudder type="bool">0</rudder>
<spoilers> <spoilers>
<spoiler-l1 type="bool">0</spoiler-l1> <spoiler-l1 type="bool">0</spoiler-l1>
<spoiler-l2 type="bool">0</spoiler-l2> <spoiler-l2 type="bool">0</spoiler-l2>
@ -1208,6 +1218,7 @@
<sec3 type="bool">0</sec3> <sec3 type="bool">0</sec3>
<fac1 type="bool">0</fac1> <fac1 type="bool">0</fac1>
<fac2 type="bool">0</fac2> <fac2 type="bool">0</fac2>
<yawdamper-active type="bool">0</yawdamper-active>
</fctl> </fctl>
<fire n="0"> <fire n="0">
<apu> <apu>

View file

@ -33,11 +33,12 @@ var failResetOld = func {
setprop("/systems/failures/fctl/sec3", 0); setprop("/systems/failures/fctl/sec3", 0);
setprop("/systems/failures/fctl/fac1", 0); setprop("/systems/failures/fctl/fac1", 0);
setprop("/systems/failures/fctl/fac2", 0); setprop("/systems/failures/fctl/fac2", 0);
setprop("/systems/failures/fctl/rtlu-1", 0);
setprop("/systems/failures/fctl/rtlu-2", 0);
setprop("/systems/failures/aileron-left", 0); setprop("/systems/failures/aileron-left", 0);
setprop("/systems/failures/aileron-right", 0); setprop("/systems/failures/aileron-right", 0);
setprop("/systems/failures/elevator-left", 0); setprop("/systems/failures/elevator-left", 0);
setprop("/systems/failures/elevator-right", 0); setprop("/systems/failures/elevator-right", 0);
setprop("/systems/failures/rudder", 0);
setprop("/systems/failures/spoilers/spoiler-l1", 0); setprop("/systems/failures/spoilers/spoiler-l1", 0);
setprop("/systems/failures/spoilers/spoiler-l2", 0); setprop("/systems/failures/spoilers/spoiler-l2", 0);
setprop("/systems/failures/spoilers/spoiler-l3", 0); setprop("/systems/failures/spoilers/spoiler-l3", 0);
@ -51,7 +52,6 @@ var failResetOld = func {
setprop("/systems/failures/hyd-blue", 0); setprop("/systems/failures/hyd-blue", 0);
setprop("/systems/failures/hyd-green", 0); setprop("/systems/failures/hyd-green", 0);
setprop("/systems/failures/hyd-yellow", 0); setprop("/systems/failures/hyd-yellow", 0);
setprop("/systems/failures/ptu", 0);
setprop("/systems/failures/pump-blue", 0); setprop("/systems/failures/pump-blue", 0);
setprop("/systems/failures/pump-green", 0); setprop("/systems/failures/pump-green", 0);
setprop("/systems/failures/pump-yellow-eng", 0); setprop("/systems/failures/pump-yellow-eng", 0);

View file

@ -124,6 +124,46 @@
<live>true</live> <live>true</live>
</checkbox> </checkbox>
<checkbox>
<label>RTLU1</label>
<halign>left</halign>
<property>/systems/failures/fctl/rtlu-1</property>
<binding>
<command>dialog-apply</command>
</binding>
<live>true</live>
</checkbox>
<checkbox>
<label>RTLU2</label>
<halign>left</halign>
<property>/systems/failures/fctl/rtlu-2</property>
<binding>
<command>dialog-apply</command>
</binding>
<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> <group>
<layout>hbox</layout> <layout>hbox</layout>

View file

@ -51,8 +51,11 @@
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
setprop("it-fbw/degrade-law", 0); setprop("/it-fbw/degrade-law", 0);
setprop("it-fbw/law", 0); setprop("/it-fbw/law", 0);
setprop("/it-fbw/degrade-yaw-law", 0);
setprop("/it-fbw/yaw-law", 0);
fbw.FBW.apOff = 0;
gui.popupTip("Fly By Wire switched to NORMAL law!"); gui.popupTip("Fly By Wire switched to NORMAL law!");
</script> </script>
</binding> </binding>
@ -67,8 +70,11 @@
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
setprop("it-fbw/degrade-law", 1); setprop("/it-fbw/degrade-law", 1);
setprop("it-fbw/law", 1); setprop("/it-fbw/law", 1);
setprop("/it-fbw/degrade-yaw-law", 1);
setprop("/it-fbw/yaw-law", 1);
fbw.FBW.apOff = 1;
gui.popupTip("Fly By Wire switched to ALTERNATE law!"); gui.popupTip("Fly By Wire switched to ALTERNATE law!");
</script> </script>
</binding> </binding>
@ -83,8 +89,11 @@
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
setprop("it-fbw/degrade-law", 2); setprop("/it-fbw/degrade-law", 2);
setprop("it-fbw/law", 2); setprop("/it-fbw/law", 2);
setprop("/it-fbw/degrade-yaw-law", 2);
setprop("/it-fbw/yaw-law", 2);
fbw.FBW.apOff = 1;
gui.popupTip("Fly By Wire switched to DIRECT law!"); gui.popupTip("Fly By Wire switched to DIRECT law!");
</script> </script>
</binding> </binding>
@ -99,8 +108,11 @@
<binding> <binding>
<command>nasal</command> <command>nasal</command>
<script> <script>
setprop("it-fbw/degrade-law", 3); setprop("/it-fbw/degrade-law", 3);
setprop("it-fbw/law", 3); setprop("/it-fbw/law", 3);
setprop("/it-fbw/degrade-yaw-law", 2);
setprop("/it-fbw/yaw-law", 2);
fbw.FBW.apOff = 1;
gui.popupTip("Fly By Wire switched to MECHANICAL BACKUP law!"); gui.popupTip("Fly By Wire switched to MECHANICAL BACKUP law!");
</script> </script>
</binding> </binding>

View file

@ -1157,6 +1157,11 @@
<repeatable>true</repeatable> <repeatable>true</repeatable>
<binding> <binding>
<condition> <condition>
<and>
<not>
<property>/it-autoflight/output/ap1</property>
<property>/it-autoflight/output/ap2</property>
</not>
<or> <or>
<greater-than-equals> <greater-than-equals>
<property>systems/electrical/bus/dc-ess</property> <property>systems/electrical/bus/dc-ess</property>
@ -1167,6 +1172,7 @@
<value>25</value> <value>25</value>
</greater-than-equals> </greater-than-equals>
</or> </or>
</and>
</condition> </condition>
<command>nasal</command> <command>nasal</command>
<script> <script>
@ -1235,6 +1241,11 @@
<repeatable>false</repeatable> <repeatable>false</repeatable>
<binding> <binding>
<condition> <condition>
<and>
<not>
<property>/it-autoflight/output/ap1</property>
<property>/it-autoflight/output/ap2</property>
</not>
<or> <or>
<greater-than-equals> <greater-than-equals>
<property>systems/electrical/bus/dc-ess</property> <property>systems/electrical/bus/dc-ess</property>
@ -1245,6 +1256,7 @@
<value>25</value> <value>25</value>
</greater-than-equals> </greater-than-equals>
</or> </or>
</and>
</condition> </condition>
<command>nasal</command> <command>nasal</command>
<script> <script>

View file

@ -52,6 +52,13 @@ var warningNodes = {
pack1ResetPb: props.globals.initNode("/ECAM/warnings/logic/reset-pack-1-switch-cmd"), pack1ResetPb: props.globals.initNode("/ECAM/warnings/logic/reset-pack-1-switch-cmd"),
pack2ResetPb: props.globals.initNode("/ECAM/warnings/logic/reset-pack-2-switch-cmd"), pack2ResetPb: props.globals.initNode("/ECAM/warnings/logic/reset-pack-2-switch-cmd"),
cabinFans: props.globals.initNode("/ECAM/warnings/logic/cabin-fans-fault"), cabinFans: props.globals.initNode("/ECAM/warnings/logic/cabin-fans-fault"),
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: { Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),
@ -78,6 +85,8 @@ var warningNodes = {
pack1Off: props.globals.initNode("/ECAM/warnings/timer/pack-1-off"), pack1Off: props.globals.initNode("/ECAM/warnings/timer/pack-1-off"),
pack2Off: props.globals.initNode("/ECAM/warnings/timer/pack-2-off"), pack2Off: props.globals.initNode("/ECAM/warnings/timer/pack-2-off"),
trimAirFault: props.globals.initNode("/ECAM/warnings/timer/trim-air-fault"), 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: { Flipflops: {
bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"), bleed1LowTemp: props.globals.initNode("/ECAM/warnings/logic/bleed-1-low-temp-flipflop-output"),

View file

@ -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 athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1);
var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 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 state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
var state2Node = props.globals.getNode("/engines/engine[1]/state", 1); var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1); var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
@ -33,8 +32,6 @@ var phaseVar1 = nil;
var phaseVarMemo = nil; var phaseVarMemo = nil;
var phaseVarMemo2 = nil; var phaseVarMemo2 = nil;
var phaseVarMemo3 = nil; var phaseVarMemo3 = nil;
var dualFailFACActive = 1;
var emerConfigFACActive = 1;
var gear_agl_cur = nil; var gear_agl_cur = nil;
var numberMinutes = nil; var numberMinutes = nil;
var timeNow = nil; var timeNow = nil;
@ -103,8 +100,6 @@ var messages_priority_3 = func {
dualFail.active = 1; dualFail.active = 1;
} else { } else {
ECAM_controller.warningReset(dualFail); ECAM_controller.warningReset(dualFail);
dualFailFACActive = 1; # reset FAC local variable
} }
if (dualFail.active == 1) { if (dualFail.active == 1) {
@ -144,7 +139,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(dualFailRadio); 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; dualFailFAC.active = 1;
} else { } else {
ECAM_controller.warningReset(dualFailFAC); ECAM_controller.warningReset(dualFailFAC);
@ -959,7 +954,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(emerconfigFuelG2); 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; emerconfigFAC.active = 1;
} else { } else {
ECAM_controller.warningReset(emerconfigFAC); ECAM_controller.warningReset(emerconfigFAC);
@ -1173,12 +1168,92 @@ var messages_priority_2 = func {
} }
if (getprop("instrumentation/tcas/serviceable") == 0 and phaseVar2 != 3 and phaseVar2 != 4 and phaseVar2 != 7 and systems.ELEC.Bus.ac1.getValue() and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) { if (getprop("instrumentation/tcas/serviceable") == 0 and phaseVar2 != 3 and phaseVar2 != 4 and phaseVar2 != 7 and systems.ELEC.Bus.ac1.getValue() >= 110 and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
tcasFault.active = 1; tcasFault.active = 1;
} else { } else {
ECAM_controller.warningReset(tcasFault); 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;
rudTravLimSysFaultFac.active = 1;
} else {
ECAM_controller.warningReset(rudTravLimSysFault);
ECAM_controller.warningReset(rudTravLimSysFaultRud);
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 {
ECAM_controller.warningReset(rudTravLimSys1Fault);
}
if (rudTravLimSys2Fault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6) and warningNodes.Logic.rtlu2Fault.getBoolValue()) {
rudTravLimSys2Fault.active = 1;
} else {
ECAM_controller.warningReset(rudTravLimSys2Fault);
}
if (fcu.FCUController.FCU1.failed and fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and fcuFault.clearFlag == 0) { if (fcu.FCUController.FCU1.failed and fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and fcuFault.clearFlag == 0) {
fcuFault.active = 1; fcuFault.active = 1;
fcuFaultBaro.active = 1; fcuFaultBaro.active = 1;
@ -1208,14 +1283,12 @@ var messages_priority_2 = func {
apuEmerShutdown.active = 1; apuEmerShutdown.active = 1;
} elsif (apuEmerShutdown.clearFlag == 1) { } elsif (apuEmerShutdown.clearFlag == 1) {
ECAM_controller.warningReset(apuEmerShutdown); ECAM_controller.warningReset(apuEmerShutdown);
apuEmerShutdown.isMainMsg = 1;
} }
if (apuEmerShutdownMast.clearFlag == 0 and getprop("controls/apu/master") and apuEmerShutdown.active == 1) { if (apuEmerShutdownMast.clearFlag == 0 and getprop("controls/apu/master") and apuEmerShutdown.active == 1) {
apuEmerShutdownMast.active = 1; apuEmerShutdownMast.active = 1;
} else { } else {
ECAM_controller.warningReset(apuEmerShutdownMast); ECAM_controller.warningReset(apuEmerShutdownMast);
apuEmerShutdown.isMainMsg = 0;
} }
# APU AUTO SHUT DOWN # APU AUTO SHUT DOWN
@ -1223,14 +1296,12 @@ var messages_priority_2 = func {
apuAutoShutdown.active = 1; apuAutoShutdown.active = 1;
} elsif (apuAutoShutdown.clearFlag == 1) { } elsif (apuAutoShutdown.clearFlag == 1) {
ECAM_controller.warningReset(apuAutoShutdown); ECAM_controller.warningReset(apuAutoShutdown);
apuAutoShutdown.isMainMsg = 1;
} }
if (apuAutoShutdownMast.clearFlag == 0 and pts.APU.masterSw.getValue() and apuAutoShutdown.active == 1) { if (apuAutoShutdownMast.clearFlag == 0 and pts.APU.masterSw.getValue() and apuAutoShutdown.active == 1) {
apuAutoShutdownMast.active = 1; apuAutoShutdownMast.active = 1;
} else { } else {
ECAM_controller.warningReset(apuAutoShutdownMast); ECAM_controller.warningReset(apuAutoShutdownMast);
apuAutoShutdown.isMainMsg = 0;
} }
# Bleed # Bleed
@ -2115,6 +2186,12 @@ var messages_memo = func {
refuelg.active = 0; 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)) { 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; irs_in_align.active = 1;
if (getprop("ECAM/phases/timer/eng1or2-output")) { if (getprop("ECAM/phases/timer/eng1or2-output")) {
@ -2386,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() { setlistener("/engines/engine[0]/state", func() {
if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and wowNode.getValue() == 0) { if ((state1Node.getValue() != 3 and state2Node.getValue() != 3) and wowNode.getValue() == 0) {
dualFailNode.setBoolValue(1); dualFailNode.setBoolValue(1);

View file

@ -226,6 +226,35 @@ var warnings = std.Vector.new([
# TCAS FAULT # TCAS FAULT
var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
# 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"),
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 # FCU fault
var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1),
var fcuFaultBaro = warning.new(msg: " -PFD BARO REF: STD ONLY", colour: "c"), var fcuFaultBaro = warning.new(msg: " -PFD BARO REF: STD ONLY", colour: "c"),

View file

@ -52,6 +52,7 @@ var FWC = {
}, },
Logic: { Logic: {
gnd: props.globals.getNode("/ECAM/ground-calc-immediate"), gnd: props.globals.getNode("/ECAM/ground-calc-immediate"),
IRSinAlign: props.globals.initNode("/ECAM/irs-in-align", 0, "BOOL"),
}, },
Timer: { Timer: {
eng1idle: props.globals.initNode("/ECAM/phases/timer/eng1idle", 0, "INT"), eng1idle: props.globals.initNode("/ECAM/phases/timer/eng1idle", 0, "INT"),

View file

@ -21,21 +21,26 @@ var ail = 0;
var roll = 0; var roll = 0;
var rollback = 0; var rollback = 0;
var law = 0; var law = 0;
var lawyaw = 0;
var FBW = { var FBW = {
apOff: 0,
degradeLaw: props.globals.getNode("/it-fbw/degrade-law"), degradeLaw: props.globals.getNode("/it-fbw/degrade-law"),
degradeYawLaw: props.globals.getNode("/it-fbw/degrade-yaw-law"),
activeLaw: props.globals.getNode("/it-fbw/law"), activeLaw: props.globals.getNode("/it-fbw/law"),
activeYawLaw: props.globals.getNode("/it-fbw/yaw-law"),
override: props.globals.getNode("/it-fbw/override"), override: props.globals.getNode("/it-fbw/override"),
rollBack: props.globals.getNode("/it-fbw/roll-back"), rollBack: props.globals.getNode("/it-fbw/roll-back"),
rollLim: props.globals.getNode("/it-fbw/roll-lim"), rollLim: props.globals.getNode("/it-fbw/roll-lim"),
yawdamper: props.globals.getNode("/systems/fctl/yawdamper-active"),
Computers: { Computers: {
elac1: props.globals.getNode("/systems/fctl/elac1"), elac1: props.globals.getNode("/systems/fctl/elac1"),
elac2: props.globals.getNode("/systems/fctl/elac2"), elac2: props.globals.getNode("/systems/fctl/elac2"),
sec1: props.globals.getNode("/systems/fctl/sec1"), sec1: props.globals.getNode("/systems/fctl/sec1"),
sec2: props.globals.getNode("/systems/fctl/sec2"), sec2: props.globals.getNode("/systems/fctl/sec2"),
sec3: props.globals.getNode("/systems/fctl/sec3"), sec3: props.globals.getNode("/systems/fctl/sec3"),
fac1: props.globals.getNode("/systems/fctl/fac1"), fac1: props.globals.getNode("/systems/fctl/fac1-healthy-signal"),
fac2: props.globals.getNode("/systems/fctl/fac2"), fac2: props.globals.getNode("/systems/fctl/fac2-healthy-signal"),
}, },
Failures: { Failures: {
elac1: props.globals.getNode("/systems/failures/fctl/elac1"), elac1: props.globals.getNode("/systems/failures/fctl/elac1"),
@ -55,6 +60,8 @@ var FBW = {
spoilerr3: props.globals.getNode("/systems/failures/spoilers/spoiler-r3"), spoilerr3: props.globals.getNode("/systems/failures/spoilers/spoiler-r3"),
spoilerr4: props.globals.getNode("/systems/failures/spoilers/spoiler-r4"), spoilerr4: props.globals.getNode("/systems/failures/spoilers/spoiler-r4"),
spoilerr5: props.globals.getNode("/systems/failures/spoilers/spoiler-r5"), 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: { Lights: {
elac1: props.globals.getNode("/systems/fctl/lights/elac1-fault"), elac1: props.globals.getNode("/systems/fctl/lights/elac1-fault"),
@ -105,6 +112,7 @@ var FBW = {
me.degradeLaw.setValue(0); me.degradeLaw.setValue(0);
me.activeLaw.setValue(0); me.activeLaw.setValue(0);
me.override.setValue(0); me.override.setValue(0);
me.apOff = 0;
if (!updatet.isRunning) { if (!updatet.isRunning) {
updatet.start(); updatet.start();
@ -121,6 +129,18 @@ var FBW = {
me.Failures.sec3.setBoolValue(0); me.Failures.sec3.setBoolValue(0);
me.Failures.fac1.setBoolValue(0); me.Failures.fac1.setBoolValue(0);
me.Failures.fac2.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);
}, },
}; };
@ -133,6 +153,7 @@ var update_loop = func {
fac1 = FBW.Computers.fac1.getBoolValue(); fac1 = FBW.Computers.fac1.getBoolValue();
fac2 = FBW.Computers.fac2.getBoolValue(); fac2 = FBW.Computers.fac2.getBoolValue();
law = FBW.activeLaw.getValue(); law = FBW.activeLaw.getValue();
lawyaw = FBW.activeYawLaw.getValue();
# Degrade logic, all failures which degrade FBW need to go here. -JD # Degrade logic, all failures which degrade FBW need to go here. -JD
blue = systems.HYD.Psi.blue.getValue(); blue = systems.HYD.Psi.blue.getValue();
@ -140,30 +161,62 @@ var update_loop = func {
yellow = systems.HYD.Psi.yellow.getValue(); yellow = systems.HYD.Psi.yellow.getValue();
if (!pts.Gear.wow[1].getBoolValue() and !pts.Gear.wow[2].getBoolValue()) { if (!pts.Gear.wow[1].getBoolValue() and !pts.Gear.wow[2].getBoolValue()) {
if (!elac1 and !elac2) { if (!elac1 and !elac2) {
if (lawyaw == 0) {
FBW.degradeYawLaw.setValue(1);
}
if (law == 0) {
FBW.degradeLaw.setValue(1);
FBW.apOff = 1;
}
}
if ((!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500)) {
if (lawyaw == 0) {
FBW.degradeYawLaw.setValue(1);
}
if (law == 0) {
FBW.degradeLaw.setValue(1);
FBW.apOff = 1;
}
}
if (!sec1 and !sec2 and !sec3) {
if (lawyaw == 0) {
FBW.degradeYawLaw.setValue(1);
}
if (law == 0) { if (law == 0) {
FBW.degradeLaw.setValue(1); FBW.degradeLaw.setValue(1);
fcu.apOff("hard", 0);
fcu.athrOff("hard");
} }
} }
if (systems.ELEC.EmerElec.getBoolValue()) { if (systems.ELEC.EmerElec.getBoolValue()) {
if (lawyaw == 0 or lawyaw == 1) {
} elsif (fac1 and lawyaw == 2) {
FBW.degradeYawLaw.setValue(1);
}
if (law == 0) { if (law == 0) {
FBW.degradeLaw.setValue(1); FBW.degradeLaw.setValue(1);
fcu.apOff("hard", 0); FBW.apOff = 1;
fcu.athrOff("hard");
} }
} }
if ((blue >= 1500 and green < 1500 and yellow < 1500) or (blue < 1500 and green < 1500 and yellow >= 1500)) { if (blue < 1500 and green < 1500 and yellow >= 1500) {
if (law == 0 or law == 1) { if (lawyaw == 0) {
FBW.degradeLaw.setValue(2); FBW.degradeYawLaw.setValue(1);
fcu.apOff("hard", 0); }
fcu.athrOff("hard"); if (law == 0) {
FBW.degradeLaw.setValue(1);
FBW.apOff = 1;
} }
} }
if (systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25) { 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);
}
if (law == 0) {
FBW.degradeLaw.setValue(1);
FBW.apOff = 1;
}
}
if (!elac1 and !elac2 and !sec1 and !sec2 and !sec3 and !fac1 and !fac2) {
FBW.degradeLaw.setValue(3); FBW.degradeLaw.setValue(3);
fcu.apOff("hard", 0); FBW.apOff = 1;
fcu.athrOff("hard");
} }
} }
@ -255,9 +308,25 @@ var fbw_loop = func {
FBW.activeLaw.setValue(3); FBW.activeLaw.setValue(3);
} }
} }
active = FBW.activeYawLaw.getValue();
degrade = FBW.degradeYawLaw.getValue();
if (degrade == 0) {
if (active != 0) {
FBW.activeYawLaw.setValue(0);
}
} else if (degrade == 1) {
if (active != 1) {
FBW.activeYawLaw.setValue(1);
}
} else if (degrade == 2) {
if (active != 2) {
FBW.activeYawLaw.setValue(2);
}
}
} }
if (FBW.activeLaw.getValue() != 0) { if (FBW.apOff) {
if (fmgc.Input.ap1.getBoolValue() or fmgc.Input.ap2.getBoolValue()) { if (fmgc.Input.ap1.getBoolValue() or fmgc.Input.ap2.getBoolValue()) {
fcu.apOff("hard", 0); fcu.apOff("hard", 0);
fcu.athrOff("hard"); fcu.athrOff("hard");

View file

@ -103,6 +103,7 @@ var FCUController = {
if (!ap1.getBoolValue()) { if (!ap1.getBoolValue()) {
ap1Input.setValue(1); ap1Input.setValue(1);
ecam.apWarnNode.setValue(0); ecam.apWarnNode.setValue(0);
pts.Controls.Flight.rudderTrim.setValue(0);
} else { } else {
apOff("hard", 1); apOff("hard", 1);
} }
@ -112,6 +113,7 @@ var FCUController = {
if (me.FCUworking and fbw.FBW.activeLaw.getValue() == 0) { if (me.FCUworking and fbw.FBW.activeLaw.getValue() == 0) {
if (!ap2.getBoolValue()) { if (!ap2.getBoolValue()) {
ap2Input.setValue(1); ap2Input.setValue(1);
pts.Controls.Flight.rudderTrim.setValue(0);
} else { } else {
apOff("hard", 2); apOff("hard", 2);
} }
@ -329,6 +331,7 @@ var FCUController = {
fmgc.ITAF.disarmGS(); fmgc.ITAF.disarmGS();
} }
} else { } else {
if (pts.Position.gearAglFt.getValue() >= 400 and vertTemp != 7) {
latModeInput.setValue(2); latModeInput.setValue(2);
if (vertTemp == 2 or vertTemp == 6) { if (vertTemp == 2 or vertTemp == 6) {
me.VSPull(); me.VSPull();
@ -337,6 +340,7 @@ var FCUController = {
} }
} }
} }
}
}, },
TRKFPA: func() { TRKFPA: func() {
if (me.FCUworking) { if (me.FCUworking) {
@ -465,9 +469,11 @@ var FCUController = {
fmgc.ITAF.disarmGS(); fmgc.ITAF.disarmGS();
} }
} else { } else {
if (pts.Position.gearAglFt.getValue() >= 400 and vertTemp != 7) {
vertModeInput.setValue(2); vertModeInput.setValue(2);
} }
} }
}
}, },
}; };

View file

@ -34,6 +34,7 @@ var Controls = {
flapsPos: props.globals.getNode("/controls/flight/flaps-pos"), flapsPos: props.globals.getNode("/controls/flight/flaps-pos"),
speedbrake: props.globals.getNode("/controls/flight/speedbrake"), speedbrake: props.globals.getNode("/controls/flight/speedbrake"),
speedbrakeArm: props.globals.getNode("/controls/flight/speedbrake-arm"), speedbrakeArm: props.globals.getNode("/controls/flight/speedbrake-arm"),
rudderTrim: props.globals.getNode("/controls/flight/rudder-trim"),
}, },
Gear: { Gear: {
gearDown: props.globals.getNode("/controls/gear/gear-down"), gearDown: props.globals.getNode("/controls/gear/gear-down"),

View file

@ -112,13 +112,13 @@ var closestAirportPage = {
} }
if (size(id) > 4) { if (size(id) > 4) {
mcdu_message(me.computer, "NOT ALLOWED"); mcdu_message(me.computer, "NOT ALLOWED");
} } elsif (airportinfo(id) == nil) {
if (airportinfo(id) == nil) { mcdu_message(me.computer, "NOT IN DATA BASE");
notInDataBase(me.computer); } else {
}
me.manAirport = airportinfo(id); me.manAirport = airportinfo(id);
me.L5 = [id, nil, "grn"]; me.L5 = [id, nil, "grn"];
me.R5 = ["----", nil, "grn"]; me.R5 = ["----", nil, "grn"];
}
canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); canvas_mcdu.pageSwitch[me.computer].setBoolValue(0);
} }
}; };

View file

@ -132,7 +132,7 @@ var latRev = {
var returny = fmgc.flightPlanController.scratchpad(mcdu_scratchpad.scratchpads[me.computer].scratchpad, me.index + 1, me.computer); var returny = fmgc.flightPlanController.scratchpad(mcdu_scratchpad.scratchpads[me.computer].scratchpad, me.index + 1, me.computer);
if (returny == 0) { if (returny == 0) {
notInDataBase(me.computer); mcdu_message(me.computer, "NOT IN DATA BASE");
} elsif (returny == 1) { } elsif (returny == 1) {
mcdu_message(me.computer, "NOT ALLOWED"); mcdu_message(me.computer, "NOT ALLOWED");
} else { } else {

View file

@ -24,7 +24,7 @@ setlistener("sim/signals/fdm-initialized", func {
props.globals.initNode("instrumentation/chrono[0]/chr-et-min",0,"INT"); props.globals.initNode("instrumentation/chrono[0]/chr-et-min",0,"INT");
props.globals.initNode("instrumentation/chrono[0]/chr-et-sec",0,"INT"); props.globals.initNode("instrumentation/chrono[0]/chr-et-sec",0,"INT");
props.globals.initNode("controls/flight/rudder-trim-display",0,"STRING"); props.globals.initNode("controls/flight/rudder-trim-display",0,"STRING");
setprop("controls/flight/rudder-trim-display", sprintf("%2.1f", getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg"))); setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", getprop("fdm/jsbsim/hydraulics/rudder/trim-deg")));
start_loop.start(); start_loop.start();
}); });
@ -33,27 +33,27 @@ setlistener("instrumentation/chrono[0]/chrono-reset", func(et){
if (tmp == 2) { if (tmp == 2) {
if (getprop("instrumentation/chrono[0]/started") == 1) { if (getprop("instrumentation/chrono[0]/started") == 1) {
if (getprop("instrumentation/chrono[0]/paused") == 0) { if (getprop("instrumentation/chrono[0]/paused") == 0) {
setprop("instrumentation/chrono[0]/elapsetime-sec", 0); setprop("/instrumentation/chrono[0]/elapsetime-sec", 0);
setprop("instrumentation/chrono[0]/chrono-reset", 0); setprop("/instrumentation/chrono[0]/chrono-reset", 0);
} else { } else {
chr.stop(); chr.stop();
chr.reset(); chr.reset();
setprop("instrumentation/chrono[0]/chrono-reset", 1); setprop("/instrumentation/chrono[0]/chrono-reset", 1);
setprop("instrumentation/chrono[0]/started", 0); setprop("/instrumentation/chrono[0]/started", 0);
setprop("instrumentation/chrono[0]/paused", 0); setprop("/instrumentation/chrono[0]/paused", 0);
}; };
} else { } else {
if (getprop("instrumentation/chrono[0]/paused") == 0) { if (getprop("instrumentation/chrono[0]/paused") == 0) {
# No action required # No action required
} else { } else {
setprop("instrumentation/chrono[0]/paused", 0); setprop("/instrumentation/chrono[0]/paused", 0);
}; };
}; };
} elsif (tmp == 1) { } elsif (tmp == 1) {
if (getprop("instrumentation/chrono[0]/started") == 1) { if (getprop("instrumentation/chrono[0]/started") == 1) {
if (getprop("instrumentation/chrono[0]/paused") == 0) { if (getprop("instrumentation/chrono[0]/paused") == 0) {
chr.stop(); chr.stop();
setprop("instrumentation/chrono[0]/paused", 1); setprop("/instrumentation/chrono[0]/paused", 1);
} else { } else {
chr.stop(); chr.stop();
}; };
@ -62,24 +62,24 @@ setlistener("instrumentation/chrono[0]/chrono-reset", func(et){
chr.stop(); chr.stop();
} else { } else {
chr.stop(); chr.stop();
setprop("instrumentation/chrono[0]/paused", 0); setprop("/instrumentation/chrono[0]/paused", 0);
}; };
}; };
} elsif (tmp == 0) { } elsif (tmp == 0) {
if (getprop("instrumentation/chrono[0]/started") == 0) { if (getprop("instrumentation/chrono[0]/started") == 0) {
if (getprop("instrumentation/chrono[0]/paused") == 0) { if (getprop("instrumentation/chrono[0]/paused") == 0) {
chr.start(); chr.start();
setprop("instrumentation/chrono[0]/started", 1); setprop("/instrumentation/chrono[0]/started", 1);
} else { } else {
chr.start(); chr.start();
setprop("instrumentation/chrono[0]/paused", 0); setprop("/instrumentation/chrono[0]/paused", 0);
}; };
} else { } else {
if (getprop("instrumentation/chrono[0]/paused") == 0) { if (getprop("instrumentation/chrono[0]/paused") == 0) {
# No action required # No action required
} else { } else {
chr.start(); chr.start();
setprop("instrumentation/chrono[0]/paused", 0); setprop("/instrumentation/chrono[0]/paused", 0);
}; };
}; };
}; };
@ -106,34 +106,34 @@ var start_loop = maketimer(0.1, func {
var UTC_date3 = sprintf("%02d", "88"); var UTC_date3 = sprintf("%02d", "88");
var clock2_1 = "88:88"; var clock2_1 = "88:88";
var clock2_2 = sprintf("%02d", 88); var clock2_2 = sprintf("%02d", 88);
setprop("instrumentation/clock/clock_hh_mm", clock2_1); setprop("/instrumentation/clock/clock_hh_mm", clock2_1);
setprop("instrumentation/clock/indicated-seconds", clock2_2); setprop("/instrumentation/clock/indicated-seconds", clock2_2);
setprop("instrumentation/clock/utc-date", UTC_date); setprop("/instrumentation/clock/utc-date", UTC_date);
setprop("instrumentation/clock/utc-date1", UTC_date1); setprop("/instrumentation/clock/utc-date1", UTC_date1);
setprop("instrumentation/clock/utc-date2", UTC_date2); setprop("/instrumentation/clock/utc-date2", UTC_date2);
setprop("instrumentation/clock/utc-date3", UTC_date3); setprop("/instrumentation/clock/utc-date3", UTC_date3);
setprop("instrumentation/chrono[0]/chr-et-string", "88 88"); setprop("/instrumentation/chrono[0]/chr-et-string", "88 88");
setprop("instrumentation/clock/elapsed-string", "88:88"); setprop("/instrumentation/clock/elapsed-string", "88:88");
} else { } else {
# Clock # Clock
var UTC_date = sprintf("%02d %02d %02d", getprop("sim/time/utc/month"), getprop("sim/time/utc/day"), substr(sprintf("%2d", getprop("sim/time/utc/year")),1,2)); var UTC_date = sprintf("%02d %02d %02d", getprop("sim/time/utc/month"), getprop("sim/time/utc/day"), substr(sprintf("%2d", getprop("sim/time/utc/year")),1,2));
setprop("instrumentation/clock/utc-date", UTC_date); setprop("/instrumentation/clock/utc-date", UTC_date);
var UTC_date1 = sprintf("%02d", getprop("sim/time/utc/month")); var UTC_date1 = sprintf("%02d", getprop("sim/time/utc/month"));
var UTC_date2 = sprintf("%02d", getprop("sim/time/utc/day")); var UTC_date2 = sprintf("%02d", getprop("sim/time/utc/day"));
var UTC_date3 = substr(sprintf("%2d", getprop("sim/time/utc/year")),2,2); var UTC_date3 = substr(sprintf("%2d", getprop("sim/time/utc/year")),2,2);
var clock2_1 = getprop("instrumentation/clock/indicated-short-string"); var clock2_1 = getprop("instrumentation/clock/indicated-short-string");
var clock2_2 = sprintf("%02d", substr(getprop("instrumentation/clock/indicated-string"),6,2)); var clock2_2 = sprintf("%02d", substr(getprop("instrumentation/clock/indicated-string"),6,2));
setprop("instrumentation/clock/clock_hh_mm", clock2_1); setprop("/instrumentation/clock/clock_hh_mm", clock2_1);
setprop("instrumentation/clock/indicated-seconds", clock2_2); setprop("/instrumentation/clock/indicated-seconds", clock2_2);
setprop("instrumentation/clock/utc-date", UTC_date); setprop("/instrumentation/clock/utc-date", UTC_date);
setprop("instrumentation/clock/utc-date1", UTC_date1); setprop("/instrumentation/clock/utc-date1", UTC_date1);
setprop("instrumentation/clock/utc-date2", UTC_date2); setprop("/instrumentation/clock/utc-date2", UTC_date2);
setprop("instrumentation/clock/utc-date3", UTC_date3); setprop("/instrumentation/clock/utc-date3", UTC_date3);
if (getprop("instrumentation/clock/set-knob") == "") { if (getprop("instrumentation/clock/set-knob") == "") {
setprop("instrumentation/clock/set-knob", 0); setprop("/instrumentation/clock/set-knob", 0);
}; };
if (getprop("instrumentation/clock/utc-selector") == "") { if (getprop("instrumentation/clock/utc-selector") == "") {
setprop("instrumentation/clock/utc-selector", 0); setprop("/instrumentation/clock/utc-selector", 0);
}; };
# if (getprop("instrumentation/clock/utc-selector") == 0) { # if (getprop("instrumentation/clock/utc-selector") == 0) {
# # To do - GPS mode # # To do - GPS mode
@ -148,7 +148,7 @@ var start_loop = maketimer(0.1, func {
# Chrono # Chrono
var chr_tmp = getprop("instrumentation/chrono[0]/elapsetime-sec"); var chr_tmp = getprop("instrumentation/chrono[0]/elapsetime-sec");
if (chr_tmp >= 6000) { if (chr_tmp >= 6000) {
setprop("instrumentation/chrono[0]/elapsetime-sec", chr_tmp-6000); setprop("/instrumentation/chrono[0]/elapsetime-sec", chr_tmp-6000);
}; };
var chr_min = int(chr_tmp * 0.0166666666667); var chr_min = int(chr_tmp * 0.0166666666667);
if (chr_tmp >= 60) { if (chr_tmp >= 60) {
@ -156,46 +156,54 @@ var start_loop = maketimer(0.1, func {
} else { } else {
var chr_sec = int(chr_tmp); var chr_sec = int(chr_tmp);
}; };
setprop("instrumentation/chrono[0]/chr-et-min",chr_min); setprop("/instrumentation/chrono[0]/chr-et-min",chr_min);
setprop("instrumentation/chrono[0]/chr-et-sec",chr_sec); setprop("/instrumentation/chrono[0]/chr-et-sec",chr_sec);
chr_tmp = sprintf("%02d:%02d", chr_min, chr_sec); chr_tmp = sprintf("%02d:%02d", chr_min, chr_sec);
setprop("instrumentation/chrono[0]/chr-et-string", chr_tmp); setprop("/instrumentation/chrono[0]/chr-et-string", chr_tmp);
# ET clock # ET clock
var et_tmp = getprop("instrumentation/clock/elapsetime-sec"); var et_tmp = getprop("instrumentation/clock/elapsetime-sec");
if (et_tmp >= 360000) { if (et_tmp >= 360000) {
setprop("instrumentation/clock/elapsetime-sec", et_tmp-360000); setprop("/instrumentation/clock/elapsetime-sec", et_tmp-360000);
}; };
var et_min = int(et_tmp * 0.0166666666667); var et_min = int(et_tmp * 0.0166666666667);
var et_hr = int(et_min * 0.0166666666667); var et_hr = int(et_min * 0.0166666666667);
et_min = et_min - (et_hr * 60); et_min = et_min - (et_hr * 60);
setprop("instrumentation/clock/et-hr",et_hr); setprop("/instrumentation/clock/et-hr",et_hr);
setprop("instrumentation/clock/et-min",et_min); setprop("/instrumentation/clock/et-min",et_min);
et_tmp = sprintf("%02d:%02d", et_hr, et_min); et_tmp = sprintf("%02d:%02d", et_hr, et_min);
setprop("instrumentation/clock/elapsed-string", et_tmp); setprop("/instrumentation/clock/elapsed-string", et_tmp);
foreach (item; update_items) {
item.update(nil);
}
}; };
}); });
setlistener("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg", func() {
if (systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25) { return; } var update_items = [
var rudder_val = getprop("fdm/jsbsim/hydraulics/rudder/trim-cmd-deg"); props.UpdateManager.FromPropertyHashList(["/fdm/jsbsim/hydraulics/rudder/trim-deg", "/controls/switches/annun-test"], 0.05, func(notification)
if (getprop("controls/switches/annun-test") == 1) { {
setprop("controls/flight/rudder-trim-display", "88.8"); var rudder_val = getprop("fdm/jsbsim/hydraulics/rudder/trim-deg");
setprop("controls/flight/rudder-trim-letter-display", "8"); if (getprop("/controls/switches/annun-test") == 1) {
setprop("/controls/flight/rudder-trim-display", sprintf("%3.1f", "88.8"));
setprop("/controls/flight/rudder-trim-letter-display", sprintf("%1.0f", "8"));
} else { } else {
if (rudder_val > -0.05 and rudder_val < 0.05) { if (rudder_val > -0.05 and rudder_val < 0.05) {
setprop("controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val))); setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("controls/flight/rudder-trim-letter-display", ""); setprop("/controls/flight/rudder-trim-letter-display", "");
} else { } else {
if (rudder_val >= 0.05) { if (rudder_val >= 0.05) {
setprop("controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val))); setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("controls/flight/rudder-trim-letter-display", "R"); setprop("/controls/flight/rudder-trim-letter-display", "R");
} else { } else {
if (rudder_val <= -0.05) { if (rudder_val <= -0.05) {
setprop("controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val))); setprop("/controls/flight/rudder-trim-display", sprintf("%2.1f", abs(rudder_val)));
setprop("controls/flight/rudder-trim-letter-display", "L"); setprop("/controls/flight/rudder-trim-letter-display", "L");
}; }
}; }
}; }
}; }
},0, 0); }
),
];

View file

@ -9,6 +9,7 @@ var fuelSvc = {
Nodes: { Nodes: {
requestLbs: props.globals.getNode("services/fuel-truck/request-lbs"), requestLbs: props.globals.getNode("services/fuel-truck/request-lbs"),
requestTotalLbs: props.globals.getNode("services/fuel-truck/request-total-lbs"), requestTotalLbs: props.globals.getNode("services/fuel-truck/request-total-lbs"),
requestFuelLbs: props.globals.initNode("services/fuel-truck/fuel-on-board-at-request", pts.Consumables.Fuel.totalFuelLbs.getValue(), "DOUBLE"),
}, },
newRequest: func() { newRequest: func() {

View file

@ -47,12 +47,14 @@
</test> </test>
</switch> </switch>
<switch name="fbw/yaw/gain-switch"> <switch name="fbw/yaw/gain-switch"> <!-- disable auto-trim -->
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="OR" value="1">
position/wow eq 1 position/wow eq 1
/it-fbw/law eq 2 <test logic="AND">
/it-fbw/law eq 3 /it-fbw/yaw-law eq 2
/it-fbw/law ne 0
</test>
</test> </test>
</switch> </switch>
@ -335,11 +337,60 @@
</test> </test>
</switch> </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"> <switch name="/systems/fctl/lights/fac1-fault">
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/controls/fctl/switches/fac1 eq 1 /controls/fctl/switches/fac1 eq 1
/systems/fctl/fac1 eq 0 /systems/fctl/fac1-healthy-signal eq 0
</test> </test>
</switch> </switch>
@ -347,9 +398,56 @@
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/controls/fctl/switches/fac1 eq 1 /controls/fctl/switches/fac1 eq 1
/systems/failures/fctl/fac1 eq 0 /systems/fctl/fac1-healthy eq 1
/systems/electrical/bus/ac-ess ge 110 </test>
/systems/electrical/bus/dc-ess-shed ge 25 </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> </test>
</switch> </switch>
@ -357,7 +455,7 @@
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/controls/fctl/switches/fac2 eq 1 /controls/fctl/switches/fac2 eq 1
/systems/fctl/fac2 eq 0 /systems/fctl/fac2-healthy-signal eq 0
</test> </test>
</switch> </switch>
@ -365,17 +463,7 @@
<default value="0"/> <default value="0"/>
<test logic="AND" value="1"> <test logic="AND" value="1">
/controls/fctl/switches/fac2 eq 1 /controls/fctl/switches/fac2 eq 1
/systems/failures/fctl/fac2 eq 0 /systems/fctl/fac2-healthy eq 1
/systems/electrical/bus/ac-2 ge 110
/systems/electrical/bus/dc-2 ge 25
</test>
</switch>
<switch name="/systems/failures/rudder">
<default value="0"/>
<test logic="AND" value="1">
/systems/fctl/fac1 eq 0
/systems/fctl/fac2 eq 0
</test> </test>
</switch> </switch>
@ -1306,10 +1394,10 @@
<channel name="FBW: Yaw"> <channel name="FBW: Yaw">
<fcs_function name="fbw/yaw/max-deg-fac"> <fcs_function name="fbw/yaw/max-deg-fac-1">
<function> <function>
<table> <table>
<independentVar lookup="row">velocities/vc-kts</independentVar> <independentVar lookup="row">/systems/fmgc/active-airspeed-1</independentVar>
<tableData> <tableData>
160 25.0 160 25.0
410 3.5 410 3.5
@ -1318,21 +1406,107 @@
</function> </function>
</fcs_function> </fcs_function>
<switch name="fbw/yaw/max-deg-switch"> <fcs_function name="fbw/yaw/max-deg-fac-2">
<default value="25"/> <function>
<test logic="AND" value="fbw/yaw/max-deg-fac"> <table>
/systems/fctl/fac1 eq 1 <independentVar lookup="row">/systems/fmgc/active-airspeed-2</independentVar>
/systems/fctl/fac2 eq 1 <tableData>
/gear/gear[1]/wow eq 0 160 25.0
/gear/gear[2]/wow eq 0 410 3.5
</tableData>
</table>
</function>
</fcs_function>
<switch name="/systems/fctl/fac1-rtlu-avail">
<default value="0"/>
<test logic="AND" value="1">
/systems/failures/fctl/rtlu-1 eq 0
/systems/electrical/bus/dc-ess ge 25
/systems/fctl/fac1-healthy-signal eq 1
<test logic="OR">
<test logic="AND">
/systems/fmgc/cas-compare/cas-reject-1 eq 0
/systems/navigation/adr/operating-1 eq 1
</test>
<test logic="AND">
/systems/fmgc/cas-compare/cas-reject-3 eq 0
/systems/navigation/adr/operating-3 eq 1
</test>
</test> </test>
<test logic="AND" value="fbw/yaw/max-deg-fac">
/controls/flight/flaps eq 0
/gear/gear[1]/wow eq 0
/gear/gear[2]/wow eq 0
</test> </test>
</switch> </switch>
<switch name="/systems/fctl/fac2-rtlu-avail">
<default value="0"/>
<test logic="AND" value="1">
/systems/failures/fctl/rtlu-2 eq 0
/systems/electrical/bus/dc-2 ge 25
/systems/fctl/fac2-healthy-signal eq 1
<test logic="OR">
<test logic="AND">
/systems/fmgc/cas-compare/cas-reject-2 eq 0
/systems/navigation/adr/operating-2 eq 1
</test>
<test logic="AND">
/systems/fmgc/cas-compare/cas-reject-3 eq 0
/systems/navigation/adr/operating-3 eq 1
</test>
</test>
</test>
</switch>
<switch name="fbw/yaw/rtlu-emergency">
<default value="0"/>
<test logic="AND" value="1">
/systems/fctl/fac1-rtlu-avail eq 0
/systems/fctl/fac2-rtlu-avail eq 0
fcs/slat-pos-deg ne 0
</test>
</switch>
<switch name="fbw/yaw/max-deg-switch-cmd">
<default value="25"/>
<test logic="AND" value="fbw/yaw/max-deg-switch"> <!-- RTLU frozen with FAC 1 / 2 failure -->
/systems/fctl/fac1-rtlu-avail eq 0
/systems/fctl/fac2-rtlu-avail eq 0
fcs/slat-pos-deg eq 0
</test>
<test logic="AND" value="25"> <!-- Return to low speed control with slats extended -->
fbw/yaw/rtlu-emergency eq 1
</test>
<test logic="AND" value="fbw/yaw/max-deg-fac-1"> <!-- Side 1 has priority -->
/systems/fctl/fac1-rtlu-avail eq 1
</test>
<test logic="AND" value="fbw/yaw/max-deg-fac-2">
/systems/fctl/fac2-rtlu-avail eq 1
</test>
</switch>
<switch name="fbw/yaw/rtlu-power">
<default value="0"/>
<test logic="AND" value="25"> <!-- Main motor control -->
<test logic="OR">
/systems/electrical/bus/dc-ess-shed ge 25
/systems/electrical/bus/dc-2 ge 25
</test>
fbw/yaw/rtlu-emergency ne 1
</test>
<test logic="AND" value="3"> <!-- Emergency motor is slower -->
/systems/electrical/bus/ac-ess-26v ge 24.8
/systems/fctl/fac1-rtlu-avail eq 0
/systems/fctl/fac2-rtlu-avail eq 0
fcs/slat-pos-deg ne 0
fbw/yaw/max-deg-switch ne fbw/yaw/max-deg-switch-cmd
</test>
</switch>
<actuator name="rubbish/rudder-travel-limiter">
<input>fbw/yaw/max-deg-switch-cmd</input>
<rate_limit>fbw/yaw/rtlu-power</rate_limit>
<output>fbw/yaw/max-deg-switch</output>
</actuator>
<aerosurface_scale name="fbw/yaw/max-deg-scale"> <aerosurface_scale name="fbw/yaw/max-deg-scale">
<input>fbw/yaw/max-deg-switch</input> <input>fbw/yaw/max-deg-switch</input>
<domain> <domain>
@ -1452,11 +1626,14 @@
<input>fbw/yaw/fmgc-cmd</input> <input>fbw/yaw/fmgc-cmd</input>
</summer> </summer>
<switch name="fbw/yaw/law-switch"> <switch name="fbw/yaw/law-switch"> <!-- Is the yaw damper active or not? -->
<default value="0"/> <default value="0"/>
<test logic="OR" value="1"> <test logic="AND" value="1">
/it-fbw/law eq 0 /it-fbw/law ne 3
/it-fbw/law eq 1 <test logic="OR">
/it-fbw/yaw-law eq 0
/it-fbw/yaw-law eq 1
</test>
</test> </test>
</switch> </switch>

View file

@ -296,7 +296,8 @@
<switch name="hydraulics/elevator-trim/rate"> <switch name="hydraulics/elevator-trim/rate">
<default value="0.125"/> <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 /systems/hydraulic/green-psi ge 1500
</test> </test>
</switch> </switch>
@ -333,13 +334,78 @@
</test> </test>
</switch> </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">
/it-autoflight/output/ap1 eq 0
/it-autoflight/output/ap2 eq 0
</test>
</switch>
<pure_gain name="hydraulics/rudder/trim-cmd-deg"> <pure_gain name="hydraulics/rudder/trim-cmd-deg">
<input>/controls/flight/rudder-trim</input> <input>hydraulics/rudder/trim-autopilot</input>
<gain>20</gain> <gain>20</gain>
</pure_gain> </pure_gain>
<switch name="hydraulics/rudder/trim-rate">
<default value="0"/>
<test logic="OR" value="1">
<test logic="AND">
/systems/electrical/bus/dc-ess ge 25
/systems/fctl/fac1-healthy-signal eq 1
</test>
<test logic="AND">
/systems/electrical/bus/dc-2 ge 25
/systems/fctl/fac2-healthy-signal eq 1
</test>
</test>
</switch>
<actuator name="hydraulics/rudder/trim-deg">
<input>hydraulics/rudder/trim-cmd-deg</input>
<rate_limit>hydraulics/rudder/trim-rate</rate_limit>
</actuator>
<aerosurface_scale name="hydraulics/rudder/trim-norm"> <aerosurface_scale name="hydraulics/rudder/trim-norm">
<input>/controls/flight/rudder-trim</input> <input>hydraulics/rudder/trim-deg</input>
<domain>
<min>-20</min>
<max> 20</max>
</domain>
<range> <range>
<min>-0.8</min> <min>-0.8</min>
<max>0.8</max> <max>0.8</max>
@ -356,11 +422,7 @@
</summer> </summer>
<switch name="hydraulics/rudder/switch"> <switch name="hydraulics/rudder/switch">
<default value="0"/> <default value="hydraulics/rudder/summer"/>
<test logic="AND" value="hydraulics/rudder/summer">
hydraulics/rudder/pressure-switch-or eq 1
/systems/failures/rudder eq 0
</test>
<clipto> <clipto>
<min>fbw/yaw/max-deg-scale-neg</min> <min>fbw/yaw/max-deg-scale-neg</min>
<max>fbw/yaw/max-deg-scale</max> <max>fbw/yaw/max-deg-scale</max>
@ -372,9 +434,16 @@
<gain>25</gain> <gain>25</gain>
</pure_gain> </pure_gain>
<switch name="hydraulics/rudder/rate">
<default value="80"/>
<test logic="OR" value="0">
hydraulics/rudder/pressure-switch-or eq 0
</test>
</switch>
<actuator name="hydraulics/rudder/final-actuator"> <actuator name="hydraulics/rudder/final-actuator">
<input>hydraulics/rudder/cmd-deg</input> <input>hydraulics/rudder/cmd-deg</input>
<rate_limit>80</rate_limit> <rate_limit>hydraulics/rudder/rate</rate_limit>
<lag>25.5</lag> <lag>25.5</lag>
<output>hydraulics/rudder/final-deg</output> <output>hydraulics/rudder/final-deg</output>
</actuator> </actuator>

View file

@ -66,6 +66,11 @@
<fcs_function name="/systems/fmgc/cas-compare/cas-reject-1"> <!-- 2 and 3 are the same but 1 is different --> <fcs_function name="/systems/fmgc/cas-compare/cas-reject-1"> <!-- 2 and 3 are the same but 1 is different -->
<function> <function>
<ifthen> <ifthen>
<or>
<eq>
<property>/systems/navigation/adr/operating-1</property>
<value>0</value>
</eq>
<and> <and>
<gt> <gt>
<property>/systems/fmgc/cas-compare/cas-1-to-3</property> <property>/systems/fmgc/cas-compare/cas-1-to-3</property>
@ -79,7 +84,16 @@
<property>/systems/fmgc/cas-compare/cas-2-to-3</property> <property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value> <value>5</value>
</lt> </lt>
<eq>
<property>/systems/navigation/adr/operating-2</property>
<value>1</value>
</eq>
<eq>
<property>/systems/navigation/adr/operating-3</property>
<value>1</value>
</eq>
</and> </and>
</or>
<value>1</value> <value>1</value>
<value>0</value> <value>0</value>
</ifthen> </ifthen>
@ -89,20 +103,34 @@
<fcs_function name="/systems/fmgc/cas-compare/cas-reject-2"> <!-- 1 and 3 are the same but 2 is different --> <fcs_function name="/systems/fmgc/cas-compare/cas-reject-2"> <!-- 1 and 3 are the same but 2 is different -->
<function> <function>
<ifthen> <ifthen>
<or>
<eq>
<property>/systems/navigation/adr/operating-2</property>
<value>0</value>
</eq>
<and> <and>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value> <!-- todo - find proper value -->
</gt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-1</property>
<value>5</value>
</gt>
<lt> <lt>
<property>/systems/fmgc/cas-compare/cas-1-to-3</property> <property>/systems/fmgc/cas-compare/cas-1-to-3</property>
<value>5</value> <value>5</value>
</lt> </lt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-1</property>
<value>5</value>
</gt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value>
</gt>
<eq>
<property>/systems/navigation/adr/operating-1</property>
<value>1</value>
</eq>
<eq>
<property>/systems/navigation/adr/operating-3</property>
<value>1</value>
</eq>
</and> </and>
</or>
<value>1</value> <value>1</value>
<value>0</value> <value>0</value>
</ifthen> </ifthen>
@ -112,20 +140,34 @@
<fcs_function name="/systems/fmgc/cas-compare/cas-reject-3"> <!-- 1 and 2 are the same but 3 is different --> <fcs_function name="/systems/fmgc/cas-compare/cas-reject-3"> <!-- 1 and 2 are the same but 3 is different -->
<function> <function>
<ifthen> <ifthen>
<or>
<eq>
<property>/systems/navigation/adr/operating-3</property>
<value>0</value>
</eq>
<and> <and>
<gt> <gt>
<property>/systems/fmgc/cas-compare/cas-1-to-3</property> <property>/systems/fmgc/cas-compare/cas-1-to-3</property>
<value>5</value> <!-- todo - find proper value -->
</gt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value> <value>5</value>
</gt> </gt>
<lt> <lt>
<property>/systems/fmgc/cas-compare/cas-2-to-1</property> <property>/systems/fmgc/cas-compare/cas-2-to-1</property>
<value>5</value> <value>5</value>
</lt> </lt>
<gt>
<property>/systems/fmgc/cas-compare/cas-2-to-3</property>
<value>5</value>
</gt>
<eq>
<property>/systems/navigation/adr/operating-1</property>
<value>1</value>
</eq>
<eq>
<property>/systems/navigation/adr/operating-2</property>
<value>1</value>
</eq>
</and> </and>
</or>
<value>1</value> <value>1</value>
<value>0</value> <value>0</value>
</ifthen> </ifthen>
@ -145,6 +187,19 @@
</function> </function>
</fcs_function> </fcs_function>
<fcs_function name="/systems/fmgc/active-airspeed-1">
<function>
<ifthen>
<eq>
<property>/systems/fmgc/active-airspeed-src-1</property>
<value>1</value>
</eq>
<property>/systems/navigation/adr/output/cas-1</property>
<property>/systems/navigation/adr/output/cas-3</property>
</ifthen>
</function>
</fcs_function>
<fcs_function name="/systems/fmgc/active-airspeed-src-2"> <fcs_function name="/systems/fmgc/active-airspeed-src-2">
<function> <function>
<ifthen> <ifthen>
@ -157,6 +212,19 @@
</ifthen> </ifthen>
</function> </function>
</fcs_function> </fcs_function>
<fcs_function name="/systems/fmgc/active-airspeed-2">
<function>
<ifthen>
<eq>
<property>/systems/fmgc/active-airspeed-src-2</property>
<value>2</value>
</eq>
<property>/systems/navigation/adr/output/cas-2</property>
<property>/systems/navigation/adr/output/cas-3</property>
</ifthen>
</function>
</fcs_function>
</channel> </channel>
</system> </system>

View file

@ -322,6 +322,19 @@
<rate_limit sense="incr">0.2</rate_limit> <!-- 5 seconds --> <rate_limit sense="incr">0.2</rate_limit> <!-- 5 seconds -->
</actuator> </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>
<channel name="ECAM"> <channel name="ECAM">
@ -1231,6 +1244,200 @@
/systems/electrical/bus/ac-2 ge 110 /systems/electrical/bus/ac-2 ge 110
</test> </test>
</switch> </switch>
<switch name="/ECAM/warnings/logic/rud-trav-lim-sys-1-fault-cmd">
<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-rtlu-avail eq 0
/systems/fctl/fac1-healthy-signal eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/rud-trav-lim-sys-2-fault-cmd">
<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/fac2-rtlu-avail eq 0
/systems/fctl/fac2-healthy-signal eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/rud-trav-lim-sys-fault">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/rud-trav-lim-sys-1-fault-cmd eq 1
/ECAM/warnings/logic/rud-trav-lim-sys-2-fault-cmd eq 1
</test>
</switch>
<switch name="/ECAM/warnings/logic/rud-trav-lim-sys-1-fault">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/rud-trav-lim-sys-1-fault-cmd eq 1
/ECAM/warnings/logic/rud-trav-lim-sys-fault eq 0
</test>
</switch>
<switch name="/ECAM/warnings/logic/rud-trav-lim-sys-2-fault">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warnings/logic/rud-trav-lim-sys-2-fault-cmd eq 1
/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> </channel>
</system> </system>

View file

@ -141,7 +141,7 @@
/systems/electrical/bus/ac-2 ge 110 /systems/electrical/bus/ac-2 ge 110
</test> </test>
<test logic="OR"> <test logic="OR">
/controls/flight/slats ge 0 /controls/flight/slats-cmd ge 0
/gear/gear[2]/wow eq 1 /gear/gear[2]/wow eq 1
</test> </test>
</test> </test>

View file

@ -64,8 +64,6 @@ var refuelClass = {
me._svg = me._root.createChild("group"); me._svg = me._root.createChild("group");
canvas.parsesvg(me._svg, "Aircraft/A320-family/gui/dialogs/refuel.svg"); canvas.parsesvg(me._svg, "Aircraft/A320-family/gui/dialogs/refuel.svg");
amount.setValue(math.round((pts.Consumables.Fuel.totalFuelLbs.getValue() + systems.fuelSvc.Nodes.requestLbs.getValue()) / 1000, 0.1));
me._HI_LVL_L = me._svg.getElementById("HI-LVL-L"); me._HI_LVL_L = me._svg.getElementById("HI-LVL-L");
me._HI_LVL_C = me._svg.getElementById("HI-LVL-C"); me._HI_LVL_C = me._svg.getElementById("HI-LVL-C");
me._HI_LVL_R = me._svg.getElementById("HI-LVL-R"); me._HI_LVL_R = me._svg.getElementById("HI-LVL-R");
@ -405,8 +403,8 @@ var refuelClass = {
me._Mode_refuel.show(); me._Mode_refuel.show();
me._Mode_off.hide(); me._Mode_off.hide();
me._Mode_defuel.hide(); me._Mode_defuel.hide();
systems.fuelSvc.Nodes.requestFuelLbs.setValue(pts.Consumables.Fuel.totalFuelLbs.getValue());
systems.fuelSvc.refuel(); systems.fuelSvc.refuel();
} }
}); });
@ -484,6 +482,9 @@ var refuelClass = {
me._timerUp.stop(); me._timerUp.stop();
}); });
amount.setValue(math.round((systems.fuelSvc.Nodes.requestFuelLbs.getValue() + systems.fuelSvc.Nodes.requestLbs.getValue()) / 1000, 0.1));
me._timerf(); me._timerf();
me._timer.start(); me._timer.start();
}, },