diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas index 01deb93f..22dadf2e 100644 --- a/Nasal/ECAM/ECAM-controller.nas +++ b/Nasal/ECAM/ECAM-controller.nas @@ -87,6 +87,8 @@ var warningNodes = { 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"), + dc2FuelConsumptionIncreased: props.globals.initNode("/ECAM/warnings/logic/dc-2-fuel-consumption-increased"), + dc2FMSPredictions: props.globals.initNode("/ECAM/warnings/logic/dc-2-fms-predictions-unreliable"), }, Timers: { apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), @@ -121,6 +123,7 @@ var warningNodes = { navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"), leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault-output"), rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault-output"), + staticInverter: props.globals.initNode("/systems/electrical/some-electric-thingie/static-inverter-timer"), }, Flipflops: { apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"), diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 6821e5de..059ba802 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -828,41 +828,38 @@ var messages_priority_3 = func { } # ESS on BAT - if ((!gear.getValue() or !pts.Controls.Gear.gearDown.getValue()) and getprop("/systems/electrical/some-electric-thingie/static-inverter-timer") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) { + # NEW EMER ELEC CONFIG + if (essBusOnBat.clearFlag == 0 and warningNodes.Timers.staticInverter.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) { essBusOnBat.active = 1; - essBusOnBatLGUplock.active = 1; - essBusOnBatManOn.active = 1; - essBusOnBatRetract.active = 1; - essBusOnBatMinSpeed.active = 1; - essBusOnBatLGCB.active = 1; + if (essBusOnBatMinSpeed.clearFlag == 0 and systems.HYD.Rat.position.getValue() != 0) { + essBusOnBatMinSpeed.active = 1; + } else { + ECAM_controller.warningReset(essBusOnBatMinSpeed); + } } else { ECAM_controller.warningReset(essBusOnBat); - ECAM_controller.warningReset(essBusOnBatLGUplock); - ECAM_controller.warningReset(essBusOnBatManOn); - ECAM_controller.warningReset(essBusOnBatRetract); ECAM_controller.warningReset(essBusOnBatMinSpeed); - ECAM_controller.warningReset(essBusOnBatLGCB); } # EMER CONFIG - if (systems.ELEC.EmerElec.getValue() and !dualFailNode.getBoolValue() and phaseVar3 != 4 and phaseVar3 != 8 and emerconfig.clearFlag == 0 and !getprop("/systems/acconfig/autoconfig-running")) { + if (systems.ELEC.EmerElec.getValue() and !dualFailNode.getBoolValue() and phaseVar3 != 4 and phaseVar3 != 8 and emerconfig.clearFlag == 0 and !pts.Acconfig.running.getBoolValue()) { emerconfig.active = 1; - if (getprop("/systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) { + if (systems.HYD.Rat.position.getValue() != 0 and emerconfigMinRat.clearFlag == 0 and FWC.Timer.gnd.getValue() == 0) { emerconfigMinRat.active = 1; } else { ECAM_controller.warningReset(emerconfigMinRat); } - if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) { + if ((!getprop("/systems/electrical/some-electric-thingie/generator-1-reset") or !getprop("/systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) { emerconfigGen.active = 1; # EGEN12R TRUE } else { ECAM_controller.warningReset(emerconfigGen); } - if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset-bustie") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) { + if ((!getprop("/systems/electrical/some-electric-thingie/generator-1-reset-bustie") or !getprop("/systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) { emerconfigGen2.active = 1; - if (getprop("/controls/electrical/switches/bus-tie")) { + if (systems.ELEC.Switch.busTie.getBoolValue()) { emerconfigBusTie.active = 1; } else { ECAM_controller.warningReset(emerconfigBusTie); @@ -880,7 +877,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(emerconfigManOn); } - if (getprop("/controls/engines/engine-start-switch") != 2 and emerconfigEngMode.clearFlag == 0) { + if (pts.Controls.Engines.startSw.getValue() != 2 and emerconfigEngMode.clearFlag == 0) { emerconfigEngMode.active = 1; } else { ECAM_controller.warningReset(emerconfigEngMode); @@ -892,48 +889,64 @@ var messages_priority_3 = func { ECAM_controller.warningReset(emerconfigRadio); } - if (emerconfigIcing.clearFlag == 0) { - emerconfigIcing.active = 1; - } else { - ECAM_controller.warningReset(emerconfigIcing); - } - - if (emerconfigFuelG.clearFlag == 0) { - emerconfigFuelG.active = 1; + if (FWC.Timer.gnd.getValue() == 0) { + if (emerconfigFuelG.clearFlag == 0) { + emerconfigFuelG.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFuelG); + } + + if (emerconfigFuelG2.clearFlag == 0) { + emerconfigFuelG2.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFuelG2); + } + + if (fbw.FBW.Computers.fac1.getBoolValue() == 0 and emerconfigFAC.clearFlag == 0) { + emerconfigFAC.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFAC); + } } else { ECAM_controller.warningReset(emerconfigFuelG); - } - - if (emerconfigFuelG2.clearFlag == 0) { - emerconfigFuelG2.active = 1; - } else { ECAM_controller.warningReset(emerconfigFuelG2); - } - - if (fbw.FBW.Computers.fac1.getBoolValue() == 0 and emerconfigFAC.clearFlag == 0) { - emerconfigFAC.active = 1; - } else { ECAM_controller.warningReset(emerconfigFAC); } - if (!getprop("/controls/electrical/switches/bus-tie") and emerconfigBusTie2.clearFlag == 0) { + if (!systems.ELEC.Switch.busTie.getBoolValue() and emerconfigBusTie2.clearFlag == 0) { emerconfigBusTie2.active = 1; } else { ECAM_controller.warningReset(emerconfigBusTie2); } - if (emerconfigAPU.clearFlag == 0) { - emerconfigAPU.active = 1; + if (FWC.Timer.gnd.getValue() == 0) { + if (emerconfigAPU.clearFlag == 0) { + emerconfigAPU.active = 1; + } else { + ECAM_controller.warningReset(emerconfigAPU); + } + + if (emerconfigVent.clearFlag == 0) { + emerconfigVent.active = 1; + } else { + ECAM_controller.warningReset(emerconfigVent); + } } else { ECAM_controller.warningReset(emerconfigAPU); - } - - if (emerconfigVent.clearFlag == 0) { - emerconfigVent.active = 1; - } else { ECAM_controller.warningReset(emerconfigVent); } + if (emerconfigFuelIN.clearFlag == 0 and warningNodes.Logic.dc2FuelConsumptionIncreased.getValue()) { + emerconfigFuelIN.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFuelIN); + } + + if (emerconfigFMSPRD.clearFlag == 0 and warningNodes.Logic.dc2FMSPredictions.getValue()) { + emerconfigFMSPRD.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFMSPRD); + } } else { ECAM_controller.warningReset(emerconfig); ECAM_controller.warningReset(emerconfigMinRat); @@ -944,13 +957,14 @@ var messages_priority_3 = func { ECAM_controller.warningReset(emerconfigManOn); ECAM_controller.warningReset(emerconfigEngMode); ECAM_controller.warningReset(emerconfigRadio); - ECAM_controller.warningReset(emerconfigIcing); ECAM_controller.warningReset(emerconfigFuelG); ECAM_controller.warningReset(emerconfigFuelG2); ECAM_controller.warningReset(emerconfigFAC); ECAM_controller.warningReset(emerconfigBusTie2); ECAM_controller.warningReset(emerconfigAPU); ECAM_controller.warningReset(emerconfigVent); + ECAM_controller.warningReset(emerconfigFuelIN); + ECAM_controller.warningReset(emerconfigFMSPRD); } if (hydBYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.blueYellow.getValue()) { @@ -2661,7 +2675,7 @@ var messages_right_memo = func { ptu.active = 0; } - if (getprop("/systems/hydraulic/sources/rat/position") != 0) { + if (systems.HYD.Rat.position.getValue() != 0) { rat.active = 1; } else { rat.active = 0; @@ -2673,7 +2687,7 @@ var messages_right_memo = func { rat.colour = "g"; } - if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and !pts.Gear.wow[1].getValue()) { + if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 1 and systems.HYD.Rat.position.getValue() != 0 and !pts.Gear.wow[1].getValue()) { emer_gen.active = 1; } else { emer_gen.active = 0; diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 26092743..2eb13a47 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -188,14 +188,16 @@ var warnings = std.Vector.new([ var lavatorySmoke = warning.new(msg: "SMOKE LAVATORY SMOKE ", colour: "r", aural: 0, light: 0, isMainMsg: 1), var lavatorySmokeComm = warning.new(msg: "-CKPT/CAB COM.ESTABLISH ", colour: "c"), + # EXCES RESID PR + var excessResidPress = warning.new(msg: "CAB PR EXCES RESIDUAL PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var excessResidPressPack1 = warning.new(msg: "-PACK 1.............OFF", colour: "c"), + var excessResidPressPack2 = warning.new(msg: "-PACK 2.............OFF", colour: "c"), + var excessResidPressCabCr = warning.new(msg: "-CABIN CREW.......ALERT", colour: "c"), + # ESS Bus on Bat + # NEW EMER CONFIG var essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1), - var essBusOnBatLGUplock = warning.new(msg: " •WHEN L/G UPLOCKED :", colour: "w", isMainMsg: 1), - var essBusOnBatManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"), - var essBusOnBatRetract = warning.new(msg: " •IF L/G RETRACT FAULT:", colour: "w", isMainMsg: 1), - var essBusOnBatMinSpeed = warning.new(msg: " MIN RAT SPD......180 KT", colour: "c"), - var essBusOnBatLGCB = warning.new(msg: " -LGCIU1 C/B (C09)..PULL", colour: "c"), - var essBusOnBatManOn2 = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"), + var essBusOnBatMinSpeed = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"), # Emer Config var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, isMainMsg: 1), @@ -207,13 +209,14 @@ var warnings = std.Vector.new([ var emerconfigManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"), var emerconfigEngMode = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"), var emerconfigRadio = warning.new(msg: " -VHF1/ATC1..........USE", colour: "c"), - var emerconfigIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), var emerconfigFuelG = warning.new(msg: " FUEL GRVTY FEED", colour: "c"), var emerconfigFuelG2 = warning.new(msg: " PROC:GRVTY FUEL FEEDING", colour: "c"), var emerconfigFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"), var emerconfigBusTie2 = warning.new(msg: " -BUS TIE...........AUTO", colour: "c"), var emerconfigAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"), var emerconfigVent = warning.new(msg: " -BLOWER + EXTRACT..OVRD", colour: "c"), + var emerconfigFuelIN = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"), + var emerconfigFMSPRD = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), # B + Y LO PR var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1), diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index ff21dced..0ebb8a29 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -1848,6 +1848,7 @@ /systems/electrical/some-electric-thingie/emer-elec-config eq 1 /systems/electrical/some-electric-thingie/generator-1-pb eq 1 + /controls/electrical/switches/gen-1 eq 1 /controls/electrical/switches/bus-tie eq 0 @@ -1857,6 +1858,7 @@ /systems/electrical/some-electric-thingie/emer-elec-config eq 1 /systems/electrical/some-electric-thingie/generator-2-pb eq 1 + /controls/electrical/switches/gen-2 eq 1 /controls/electrical/switches/bus-tie eq 0 @@ -1866,6 +1868,7 @@ /systems/electrical/some-electric-thingie/emer-elec-config eq 1 /systems/electrical/some-electric-thingie/generator-1-pb eq 1 + /controls/electrical/switches/gen-1 eq 1 @@ -1874,6 +1877,7 @@ /systems/electrical/some-electric-thingie/emer-elec-config eq 1 /systems/electrical/some-electric-thingie/generator-2-pb eq 1 + /controls/electrical/switches/gen-2 eq 1 diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index ccf85bd9..194bf319 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -1474,8 +1474,8 @@ - /systems/hydraulics/warnings/green-lo-pr eq 0 - /systems/hydraulics/warnings/yellow-lo-pr eq 0 + /systems/hydraulic/warnings/green-lo-pr eq 0 + /systems/hydraulic/warnings/yellow-lo-pr eq 0 @@ -1684,6 +1684,86 @@ + + + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 + /systems/electrical/some-electric-thingie/emer-elec-config eq 1 + /systems/electrical/some-electric-thingie/emer-elec-config-20-sec eq 1 + + + + + + + /ECAM/warnings/logic/BLUE-EMER-ELEC NE 1 + fcs/slat-pos-rate eq 0 + fcs/slat-pos-deg ge 2 + + + + + + + fcs/flap-pos-rate eq 0 + fcs/flap-pos-deg ge 2 + + + + + + + /ECAM/timer/ground-calc eq 0 + /ECAM/dual-failure-enabled eq 0 + + + + /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1 + /systems/electrical/bus/dc-ess lt 25 + + /ECAM/warnings/logic/SFLAPEXT eq 1 + + + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 + /systems/electrical/bus/dc-ess lt 25 + + /ECAM/warnings/logic/SSLATEXT eq 1 + + + + + hydraulics/aileron-l/pressure-switch-or eq 1 + + /systems/fctl/elac1 eq 0 + /systems/hydraulic/blue-psi lt 1500 + + /ECAM/warnings/logic/BLUE-EMER-ELEC ne 1 + + + hydraulics/aileron-r/pressure-switch-or eq 1 + + /systems/fctl/elac1 eq 0 + /systems/hydraulic/green-psi lt 1500 + + + + + /gear/gear[0]/position-norm eq 0 + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 0 + + + + + + + + + + /ECAM/warnings/logic/dc-2-fuel-consumption-increased eq 1 + /systems/electrical/relay/dc-ess-shed-switch/contact-pos eq 0 + + @@ -2610,7 +2690,7 @@ - /systems/hydraulics/warnings/blue-lo-pr eq 1 + /systems/hydraulic/warnings/blue-lo-pr eq 1 /ECAM/warnings/hyd/engines-2-online eq 1 /ECAM/warnings/hyd/engines-2-off-in-air-output eq 1 @@ -2621,7 +2701,7 @@ - /systems/hydraulics/warnings/green-lo-pr eq 1 + /systems/hydraulic/warnings/green-lo-pr eq 1 /ECAM/warnings/hyd/engine-1-start-output eq 1 @@ -2629,7 +2709,7 @@ - /systems/hydraulics/warnings/yellow-lo-pr eq 1 + /systems/hydraulic/warnings/yellow-lo-pr eq 1 /ECAM/warnings/hyd/engine-2-start-output eq 1 diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml index 097c3c47..67e33fbb 100644 --- a/Systems/a320-hydraulic.xml +++ b/Systems/a320-hydraulic.xml @@ -610,34 +610,34 @@ - + /systems/hydraulic/blue-psi lt 1750 - /systems/hydraulics/warnings/blue-lo-pr eq 1 + /systems/hydraulic/warnings/blue-lo-pr eq 1 /systems/hydraulic/blue-psi lt 1450 - + /systems/hydraulic/green-psi lt 1750 - /systems/hydraulics/warnings/green-lo-pr eq 1 + /systems/hydraulic/warnings/green-lo-pr eq 1 /systems/hydraulic/green-psi lt 1450 - + /systems/hydraulic/yellow-psi lt 1750 - /systems/hydraulics/warnings/yellow-lo-pr eq 1 + /systems/hydraulic/warnings/yellow-lo-pr eq 1 /systems/hydraulic/yellow-psi lt 1450 diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index be08bc8a..d5a55c1a 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -6,24 +6,22 @@ monostable - true - /controls/electrical/switches/gen-1 + /controls/electrical/switches/gen-1 /systems/electrical/some-electric-thingie/generator-1-pb monostable - true - /controls/electrical/switches/gen-2 + /controls/electrical/switches/gen-2 /systems/electrical/some-electric-thingie/generator-2-pb @@ -80,6 +78,18 @@ /systems/electrical/some-electric-thingie/generator-2-reset + + monostable + + + /systems/electrical/some-electric-thingie/emer-elec-config + + /systems/electrical/some-electric-thingie/emer-elec-config-20-sec + + + RS