1
0
Fork 0

Rework all takeoff config warnings

This commit is contained in:
legoboyvdlp R 2021-01-30 18:31:06 +00:00
parent 7d5db5ad01
commit 8857a2641c
5 changed files with 271 additions and 19 deletions

View file

@ -76,6 +76,17 @@ var warningNodes = {
leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"), leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"),
rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"), rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"),
flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"), flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"),
slatsConfig: props.globals.initNode("/ECAM/warnings/fctl/slats-config-output"),
flapsConfig: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-output"),
spdBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-output"),
pitchTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-output"),
rudTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-output"),
parkBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/park-brk-config-output"),
slatsConfig2: props.globals.initNode("/ECAM/warnings/fctl/slats-config-range"),
flapsConfig2: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-range"),
spdBrkConfig2: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-range"),
pitchTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-range"),
rudTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-range"),
}, },
Timers: { Timers: {
apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"),

View file

@ -578,29 +578,23 @@ var messages_priority_3 = func {
takeoffConfig = 0; takeoffConfig = 0;
} }
if ((pts.Controls.Flight.flapsInput.getValue() == 0 or pts.Controls.Flight.flapsInput.getValue() == 4) and takeoffConfig) { if (slats_config.clearFlag == 0 and (warningNodes.Logic.slatsConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.slatsConfig2.getBoolValue()))) {
if (slats_config.clearFlag == 0) { slats_config.active = 1;
slats_config.active = 1; slats_config_1.active = 1;
slats_config_1.active = 1;
} else {
ECAM_controller.warningReset(slats_config);
ECAM_controller.warningReset(slats_config_1);
}
if (flaps_config.clearFlag == 0) {
flaps_config.active = 1;
flaps_config_1.active = 1;
} else {
ECAM_controller.warningReset(flaps_config);
ECAM_controller.warningReset(flaps_config_1);
}
} else { } else {
ECAM_controller.warningReset(slats_config); ECAM_controller.warningReset(slats_config);
ECAM_controller.warningReset(slats_config_1); ECAM_controller.warningReset(slats_config_1);
}
if (flaps_config.clearFlag == 0 and (warningNodes.Logic.flapsConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.flapsConfig2.getBoolValue()))) {
flaps_config.active = 1;
flaps_config_1.active = 1;
} else {
ECAM_controller.warningReset(flaps_config); ECAM_controller.warningReset(flaps_config);
ECAM_controller.warningReset(flaps_config_1); ECAM_controller.warningReset(flaps_config_1);
} }
if ((spd_brk_config.clearFlag == 0) and pts.Controls.Flight.speedbrake.getValue() != 0 and takeoffConfig) { if (spd_brk_config.clearFlag == 0 and (warningNodes.Logic.spdBrkConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.spdBrkConfig2.getBoolValue()))) {
spd_brk_config.active = 1; spd_brk_config.active = 1;
spd_brk_config_1.active = 1; spd_brk_config_1.active = 1;
} else { } else {
@ -608,7 +602,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(spd_brk_config_1); ECAM_controller.warningReset(spd_brk_config_1);
} }
if ((pitch_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") > 2.6 or getprop("/fdm/jsbsim/hydraulics/elevator-trim/final-deg") < -2.6) and takeoffConfig) { if (pitch_trim_config.clearFlag == 0 and (warningNodes.Logic.pitchTrimConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.pitchTrimConfig2.getBoolValue()))) {
pitch_trim_config.active = 1; pitch_trim_config.active = 1;
pitch_trim_config_1.active = 1; pitch_trim_config_1.active = 1;
} else { } else {
@ -616,7 +610,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(pitch_trim_config_1); ECAM_controller.warningReset(pitch_trim_config_1);
} }
if ((rud_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.6 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.6) and takeoffConfig) { if (rud_trim_config.clearFlag == 0 and (warningNodes.Logic.rudTrimConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.rudTrimConfig2.getBoolValue()))) {
rud_trim_config.active = 1; rud_trim_config.active = 1;
rud_trim_config_1.active = 1; rud_trim_config_1.active = 1;
} else { } else {
@ -624,7 +618,7 @@ var messages_priority_3 = func {
ECAM_controller.warningReset(rud_trim_config_1); ECAM_controller.warningReset(rud_trim_config_1);
} }
if ((park_brk_config.clearFlag == 0) and warningNodes.Flipflops.parkBrk.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) { if (park_brk_config.clearFlag == 0 and warningNodes.Logic.parkBrkConfig.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) {
park_brk_config.active = 1; park_brk_config.active = 1;
} else { } else {
ECAM_controller.warningReset(park_brk_config); ECAM_controller.warningReset(park_brk_config);

View file

@ -85,6 +85,20 @@ var warnings = std.Vector.new([
var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"), var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"),
var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"), var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"),
# ADR 1 + 2 + 3 FAULT
var ADR123Fault = warning.new(msg: "NAV ADR1+2+3 FAULT ", colour: "r", aural: 0, light: 0, isMainMsg: 1),
var ADR123FaultAP = warning.new(msg: " -AP+FD..............OFF", colour: "c"),
var ADR123FaultATHR = warning.new(msg: " -ATHR...............OFF", colour: "c"),
var ADR123FaultPRBW = warning.new(msg: " -PROBE/WINDOW HEAT...ON", colour: "c"),
var ADR123FaultBUSSC = warning.new(msg: " -CAPT BKUP SPD/ALT...ON", colour: "c"),
var ADR123FaultBUSSF = warning.new(msg: " -FO BKUP SPD/ALT.....ON", colour: "c"),
var ADR123FaultADRPB = warning.new(msg: " -ADR 1+2+3 P/B......OFF", colour: "c"),
var ADR123FaultSPD = warning.new(msg: " -SPD......FLY THE GREEN", colour: "c"),
var ADR123FaultAOADISAG = warning.new(msg: " •IF AOA DISAGREE: ", colour: "w", isMainMsg: 1),
var ADR123FaultBUSSINOP = warning.new(msg: " BKUP SPD/ALT.DO NOT USE", colour: "c"),
var ADR123FaultSTBY = warning.new(msg: " -STBY INST.MAY BE UNREL", colour: "c"),
var ADR123FaultPROC = warning.new(msg: " -ALL ADR OFF PROC.APPLY", colour: "c"),
# APU FIRE # APU FIRE
var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apu"), var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apu"),
var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"), var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"),

View file

@ -2337,6 +2337,156 @@
</test> </test>
</switch> </switch>
<switch name="/ECAM/warnings/fctl/flaps-config-range">
<default value="0"/>
<test logic="OR" value="1">
fcs/flap-pos-deg lt 2
fcs/flap-pos-deg ge 24
</test>
</switch>
<switch name="/ECAM/warnings/fctl/flaps-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/flaps-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/flaps-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/flaps-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/slats-config-range">
<default value="0"/>
<test logic="OR" value="1">
fcs/slat-pos-deg lt 17
fcs/slat-pos-deg ge 25
</test>
</switch>
<switch name="/ECAM/warnings/fctl/slats-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/slats-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/slats-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/slats-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/spd-brk-config-range">
<default value="0"/>
<test logic="OR" value="1">
/controls/flight/speedbrake gt 0.0
</test>
</switch>
<switch name="/ECAM/warnings/fctl/spd-brk-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/spd-brk-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/spd-brk-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/spd-brk-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/pitch-trim-config-range">
<default value="0"/>
<test logic="OR" value="1">
hydraulics/elevator-trim/final-deg gt 2.9
hydraulics/elevator-trim/final-deg lt -2.9
</test>
</switch>
<switch name="/ECAM/warnings/fctl/pitch-trim-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/pitch-trim-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/pitch-trim-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/pitch-trim-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/rudder-trim-config-range">
<default value="0"/>
<test logic="OR" value="1">
hydraulics/rudder/trim-deg gt 3.6
hydraulics/rudder/trim-deg lt -3.6
</test>
</switch>
<switch name="/ECAM/warnings/fctl/rudder-trim-config-set">
<default value="0"/>
<test logic="AND" value="1">
<test logic="OR">
/ECAM/warning-phase eq 3
/ECAM/warning-phase eq 4
</test>
/ECAM/warnings/fctl/rudder-trim-config-range eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/rudder-trim-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/ECAM/warnings/fctl/rudder-trim-config-range ne 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/park-brk-config-set">
<default value="0"/>
<test logic="AND" value="1">
/ECAM/warning-phase eq 3
/controls/gear/brake-parking eq 1
</test>
</switch>
<switch name="/ECAM/warnings/fctl/park-brk-config-reset">
<default value="0"/>
<test logic="OR" value="1">
/ECAM/warning-phase eq 5
/controls/gear/brake-parking eq 0
</test>
</switch>
</channel> </channel>
<channel name="Hydraulic" execrate="16"> <channel name="Hydraulic" execrate="16">
@ -2728,4 +2878,21 @@
</channel> </channel>
<!--<channel name="NAV" execrate="8">
<switch name="/ECAM/warnings/navigation/ADR123-fault">
<default value="0"/>
<test logic="AND" value="1">
/systems/electrical/bus/ac-1 ge 110
/systems/electrical/bus/ac-2 ge 110
/systems/electrical/bus/ac-ess ge 110
/ECAM/warning-phase ne 1
/ECAM/warning-phase ne 4
/ECAM/warning-phase ne 8
/ECAM/warning-phase ne 10
</test>
</switch>
</channel>-->
</system> </system>

View file

@ -1005,4 +1005,70 @@
</R> </R>
<output>/ECAM/phases/phase-calculation/altitude-ge-800</output> <output>/ECAM/phases/phase-calculation/altitude-ge-800</output>
</flipflop> </flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/flaps-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/flaps-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/flaps-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/slats-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/slats-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/slats-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/spd-brk-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/spd-brk-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/spd-brk-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/pitch-trim-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/pitch-trim-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/pitch-trim-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/rudder-trim-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/rudder-trim-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/rudder-trim-config-output</output>
</flipflop>
<flipflop>
<type>SR</type>
<S>
<property>/ECAM/warnings/fctl/park-brk-config-set</property>
</S>
<R>
<property>/ECAM/warnings/fctl/park-brk-config-reset</property>
</R>
<output>/ECAM/warnings/fctl/park-brk-config-output</output>
</flipflop>
</PropertyList> </PropertyList>