From c0ae1c58f49e4428f3c954e0585e6c5f201503a4 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 28 Dec 2021 12:43:14 +0000 Subject: [PATCH 01/42] FMGC: remove properties for navDatabase --- Models/Instruments/MCDU/MCDU.nas | 9 +++---- Nasal/FMGC/FMGC.nas | 44 +++++++++++++++++--------------- Nasal/MCDU/MCDU.nas | 4 --- 3 files changed, 26 insertions(+), 31 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 307a733a..29e8c013 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -81,9 +81,6 @@ var mcdu1_lgt = props.globals.getNode("/controls/lighting/DU/mcdu1", 1); var mcdu2_lgt = props.globals.getNode("/controls/lighting/DU/mcdu2", 1); var acType = props.globals.getNode("/MCDUC/type", 1); var engType = props.globals.getNode("/MCDUC/eng", 1); -var database1 = props.globals.getNode("/FMGC/internal/navdatabase", 1); -var database2 = props.globals.getNode("/FMGC/internal/navdatabase2", 1); -var databaseCode = props.globals.getNode("/FMGC/internal/navdatabasecode", 1); # INT-A var ADIRSMCDUBTN = props.globals.getNode("/controls/adirs/mcducbtn", 1); @@ -2134,9 +2131,9 @@ var canvas_MCDU_base = { } me["Simple_L1"].setText(sprintf("%s", engType.getValue())); - me["Simple_L2"].setText(sprintf("%s", " " ~ database1.getValue())); - me["Simple_L3"].setText(sprintf("%s", " " ~ database2.getValue())); - me["Simple_R2"].setText(sprintf("%s", databaseCode.getValue() ~ " ")); + me["Simple_L2"].setText(" " ~ fmgc.navDataBase.currentDate); + me["Simple_L3"].setText(" " ~ fmgc.navDataBase.standbyDate); + me["Simple_R2"].setText(fmgc.navDataBase.currentCode); if (fmgc.WaypointDatabase.getCount() >= 1) { me["Simple_R4"].show(); diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 7ca79fe1..0e2a1060 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -4,11 +4,6 @@ ################## # Init Functions # ################## - -var database1 = 0; -var database2 = 0; -var code1 = 0; -var code2 = 0; var gear0 = 0; var state1 = 0; var state2 = 0; @@ -918,18 +913,16 @@ var masterFMGC = maketimer(0.2, func { ############################ #handle radios, runways, v1/vr/v2 ############################ -var airportRadiosPhase = nil; var updateAirportRadios = func { - - airportRadiosPhase = FMGCInternal.phase; - departure_rwy = fmgc.flightPlanController.flightplans[2].departure_runway; destination_rwy = fmgc.flightPlanController.flightplans[2].destination_runway; - if (airportRadiosPhase >= 2 and destination_rwy != nil) { + + if (FMGCInternal.phase >= 2 and destination_rwy != nil) { var airport = airportinfo(FMGCInternal.arrApt); setprop("/FMGC/internal/ldg-elev", airport.elevation * M2FT); # eventually should be runway elevation - magnetic_hdg = geo.normdeg(destination_rwy.heading - getprop("/environment/magnetic-variation-deg")); + magnetic_hdg = geo.normdeg(destination_rwy.heading - pts.Environment.magVar.getValue()); runway_ils = destination_rwy.ils_frequency_mhz; + if (runway_ils != nil and !fmgc.FMGCInternal.ILS.freqSet and !fmgc.FMGCInternal.ILS.crsSet) { fmgc.FMGCInternal.ILS.freqCalculated = runway_ils; pts.Instrumentation.Nav.Frequencies.selectedMhz[0].setValue(runway_ils); @@ -940,9 +933,10 @@ var updateAirportRadios = func { } elsif (!fmgc.FMGCInternal.ILS.crsSet) { pts.Instrumentation.Nav.Radials.selectedDeg[0].setValue(magnetic_hdg); } - } elsif (airportRadiosPhase <= 1 and departure_rwy != nil) { - magnetic_hdg = geo.normdeg(departure_rwy.heading - getprop("/environment/magnetic-variation-deg")); + } elsif (FMGCInternal.phase <= 1 and departure_rwy != nil) { + magnetic_hdg = geo.normdeg(departure_rwy.heading - pts.Environment.magVar.getValue()); runway_ils = departure_rwy.ils_frequency_mhz; + if (runway_ils != nil and !fmgc.FMGCInternal.ILS.freqSet and !fmgc.FMGCInternal.ILS.crsSet) { fmgc.FMGCInternal.ILS.freqCalculated = runway_ils; pts.Instrumentation.Nav.Frequencies.selectedMhz[0].setValue(runway_ils); @@ -1124,15 +1118,23 @@ var ManagedSPD = maketimer(0.25, func { } }); +# Nav Database +var navDataBase = { + currentCode: "AB20170101", + currentDate: "01JAN-28JAN", + standbyCode: "AB20170102", + standbyDate: "29JAN-26FEB", +}; + +var tempStoreCode = nil; +var tempStoreDate = nil; var switchDatabase = func { - database1 = getprop("/FMGC/internal/navdatabase"); - database2 = getprop("/FMGC/internal/navdatabase2"); - code1 = getprop("/FMGC/internal/navdatabasecode"); - code2 = getprop("/FMGC/internal/navdatabasecode2"); - setprop("/FMGC/internal/navdatabase", database2); - setprop("/FMGC/internal/navdatabase2", database1); - setprop("/FMGC/internal/navdatabasecode", code2); - setprop("/FMGC/internal/navdatabasecode2", code1); + tempStoreCode = navDataBase.currentCode; + tempStoreDate = navDataBase.currentDate; + navDataBase.currentCode = navDataBase.standbyCode; + navDataBase.currentDate = navDataBase.standbyDate; + navDataBase.standbyCode = tempStoreCode; + navDataBase.standbyDate = tempStoreDate; } # Landing to phase 7 diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 8931782a..37eae63f 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -25,10 +25,6 @@ var MCDU_reset = func(i) { setprop("/FMGC/keyboard-right", 0); #ACCONFIG - setprop("/FMGC/internal/navdatabase", "01JAN-28JAN"); - setprop("/FMGC/internal/navdatabase2", "29JAN-26FEB"); - setprop("/FMGC/internal/navdatabasecode", "AB20170101"); - setprop("/FMGC/internal/navdatabasecode2", "AB20170102"); setprop("/FMGC/print/mcdu/page1/L1auto", 0); setprop("/FMGC/print/mcdu/page1/L2auto", 0); setprop("/FMGC/print/mcdu/page1/L3auto", 0); From 5e61555eb5c75e1a60b228009d1aa1ce5ac9c110 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 28 Dec 2021 12:59:08 +0000 Subject: [PATCH 02/42] Optimize FMGC timers --- Nasal/FMGC/FMGC.nas | 49 ++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 0e2a1060..444dd65b 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -66,14 +66,13 @@ var FMGCinit = func { FMGCInternal.mngSpdCmd = 157; FMGCInternal.mngKtsMach = 0; FMGCInternal.machSwitchover = 0; - setprop("/FMGC/internal/loc-source", "NAV0"); setprop("/FMGC/internal/optalt", 0); - setprop("/FMGC/internal/landing-time", -99); + FMGCInternal.landingTime = -99; + FMGCInternal.blockFuelTime = -99; + FMGCInternal.fuelPredTime = -99; FMGCAlignTime[0].setValue(-99); FMGCAlignTime[1].setValue(-99); FMGCAlignTime[2].setValue(-99); - setprop("/FMGC/internal/block-fuel-time", -99); - setprop("/FMGC/internal/fuel-pred-time", -99); masterFMGC.start(); radios.start(); } @@ -217,6 +216,10 @@ var FMGCInternal = { mngSpd: 0, mngSpdCmd: 0, + landingTime: -99, + blockFuelTime: -99, + fuelPredTime: -99, + # RADNAV ADF1: { freqSet: 0, @@ -1138,15 +1141,15 @@ var switchDatabase = func { } # Landing to phase 7 -setlistener("/gear/gear[1]/wow", func() { - if (getprop("/gear/gear[1]/wow") == 0 and timer30secLanding.isRunning) { +setlistener("/gear/gear[1]/wow", func(val) { + if (val.getValue() == 0 and timer30secLanding.isRunning) { timer30secLanding.stop(); - setprop("/FMGC/internal/landing-time", -99); + FMGCInternal.landingTime = -99; } - if (pts.Gear.wow[1].getValue() and getprop("/FMGC/internal/landing-time") == -99) { + if (val.getValue() and FMGCInternal.landingTime == -99) { timer30secLanding.start(); - setprop("/FMGC/internal/landing-time", pts.Sim.Time.elapsedSec.getValue()); + FMGCInternal.landingTime = pts.Sim.Time.elapsedSec.getValue(); } }, 0, 0); @@ -1189,34 +1192,34 @@ setlistener("/systems/navigation/adr/operating-3", func() { # Calculate Block Fuel setlistener("/FMGC/internal/block-calculating", func() { if (timer3blockFuel.isRunning) { - setprop("/FMGC/internal/block-fuel-time", -99); + FMGCInternal.blockFuelTime = -99; timer3blockFuel.start(); - setprop("/FMGC/internal/block-fuel-time", pts.Sim.Time.elapsedSec.getValue()); + FMGCInternal.blockFuelTime = pts.Sim.Time.elapsedSec.getValue(); } - if (getprop("/FMGC/internal/block-fuel-time") == -99) { + if (FMGCInternal.blockFuelTime == -99) { timer3blockFuel.start(); - setprop("/FMGC/internal/block-fuel-time", pts.Sim.Time.elapsedSec.getValue()); + FMGCInternal.blockFuelTime = pts.Sim.Time.elapsedSec.getValue(); } }, 0, 0); # Calculate Fuel Prediction setlistener("/FMGC/internal/fuel-calculating", func() { if (timer5fuelPred.isRunning) { - setprop("/FMGC/internal/fuel-pred-time", -99); + FMGCInternal.fuelPredTime = -99; timer5fuelPred.start(); - setprop("/FMGC/internal/fuel-pred-time", pts.Sim.Time.elapsedSec.getValue()); + FMGCInternal.fuelPredTime = pts.Sim.Time.elapsedSec.getValue(); } - if (getprop("/FMGC/internal/fuel-pred-time") == -99) { + if (FMGCInternal.fuelPredTime == -99) { timer5fuelPred.start(); - setprop("/FMGC/internal/fuel-pred-time", pts.Sim.Time.elapsedSec.getValue()); + FMGCInternal.fuelPredTime = pts.Sim.Time.elapsedSec.getValue(); } }, 0, 0); # Maketimers var timer30secLanding = maketimer(1, func() { - if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/landing-time") + 30) { + if (pts.Sim.Time.elapsedSec.getValue() > FMGCInternal.landingTime + 30) { FMGCInternal.phase = 7; if (FMGCInternal.costIndexSet) { @@ -1224,7 +1227,7 @@ var timer30secLanding = maketimer(1, func() { } else { setprop("/FMGC/internal/last-cost-index", 0); } - setprop("/FMGC/internal/landing-time", -99); + FMGCInternal.landingTime = -99; timer30secLanding.stop(); } }); @@ -1254,21 +1257,21 @@ var timer48gpsAlign3 = maketimer(1, func() { }); var timer3blockFuel = maketimer(1, func() { - if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/block-fuel-time") + 3) { + if (pts.Sim.Time.elapsedSec.getValue() > FMGCInternal.blockFuelTime + 3) { #updateFuel(); fmgc.FMGCInternal.blockCalculating = 0; fmgc.blockCalculating.setValue(0); - setprop("/FMGC/internal/block-fuel-time", -99); + FMGCInternal.blockFuelTime = -99; timer3blockFuel.stop(); } }); var timer5fuelPred = maketimer(1, func() { - if (pts.Sim.Time.elapsedSec.getValue() > getprop("/FMGC/internal/fuel-pred-time") + 5) { + if (pts.Sim.Time.elapsedSec.getValue() > FMGCInternal.fuelPredTime + 5) { #updateFuel(); fmgc.FMGCInternal.fuelCalculating = 0; fmgc.fuelCalculating.setValue(0); - setprop("/FMGC/internal/fuel-pred-time", -99); + FMGCInternal.fuelPredTime = -99; timer5fuelPred.stop(); } }); \ No newline at end of file From 7dfd9f15ff8e92c7da71f0046d77fdcb869aa1cc Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 30 Dec 2021 13:46:35 +0000 Subject: [PATCH 03/42] APU: make the code shutting down the APU after 0.2 seconds of power loss more resilient, uisng JSBSim --- Nasal/Systems/APU.nas | 31 ++--- Systems/a320-apu.xml | 275 +++++++++++++++++++++++------------------- 2 files changed, 161 insertions(+), 145 deletions(-) diff --git a/Nasal/Systems/APU.nas b/Nasal/Systems/APU.nas index 0ec3635c..919c9cf6 100644 --- a/Nasal/Systems/APU.nas +++ b/Nasal/Systems/APU.nas @@ -273,24 +273,6 @@ var APU = { me.autoStop(); } - if (systems.ELEC.Bus.dcBat.getValue() < 25) { - if (!me._powerLost) { - me._powerLost = 1; - settimer(func() { - if (me._powerLost) { - if (me.GenericControls.starter.getValue()) { - me.GenericControls.starter.setValue(0); - } - if (me.state != 0) { - me.autoStop(); - } - } - }, 0.2); - } - } else { - me._powerLost = 0; - } - if (systems.ELEC.EmerElec.getValue() == 1 and (systems.ELEC.EmerElec45.getValue() != 1 and systems.ELEC.Source.EmerGen.voltsRelay.getValue() < 110)) { me.inhibitEMERELEC = 1; } else { @@ -316,6 +298,19 @@ var APUController = { } }; +setlistener("/systems/apu/shutdown-power-loss", func(val) { + if (APUController.APU != nil) { + if (val.getBoolValue()) { + if (APUController.APU.GenericControls.starter.getValue()) { + APUController.APU.GenericControls.starter.setValue(0); + } + if (APUController.APU.state != 0) { + APUController.APU.autoStop(); + } + } + } +}, 0, 0); + var _masterTime = 0; setlistener("/controls/apu/master", func() { if (APUController.APU != nil) { diff --git a/Systems/a320-apu.xml b/Systems/a320-apu.xml index f6ad2161..f4ae5c9c 100644 --- a/Systems/a320-apu.xml +++ b/Systems/a320-apu.xml @@ -7,52 +7,52 @@ - + - - - - - /controls/pneumatics/switches/apu - 1 - - 252 - 0 - - - - - - - - - - /systems/electrical/relay/apu-glc/output - 110 - - 132 - 0 - - - - - - - - - /systems/apu/electrical-load-kw - /systems/apu/bleed-load-kw - - 400 - - - - - - /systems/apu/apu-load-cmd - 0.01 - - + + + + + /controls/pneumatics/switches/apu + 1 + + 252 + 0 + + + + + + + + + + /systems/electrical/relay/apu-glc/output + 110 + + 132 + 0 + + + + + + + + + /systems/apu/electrical-load-kw + /systems/apu/bleed-load-kw + + 400 + + + + + + /systems/apu/apu-load-cmd + 0.01 + + /engines/engine[2]/n1 1 @@ -60,60 +60,60 @@ - - - /systems/apu/apu-load - 50 - - - - - /engines/engine[2]/n1 - 0.5 - - - /systems/apu/dn-dt - 0 - - - - /engines/engine[2]/n1 - - 5.0 20.0 - 8.0 45.0 - 10.0 120.0 - 12.0 225.0 - 18.0 430.0 - 25.0 500.0 - 27.0 560.0 - 30.0 720.0 - 35.0 785.0 - 40.0 800.0 - 45.0 795.0 - 50.0 785.0 - 60.0 755.0 - 75.0 645.0 - 90.0 520.0 - 100.0 415.0 - -
- - /engines/engine[2]/n1 - - 2.0 200.0 - 8.0 220.0 - 12.0 225.0 - 18.0 240.0 - 30.0 250.0 - 50.0 265.0 - 60.0 295.0 - 75.0 380.0 - 90.0 410.0 - 100.0 415.0 - -
-
-
+ + + /systems/apu/apu-load + 50 + + + + + /engines/engine[2]/n1 + 0.5 + + + /systems/apu/dn-dt + 0 + + + + /engines/engine[2]/n1 + + 5.0 20.0 + 8.0 45.0 + 10.0 120.0 + 12.0 225.0 + 18.0 430.0 + 25.0 500.0 + 27.0 560.0 + 30.0 720.0 + 35.0 785.0 + 40.0 800.0 + 45.0 795.0 + 50.0 785.0 + 60.0 755.0 + 75.0 645.0 + 90.0 520.0 + 100.0 415.0 + +
+ + /engines/engine[2]/n1 + + 2.0 200.0 + 8.0 220.0 + 12.0 225.0 + 18.0 240.0 + 30.0 250.0 + 50.0 265.0 + 60.0 295.0 + 75.0 380.0 + 90.0 410.0 + 100.0 415.0 + +
+
+
@@ -137,31 +137,31 @@ - - + + - - - 1.0 - - /systems/apu/apu-load - 0.3 - - - - /systems/apu/oil/oil-pressure-psi - - 0 0 - 25 135 - 35 105 - 55 85 - -
- - /engines/engine[2]/n1 - 100 - -
+ + + 1.0 + + /systems/apu/apu-load + 0.3 + + + + /systems/apu/oil/oil-pressure-psi + + 0 0 + 25 135 + 35 105 + 55 85 + +
+ + /engines/engine[2]/n1 + 100 + +
@@ -170,10 +170,10 @@ /systems/apu/oil/level-l - - /engines/engine[2]/n1 - 100 - + + /engines/engine[2]/n1 + 100 + /systems/apu/oil/allow-oil-consumption -0.00000131437 simulation/channel-dt @@ -182,6 +182,27 @@ /systems/apu/oil/level-l
+ + + + + /systems/electrical/bus/dc-bat lt 25 + + + + + /systems/apu/shutdown-power-loss-cmd + 5 + 100 + + + + + + /systems/apu/shutdown-power-loss-timer eq 1 + + +
From 34acba26f4418c7b901284680f54b8496065b2f6 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 30 Dec 2021 14:05:31 +0000 Subject: [PATCH 04/42] EMER ELEC - improve warning so that it deals correctly with APU available signal, GEN fault signals This should reduce the number of transients. Also added a small 200ms delay --- Nasal/ECAM/ECAM-logic.nas | 4 ++-- Systems/a320-electrical.xml | 23 ++++++++++++++++++----- Systems/a320-fwc.xml | 8 ++++---- 3 files changed, 24 insertions(+), 11 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 987914b4..4b9cb0da 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -3564,13 +3564,13 @@ var messages_right_memo = func { wing_aice.active = 0; } - if (systems.PNEU.Switch.apu.getValue() == 1 and pts.APU.rpm.getValue() >= 95) { + if (systems.PNEU.Switch.apu.getValue() == 1 and systems.PNEU.Valves.apu.getValue() != 0 and systems.APUController.APU != nil and systems.APUController.APU.signals.available.getBoolValue()) { apu_bleed.active = 1; } else { apu_bleed.active = 0; } - if (apu_bleed.active == 0 and pts.APU.rpm.getValue() >= 95) { + if (apu_bleed.active == 0 and systems.APUController.APU != nil and systems.APUController.APU.signals.available.getBoolValue()) { apu_avail.active = 1; } else { apu_avail.active = 0; diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index 9b416c21..94aa069d 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -2153,7 +2153,7 @@ - + /systems/electrical/bus/ac-1 lt 110 @@ -2163,20 +2163,33 @@ /systems/electrical/relay/ext-epc/contact-pos eq 0 /controls/electrical/switches/gen-1 eq 0 - /systems/failures/electrical/gen-1 eq 1 + /ECAM/warnings/logic/gen-1-inop eq 1 /controls/electrical/switches/gen-2 eq 0 - /systems/failures/electrical/gen-2 eq 1 + /ECAM/warnings/logic/gen-2-inop eq 1 /controls/electrical/switches/apu eq 0 - /systems/failures/electrical/apu eq 1 - /engines/engine[2]/n1 lt 94.9 + /ECAM/warnings/logic/apu-gen-fault eq 1 + /systems/apu/available eq 0 + + /systems/electrical/some-electric-thingie/emer-elec-config-cmd + 5 + 100 + + + + + + /systems/electrical/some-electric-thingie/emer-elec-config-timer eq 1 + + + diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index a88998b0..a132a408 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -2822,7 +2822,7 @@ - + /engines/engine[0]/n2-actual lt 59.4 @@ -2830,8 +2830,8 @@ - - /ECAM/warnings/logic/eng/dual-failure-5-sec-input + + /ECAM/warnings/logic/eng/dual-failure-2-sec-input 0.5 100 @@ -2859,7 +2859,7 @@ /controls/engines/engine[0]/cutoff-switch eq 1 /controls/engines/engine[1]/cutoff-switch eq 1 - /ECAM/warnings/logic/eng/dual-failure-5-sec eq 1 + /ECAM/warnings/logic/eng/dual-failure-2-sec eq 1 From 2b8953ff63e399cd8a9bfeac1de8f9034214d107 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 30 Dec 2021 15:44:35 +0000 Subject: [PATCH 05/42] GEN FAULT lights: adjust power supply to GCU --- Models/Instruments/OHpanel/OHpanel.xml | 48 ++++++++++++++------------ 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 632b258a..9b5b6504 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -71,9 +71,7 @@ ELAC1Btn2O FAC1Btn1F FAC1Btn2O - Gen1Btn1F Gen1Btn2O - Gen2Btn1F Gen2Btn2O SEC1Btn1F SEC1Btn2O @@ -3271,16 +3269,19 @@ select Gen1Btn1F - - - systems/electrical/light/gen-1-fault - 1 - - - controls/switches/annun-test - 1 - - + + + + systems/electrical/light/gen-1-fault + 1 + + + controls/switches/annun-test + 1 + + + /systems/electrical/sources/idg-1/gcu-1-powered + @@ -3581,16 +3582,19 @@ select Gen2Btn1F - - - systems/electrical/light/gen-2-fault - 1 - - - controls/switches/annun-test - 1 - - + + + + systems/electrical/light/gen-2-fault + 1 + + + controls/switches/annun-test + 1 + + + /systems/electrical/sources/idg-2/gcu-2-powered + From e32d066631edb3a856d2411dd582553435a806bd Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 30 Dec 2021 20:22:54 +0000 Subject: [PATCH 06/42] All LED pushbuttons, FCU display now have their correct power source, 5VAC --- Models/FlightDeck/a320.flightdeck.xml | 300 +++++++++++------- Models/Instruments/OHpanel/OHpanel.xml | 422 ++++++++++++++----------- Systems/a320-lights.xml | 7 +- 3 files changed, 411 insertions(+), 318 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 6744b7b6..f5d94e87 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -557,14 +557,6 @@ radar_glare - - select - engine_fault_1 - - systems/unused/unused-ped - - - select engine_fire_1 @@ -585,15 +577,7 @@ 1.0 - - - select - engine_fault_2 - - systems/unused/unused-ped - - - + select engine_fire_2 @@ -1058,12 +1042,13 @@ Aircraft/A320-family/Models/Instruments/IESI/IESI.xml - + + + + + select - abs_low_on - abs_med_on - abs_max_on alt-text alt-text-test ap1_led @@ -1071,9 +1056,9 @@ appr_led arpt_led arpt_led.001 - a-thr_led atc-code atc-test + a-thr_led audio_att_led audio_att_sgn audio_call_hf2_led @@ -1085,19 +1070,165 @@ audio_hf2_led audio_mech_led audio_mech_sgn + audio_pa_led audio_voice_led audio_vhf1_led audio_vhf2_led audio_vhf3_led - autoland_light_on - brk_fan_on - brk_hot_on - cstr_led cstr_led.001 + exped_led + fcu_screen + fd1_led + fd2_led + fpa-text + hdg-text + hdg-text-test + ils_led + ils2_led + loc_led + mach-text + ndb_led + ndb_led.001 + qnh-hpa + qnh-inhg + qnh-std + qnh-test + radio_adf_led + radio_am_led + radio_bfo_led + radio_hf1_led + radio_hf2_led + radio_ls_led + radio_nav_led + radio_opt_led + radio_vhf1_led + radio_vhf2_led + radio_vhf3_led + radio_vor_led + spd-text + spd-text-test + vord_led + vord_led.001 + vs-text + vs-text-last-2-digits + vs-text-test + wpt_led + wpt_led.001 + + + + systems/electrical/bus/ac-si-bus + 110 + + + systems/electrical/bus/ac-ess-shed + 110 + + + + + + + + select + autoland_light_on + master_caution_on + master_warning_on + + + + systems/electrical/bus/ac-si-bus + 110 + + + systems/electrical/bus/ac-ess-shed + 110 + + + /systems/electrical/bus/ac-2 + 110 + + + + + + + + select + engine_fire_1 + engine_fire_2 + gear_lever_down_arrow + lgear_down + lgear_unlk + ngear_down + ngear_unlk + rgear_down + rgear_unlk + + + + systems/electrical/bus/ac-si-bus + 110 + + + systems/electrical/bus/ac-ess-shed + 110 + + + + + + + + + select + brk_fan_on + brk_hot_on + CockpitDoorFault + CockpitDoorOpen + engine_fault_1 + engine_fault_2 + prio_fo.arrow + prio_fo_fo + + + /systems/electrical/bus/ac-2 + 110 + + + + + + + + select + abs_low_on + abs_med_on + abs_max_on dec_low_on dec_med_on dec_max_on + prio_capt.arrow + prio_capt.arrow.001 + prio_capt.capt + prio_capt.capt.001 + radio_sel_led + terr_on_nd_on_l + terr_on_nd_on_r + + + /systems/electrical/bus/ac-1 + 110 + + + + + + + select ecam_apu_led ecam_bleed_led ecam_cond_led @@ -1114,59 +1245,9 @@ ecam_press_led ecam_sts_led ecam_wheel_led - exped_led - fcu_screen - fd1_led - fd2_led - fpa-text - hdg-text - hdg-text-test - ils_led - ils2_led - lgear_down - lgear_unlk - loc_led - mach-text - master_caution_on - master_warning_on - ndb_led - ndb_led.001 - ngear_down - ngear_unlk - qnh-hpa - qnh-inhg - qnh-std - qnh-test - radio_adf_led - radio_am_led - radio_bfo_led - radio_hf1_led - radio_hf2_led - radio_ls_led - radio_nav_led - radio_opt_led - radio_sel_led - radio_vhf1_led - radio_vhf2_led - radio_vhf3_led - radio_vor_led - rgear_down - rgear_unlk - spd-text - spd-text-test - terr_on_nd_label - terr_on_nd_on_l - terr_on_nd_on_r - vord_led - vord_led.001 - vs-text - vs-text-last-2-digits - vs-text-test - wpt_led - wpt_led.001 - systems/electrical/bus/dc-ess + systems/electrical/bus/dc-2 25 @@ -1201,7 +1282,6 @@ select - atc-test audio_att_sgn audio_call_hf2_led audio_call_hf1_led @@ -5916,28 +5996,16 @@ select gear_lever_down_arrow - - - - systems/electrical/bus/ac-ess - 110 - - - systems/electrical/bus/ac-2 - 110 - - - - - controls/switches/annun-test - 1 - - - ECAM/warnings/landing-gear-warning-light - 1 - - - + + + controls/switches/annun-test + 1 + + + ECAM/warnings/landing-gear-warning-light + 1 + + @@ -5945,28 +6013,16 @@ material gear_lever_down_arrow - - - - systems/electrical/bus/ac-ess - 110 - - - systems/electrical/bus/ac-2 - 110 - - - - - controls/switches/annun-test - 1 - - - ECAM/warnings/landing-gear-warning-light - 1 - - - + + + controls/switches/annun-test + 1 + + + ECAM/warnings/landing-gear-warning-light + 1 + + 1.00 diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 9b5b6504..971d182c 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -8,57 +8,70 @@ - + + select - ACPack1Btn1F - ACPack1Btn2O - ACPack2Btn1F - ACPack2Btn2O - ADR1Btn1F - ADR1Btn2O - ADR2Btn1F - ADR2Btn2O - ADR3Btn1F - ADR3Btn2O - BatteryBtn11F - BatteryBtn21F - BusTieBtn2O - DitchBtn2O - EmerExtLtBtn2O - Eng1AntiIceBtn1F - Eng1AntiIceBtn2O - Eng2AntiIceBtn1F - Eng2AntiIceBtn2O - ExtPwrBtn2O - IR1Btn1F - IR1Btn2O - IR2Btn1F - IR2Btn2O - IR3Btn1F - IR3Btn2O + AftCargoIsoBtn1F + AftCargoIsoBtn2O + APUBleedBtn1F + APUBleedBtn2O + BlueElecPump1F + BlueElecPump2O + CargoHotAirBtn1F + CargoHotAirBtn2O + CrewOxyBtn2O + ExtPwrBtn1A + GalleyPwrBtn1F + GalleyPwrBtn2O + Gen1LineBtn1S + Gen1LineBtn2O + FuelXfeedBtn1O + FuelXfeedBtn2O + LFuelTank1Btn1F + LFuelTank1Btn2O + PassOxyInd1S RamAirBtn2O + RFuelTank1Btn1F + RFuelTank1Btn2O WingAntiIceBtn1F WingAntiIceBtn2O - VentBlowBtn1F - systems/electrical/bus/ac-ess - 5 + systems/electrical/bus/ac-ess-shed + 110 + select + ACPack1Btn1F + ACPack1Btn2O + APUFireAgtBtn1S + APUFireAgtBtn2D APUGenBtn1F APUGenBtn2O APUMasterBtn1F APUMasterBtn2O APUStartBtn1A APUStartBtn2O - APUFireAgtBtn1S - APUFireAgtBtn2D + BatteryBtn11F + BatteryBtn21F + BatteryBtn12O + BatteryBtn22O + BusTieBtn2O + CabinPressModeBtn1F + CabinPressModeBtn2M + DitchBtn2O + ELAC1Btn1F + ELAC1Btn2O + EmerCallBtn1C + EmerCallBtn2O + EmerExtLtBtn2O Eng1FireAgt1Btn1S Eng1FireAgt1Btn2D Eng2FireAgt1Btn1S @@ -67,69 +80,100 @@ Eng1FireAgt2Btn2D Eng2FireAgt2Btn1S Eng2FireAgt2Btn2D - ELAC1Btn1F - ELAC1Btn2O - FAC1Btn1F - FAC1Btn2O - Gen1Btn2O - Gen2Btn2O - SEC1Btn1F - SEC1Btn2O - - - - systems/electrical/bus/ac-si-bus - 5 - - - systems/electrical/bus/ac-ess - 5 - - - - - - - select - ACESSFeedBtn1F - ACESSFeedBtn2A - AftCargoIsoBtn1F - AftCargoIsoBtn2O - AftCargoSmkBtn1S - AftCargoSmkBtn2D - BlueElecPump1F - BlueElecPump2O - CabinPressModeBtn1F - CabinPressModeBtn2M - CabinFansBtn2O - CargoHotAirBtn1F - CargoHotAirBtn2O - CFuelTank1Btn1F - CFuelTank1Btn2O - CFuelTank2Btn1F - CFuelTank2Btn2O - CrewOxyBtn2O - ELAC2Btn1F - ELAC2Btn2O - EmerCallBtn1C - EmerCallBtn2O - EmerGenInd1F Eng1ManStartBtn2O Eng2ManStartBtn2O EvacCommandBtn1E EvacCommandBtn2O + FAC1Btn1F + FAC1Btn2O + Gen1Btn2O + Gen2Btn2O + IDG1Btn1F + IDG2Btn1F + SEC1Btn1F + SEC1Btn2O + VentBlowBtn1F + VentBlowBtn2O + VentExtractBtn1F + VentExtractBtn2O + + + + systems/electrical/bus/ac-si-bus + 110 + + + systems/electrical/bus/ac-ess-shed + 110 + + + + + + + + select + ACESSFeedBtn1F + ACESSFeedBtn2A + ACPack2Btn1F + ACPack2Btn2O + CFuelTank1Btn1F + CFuelTank1Btn2O + ELAC2Btn1F + ELAC2Btn2O + Eng2AntiIceBtn1F + Eng2AntiIceBtn2O + Eng2BleedBtn1F + Eng2BleedBtn2O FAC2Btn1F FAC2Btn2O + LFuelTank2Btn1F + LFuelTank2Btn2O + PrbWinHeatBtn2O + PTU1F + PTU2O + RFuelTank2Btn1F + RFuelTank2Btn2O + SEC2Btn1F + SEC2Btn2O + SEC3Btn1F + SEC3Btn2O + YellowElecPump1F + YellowElecPump2O + YellowEngPump1F + YellowEngPump2O + + + /systems/electrical/bus/ac-2 + 110 + + + + + + + select + ADR1Btn1F + ADR1Btn2O + ADR2Btn1F + ADR2Btn2O + ADR3Btn1F + ADR3Btn2O + AftCargoSmkBtn1S + AftCargoSmkBtn2D + CabinFansBtn2O + CFuelTank2Btn1F + CFuelTank2Btn2O + EmerGenInd1F + Eng1AntiIceBtn1F + Eng1AntiIceBtn2O + Eng1BleedBtn1F + Eng1BleedBtn2O + ExtPwrBtn2O FuelModeBtn1F FuelModeBtn2O - FuelXfeedBtn1O - FuelXfeedBtn2O FwdCargoSmkBtn1S FwdCargoSmkBtn2D - GalleyPwrBtn1F - GalleyPwrBtn2O - Gen1LineBtn1S - Gen1LineBtn2O GPWSBtn1F GPWSBtn2O GPWSFlpBtn2O @@ -141,60 +185,18 @@ GreenEngPump2O HotAirBtn1F HotAirBtn2O - IDG1Btn1F - IDG2Btn1F - LFuelTank1Btn1F - LFuelTank1Btn2O - LFuelTank2Btn1F - LFuelTank2Btn2O - PassOxyInd1S - PrbWinHeatBtn2O - PTU1F - PTU2O - RamAirBtn2O + IR1Btn1F + IR1Btn2O + IR2Btn1F + IR2Btn2O + IR3Btn1F + IR3Btn2O RcdrGndCtlBtn2O - RFuelTank1Btn1F - RFuelTank1Btn2O - RFuelTank2Btn1F - RFuelTank2Btn2O - SEC2Btn1F - SEC2Btn2O - SEC3Btn1F - SEC3Btn2O - VentBlowBtn2O - VentExtractBtn1F - VentExtractBtn2O - YellowElecPump1F - YellowElecPump2O - YellowEngPump1F - YellowEngPump2O - - systems/electrical/bus/dc-ess - 25 - - - - - - select - Eng1BleedBtn1F - Eng1BleedBtn2O - Eng2BleedBtn1F - Eng2BleedBtn2O - APUBleedBtn1F - APUBleedBtn2O - - - - systems/electrical/bus/dc-2 - 25 - - - systems/electrical/bus/dc-ess-shed - 25 - - + + /systems/electrical/bus/ac-1 + 110 + @@ -3041,22 +3043,16 @@ select BatteryBtn12O - - - - controls/electrical/switches/bat-1 - 0 - - - controls/switches/annun-test - 1 - - - - systems/electrical/bus/dc-bat - 25 - - + + + controls/electrical/switches/bat-1 + 0 + + + controls/switches/annun-test + 1 + + @@ -3108,22 +3104,16 @@ select BatteryBtn22O - - - - controls/electrical/switches/bat-2 - 0 - - - controls/switches/annun-test - 1 - - - - systems/electrical/bus/dc-bat - 25 - - + + + controls/electrical/switches/bat-2 + 0 + + + controls/switches/annun-test + 1 + + @@ -3516,18 +3506,10 @@ controls/electrical/ground-cart 1 - - - controls/switches/annun-test - 1 - - - - systems/electrical/bus/ac-ess - 110 - - - + + controls/switches/annun-test + 1 + @@ -6661,10 +6643,28 @@ material Eng1FireBtn - - systems/fire/engine1/warning-active - controls/switches/annun-test - + + + systems/fire/engine1/warning-active + controls/switches/annun-test + + + + + systems/electrical/bus/ac-si-bus + 110 + + + systems/electrical/bus/ac-ess-shed + 110 + + + + /systems/electrical/bus/ac-1 + 110 + + + 1.0 @@ -7008,10 +7008,28 @@ material APUFireBtn - - systems/fire/apu/warning-active - controls/switches/annun-test - + + + systems/fire/apu/warning-active + controls/switches/annun-test + + + + + systems/electrical/bus/ac-si-bus + 110 + + + systems/electrical/bus/ac-ess-shed + 110 + + + + /systems/electrical/bus/ac-1 + 110 + + + 1.0 @@ -7161,10 +7179,28 @@ material Eng2FireBtn - - systems/fire/engine2/warning-active - controls/switches/annun-test - + + + systems/fire/engine2/warning-active + controls/switches/annun-test + + + + + systems/electrical/bus/ac-si-bus + 110 + + + systems/electrical/bus/ac-ess-shed + 110 + + + + /systems/electrical/bus/ac-1 + 110 + + + 1.0 diff --git a/Systems/a320-lights.xml b/Systems/a320-lights.xml index b4f01878..da4104f0 100644 --- a/Systems/a320-lights.xml +++ b/Systems/a320-lights.xml @@ -28,14 +28,15 @@ - /systems/electrical/bus/ac-1 gt 25 + /systems/electrical/bus/ac-1 gt 110 - - /systems/electrical/bus/ac-1 gt 25 + + /systems/electrical/bus/ac-si-bus ge 110 + /systems/electrical/bus/ac-ess-shed ge 110 From fbe796bc83ddf0aa7e0eaaf20098596922ecfa67 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 30 Dec 2021 20:33:41 +0000 Subject: [PATCH 07/42] Cleanup xml --- Models/FlightDeck/a320.flightdeck.xml | 12 +----------- Systems/a320-lights-proprules.xml | 8 -------- Systems/a320-lights.xml | 11 +---------- 3 files changed, 2 insertions(+), 29 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index f5d94e87..b1877ad4 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -1226,7 +1226,7 @@ - + select ecam_apu_led @@ -1245,16 +1245,6 @@ ecam_press_led ecam_sts_led ecam_wheel_led - - - systems/electrical/bus/dc-2 - 25 - - - - - - select rudder-trim-letter rudder-trim diff --git a/Systems/a320-lights-proprules.xml b/Systems/a320-lights-proprules.xml index c1e702cd..9657e427 100644 --- a/Systems/a320-lights-proprules.xml +++ b/Systems/a320-lights-proprules.xml @@ -74,12 +74,4 @@ /controls/lighting/overhead-panel-norm-digital - - - gain - 1.0 - /controls/lighting/annunciator-lights-tied - /controls/lighting/annunciator-lights - - diff --git a/Systems/a320-lights.xml b/Systems/a320-lights.xml index da4104f0..bb66de86 100644 --- a/Systems/a320-lights.xml +++ b/Systems/a320-lights.xml @@ -43,23 +43,14 @@ - /systems/electrical/bus/ac-1 gt 25 + /systems/electrical/bus/ac-1 gt 110 - /systems/electrical/bus/ac-1 gt 25 - - - - - - /systems/electrical/bus/ac-1 gt 110 - /systems/electrical/bus/ac-2 gt 110 - /systems/electrical/bus/dc-2 gt 25 From 92b21d7f1591e2bd89fefc7c637379f44d9205c1 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 31 Dec 2021 15:03:43 +0000 Subject: [PATCH 08/42] Revise Wing Anti Ice fault messages, and correct behavior of wing fault PB light --- Nasal/ECAM/ECAM-logic.nas | 161 +++++++++++++++++++++++++++++++++-- Nasal/ECAM/ECAM-messages.nas | 25 +++--- Nasal/ECAM/ECAM-nodes.nas | 2 + Systems/a320-fwc.xml | 160 +++++++++++++++++++++++++++++++--- Systems/a320-pneumatic.xml | 31 ++++--- Systems/ecam-proprules.xml | 50 +++++++++++ 6 files changed, 385 insertions(+), 44 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 4b9cb0da..c4481bcb 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -1294,7 +1294,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(eng1FailRelight); } - if (warningNodes.Logic.eng1Shutdown.getValue() and eng1ShutDown.clearFlag == 0) { + if (warningNodes.Logic.eng1Shutdown.getValue() and !warningNodes.Logic.eng1Fail.getValue() and eng1ShutDown.clearFlag == 0) { eng1ShutDown.active = 1; if (phaseVar2 != 4 and phaseVar2 != 5 and systems.fireButtons[0].getValue() == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) { @@ -1501,7 +1501,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(eng2FailRelight); } - if (warningNodes.Logic.eng2Shutdown.getValue() and eng2ShutDown.clearFlag == 0) { + if (warningNodes.Logic.eng2Shutdown.getValue() and !warningNodes.Logic.eng2Fail.getValue() and eng2ShutDown.clearFlag == 0) { eng2ShutDown.active = 1; if (phaseVar2 != 4 and phaseVar2 != 5 and systems.fireButtons[1].getValue() == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) { @@ -2950,18 +2950,19 @@ var messages_priority_2 = func { if (wingIceSysFault.clearFlag == 0 and warningNodes.Logic.waiSysfault.getBoolValue() and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6)) { wingIceSysFault.active = 1; - if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and warningNodes.Logic.procWaiShutdown.getValue() == 1) { + if (wingIceSysFaultXbld.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and warningNodes.Logic.procWaiShutdown.getValue() == 1) { wingIceSysFaultXbld.active = 1; } else { ECAM_controller.warningReset(wingIceSysFaultXbld); } - if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and wing_pb.getValue()) { + + if (wingIceSysFaultOff.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and wing_pb.getValue()) { wingIceSysFaultOff.active = 1; } else { ECAM_controller.warningReset(wingIceSysFaultOff); } - if (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) { + if (wingIceSysFaultIcing.clearFlag == 0 and (warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue())) { wingIceSysFaultIcing.active = 1; } else { ECAM_controller.warningReset(wingIceSysFaultIcing); @@ -2973,10 +2974,158 @@ var messages_priority_2 = func { ECAM_controller.warningReset(wingIceSysFaultIcing); } + if (wingIceLOpen.clearFlag == 0 and warningNodes.Logic.waiLopen.getBoolValue() and (phaseVar2 <= 3 or phaseVar2 >= 9 or phaseVar2 == 6)) { + wingIceLOpen.active = 1; + + if (wingIceLOpenOff.clearFlag == 0 and wing_pb.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 9)) { + wingIceLOpenOff.active = 1; + } else { + ECAM_controller.warningReset(wingIceLOpenOff); + } + + if (FWC.Timer.gnd.getValue() == 1) { + if (wingIceLOpenEngOff.clearFlag == 0 and systems.PNEU.Switch.bleed1.getBoolValue()) { + wingIceLOpenEngOff.active = 1; + } else { + ECAM_controller.warningReset(wingIceLOpenEngOff); + } + + if (wingIceLOpenXbld.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() != 0) { + wingIceLOpenXbld.active = 1; + } else { + ECAM_controller.warningReset(wingIceLOpenXbld); + } + + if (wingIceLOpenApuOff.clearFlag == 0 and systems.PNEU.Valves.apu.getValue() != 0) { + wingIceLOpenApuOff.active = 1; + } else { + ECAM_controller.warningReset(wingIceLOpenApuOff); + } + } else { + ECAM_controller.warningReset(wingIceLOpenEngOff); + ECAM_controller.warningReset(wingIceLOpenXbld); + ECAM_controller.warningReset(wingIceLOpenApuOff); + } + + if (wingIceLOpenFlt.clearFlag == 0 and phaseVar2 != 9 and phaseVar2 != 10 and (wing_pb.getValue() == 0 or FWC.Timer.gnd.getValue() == 1)) { + wingIceLOpenFlt.active = 1; + } else { + ECAM_controller.warningReset(wingIceLOpenFlt); + } + + if (FWC.Timer.gnd.getValue() != 1) { + if (wingIceLOpenEngOn.clearFlag == 0 and !systems.PNEU.Switch.bleed1.getBoolValue()) { + wingIceLOpenEngOn.active = 1; + } else { + ECAM_controller.warningReset(wingIceLOpenEngOn); + } + + if (wingIceLOpenIceReq.clearFlag == 0 and !wing_pb.getValue()) { + wingIceLOpenIceReq.active = 1; + } else { + ECAM_controller.warningReset(wingIceLOpenIceReq); + } + + if (wingIceLOpenThrust.clearFlag == 0 and systems.PNEU.Switch.bleed1.getBoolValue() and !wing_pb.getValue()) { + wingIceLOpenThrust.active = 1; + } else { + ECAM_controller.warningReset(wingIceLOpenThrust); + } + } else { + ECAM_controller.warningReset(wingIceLOpenEngOn); + ECAM_controller.warningReset(wingIceLOpenIceReq); + ECAM_controller.warningReset(wingIceLOpenThrust); + } + } else { + ECAM_controller.warningReset(wingIceLOpen); + ECAM_controller.warningReset(wingIceLOpenOff); + ECAM_controller.warningReset(wingIceLOpenEngOff); + ECAM_controller.warningReset(wingIceLOpenXbld); + ECAM_controller.warningReset(wingIceLOpenApuOff); + ECAM_controller.warningReset(wingIceLOpenFlt); + ECAM_controller.warningReset(wingIceLOpenEngOn); + ECAM_controller.warningReset(wingIceLOpenIceReq); + ECAM_controller.warningReset(wingIceLOpenThrust); + } + + if (wingIceROpen.clearFlag == 0 and warningNodes.Logic.waiRopen.getBoolValue() and (phaseVar2 <= 3 or phaseVar2 >= 9 or phaseVar2 == 6)) { + wingIceROpen.active = 1; + + if (wingIceROpenOff.clearFlag == 0 and wing_pb.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 9)) { + wingIceROpenOff.active = 1; + } else { + ECAM_controller.warningReset(wingIceROpenOff); + } + + if (FWC.Timer.gnd.getValue() == 1) { + if (wingIceROpenEngOff.clearFlag == 0 and systems.PNEU.Switch.bleed2.getBoolValue()) { + wingIceROpenEngOff.active = 1; + } else { + ECAM_controller.warningReset(wingIceROpenEngOff); + } + + if (wingIceROpenXbld.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() != 0) { + wingIceROpenXbld.active = 1; + } else { + ECAM_controller.warningReset(wingIceROpenXbld); + } + + if (wingIceROpenApuOff.clearFlag == 0 and systems.PNEU.Valves.apu.getValue() != 0) { + wingIceROpenApuOff.active = 1; + } else { + ECAM_controller.warningReset(wingIceROpenApuOff); + } + } else { + ECAM_controller.warningReset(wingIceROpenEngOff); + ECAM_controller.warningReset(wingIceROpenXbld); + ECAM_controller.warningReset(wingIceROpenApuOff); + } + + if (wingIceROpenFlt.clearFlag == 0 and phaseVar2 != 9 and phaseVar2 != 10 and (wing_pb.getValue() == 0 or FWC.Timer.gnd.getValue() == 1)) { + wingIceROpenFlt.active = 1; + } else { + ECAM_controller.warningReset(wingIceROpenFlt); + } + + if (FWC.Timer.gnd.getValue() != 1) { + if (wingIceROpenEngOn.clearFlag == 0 and !systems.PNEU.Switch.bleed2.getBoolValue()) { + wingIceROpenEngOn.active = 1; + } else { + ECAM_controller.warningReset(wingIceROpenEngOn); + } + + if (wingIceROpenIceReq.clearFlag == 0 and !wing_pb.getValue()) { + wingIceROpenIceReq.active = 1; + } else { + ECAM_controller.warningReset(wingIceROpenIceReq); + } + + if (wingIceROpenThrust.clearFlag == 0 and systems.PNEU.Switch.bleed2.getBoolValue() and !wing_pb.getValue()) { + wingIceROpenThrust.active = 1; + } else { + ECAM_controller.warningReset(wingIceROpenThrust); + } + } else { + ECAM_controller.warningReset(wingIceROpenEngOn); + ECAM_controller.warningReset(wingIceROpenIceReq); + ECAM_controller.warningReset(wingIceROpenThrust); + } + } else { + ECAM_controller.warningReset(wingIceROpen); + ECAM_controller.warningReset(wingIceROpenOff); + ECAM_controller.warningReset(wingIceROpenEngOff); + ECAM_controller.warningReset(wingIceROpenXbld); + ECAM_controller.warningReset(wingIceROpenApuOff); + ECAM_controller.warningReset(wingIceROpenFlt); + ECAM_controller.warningReset(wingIceROpenEngOn); + ECAM_controller.warningReset(wingIceROpenIceReq); + ECAM_controller.warningReset(wingIceROpenThrust); + } + if (wingIceOpenGnd.clearFlag == 0 and warningNodes.Logic.waiGndFlight.getValue() and (phaseVar2 <= 2 or phaseVar2 >= 9)) { wingIceOpenGnd.active = 1; - if (pts.Gear.wow[1].getValue() and wing_pb.getValue()) { + if (FWC.Timer.gnd.getValue() == 1 and wing_pb.getValue()) { wingIceOpenGndShut.active = 1; } else { ECAM_controller.warningReset(wingIceOpenGndShut); diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 58c1451f..0be5d0d9 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -543,20 +543,9 @@ var warnings = std.Vector.new([ var fac2FaultSuccess = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"), var fac2FaultFacOff = warning.new(msg: " -FAC 2..............OFF", colour: "c"), - var yawDamper1Fault = warning.new(msg: "AUTO FLT YAW DAMPER 1", colour: "a", isMainMsg: 1), - var yawDamper2Fault = warning.new(msg: "AUTO FLT YAW DAMPER 2", colour: "a", isMainMsg: 1), - # var rudTrim1Fault = warning.new(msg: "AUTO FLT RUD TRIM1 FAULT", colour: "a", isMainMsg: 1), not implemented - # var rudTrim2Fault = warning.new(msg: "AUTO FLT RUD TRIM2 FAULT", colour: "a", isMainMsg: 1), not implemented - var rudTravLimSys1Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 1", colour: "a", isMainMsg: 1), - var rudTravLimSys2Fault = warning.new(msg: "AUTO FLT RUD TRV LIM 2", colour: "a", isMainMsg: 1), - # FCU fault var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var fcuFaultBaro = warning.new(msg: " -PFD BARO REF: STD ONLY", colour: "c"), - var fcuFault1 = warning.new(msg: "AUTO FLT FCU 1 FAULT", colour: "a", isMainMsg: 1), - var fcuFault1Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"), - var fcuFault2 = warning.new(msg: "AUTO FLT FCU 2 FAULT", colour: "a", isMainMsg: 1), - var fcuFault2Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"), # FUEL var wingLoLvl = warning.new(msg: "FUEL L+R WING TK LO LVL", colour: "a", aural: 1, light: 1, isMainMsg: 1), @@ -691,7 +680,6 @@ var warnings = std.Vector.new([ var wingIceLOpenEngOff = warning.new(msg: " -ENG1 BLEED.........OFF", colour: "c"), var wingIceLOpenXbld = warning.new(msg: " -X BLEED...........SHUT", colour: "c"), var wingIceLOpenApuOff = warning.new(msg: " -APU BLEED..........OFF", colour: "c"), - var wingIceLOpenSpacer = warning.new(msg: " ", colour: "c"), var wingIceLOpenFlt = warning.new(msg: " WAI AVAIL IN FLT", colour: "c"), var wingIceLOpenEngOn = warning.new(msg: " -ENG1 BLEED.........OFF", colour: "c"), var wingIceLOpenIceReq = warning.new(msg: " -WING ANTI ICE..AS RQRD", colour: "c"), @@ -701,13 +689,24 @@ var warnings = std.Vector.new([ var wingIceROpenEngOff = warning.new(msg: " -ENG2 BLEED.........OFF", colour: "c"), var wingIceROpenXbld = warning.new(msg: " -X BLEED...........SHUT", colour: "c"), var wingIceROpenApuOff = warning.new(msg: " -APU BLEED..........OFF", colour: "c"), - var wingIceROpenSpacer = warning.new(msg: " ", colour: "c"), var wingIceROpenFlt = warning.new(msg: " WAI AVAIL IN FLT", colour: "c"), var wingIceROpenEngOn = warning.new(msg: " -ENG2 BLEED.........OFF", colour: "c"), var wingIceROpenIceReq = warning.new(msg: " -WING ANTI ICE..AS RQRD", colour: "c"), var wingIceROpenThrust = warning.new(msg: " THRUST LIM PENALTY", colour: "c"), var wingIceOpenGnd = warning.new(msg: "WING A.ICE OPEN ON GND", colour: "a", aural: 1, light: 1, isMainMsg: 1), var wingIceOpenGndShut = warning.new(msg: " -WING ANTI ICE......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), + var fcuFault1 = warning.new(msg: "AUTO FLT FCU 1 FAULT", colour: "a", isMainMsg: 1), + var fcuFault1Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"), + var fcuFault2 = warning.new(msg: "AUTO FLT FCU 2 FAULT", colour: "a", isMainMsg: 1), + var fcuFault2Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"), + var wingIceLHiPr = warning.new(msg: "WING A.ICE L HI PR", colour: "a", isMainMsg: 1), var wingIceLHiPrThrust = warning.new(msg: " THRUST LIM PENTALTY", colour: "c"), var wingIceRHiPr = warning.new(msg: "WING A.ICE R HI PR", colour: "a", isMainMsg: 1), diff --git a/Nasal/ECAM/ECAM-nodes.nas b/Nasal/ECAM/ECAM-nodes.nas index 9a345383..d19bf137 100644 --- a/Nasal/ECAM/ECAM-nodes.nas +++ b/Nasal/ECAM/ECAM-nodes.nas @@ -90,6 +90,8 @@ var warningNodes = { bleed2LoTempPack: props.globals.initNode("/ECAM/warnings/logic/bleed-2-lo-temp-pack"), bleed2WaiAvail: props.globals.initNode("/ECAM/warnings/logic/bleed-2-wai-avail"), waiSysfault: props.globals.initNode("/ECAM/warnings/logic/wing-anti-ice-sys-fault"), + waiLopen: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-open"), + waiRopen: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-open"), waiLclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-left-closed"), waiRclosed: props.globals.initNode("/ECAM/warnings/flipflop/wing-anti-ice-right-closed"), procWaiShutdown: props.globals.initNode("/ECAM/warnings/logic/proc-wai-shutdown-output"), diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index a132a408..4bb6fa18 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -207,14 +207,14 @@ 0.04 - + Timer for the ECAM system /ECAM/warnings/logic/wing-anti-ice-left-closed-set-input 120 0.066666 - + Timer for the ECAM system /ECAM/warnings/logic/wing-anti-ice-right-closed-set-input 120 @@ -360,6 +360,20 @@ 120 0.5 + + + Timer for the ECAM system + /ECAM/warnings/logic/wing-anti-ice-left-open-set-15-input + 120 + 0.06666666666 + + + + Timer for the ECAM system + /ECAM/warnings/logic/wing-anti-ice-right-open-set-15-input + 120 + 0.06666666666 + @@ -785,7 +799,7 @@ - /gear/gear[1]/wow eq 0 + /ECAM/timer/ground-calc ne 1 /controls/ice-protection/wing eq 1 @@ -804,13 +818,20 @@ /ECAM/warnings/logic/wai-ground-pulse-set eq 1 - /gear/gear[1]/wow eq 1 + /ECAM/timer/ground-calc eq 1 /ECAM/warnings/timer/wing-anti-ice-25 ne 1 + + + + /ECAM/warnings/logic/wing-anti-ice-left-closed-set-timer eq 1 + + + @@ -832,6 +853,14 @@ + + + + /ECAM/warnings/logic/wing-anti-ice-right-closed-set-timer eq 1 + + + + @@ -867,7 +896,7 @@ /controls/ice-protection/wing eq 1 - /gear/gear[1]/wow eq 1 + /ECAM/timer/ground-calc eq 1 /ECAM/warnings/logic/wai-on eq 1 @@ -888,14 +917,14 @@ /controls/engines/engine[1]/fire-btn eq 0 /ECAM/warnings/logic/wai-ground-pulse eq 1 /ECAM/warnings/logic/wai-ground-pulse-set eq 1 - + - /engines/engine[0]/state eq 3 - /engines/engine[1]/state ne 3 + /ECAM/warnings/logic/eng/eng-1-shutdown eq 1 + /ECAM/warnings/logic/eng/eng-2-shutdown eq 0 - /engines/engine[0]/state ne 3 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/eng-1-shutdown eq 0 + /ECAM/warnings/logic/eng/eng-2-shutdown eq 1 @@ -930,6 +959,20 @@ + + + + /ECAM/warning-phase eq 6 + + + + + + + /ECAM/warning-phase eq 9 + + + @@ -958,11 +1001,106 @@ + + + + /systems/pneumatics/valves/wing-ice-1 ne 0 + + /ECAM/warnings/logic/wai-on eq 0 + + + + + + + + + /systems/electrical/bus/dc-ess-shed ge 25 + /ECAM/warnings/logic/wing-anti-ice-left-open-set-15 eq 1 + + + + + + + /systems/pneumatics/valves/wing-ice-1 eq 0 + /ECAM/warnings/timer/phase-1 eq 1 + + + /ECAM/warnings/logic/wai-phase-9-pulse-input eq 1 + /ECAM/warnings/logic/wai-phase-9-pulse eq 1 + + /systems/pneumatics/valves/wing-ice-1 ne 0 + /controls/pneumatics/switches/bleed-1 eq 1 + + + /systems/pneumatics/valves/wing-ice-1 ne 0 + /controls/pneumatics/switches/bleed-1 eq 0 + + /ECAM/warnings/logic/wai-phase-9-pulse-input eq 1 + /ECAM/warnings/logic/wai-phase-9-pulse eq 1 + + + + + + + + + + /systems/pneumatics/valves/wing-ice-2 ne 0 + + /ECAM/warnings/logic/wai-on eq 0 + + + + + + + + + /systems/electrical/bus/dc-ess-shed ge 25 + /ECAM/warnings/logic/wing-anti-ice-right-open-set-15 eq 1 + + + + + + + /systems/pneumatics/valves/wing-ice-2 eq 0 + /ECAM/warnings/timer/phase-1 eq 1 + + + /ECAM/warnings/logic/wai-phase-9-pulse-input eq 1 + /ECAM/warnings/logic/wai-phase-9-pulse eq 1 + + /systems/pneumatics/valves/wing-ice-2 ne 0 + /controls/pneumatics/switches/bleed-2 eq 1 + + + /systems/pneumatics/valves/wing-ice-2 ne 0 + /controls/pneumatics/switches/bleed-2 eq 0 + + /ECAM/warnings/logic/wai-phase-9-pulse-input eq 1 + /ECAM/warnings/logic/wai-phase-9-pulse eq 1 + + + + + /ECAM/warnings/logic/wai-on eq 1 - /systems/pneumatics/psi/engine-1-psi gt 49 + /systems/pneumatics/psi/engine-1-psi gt 49 diff --git a/Systems/a320-pneumatic.xml b/Systems/a320-pneumatic.xml index 1ada48d2..a9e718a1 100644 --- a/Systems/a320-pneumatic.xml +++ b/Systems/a320-pneumatic.xml @@ -459,13 +459,13 @@ - + /systems/startup-power-valves eq 1 /systems/failures/icing/wing-left-valve eq 1 - + /systems/electrical/bus/dc-ess-shed lt 25 /systems/pneumatics/psi/engine-1-psi le 1 @@ -473,7 +473,7 @@ /systems/pneumatics/valves/wing-ice-1-cmd eq 0 /systems/pneumatics/valves/wing-ice-1 ne 0 - + /systems/electrical/bus/dc-ess-shed ge 25 @@ -501,13 +501,13 @@ - + /systems/startup-power-valves eq 1 /systems/failures/icing/wing-right-valve eq 1 - + /systems/electrical/bus/dc-ess-shed lt 25 /systems/pneumatics/psi/engine-2-psi le 1 @@ -515,7 +515,7 @@ /systems/pneumatics/valves/wing-ice-2-cmd eq 0 /systems/pneumatics/valves/wing-ice-2 ne 0 - + /systems/electrical/bus/dc-ess-shed ge 25 @@ -540,13 +540,13 @@ - + /systems/startup-power-valves eq 1 /systems/failures/icing/engine-left-valve eq 1 - + /systems/electrical/bus/dc-1 lt 25 /systems/pneumatics/source/engine-1-hp-psi lt 7 @@ -554,7 +554,7 @@ /systems/pneumatics/valves/engine-ice-1-cmd eq 1 /systems/pneumatics/valves/engine-ice-1 ne 1 - + /systems/electrical/bus/dc-1 ge 25 @@ -579,13 +579,13 @@ - + /systems/startup-power-valves eq 1 /systems/failures/icing/engine-right-valve eq 1 - + /systems/electrical/bus/dc-2 lt 25 /systems/pneumatics/source/engine-2-hp-psi lt 7 @@ -593,7 +593,7 @@ /systems/pneumatics/valves/engine-ice-2-cmd eq 1 /systems/pneumatics/valves/engine-ice-2 ne 1 - + /systems/electrical/bus/dc-2 ge 25 @@ -1297,8 +1297,11 @@ - /systems/pneumatics/valves/wing-ice-1 ne /controls/ice-protection/wing - /systems/pneumatics/valves/wing-ice-2 ne /controls/ice-protection/wing + /ECAM/warnings/logic/wing-anti-ice-sys-fault eq 1 + /ECAM/warnings/flipflop/wing-anti-ice-left-open eq 1 + /ECAM/warnings/flipflop/wing-anti-ice-right-open eq 1 + /systems/pneumatics/valves/wing-ice-1 ne /systems/pneumatics/valves/wing-ice-1-cmd + /systems/pneumatics/valves/wing-ice-2 ne /systems/pneumatics/valves/wing-ice-2-cmd /systems/electrical/bus/dc-ess-shed lt 25 diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index 9aca49cd..f389f971 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -597,6 +597,28 @@ /ECAM/warnings/logic/wai-phase-9-pulse + + monostable + + + /ECAM/warnings/logic/phase-6-pulse-input + + /ECAM/warnings/logic/phase-6-pulse + + + + monostable + + + /ECAM/warnings/logic/phase-9-pulse-input + + /ECAM/warnings/logic/phase-9-pulse + + monostable + + RS + + + /ECAM/warnings/logic/wing-anti-ice-left-open-set + 1 + + + + /ECAM/warnings/logic/wing-anti-ice-left-open-reset + + /ECAM/warnings/flipflop/wing-anti-ice-left-open + + + + RS + + + /ECAM/warnings/logic/wing-anti-ice-right-open-set + 1 + + + + /ECAM/warnings/logic/wing-anti-ice-right-open-reset + + /ECAM/warnings/flipflop/wing-anti-ice-right-open + + SR From 6fb8ad6f90d055ae6a05a1db5d94fd98a13c6705 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 31 Dec 2021 16:01:02 +0000 Subject: [PATCH 09/42] Fix typo in FMGC.nas, MCDU - add plus character --- Nasal/FMGC/FMGC.nas | 6 ++---- Nasal/MCDU/MCDU.nas | 7 ++++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 444dd65b..1bdb64a4 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1193,8 +1193,7 @@ setlistener("/systems/navigation/adr/operating-3", func() { setlistener("/FMGC/internal/block-calculating", func() { if (timer3blockFuel.isRunning) { FMGCInternal.blockFuelTime = -99; - timer3blockFuel.start(); - FMGCInternal.blockFuelTime = pts.Sim.Time.elapsedSec.getValue(); + timer3blockFuel.stop(); } if (FMGCInternal.blockFuelTime == -99) { @@ -1207,8 +1206,7 @@ setlistener("/FMGC/internal/block-calculating", func() { setlistener("/FMGC/internal/fuel-calculating", func() { if (timer5fuelPred.isRunning) { FMGCInternal.fuelPredTime = -99; - timer5fuelPred.start(); - FMGCInternal.fuelPredTime = pts.Sim.Time.elapsedSec.getValue(); + timer5fuelPred.stop(); } if (FMGCInternal.fuelPredTime == -99) { diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 37eae63f..f54a2a5d 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -1523,7 +1523,12 @@ var button = func(btn, i, event = "") { } else if (btn == "DOT") { mcdu_scratchpad.scratchpads[i].addChar("."); } else if (btn == "PLUSMINUS") { - mcdu_scratchpad.scratchpads[i].addChar("-"); + if (right(mcdu_scratchpad.scratchpads[i].scratchpad, 1) == "-") { + mcdu_scratchpad.scratchpads[i].clear(); + mcdu_scratchpad.scratchpads[i].addChar("+"); + } else { + mcdu_scratchpad.scratchpads[i].addChar("-"); + } } else { mcdu_scratchpad.scratchpads[i].addChar(btn); } From 698caf81b434f5ebf6e28b20e3fec12729d3bc0b Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 1 Jan 2022 20:53:29 +0000 Subject: [PATCH 10/42] ATC was missing from annun-test condition --- Models/FlightDeck/a320.flightdeck.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index b1877ad4..ad3a2f8f 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -1272,6 +1272,7 @@ select + atc-test audio_att_sgn audio_call_hf2_led audio_call_hf1_led @@ -1281,13 +1282,10 @@ audio_mech_sgn ecam_c_b_led ecam_el_dc_led - ecam_sts_led engine_fault_1 engine_fault_2 exped_led - qnh-test radio_opt_led - ver.fmgc controls/switches/annun-test @@ -1298,7 +1296,9 @@ alt-text-test hdg-text-test spd-text-test + qnh-test vs-text-test + ver.fmgc FMGC/FCU-working From 5e666793665714fb958dffe1ef565f1790d462ce Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 2 Jan 2022 02:08:08 +0000 Subject: [PATCH 11/42] Apply patch by Tobias Dammers to prevent mapstructure error --- Models/Instruments/ND/canvas/map/RTE.lcontroller | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Models/Instruments/ND/canvas/map/RTE.lcontroller b/Models/Instruments/ND/canvas/map/RTE.lcontroller index e8fc79c7..42343196 100644 --- a/Models/Instruments/ND/canvas/map/RTE.lcontroller +++ b/Models/Instruments/ND/canvas/map/RTE.lcontroller @@ -25,7 +25,7 @@ var new = func(layer) { map: layer.map, listeners: [], }; - layer.searcher._equals = func(l,r) 0; # TODO: create model objects instead? + layer.searcher._equals = func(l,r) return (l == r); append(m.listeners, setlistener(layer.options.active_node, func m.layer.update() ), setlistener(layer.options.wp_num, func m.layer.update() )); m.addVisibilityListener(); var driver = opt_member(m.layer.options, 'route_driver'); From ca4036400ce5e6d22180816e543cde1b2809a013 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 2 Jan 2022 13:11:35 +0000 Subject: [PATCH 12/42] remove un-needed --- Systems/a320-fuel.xml | 1 - Systems/a320-fwc-phases.xml | 1 - Systems/a320-fwc.xml | 55 ------------------------------------- Systems/a320-hydraulic.xml | 1 - 4 files changed, 58 deletions(-) diff --git a/Systems/a320-fuel.xml b/Systems/a320-fuel.xml index 9267dd76..9bd6e57a 100644 --- a/Systems/a320-fuel.xml +++ b/Systems/a320-fuel.xml @@ -186,7 +186,6 @@ - Timer for the Fuel Center pumps /systems/fuel/quantity/center-low 120 0.00333 diff --git a/Systems/a320-fwc-phases.xml b/Systems/a320-fwc-phases.xml index 05af76de..59894caf 100644 --- a/Systems/a320-fwc-phases.xml +++ b/Systems/a320-fwc-phases.xml @@ -7,7 +7,6 @@ - Timer for the ECAM phase system /ECAM/logic/ground-calc-immediate 120 1 diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index 4bb6fa18..b59f0d73 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -13,363 +13,311 @@ - Timer for the ECAM system /ECAM/phases/timer/eng1idle 120 0.033 - Timer for the ECAM system /ECAM/phases/timer/eng2idle 120 0.033 - Timer for the ECAM system /ECAM/phases/timer/to-inhibit 120 0.33 - Timer for the ECAM system /ECAM/phases/timer/ldg-inhibit 120 0.33 - Timer for the ECAM system /ECAM/warnings/timer/bleed-1-fault 120 0.2 - Timer for the ECAM system /ECAM/warnings/timer/bleed-2-fault 120 0.2 - Timer for the ECAM system /ECAM/warnings/logic/apu-bleed-fault 120 0.1 - Timer for the ECAM system /systems/pneumatics/warnings/crossbleed-disag 120 0.1 - Timer for the ECAM system /ECAM/warnings/logic/crossbleed-fault-timer-was-one 0.1 120 - Timer for the ECAM system /controls/engines/engine[0]/fire-btn 0.06666666666 - Timer for the ECAM system /ECAM/warnings/logic/prv-1-not-shut-apu 120 1 - Timer for the ECAM system /ECAM/warnings/logic/prv-2-not-shut-apu 120 1 - Timer for the ECAM system /ECAM/warnings/logic/prv-1-not-shut 120 1 - Timer for the ECAM system /ECAM/warnings/logic/prv-2-not-shut 120 1 - Timer for the ECAM system /ECAM/warnings/timer/bleed-1-and-2-low-temp 120 0.00185185 - Timer for the ECAM system /systems/pneumatics/warnings/lowtemp-1-mem 120 0.016666 - Timer for the ECAM system /systems/pneumatics/warnings/lowtemp-2-mem 120 0.016666 - Timer for the ECAM system /ECAM/warnings/logic/bleed-1-off-60 120 0.016666 - Timer for the ECAM system /ECAM/warnings/logic/bleed-2-off-60 120 0.016666 - Timer for the ECAM system /ECAM/warnings/logic/bleed-1-off-5 120 0.2 - Timer for the ECAM system /ECAM/warnings/logic/bleed-2-off-5 120 0.2 - Timer for the ECAM system /ECAM/warnings/logic/eng-aice-1-open 120 0.2 - Timer for the ECAM system /ECAM/warnings/logic/eng-aice-2-open 120 0.2 - Timer for the ECAM system /ECAM/warnings/logic/eng-aice-1-closed 120 0.1 - Timer for the ECAM system /ECAM/warnings/logic/eng-aice-2-closed 120 0.1 - Timer for the ECAM system /ECAM/warnings/logic/wing-anti-ice-flipflop-set-input 120 0.0285714 - Timer for the ECAM system /ECAM/warnings/timer/phase-1-input 120 0.5 - Timer for the ECAM system /controls/ice-protection/wing 120 0.04 - Timer for the ECAM system /ECAM/warnings/logic/wing-anti-ice-left-closed-set-input 120 0.066666 - Timer for the ECAM system /ECAM/warnings/logic/wing-anti-ice-right-closed-set-input 120 0.066666 - Timer for the ECAM system /ECAM/warnings/logic/proc-wai-shutdown-flipflop 120 0.1 - Timer for the ECAM system /ECAM/warnings/logic/wing-hi-pr-left-input 120 0.025 - Timer for the ECAM system /ECAM/warnings/logic/wing-hi-pr-right-input 120 0.025 - Timer for the ECAM system /ECAM/warnings/logic/cranking-35-sec-input 120 0.028571 - Timer for the ECAM system /ECAM/warnings/logic/pack-1-fault-closed-input 120 0.1 - Timer for the ECAM system /ECAM/warnings/logic/pack-2-fault-closed-input 120 0.1 - Timer for the ECAM system /ECAM/warnings/logic/pack-1-disagree-input 120 0.1 - Timer for the ECAM system /ECAM/warnings/logic/pack-2-disagree-input 120 0.1 - Timer for the ECAM system /ECAM/warnings/logic/ignition 100 0.028571 - Timer for the ECAM system /ECAM/warnings/logic/pack-1-fault-input 120 0.20 - Timer for the ECAM system /ECAM/warnings/logic/pack-2-fault-input 120 0.20 - Timer for the ECAM system /ECAM/warnings/logic/pack-1-fault-warning-input 120 0.50 - Timer for the ECAM system /ECAM/warnings/logic/pack-2-fault-warning-input 120 0.50 - Timer for the ECAM system /ECAM/warnings/logic/pack-1-off-input 120 0.0166666 - Timer for the ECAM system /ECAM/warnings/logic/pack-2-off-input 120 0.0166666 - Timer for the ECAM system /ECAM/warnings/logic/trim-air-fault-input 120 0.2 - Timer for the ECAM system /ECAM/warnings/logic/yaw-damper-1-fault 120 0.2 - Timer for the ECAM system /ECAM/warnings/logic/yaw-damper-2-fault 120 0.2 - Timer for the ECAM system /ECAM/warnings/logic/nav-gpws-terr-fault 120 1.0 - Timer for the ECAM system /ECAM/warnings/logic/apu-gen-fault-reset 120 0.5 - Timer for the ECAM system /ECAM/warnings/logic/wing-anti-ice-left-open-set-15-input 120 0.06666666666 - Timer for the ECAM system /ECAM/warnings/logic/wing-anti-ice-right-open-set-15-input 120 0.06666666666 @@ -1725,7 +1673,6 @@ - Timer for the ECAM system /ECAM/warnings/logic/gen-1-fault-set 120 0.1818 @@ -1793,7 +1740,6 @@ - Timer for the ECAM system /ECAM/warnings/logic/gen-2-fault-set 120 0.1818 @@ -1860,7 +1806,6 @@ - Timer for the ECAM system /ECAM/warnings/logic/apu-gen-fault-set 120 0.2 diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml index f3ad3abc..30def2b9 100644 --- a/Systems/a320-hydraulic.xml +++ b/Systems/a320-hydraulic.xml @@ -172,7 +172,6 @@ - Timer for the ECAM system /systems/hydraulic/sources/blue-elec/pump-operate-apu 100 0.0083333 From 293e6af84c0b1d98f453ddbe5c8fcb305702eb9a Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 2 Jan 2022 13:57:03 +0000 Subject: [PATCH 13/42] FAC failure: correct condition on warning --- Systems/a320-fbw.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Systems/a320-fbw.xml b/Systems/a320-fbw.xml index a510a77b..808ca447 100644 --- a/Systems/a320-fbw.xml +++ b/Systems/a320-fbw.xml @@ -570,7 +570,7 @@ - /systems/fctl/fac1-healthy ne 0 + /systems/fctl/fac1-healthy eq 1 /systems/fctl/fac1-healthy-latch eq 0 /gear/gear[0]/wow eq 1 @@ -641,7 +641,7 @@ - /systems/fctl/fac2-healthy ne 0 + /systems/fctl/fac2-healthy eq 1 /systems/fctl/fac2-healthy-latch eq 0 /gear/gear[0]/wow eq 1 From e394db0cd96f4c84fc3aeaf3a428082698ee27eb Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 2 Jan 2022 16:52:05 +0000 Subject: [PATCH 14/42] External power light - correct AVAIL power source --- Models/Instruments/OHpanel/OHpanel.xml | 39 +++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 971d182c..8b419635 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -21,7 +21,6 @@ CargoHotAirBtn1F CargoHotAirBtn2O CrewOxyBtn2O - ExtPwrBtn1A GalleyPwrBtn1F GalleyPwrBtn2O Gen1LineBtn1S @@ -110,6 +109,44 @@ + + + select + ExtPwrBtn1A + + + + + + systems/electrical/bus/ac-si-bus + 110 + + + systems/electrical/bus/ac-ess-shed + 110 + + + + systems/electrical/bus/ac-ess + 110 + + + + + /systems/electrical/sources/ext/output-volt + 110 + + + + systems/electrical/bus/ac-ess + 110 + + + + + + + select From b85863cf06fb46b361f86f6b3c29092ae7fc355d Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 2 Jan 2022 17:24:59 +0000 Subject: [PATCH 15/42] No smoking light / seatbelt light - correct CIDS power source; move to JSB --- AircraftConfig/acconfig.nas | 12 +-- Nasal/ECAM/ECAM-logic.nas | 12 +-- Nasal/Libraries/buttons.nas | 8 +- Nasal/Libraries/libraries.nas | 102 ++++++++---------------- Nasal/Libraries/property-tree-setup.nas | 10 +++ Nasal/Systems/ground_services.nas | 4 +- Systems/a320-lights.xml | 40 ++++++++++ 7 files changed, 102 insertions(+), 86 deletions(-) diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index 58ec28a6..53f18096 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -391,9 +391,9 @@ var beforestart_b = func { setprop("/controls/adirs/mcducbtn", 1); setprop("/controls/switches/beacon", 1); setprop("/controls/lighting/nav-lights-switch", 1); - libraries.noSmokingSwitch.setValue(0.5); - libraries.seatbeltSwitch.setValue(1.0); - libraries.emerLtsSwitch.setValue(0.5); + pts.Controls.Switches.noSmokingSwitch.setValue(0.5); + pts.Controls.Switches.seatbeltSwitch.setValue(1.0); + pts.Controls.Switches.emerLtsSwitch.setValue(0.5); setprop("/controls/radio/rmp[0]/on", 1); setprop("/controls/radio/rmp[1]/on", 1); setprop("/controls/radio/rmp[2]/on", 1); @@ -488,9 +488,9 @@ var taxi_b = func { setprop("/controls/switches/beacon", 1); setprop("/controls/switches/wing-lights", 1); setprop("/controls/lighting/nav-lights-switch", 1); - libraries.noSmokingSwitch.setValue(0.5); - libraries.seatbeltSwitch.setValue(1.0); - libraries.emerLtsSwitch.setValue(0.5); + pts.Controls.Switches.noSmokingSwitch.setValue(0.5); + pts.Controls.Switches.seatbeltSwitch.setValue(1.0); + pts.Controls.Switches.emerLtsSwitch.setValue(0.5); setprop("/controls/radio/rmp[0]/on", 1); setprop("/controls/radio/rmp[1]/on", 1); setprop("/controls/radio/rmp[2]/on", 1); diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index c4481bcb..68318983 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -3314,7 +3314,7 @@ var messages_config_memo = func { toMemoLine1.colour = "c"; } - if (libraries.seatbeltSwitch.getValue() and libraries.noSmokingSwitch.getValue() ) { + if (pts.Controls.Switches.seatbeltSwitch.getValue() and pts.Controls.Switches.noSmokingSwitch.getValue()) { toMemoLine2.msg = " SIGNS ON"; toMemoLine2.colour = "g"; } else { @@ -3380,7 +3380,7 @@ var messages_config_memo = func { ldgMemoLine1.colour = "c"; } - if (libraries.seatbeltSwitch.getValue() and libraries.noSmokingSwitch.getValue()) { + if (pts.Controls.Switches.seatbeltSwitch.getValue() and pts.Controls.Switches.noSmokingSwitch.getValue()) { ldgMemoLine2.msg = " SIGNS ON"; ldgMemoLine2.colour = "g"; } else { @@ -3505,19 +3505,19 @@ var messages_memo = func { gnd_splrs.active = 0; } - if (libraries.seatbeltLight.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { + if (pts.Controls.Lighting.seatbeltSign.getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { seatbelts.active = 1; } else { seatbelts.active = 0; } - if (libraries.noSmokingLight.getValue() == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed! + if (pts.Controls.Lighting.noSmokingSign.getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # should go off after takeoff assuming switch is in auto due to old logic from the days when smoking was allowed! nosmoke.active = 1; } else { nosmoke.active = 0; } - if (getprop("/controls/lighting/strobe") == 0 and !pts.Gear.wow[1].getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties + if (!pts.Controls.Lighting.strobe.getValue() and !pts.Gear.wow[1].getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # todo: use gear branch properties strobe_lt_off.active = 1; } else { strobe_lt_off.active = 0; @@ -3542,7 +3542,7 @@ var messages_memo = func { fob_66L.active = 0; } - if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { + if (libraries.GPWS.flapAllOverride.getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { gpws_flap_mode_off.active = 1; } else { gpws_flap_mode_off.active = 0; diff --git a/Nasal/Libraries/buttons.nas b/Nasal/Libraries/buttons.nas index a888c3d3..423bc9cf 100644 --- a/Nasal/Libraries/buttons.nas +++ b/Nasal/Libraries/buttons.nas @@ -24,7 +24,7 @@ var variousReset = func() { setprop("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", 0); setprop("/controls/switches/cabinCall", 0); setprop("/controls/switches/mechCall", 0); - libraries.emerLtsSwitch.setValue(0.5); + pts.Controls.Switches.emerLtsSwitch.setValue(0.5); # cockpit voice recorder stuff setprop("/controls/CVR/power", 0); setprop("/controls/CVR/test", 0); @@ -61,9 +61,9 @@ var variousReset = func() { setprop("/modes/fcu/hdg-time", -45); setprop("/controls/navigation/switching/att-hdg", 0); setprop("/controls/navigation/switching/air-data", 0); - libraries.noSmokingSwitch.setValue(0.0); - libraries.seatbeltSwitch.setValue(0.0); - libraries.emerLtsSwitch.setValue(0.0); + pts.Controls.Switches.noSmokingSwitch.setValue(0); + pts.Controls.Switches.seatbeltSwitch.setValue(0); + pts.Controls.Switches.emerLtsSwitch.setValue(0); } var BUTTONS = { diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index f5014294..09ac782c 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -70,7 +70,7 @@ var triggerDoor = func(door, doorName, doorDesc) { gui.popupTip("Closing " ~ doorDesc ~ " door"); door.toggle(); } else { - if (getprop("/velocities/groundspeed-kt") > 5) { + if (pts.Velocities.groundspeed.getValue() > 5) { gui.popupTip("You cannot open the doors while the aircraft is moving!"); } else { gui.popupTip("Opening " ~ doorDesc ~ " door"); @@ -133,48 +133,6 @@ setlistener("/sim/signals/fdm-initialized", func() { emesary.GlobalTransmitter.Register(A320Libraries); }); -var collectorTankL = props.globals.getNode("/fdm/jsbsim/propulsion/tank[5]/contents-lbs"); -var collectorTankR = props.globals.getNode("/fdm/jsbsim/propulsion/tank[6]/contents-lbs"); -var groundAir = props.globals.getNode("/controls/pneumatics/switches/groundair"); -var groundCart = props.globals.getNode("/controls/electrical/ground-cart"); -var chocks = props.globals.getNode("/services/chocks/enable"); -var groundspeed = 0; -var stateL = 0; -var stateR = 0; - -var seatbeltSwitch = props.globals.getNode("/controls/switches/seatbelt-sign"); -var noSmokingSwitch = props.globals.getNode("/controls/switches/no-smoking-sign"); -var emerLtsSwitch = props.globals.getNode("/controls/switches/emer-lights"); -var seatbeltLight = props.globals.getNode("/controls/lighting/seatbelt-sign"); -var noSmokingLight = props.globals.getNode("/controls/lighting/no-smoking-sign"); - -var update_items = [ - props.UpdateManager.FromHashValue("seatbelt", nil, func(val) { - if (val) { - if (!seatbeltLight.getBoolValue()) { - seatbeltLight.setValue(1); - } - } else { - if (seatbeltLight.getBoolValue()) { - seatbeltLight.setValue(0); - } - } - }), - props.UpdateManager.FromHashList(["noSmoking","gearPosNorm"], nil, func(val) { - if (val.noSmoking == 1) { - if (!noSmokingLight.getBoolValue()) { - noSmokingLight.setBoolValue(1); - } - } elsif (val.noSmoking == 0.5 and val.gearPosNorm != 0) { # todo: should be when uplocks not engaged - if (!noSmokingLight.getBoolValue()) { - noSmokingLight.setBoolValue(1); - } - } else { - noSmokingLight.setBoolValue(0); # sign stays on in cabin but sound still occurs - } - }), -]; - var systemsLoop = func(notification) { if (!systemsInitialized and getprop("/systems/acconfig/mismatch-code") != "0x000") { return; } systems.PNEU.loop(notification); @@ -190,15 +148,12 @@ var systemsLoop = func(notification) { atsu.ATSU.loop(); libraries.BUTTONS.update(); - if ((notification.engine1State == 2 or notification.engine1State == 3) and collectorTankL.getValue() < 1) { + if (notification.engine1State >= 2 and pts.Fdm.JSBsim.Propulsion.Tank.contentsLbs[5].getValue() < 1) { systems.cutoff_one(); } - if ((notification.engine2State == 2 or notification.engine2State == 3) and collectorTankR.getValue() < 1) { - systems.cutoff_two(); - } - foreach (var update_item; update_items) { - update_item.update(notification); + if (notification.engine2State >= 2 and pts.Fdm.JSBsim.Propulsion.Tank.contentsLbs[6].getValue() < 1) { + systems.cutoff_two(); } } @@ -210,11 +165,13 @@ var GPWS = { flapAllOverride: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override"), flap3Override: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override"), flapOverride: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override"), - alertMode: props.globals.initNode("/instrumentation/mk-viii/outputs/alert-mode",0,"INT"), + alertMode: props.globals.initNode("/instrumentation/mk-viii/outputs/alert-mode", 0, "INT"), + alert: props.globals.getNode("instrumentation/mk-viii/outputs/discretes/gpws-alert"), + warning: props.globals.getNode("instrumentation/mk-viii/outputs/discretes/gpws-warning"), }; -setlistener("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit", func() { - if (GPWS.inhibitNode.getBoolValue()) { +setlistener("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit", func(val) { + if (val.getBoolValue()) { GPWS.volume.setValue(2); } else { GPWS.volume.setValue(0); @@ -238,18 +195,29 @@ setlistener("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override }, 0, 0); # GPWS alert pooling for get mode change - a little esoteric way but it works -var gpws_alert_watch = maketimer(0.8,func { - var alert = 0; - if (getprop("instrumentation/mk-viii/outputs/discretes/gpws-warning")) alert = 2; # MODE2 - warning - RED - else if (getprop("instrumentation/mk-viii/outputs/discretes/gpws-alert")) alert = 1; # MODE1 - caution - YELLOW - if (GPWS.alertMode.getValue()!=alert) GPWS.alertMode.setValue(alert); +var GPWSAlertStatus = 0; +var gpws_alert_watch = maketimer(0.8, func() { + if (GPWS.warning.getValue()) { + GPWSAlertStatus = 2; # MODE2 - warning - RED + } else if (GPWS.alert.getValue()) { + GPWSAlertStatus = 1; # MODE1 - caution - YELLOW + } else { + GPWSAlertStatus = 0; + } + + if (GPWS.alertMode.getValue() != GPWSAlertStatus) { + GPWS.alertMode.setValue(GPWSAlertStatus); + } }); -setlistener("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit", func{ # detect GPWS switch status - var failure = GPWS.tatcfInhibit.getBoolValue(); - if (!failure) gpws_alert_watch.start(); - else gpws_alert_watch.stop(); -},1,0); +# detect GPWS switch status +setlistener("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit", func (val) { + if (!val.getBoolValue()) { + gpws_alert_watch.start(); + } else { + gpws_alert_watch.stop(); + } +}, 1, 0); # Replay var replayState = props.globals.getNode("/sim/replay/replay-state"); @@ -392,8 +360,6 @@ var LibrariesRecipient = var input = { # Libraries - "seatbelt": "/controls/switches/seatbelt-sign", - "noSmoking": "/controls/switches/no-smoking-sign", "gearPosNorm": "/gear/gear[0]/position-norm", "gearPosNorm1": "/gear/gear[1]/position-norm", "gearPosNorm2": "/gear/gear[2]/position-norm", @@ -407,8 +373,8 @@ foreach (var name; keys(input)) { # TODO split EFIS altimeters var newinhg = nil; -setlistener("/instrumentation/altimeter/setting-inhg", func() { - newinhg = getprop("/instrumentation/altimeter/setting-inhg"); +setlistener("/instrumentation/altimeter/setting-inhg", func(val) { + newinhg = val.getValue(); setprop("/instrumentation/altimeter[1]/setting-inhg", newinhg); setprop("/instrumentation/altimeter[2]/setting-inhg", newinhg); setprop("/instrumentation/altimeter[3]/setting-inhg", newinhg); @@ -417,8 +383,8 @@ setlistener("/instrumentation/altimeter/setting-inhg", func() { }, 0, 0); var newhpa = nil; -setlistener("/instrumentation/altimeter/setting-hpa", func() { - newhpa = getprop("/instrumentation/altimeter/setting-hpa"); +setlistener("/instrumentation/altimeter/setting-hpa", func(val) { + newhpa = val.getValue(); setprop("/instrumentation/altimeter[1]/setting-hpa", newhpa); setprop("/instrumentation/altimeter[2]/setting-hpa", newhpa); setprop("/instrumentation/altimeter[3]/setting-hpa", newhpa); diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas index b88890eb..7c08659b 100644 --- a/Nasal/Libraries/property-tree-setup.nas +++ b/Nasal/Libraries/property-tree-setup.nas @@ -69,9 +69,15 @@ var Controls = { }, Lighting: { landingLights: [props.globals.getNode("/controls/lighting/landing-lights[0]"),props.globals.getNode("/controls/lighting/landing-lights[1]"),props.globals.getNode("/controls/lighting/landing-lights[2]")], + noSmokingSign: props.globals.getNode("/controls/lighting/no-smoking-sign"), + seatbeltSign: props.globals.getNode("/controls/lighting/seatbelt-sign"), + strobe: props.globals.getNode("/controls/lighting/strobe"), }, Switches: { annunTest: props.globals.getNode("/controls/switches/annun-test"), + emerLtsSwitch: props.globals.getNode("/controls/switches/emer-lights"), + noSmokingSwitch: props.globals.getNode("/controls/switches/no-smoking-sign"), + seatbeltSwitch: props.globals.getNode("/controls/switches/seatbelt-sign"), }, }; @@ -136,6 +142,10 @@ var Fdm = { fuelUsed: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/fuel-used-lbs")], reverserAngle: [props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/reverser-angle-rad"), props.globals.getNode("/fdm/jsbsim/propulsion/engine[1]/reverser-angle-rad")], }, + Tank: { + contentsLbs: [props.globals.getNode("/fdm/jsbsim/propulsion/tank[0]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[1]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[2]/contents-lbs"), + props.globals.getNode("/fdm/jsbsim/propulsion/tank[3]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[4]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[5]/contents-lbs"), props.globals.getNode("/fdm/jsbsim/propulsion/tank[6]/contents-lbs")], + }, }, }, }; diff --git a/Nasal/Systems/ground_services.nas b/Nasal/Systems/ground_services.nas index ff82adef..0b027dc7 100644 --- a/Nasal/Systems/ground_services.nas +++ b/Nasal/Systems/ground_services.nas @@ -19,8 +19,8 @@ var ground_services = { setprop("/services/deicing_truck/de-ice", 0); # Set them all to 0 if the aircraft is not stationary - if (getprop("velocities/groundspeed-kt") >= 2) { - setprop("/services/chocks/enable", 0); + if (pts.Velocities.groundspeed.getValue() >= 2) { + pts.Controls.Gear.chocks.setValue(0); setprop("/services/fuel-truck/enable", 0); setprop("/services/deicing_truck/enable", 0); setprop("/services/catering/enable", 0); diff --git a/Systems/a320-lights.xml b/Systems/a320-lights.xml index bb66de86..d64b1429 100644 --- a/Systems/a320-lights.xml +++ b/Systems/a320-lights.xml @@ -223,5 +223,45 @@ + + + + + + + + /systems/electrical/bus/dc-ess ge 25 + /systems/electrical/bus/dc-service-bus ge 25 + + + /systems/pressurization/cabinalt-norm ge 11300 + /controls/switches/no-smoking-sign eq 1 + + + + /controls/switches/no-smoking-sign eq 0.5 + /gear/gear[0]/position-norm eq 1 + + /systems/electrical/bus/dc-ess ge 25 + /systems/electrical/bus/dc-service-bus ge 25 + + + + + + + + + /systems/electrical/bus/dc-ess ge 25 + /systems/electrical/bus/dc-service-bus ge 25 + + + /systems/pressurization/cabinalt-norm ge 11300 + /controls/switches/seatbelt-sign eq 1 + + + + + From c58a8c00e985e2a86a826241ba2207daf93ee6b1 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 2 Jan 2022 17:46:46 +0000 Subject: [PATCH 16/42] No smoking sign comes on with gear downlocks --- Systems/a320-lights.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Systems/a320-lights.xml b/Systems/a320-lights.xml index d64b1429..f3d4df08 100644 --- a/Systems/a320-lights.xml +++ b/Systems/a320-lights.xml @@ -240,7 +240,7 @@ /controls/switches/no-smoking-sign eq 0.5 - /gear/gear[0]/position-norm eq 1 + /gear/gear[0]/position-norm ge 0.8 /systems/electrical/bus/dc-ess ge 25 /systems/electrical/bus/dc-service-bus ge 25 From 02d47b475ec023870c274b65c2e9aedf2b2000a3 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 2 Jan 2022 17:52:36 +0000 Subject: [PATCH 17/42] GPWS code - move to jsb --- Nasal/ECAM/ECAM-logic.nas | 4 +-- Nasal/Libraries/libraries.nas | 48 +++++-------------------- Nasal/Libraries/property-tree-setup.nas | 2 ++ Systems/a320-misc.xml | 22 ++++++++++++ 4 files changed, 35 insertions(+), 41 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 68318983..b8f9a7d0 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -3542,7 +3542,7 @@ var messages_memo = func { fob_66L.active = 0; } - if (libraries.GPWS.flapAllOverride.getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { + if (pts.Instrumentation.MKVII.Inputs.Discretes.flapAllOverride.getValue() and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { gpws_flap_mode_off.active = 1; } else { gpws_flap_mode_off.active = 0; @@ -3737,7 +3737,7 @@ var messages_right_memo = func { brk_fan.active = 0; } - if (pts.Instrumentation.MKVII.Inputs.Discretes.flap3Override.getValue() == 1) { # todo: emer elec + if (pts.Instrumentation.MKVII.Inputs.Discretes.flap3Override.getValue()) { # todo: emer elec gpws_flap3.active = 1; } else { gpws_flap3.active = 0; diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index 09ac782c..1b76fb13 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -159,41 +159,11 @@ var systemsLoop = func(notification) { # GPWS var GPWS = { - inhibitNode: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit"), - tatcfInhibit: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit"), - volume: props.globals.getNode("/instrumentation/mk-viii/speaker/volume"), - flapAllOverride: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override"), - flap3Override: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override"), - flapOverride: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-override"), alertMode: props.globals.initNode("/instrumentation/mk-viii/outputs/alert-mode", 0, "INT"), alert: props.globals.getNode("instrumentation/mk-viii/outputs/discretes/gpws-alert"), warning: props.globals.getNode("instrumentation/mk-viii/outputs/discretes/gpws-warning"), }; -setlistener("/instrumentation/mk-viii/inputs/discretes/gpws-inhibit", func(val) { - if (val.getBoolValue()) { - GPWS.volume.setValue(2); - } else { - GPWS.volume.setValue(0); - } -}, 0, 0); - -var updateGPWSFlap = func() { - if (GPWS.flapAllOverride.getBoolValue() or (GPWS.flap3Override.getBoolValue() and pts.Controls.Flight.flapsPos.getValue() >= 4)) { - GPWS.flapOverride.setBoolValue(1); - } else { - GPWS.flapOverride.setBoolValue(0); - } -} - -setlistener("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override", func() { - updateGPWSFlap(); -}, 0, 0); - -setlistener("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override", func() { - updateGPWSFlap(); -}, 0, 0); - # GPWS alert pooling for get mode change - a little esoteric way but it works var GPWSAlertStatus = 0; var gpws_alert_watch = maketimer(0.8, func() { @@ -219,6 +189,15 @@ setlistener("/instrumentation/mk-viii/inputs/discretes/ta-tcf-inhibit", func (va } }, 1, 0); +# Steep ILS +setlistener("/options/steep-ils", func(val) { + if (val.getValue()) { + pts.Instrumentation.MKVII.Inputs.Discretes.steepApproach.setValue(1); + } else { + pts.Instrumentation.MKVII.Inputs.Discretes.steepApproach.setValue(0); + } +}, 0, 0); + # Replay var replayState = props.globals.getNode("/sim/replay/replay-state"); setlistener(replayState, func(v) { @@ -229,15 +208,6 @@ setlistener(replayState, func(v) { } }, 0, 0); -# Steep ILS -setlistener("/options/steep-ils", func() { - if (getprop("/options/steep-ils") == 1) { - setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 1); - } else { - setprop("/instrumentation/mk-viii/inputs/discretes/steep-approach", 0); - } -}, 0, 0); - # hackCanvas canvas.Text._lastText = canvas.Text["_lastText"]; canvas.Text.setText = func(text) { diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas index 7c08659b..2c61598c 100644 --- a/Nasal/Libraries/property-tree-setup.nas +++ b/Nasal/Libraries/property-tree-setup.nas @@ -217,6 +217,8 @@ var Instrumentation = { Inputs: { Discretes: { flap3Override: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override"), + flapAllOverride: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override"), + steepApproach: props.globals.getNode("/instrumentation/mk-viii/inputs/discretes/steep-approach"), }, }, }, diff --git a/Systems/a320-misc.xml b/Systems/a320-misc.xml index 04800d0a..27d5feb0 100644 --- a/Systems/a320-misc.xml +++ b/Systems/a320-misc.xml @@ -385,6 +385,28 @@ + + + + + + /instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override eq 1 + + /instrumentation/mk-viii/inputs/discretes/momentary-flap-3-override eq 1 + /controls/flight/flaps-pos ge 4 + + + + + + + + /instrumentation/mk-viii/inputs/discretes/gpws-inhibit eq 0 + + + + + From 361795c89f2d190135b76d250406726dafbdfa95 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 2 Jan 2022 18:46:45 +0000 Subject: [PATCH 18/42] OXygen: fix power supply --- Systems/a320-oxygen.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Systems/a320-oxygen.xml b/Systems/a320-oxygen.xml index 1fb49433..40979221 100644 --- a/Systems/a320-oxygen.xml +++ b/Systems/a320-oxygen.xml @@ -316,11 +316,11 @@ /controls/oxygen/passenger-mask-reset eq 1 - /systems/electrical/bus/dc-ess lt 25 + /systems/electrical/bus/dc-ess-shed lt 25 /systems/oxygen/passenger-oxygen/masks-deploy-cmd eq 1 - /systems/electrical/bus/dc-ess ge 25 + /systems/electrical/bus/dc-ess-shed ge 25 /systems/oxygen/passenger-oxygen/sys-on-light From 14a02470a03a89e7d3d3a11c1f5d3c921fbfeb40 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Mon, 3 Jan 2022 17:58:26 +0000 Subject: [PATCH 19/42] Remove redundant --- Models/Instruments/OHpanel/OHpanel.xml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 8b419635..9f0fba46 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -261,22 +261,6 @@ - - material - Battery-volt - Battery-volt-test - - 1 - 1 - 1 - - - 1 - 1 - 1 - - - select From 11edf58d90ea5d2577977d942c0522af26de31bc Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Mon, 3 Jan 2022 20:46:42 +0000 Subject: [PATCH 20/42] Hydraulics: add new logic for fault lights. Add correct power sourcing for transducers and quantity indications. --- A320-main.xml | 9 +- .../Instruments/Lower-ECAM/Lower-ECAM-hyd.nas | 154 +++++++----- Models/Instruments/OHpanel/OHpanel.xml | 160 ++---------- Nasal/ECAM/ECAM-phases.nas | 4 +- Nasal/Systems/hydraulics.nas | 16 ++ Systems/a320-hydraulic.xml | 233 ++++++++++++++---- 6 files changed, 324 insertions(+), 252 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 5b812a29..2f24d876 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1336,15 +1336,22 @@ 0 - 0 0 + 0 0 + 0 + 0 0 0 + 0 + 0 0 0 0 + 0 0 + 0 + 0 0 diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas index 170cd993..93d1fb75 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas @@ -1,15 +1,6 @@ # A3XX Lower ECAM Canvas # Copyright (c) 2021 Josh Davidson (Octal450) and Jonathan Redpath -var elec_pump_y_ovht = props.globals.initNode("/systems/hydraulic/elec-pump-yellow-ovht", 0, "BOOL"); -var elec_pump_b_ovht = props.globals.initNode("/systems/hydraulic/elec-pump-blue-ovht", 0, "BOOL"); -var y_resv_ovht = props.globals.initNode("/systems/hydraulic/yellow-resv-ovht", 0, "BOOL"); -var b_resv_ovht = props.globals.initNode("/systems/hydraulic/blue-resv-ovht", 0, "BOOL"); -var g_resv_ovht = props.globals.initNode("/systems/hydraulic/green-resv-ovht", 0, "BOOL"); -var y_resv_lo_press = props.globals.initNode("/systems/hydraulic/yellow-resv-lo-air-press", 0, "BOOL"); -var b_resv_lo_press = props.globals.initNode("/systems/hydraulic/blue-resv-lo-air-press", 0, "BOOL"); -var g_resv_lo_press = props.globals.initNode("/systems/hydraulic/green-resv-lo-air-press", 0, "BOOL"); - var canvas_lowerECAMPageHyd = { new: func(svg,name) { @@ -46,22 +37,33 @@ var canvas_lowerECAMPageHyd = # init obj.update_items = [ - props.UpdateManager.FromHashValue("blue", 25, func(val) { - if (val >= 100) { - obj["Press-Blue"].setText(sprintf("%s", math.round(val, 50))); - } else { - obj["Press-Blue"].setText(sprintf("%s", 0)); - } - - if (val > 1450) { - obj["Blue-Line"].setColor(0.0509,0.7529,0.2941); - obj["Blue-Line"].setColorFill(0.0509,0.7529,0.2941); - obj["Blue-Line-Top"].setColorFill(0.0509,0.7529,0.2941); - obj["Blue-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941); - obj["Blue-Indicator"].setColor(0.0509,0.7529,0.2941); - obj["Press-Blue"].setColor(0.0509,0.7529,0.2941); - obj["Blue-label"].setColor(0.8078,0.8039,0.8078); + props.UpdateManager.FromHashList(["blue", "dcEssShed"], 25, func(val) { + if (val.dcEssShed >= 25) { + if (val.blue >= 100) { + obj["Press-Blue"].setText(sprintf("%s", math.round(val.blue, 50))); + } else { + obj["Press-Blue"].setText(sprintf("%s", 0)); + } + + if (val.blue > 1450) { + obj["Blue-Line"].setColor(0.0509,0.7529,0.2941); + obj["Blue-Line"].setColorFill(0.0509,0.7529,0.2941); + obj["Blue-Line-Top"].setColorFill(0.0509,0.7529,0.2941); + obj["Blue-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941); + obj["Blue-Indicator"].setColor(0.0509,0.7529,0.2941); + obj["Press-Blue"].setColor(0.0509,0.7529,0.2941); + obj["Blue-label"].setColor(0.8078,0.8039,0.8078); + } else { + obj["Blue-Line"].setColor(0.7333,0.3803,0); + obj["Blue-Line"].setColorFill(0.7333,0.3803,0); + obj["Blue-Line-Top"].setColorFill(0.7333,0.3803,0); + obj["Blue-Line-Bottom"].setColorFill(0.7333,0.3803,0); + obj["Blue-Indicator"].setColor(0.7333,0.3803,0); + obj["Press-Blue"].setColor(0.7333,0.3803,0); + obj["Blue-label"].setColor(0.7333,0.3803,0); + } } else { + obj["Press-Blue"].setText(sprintf("%s", "XX")); obj["Blue-Line"].setColor(0.7333,0.3803,0); obj["Blue-Line"].setColorFill(0.7333,0.3803,0); obj["Blue-Line-Top"].setColorFill(0.7333,0.3803,0); @@ -71,23 +73,35 @@ var canvas_lowerECAMPageHyd = obj["Blue-label"].setColor(0.7333,0.3803,0); } }), - props.UpdateManager.FromHashValue("yellow", 25, func(val) { - if (val >= 100) { - obj["Press-Yellow"].setText(sprintf("%s", math.round(val, 50))); - } else { - obj["Press-Yellow"].setText(sprintf("%s", 0)); - } - - if (val > 1450) { - obj["Yellow-Line"].setColor(0.0509,0.7529,0.2941); - obj["Yellow-Line"].setColorFill(0.0509,0.7529,0.2941); - obj["Yellow-Line-Top"].setColorFill(0.0509,0.7529,0.2941); - obj["Yellow-Line-Middle"].setColorFill(0.0509,0.7529,0.2941); - obj["Yellow-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941); - obj["Yellow-Indicator"].setColor(0.0509,0.7529,0.2941); - obj["Press-Yellow"].setColor(0.0509,0.7529,0.2941); - obj["Yellow-label"].setColor(0.8078,0.8039,0.8078); + props.UpdateManager.FromHashList(["yellow", "dcEssShed"], 25, func(val) { + if (val.dcEssShed >= 25) { + if (val.yellow >= 100) { + obj["Press-Yellow"].setText(sprintf("%s", math.round(val.yellow, 50))); + } else { + obj["Press-Yellow"].setText(sprintf("%s", 0)); + } + + if (val.yellow > 1450) { + obj["Yellow-Line"].setColor(0.0509,0.7529,0.2941); + obj["Yellow-Line"].setColorFill(0.0509,0.7529,0.2941); + obj["Yellow-Line-Top"].setColorFill(0.0509,0.7529,0.2941); + obj["Yellow-Line-Middle"].setColorFill(0.0509,0.7529,0.2941); + obj["Yellow-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941); + obj["Yellow-Indicator"].setColor(0.0509,0.7529,0.2941); + obj["Press-Yellow"].setColor(0.0509,0.7529,0.2941); + obj["Yellow-label"].setColor(0.8078,0.8039,0.8078); + } else { + obj["Yellow-Line"].setColor(0.7333,0.3803,0); + obj["Yellow-Line"].setColorFill(0.7333,0.3803,0); + obj["Yellow-Line-Top"].setColorFill(0.7333,0.3803,0); + obj["Yellow-Line-Middle"].setColorFill(0.7333,0.3803,0); + obj["Yellow-Line-Bottom"].setColorFill(0.7333,0.3803,0); + obj["Yellow-Indicator"].setColor(0.7333,0.3803,0); + obj["Press-Yellow"].setColor(0.7333,0.3803,0); + obj["Yellow-label"].setColor(0.7333,0.3803,0); + } } else { + obj["Press-Yellow"].setText(sprintf("%s", "XX")); obj["Yellow-Line"].setColor(0.7333,0.3803,0); obj["Yellow-Line"].setColorFill(0.7333,0.3803,0); obj["Yellow-Line-Top"].setColorFill(0.7333,0.3803,0); @@ -98,23 +112,35 @@ var canvas_lowerECAMPageHyd = obj["Yellow-label"].setColor(0.7333,0.3803,0); } }), - props.UpdateManager.FromHashValue("green", 25, func(val) { - if (val >= 100) { - obj["Press-Green"].setText(sprintf("%s", math.round(val, 50))); - } else { - obj["Press-Green"].setText(sprintf("%s", 0)); - } - - if (val > 1450) { - obj["Green-Line"].setColor(0.0509,0.7529,0.2941); - obj["Green-Line"].setColorFill(0.0509,0.7529,0.2941); - obj["Green-Line-Top"].setColorFill(0.0509,0.7529,0.2941); - obj["Green-Line-Middle"].setColorFill(0.0509,0.7529,0.2941); - obj["Green-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941); - obj["Green-Indicator"].setColor(0.0509,0.7529,0.2941); - obj["Press-Green"].setColor(0.0509,0.7529,0.2941); - obj["Green-label"].setColor(0.8078,0.8039,0.8078); + props.UpdateManager.FromHashList(["green", "dcEssShed"], 25, func(val) { + if (val.dcEssShed) { + if (val.green >= 100) { + obj["Press-Green"].setText(sprintf("%s", math.round(val.green, 50))); + } else { + obj["Press-Green"].setText(sprintf("%s", 0)); + } + + if (val.green > 1450) { + obj["Green-Line"].setColor(0.0509,0.7529,0.2941); + obj["Green-Line"].setColorFill(0.0509,0.7529,0.2941); + obj["Green-Line-Top"].setColorFill(0.0509,0.7529,0.2941); + obj["Green-Line-Middle"].setColorFill(0.0509,0.7529,0.2941); + obj["Green-Line-Bottom"].setColorFill(0.0509,0.7529,0.2941); + obj["Green-Indicator"].setColor(0.0509,0.7529,0.2941); + obj["Press-Green"].setColor(0.0509,0.7529,0.2941); + obj["Green-label"].setColor(0.8078,0.8039,0.8078); + } else { + obj["Green-Line"].setColor(0.7333,0.3803,0); + obj["Green-Line"].setColorFill(0.7333,0.3803,0); + obj["Green-Line-Top"].setColorFill(0.7333,0.3803,0); + obj["Green-Line-Middle"].setColorFill(0.7333,0.3803,0); + obj["Green-Line-Bottom"].setColorFill(0.7333,0.3803,0); + obj["Green-Indicator"].setColor(0.7333,0.3803,0); + obj["Press-Green"].setColor(0.7333,0.3803,0); + obj["Green-label"].setColor(0.7333,0.3803,0); + } } else { + obj["Press-Green"].setText(sprintf("%s", "XX")); obj["Green-Line"].setColor(0.7333,0.3803,0); obj["Green-Line"].setColorFill(0.7333,0.3803,0); obj["Green-Line-Top"].setColorFill(0.7333,0.3803,0); @@ -514,14 +540,14 @@ var canvas_lowerECAMPageHyd = }; var input = { - hydBlueResvOvht: "/systems/hydraulic/blue-resv-ovht", - hydGreenResvOvht: "/systems/hydraulic/green-resv-ovht", - hydYellowResvOvht: "/systems/hydraulic/yellow-resv-ovht", - hydBlueResvLoPrs: "/systems/hydraulic/blue-resv-lo-air-press", - hydGreenResvLoPrs: "/systems/hydraulic/green-resv-lo-air-press", - hydYellowResvLoPrs: "/systems/hydraulic/yellow-resv-lo-air-press", - hydYellowElecPumpOvht: "/systems/hydraulic/elec-pump-yellow-ovht", - hydBlueElecPumpOvht: "/systems/hydraulic/elec-pump-blue-ovht", + hydBlueResvOvht: "/systems/hydraulic/relays/blue-reservoir-overheat", + hydGreenResvOvht: "/systems/hydraulic/relays/green-reservoir-overheat", + hydYellowResvOvht: "/systems/hydraulic/relays/yellow-reservoir-overheat", + hydBlueResvLoPrs: "/systems/failures/hydraulic/blue-reservoir-air-press-lo", + hydGreenResvLoPrs: "/systems/failures/hydraulic/green-reservoir-air-press-lo", + hydYellowResvLoPrs: "/systems/failures/hydraulic/yellow-reservoir-air-press-lo", + hydBlueElecPumpOvht: "/systems/failures/hydraulic/blue-elec-ovht", + hydYellowElecPumpOvht: "/systems/failures/hydraulic/yellow-elec-ovht", hydRATPosition: "/systems/hydraulic/sources/rat/position", hydGreenFireValve: "/systems/hydraulic/sources/green-edp/fire-valve", hydYellowFireValve: "/systems/hydraulic/sources/yellow-edp/fire-valve", diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 9f0fba46..7a241247 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -2009,12 +2009,6 @@ false - - - systems/electrical/bus/dc-ess - 25 - - property-toggle controls/hydraulic/switches/green-edp @@ -2030,20 +2024,8 @@ GreenEngPump1F - - - systems/hydraulic/lights/green-edp-fault - 1 - - - controls/hydraulic/switches/green-edp - 1 - - - - controls/switches/annun-test - 1 - + systems/hydraulic/lights/green-edp-fault + controls/switches/annun-test @@ -2053,14 +2035,10 @@ GreenEngPump2O - + controls/hydraulic/switches/green-edp - 0 - - - controls/switches/annun-test - 1 - + + controls/switches/annun-test @@ -2177,12 +2155,6 @@ false - - - systems/electrical/bus/dc-ess - 25 - - property-toggle controls/hydraulic/switches/blue-elec @@ -2198,20 +2170,8 @@ BlueElecPump1F - - - systems/hydraulic/lights/blue-elec-fault - 1 - - - controls/hydraulic/switches/blue-elec - 1 - - - - controls/switches/annun-test - 1 - + systems/hydraulic/lights/blue-elec-fault + controls/switches/annun-test @@ -2221,14 +2181,10 @@ BlueElecPump2O - + controls/hydraulic/switches/blue-elec - 0 - - - controls/switches/annun-test - 1 - + + controls/switches/annun-test @@ -2244,12 +2200,6 @@ false - - - systems/electrical/bus/dc-ess - 25 - - property-toggle controls/hydraulic/switches/ptu @@ -2265,20 +2215,8 @@ PTU1F - - - systems/hydraulic/lights/ptu-fault - 1 - - - controls/hydraulic/switches/ptu - 1 - - - - controls/switches/annun-test - 1 - + systems/hydraulic/lights/ptu-fault + controls/switches/annun-test @@ -2288,14 +2226,10 @@ PTU2O - + controls/hydraulic/switches/ptu - 0 - - - controls/switches/annun-test - 1 - + + controls/switches/annun-test @@ -2311,12 +2245,6 @@ false - - - systems/electrical/bus/dc-ess - 25 - - property-toggle controls/hydraulic/switches/yellow-edp @@ -2332,20 +2260,8 @@ YellowEngPump1F - - - systems/hydraulic/lights/yellow-edp-fault - 1 - - - controls/hydraulic/switches/yellow-edp - 1 - - - - controls/switches/annun-test - 1 - + systems/hydraulic/lights/yellow-edp-fault + controls/switches/annun-test @@ -2355,14 +2271,10 @@ YellowEngPump2O - + controls/hydraulic/switches/yellow-edp - 0 - - - controls/switches/annun-test - 1 - + + controls/switches/annun-test @@ -2378,12 +2290,6 @@ false - - - systems/electrical/bus/dc-ess - 25 - - property-toggle controls/hydraulic/switches/yellow-elec @@ -2399,20 +2305,8 @@ YellowElecPump1F - - - systems/hydraulic/lights/yellow-elec-fault - 1 - - - controls/hydraulic/switches/yellow-elec - 1 - - - - controls/switches/annun-test - 1 - + systems/hydraulic/lights/yellow-elec-fault + controls/switches/annun-test @@ -2422,14 +2316,8 @@ YellowElecPump2O - - controls/hydraulic/switches/yellow-elec - 1 - - - controls/switches/annun-test - 1 - + controls/hydraulic/switches/yellow-elec + controls/switches/annun-test diff --git a/Nasal/ECAM/ECAM-phases.nas b/Nasal/ECAM/ECAM-phases.nas index 6b959355..5d15918b 100644 --- a/Nasal/ECAM/ECAM-phases.nas +++ b/Nasal/ECAM/ECAM-phases.nas @@ -96,6 +96,6 @@ var setPhase = func(newPhase) { } } -setlistener("/ECAM/buttons/recall-btn", func() { - FWC.Flipflop.recallSet.setValue(FWC.Btn.recall.getBoolValue()); +setlistener("/ECAM/buttons/recall-btn", func(val) { + FWC.Flipflop.recallSet.setValue(val.getBoolValue()); }, 0, 0); diff --git a/Nasal/Systems/hydraulics.nas b/Nasal/Systems/hydraulics.nas index fc698241..b0d1ff60 100644 --- a/Nasal/Systems/hydraulics.nas +++ b/Nasal/Systems/hydraulics.nas @@ -17,13 +17,21 @@ var HYD = { }, Fail: { blueElec: props.globals.getNode("/systems/failures/hydraulic/blue-elec"), + blueElecOvht: props.globals.getNode("/systems/failures/hydraulic/blue-elec-ovht"), blueLeak: props.globals.getNode("/systems/failures/hydraulic/blue-leak"), + blueReservoirAirPressLow: props.globals.getNode("/systems/failures/hydraulic/blue-reservoir-air-press-lo"), + blueReservoirOvht: props.globals.getNode("/systems/failures/hydraulic/blue-reservoir-ovht"), greenEng: props.globals.getNode("/systems/failures/hydraulic/green-edp"), greenLeak: props.globals.getNode("/systems/failures/hydraulic/green-leak"), + greenReservoirAirPressLow: props.globals.getNode("/systems/failures/hydraulic/green-reservoir-air-press-lo"), + greenReservoirOvht: props.globals.getNode("/systems/failures/hydraulic/green-reservoir-ovht"), ptuFault: props.globals.getNode("/systems/failures/hydraulic/ptu"), yellowEng: props.globals.getNode("/systems/failures/hydraulic/yellow-edp"), yellowElec: props.globals.getNode("/systems/failures/hydraulic/yellow-elec"), + yellowElecOvht: props.globals.getNode("/systems/failures/hydraulic/yellow-elec-ovht"), yellowLeak: props.globals.getNode("/systems/failures/hydraulic/yellow-leak"), + yellowReservoirAirPressLow: props.globals.getNode("/systems/failures/hydraulic/yellow-reservoir-air-press-lo"), + yellowReservoirOvht: props.globals.getNode("/systems/failures/hydraulic/yellow-reservoir-ovht"), }, Psi: { blue: props.globals.getNode("/systems/hydraulic/blue-psi"), @@ -83,13 +91,21 @@ var HYD = { }, resetFail: func() { me.Fail.blueElec.setBoolValue(0); + me.Fail.blueElecOvht.setBoolValue(0); me.Fail.blueLeak.setBoolValue(0); + me.Fail.blueReservoirAirPressLow.setBoolValue(0); + me.Fail.blueReservoirOvht.setBoolValue(0); me.Fail.greenEng.setBoolValue(0); me.Fail.greenLeak.setBoolValue(0); + me.Fail.greenReservoirAirPressLow.setBoolValue(0); + me.Fail.greenReservoirOvht.setBoolValue(0); me.Fail.ptuFault.setBoolValue(0); me.Fail.yellowEng.setBoolValue(0); me.Fail.yellowElec.setBoolValue(0); + me.Fail.yellowElecOvht.setBoolValue(0); me.Fail.yellowLeak.setBoolValue(0); + me.Fail.yellowReservoirAirPressLow.setBoolValue(0); + me.Fail.yellowReservoirOvht.setBoolValue(0); }, loop: func(notification) { # Decrease accumPressPsi when green and yellow hydraulics aren't pressurized diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml index 30def2b9..bd034982 100644 --- a/Systems/a320-hydraulic.xml +++ b/Systems/a320-hydraulic.xml @@ -5,7 +5,8 @@ /systems/hydraulic/sys-incr-rate - + + @@ -84,7 +85,7 @@ - + @@ -301,6 +302,10 @@ + + + + @@ -437,6 +442,9 @@ /systems/hydraulic/sys-decr-rate + + + @@ -553,11 +561,18 @@ - + /systems/hydraulic/yellow-accumulator-psi 9 + + + + /systems/electrical/bus/dc-ess lt 25 + + + @@ -572,85 +587,105 @@ - + /systems/hydraulic/brakes/pressure-left-psi-input 9 - + + + + /systems/electrical/bus/dc-ess lt 25 + + + + /systems/hydraulic/brakes/pressure-right-psi-input 9 + + + + /systems/electrical/bus/dc-ess lt 25 + + + - + - + - - - /systems/hydraulic/sources/blue-elec/output-psi le 1450 - - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 - - - /systems/hydraulic/blue-qty lt 2.4 + + /systems/electrical/bus/dc-1 ge 25 + /systems/hydraulic/blue-qty lt 2.2 - + - - - /systems/hydraulic/sources/green-edp/output-psi le 1750 - /engines/engine[0]/state eq 3 - - - /systems/hydraulic/green-qty lt 3.5 + + /systems/electrical/bus/dc-1 ge 25 + /systems/hydraulic/green-qty lt 3.0 + + + + + + + /systems/electrical/bus/dc-1 ge 25 + /systems/hydraulic/yellow-qty lt 3.0 + + + + + + + /systems/electrical/bus/dc-1 ge 25 + + /systems/hydraulic/relays/green-reservoir-low-qty-switch eq 1 + /systems/failures/hydraulic/green-reservoir-air-press-lo eq 1 - + - - - /systems/hydraulic/sources/yellow-edp/output-psi le 1750 - /engines/engine[1]/state eq 3 - - - /systems/hydraulic/yellow-qty lt 3.5 + + /systems/electrical/bus/dc-2 ge 25 + + /systems/hydraulic/relays/yellow-reservoir-low-qty-switch eq 1 + /systems/failures/hydraulic/yellow-reservoir-air-press-lo eq 1 - + - - - /systems/hydraulic/sources/yellow-elec/output-psi le 1450 - /systems/hydraulic/sources/yellow-edp/output-psi le 1750 - - /systems/hydraulic/sources/ptu/green-yellow le 1750 - /systems/hydraulic/sources/ptu/yellow-green le 1750 - - - - /systems/hydraulic/yellow-qty lt 3.5 - + + /systems/electrical/bus/dc-ess ge 25 + /systems/failures/hydraulic/blue-reservoir-ovht eq 1 - + - - /systems/hydraulic/yellow-qty lt 3.5 - /systems/hydraulic/green-qty lt 3.5 + + /systems/electrical/bus/dc-1 ge 25 + /systems/failures/hydraulic/green-reservoir-ovht eq 1 + + + + /systems/electrical/bus/dc-2 ge 25 + /systems/failures/hydraulic/yellow-reservoir-ovht eq 1 + + + + @@ -686,4 +721,104 @@ + + + + + + /systems/electrical/bus/dc-2 ge 25 + + /systems/hydraulic/relays/yellow-reservoir-overheat eq 1 + /systems/hydraulic/relays/green-reservoir-overheat eq 1 + + + /systems/hydraulic/relays/green-reservoir-low-qty-air-press-fault eq 1 + /systems/hydraulic/relays/yellow-reservoir-low-qty-air-press-fault eq 1 + + /controls/hydraulic/switches/ptu eq 1 + + + + + + + + + /systems/electrical/bus/dc-1 ge 25 + + /systems/hydraulic/relays/green-reservoir-overheat eq 1 + + + + /systems/hydraulic/sources/green-edp/output-psi le 1750 + /engines/engine[0]/state eq 3 + + /systems/hydraulic/relays/green-reservoir-low-qty-air-press-fault eq 1 + + /controls/hydraulic/switches/green-edp eq 1 + + + + + + + + + /systems/electrical/bus/dc-2 ge 25 + + /systems/hydraulic/relays/yellow-reservoir-overheat eq 1 + + + + /systems/hydraulic/sources/yellow-edp/output-psi le 1750 + /engines/engine[1]/state eq 3 + + /systems/hydraulic/relays/yellow-reservoir-low-qty-air-press-fault eq 1 + + /controls/hydraulic/switches/yellow-edp eq 1 + + + + + + + + + /systems/hydraulic/relays/blue-reservoir-overheat eq 1 + /systems/failures/hydraulic/blue-elec-ovht eq 1 + + + /systems/hydraulic/relays/blue-reservoir-low-qty-switch eq 1 + /systems/failures/hydraulic/blue-reservoir-air-press-lo eq 1 + + /systems/hydraulic/sources/blue-elec/output-psi le 1450 + + /engines/engine[0]/state eq 3 + /engines/engine[1]/state eq 3 + /controls/hydraulic/switches/blue-elec-ovrd eq 1 + + + + /controls/hydraulic/switches/blue-elec eq 1 + + + + + + + /systems/hydraulic/relays/yellow-reservoir-overheat eq 1 + /systems/failures/hydraulic/yellow-elec-ovht eq 1 + + + /systems/hydraulic/relays/yellow-reservoir-low-qty-switch eq 1 + /systems/failures/hydraulic/yellow-reservoir-air-press-lo eq 1 + /systems/hydraulic/sources/yellow-elec/output-psi le 1450 + + /controls/hydraulic/switches/yellow-elec eq 1 + + + + + + From 489411e8c43bc4bd3878f9c97aba89b59ad33053 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Mon, 3 Jan 2022 21:43:55 +0000 Subject: [PATCH 21/42] HYD: improve fire valve code; add 1500 feet inhibition for PTU --- A320-main.xml | 4 +- Systems/a320-hydraulic.xml | 128 +++++++++++++++++++++++++------------ 2 files changed, 88 insertions(+), 44 deletions(-) diff --git a/A320-main.xml b/A320-main.xml index 2f24d876..823c5cf0 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -1340,7 +1340,7 @@ 0 0 0 - 0 + 0 0 0 0 @@ -1348,7 +1348,7 @@ 0 0 0 - 0 + 0 0 0 0 diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml index bd034982..13afd59a 100644 --- a/Systems/a320-hydraulic.xml +++ b/Systems/a320-hydraulic.xml @@ -133,6 +133,16 @@ + + + @@ -204,6 +214,11 @@ + + @@ -233,7 +248,6 @@ /controls/hydraulic/switches/green-edp eq 1 - /systems/hydraulic/sources/green-edp/fire-valve lt 0.10 @@ -250,6 +264,15 @@ + + @@ -269,6 +292,12 @@ + + + @@ -298,7 +327,6 @@ /controls/hydraulic/switches/yellow-edp eq 1 - /systems/hydraulic/sources/yellow-edp/fire-valve lt 0.10 @@ -345,17 +373,20 @@ - - - /systems/hydraulic/green-qty - 1.0 - - - /systems/hydraulic/green-psi-cmd-pump - /systems/hydraulic/sources/ptu/yellow-green - - 0 - + + + + /systems/hydraulic/green-qty + 1.0 + + + /systems/hydraulic/green-psi-cmd-pump + /systems/hydraulic/sources/ptu/yellow-green + + 0 + + /systems/hydraulic/sources/green-edp/fire-valve + @@ -389,17 +420,20 @@ - - - /systems/hydraulic/yellow-qty - 1.0 - - - /systems/hydraulic/yellow-psi-cmd-pump - /systems/hydraulic/sources/ptu/green-yellow - - 0 - + + + + /systems/hydraulic/yellow-qty + 1.0 + + + /systems/hydraulic/yellow-psi-cmd-pump + /systems/hydraulic/sources/ptu/green-yellow + + 0 + + /systems/hydraulic/sources/yellow-edp/fire-valve + @@ -442,10 +476,6 @@ /systems/hydraulic/sys-decr-rate - - - - @@ -455,9 +485,15 @@ + + + + + + /systems/electrical/bus/dc-service-bus ge 25 /gear/gear[0]/compression-norm ne 0 @@ -501,18 +537,38 @@ + + + /position/altitude-ft ge 1500 + /gear/gear[0]/compression-norm ne 0 + + /systems/electrical/bus/dc-service-bus ge 25 /controls/hydraulic/switches/ptu eq 1 /systems/hydraulic/sources/ptu/ptu-hydraulic-condition eq 1 /systems/hydraulic/sources/ptu/ptu-inhibited eq 0 - /systems/electrical/bus/dc-2 ge 25 /systems/failures/hydraulic/ptu ne 1 - /systems/hydraulic/sources/yellow-edp/fire-valve lt 0.10 + + + + + /position/altitude-ft ge 1500 + /gear/gear[0]/compression-norm ne 0 + + /systems/electrical/bus/dc-service-bus ge 25 + /controls/hydraulic/switches/ptu eq 1 + /systems/hydraulic/sources/ptu/ptu-hydraulic-condition eq 1 + /systems/hydraulic/sources/ptu/ptu-inhibited eq 0 + /systems/failures/hydraulic/ptu ne 1 + + + + @@ -527,18 +583,6 @@ 120 - - - - /controls/hydraulic/switches/ptu eq 1 - /systems/hydraulic/sources/ptu/ptu-hydraulic-condition eq 1 - /systems/hydraulic/sources/ptu/ptu-inhibited eq 0 - /systems/electrical/bus/dc-2 ge 25 - /systems/failures/hydraulic/ptu ne 1 - /systems/hydraulic/sources/green-edp/fire-valve lt 0.10 - - - From 57de1cc8e3724e53dcee9148c04d90785c9b2feb Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Mon, 3 Jan 2022 21:47:35 +0000 Subject: [PATCH 22/42] Bugfix fire valve --- Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas | 2 +- Systems/a320-hydraulic.xml | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas index 93d1fb75..6e51edda 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-hyd.nas @@ -557,7 +557,7 @@ var input = { hydYellowEDPPumpSwitch: "/controls/hydraulic/switches/yellow-edp", hydPTUSwitch: "/controls/hydraulic/switches/ptu", hydPTUFault: "/systems/failures/hydraulic/ptu", - hydPTUActive: "/systems/hydraulic/sources/ptu/ptu-hydraulic-condition", + hydPTUActive: "/systems/hydraulic/sources/ptu/ptu-loop-sound-cmd", hydPTUDiff: "/systems/hydraulic/yellow-psi-diff", hydBlueQTY: "/systems/hydraulic/blue-qty", hydGreenQTY: "/systems/hydraulic/green-qty", diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml index 13afd59a..b929eb70 100644 --- a/Systems/a320-hydraulic.xml +++ b/Systems/a320-hydraulic.xml @@ -385,7 +385,10 @@ 0 - /systems/hydraulic/sources/green-edp/fire-valve + + 1 + /systems/hydraulic/sources/green-edp/fire-valve + @@ -432,7 +435,10 @@ 0 - /systems/hydraulic/sources/yellow-edp/fire-valve + + 1 + /systems/hydraulic/sources/yellow-edp/fire-valve + @@ -557,7 +563,7 @@ - /position/altitude-ft ge 1500 + /position/gear-agl-ft ge 1500 /gear/gear[0]/compression-norm ne 0 /systems/electrical/bus/dc-service-bus ge 25 From eb08cabaaafdaba1ddaa9ea14c32d23f6f6e2f4f Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Mon, 3 Jan 2022 21:55:01 +0000 Subject: [PATCH 23/42] Prevent ALTN / DIRECT law during eng start because timer condition was incorrect --- Nasal/ECAM/ECAM-logic.nas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index b8f9a7d0..fe6a4406 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -2058,7 +2058,7 @@ var messages_priority_2 = func { } gearPosition = pts.Gear.position[1].getValue(); - if (directLaw.clearFlag == 0 and warningNodes.Timers.directLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) { + if (directLaw.clearFlag == 0 and warningNodes.Timers.directLaw.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) { directLaw.active = 1; directLawProt.active = 1; if (directLawMaxSpeed.clearFlag == 0 and !fbw.tripleADRFail and gearPosition != 1) { @@ -2096,7 +2096,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(directLawSpdBrk2); } - if (altnLaw.clearFlag == 0 and warningNodes.Timers.altnLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) { + if (altnLaw.clearFlag == 0 and warningNodes.Timers.altnLaw.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) { altnLaw.active = 1; altnLawProt.active = 1; if (altnLawMaxSpeed.clearFlag == 0 and altnLawMaxSpeed2.clearFlag == 0 and !fbw.tripleADRFail) { From db5ef87acd06da4651c561f2f60d2305a214aaba Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 4 Jan 2022 17:24:49 +0000 Subject: [PATCH 24/42] Fix FMGC --- Nasal/FMGC/FMGC.nas | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 1bdb64a4..aaf29b90 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -216,7 +216,8 @@ var FMGCInternal = { mngSpd: 0, mngSpdCmd: 0, - landingTime: -99, + # This can't be init to -98, because we don't want it to run until WOW has gone to false and back to true + landingTime: -98, blockFuelTime: -99, fuelPredTime: -99, @@ -1142,12 +1143,15 @@ var switchDatabase = func { # Landing to phase 7 setlistener("/gear/gear[1]/wow", func(val) { + print("Called gear"); if (val.getValue() == 0 and timer30secLanding.isRunning) { + print("Stopping timer"); timer30secLanding.stop(); FMGCInternal.landingTime = -99; } if (val.getValue() and FMGCInternal.landingTime == -99) { + print("Starting timer"); timer30secLanding.start(); FMGCInternal.landingTime = pts.Sim.Time.elapsedSec.getValue(); } @@ -1217,8 +1221,9 @@ setlistener("/FMGC/internal/fuel-calculating", func() { # Maketimers var timer30secLanding = maketimer(1, func() { - if (pts.Sim.Time.elapsedSec.getValue() > FMGCInternal.landingTime + 30) { + if (pts.Sim.Time.elapsedSec.getValue() > (FMGCInternal.landingTime + 30)) { FMGCInternal.phase = 7; + FMGCNodes.phase.setValue(7); if (FMGCInternal.costIndexSet) { setprop("/FMGC/internal/last-cost-index", FMGCInternal.costIndex); From 22d8a4bca652c948bbf633093208d2d2f6d6c674 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 4 Jan 2022 17:27:31 +0000 Subject: [PATCH 25/42] Remove debug statements --- Nasal/FMGC/FMGC.nas | 3 --- 1 file changed, 3 deletions(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index aaf29b90..ab1c1097 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -1143,15 +1143,12 @@ var switchDatabase = func { # Landing to phase 7 setlistener("/gear/gear[1]/wow", func(val) { - print("Called gear"); if (val.getValue() == 0 and timer30secLanding.isRunning) { - print("Stopping timer"); timer30secLanding.stop(); FMGCInternal.landingTime = -99; } if (val.getValue() and FMGCInternal.landingTime == -99) { - print("Starting timer"); timer30secLanding.start(); FMGCInternal.landingTime = pts.Sim.Time.elapsedSec.getValue(); } From 383ffcf969142b511637394bf2b506ce08fffd07 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Wed, 5 Jan 2022 16:38:04 +0000 Subject: [PATCH 26/42] Altitude constraints - add ability to set above / below constraints --- Nasal/MCDU/F-PLN.nas | 51 +++++++++++++++++++++++++++++------------- Nasal/MCDU/VERTREV.nas | 42 +++++++++++++++++++++++++++------- 2 files changed, 69 insertions(+), 24 deletions(-) diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas index 65c2348c..a83f7c0f 100644 --- a/Nasal/MCDU/F-PLN.nas +++ b/Nasal/MCDU/F-PLN.nas @@ -122,11 +122,17 @@ var fplnItem = { return [" " ~ fmgc.flightPlanController.fromWptAlt, "mag"]; } elsif (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) { var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed + var cstrAlt = ""; + if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) { - return [" " ~ sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)), tcol]; + cstrAlt = "FL" ~ math.round(num(me.wp.alt_cstr) / 100); } else { - return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol]; + cstrAlt = me.wp.alt_cstr; } + + cstrAlt = (me.wp.alt_cstr_type == "above") ? "+" ~ cstrAlt : cstrAlt; + cstrAlt = (me.wp.alt_cstr_type == "below") ? "-" ~ cstrAlt : cstrAlt; + return [sprintf("%6s", cstrAlt), tcol]; } else { return ["------", "wht"]; } @@ -208,25 +214,25 @@ var fplnItem = { } elsif (find("/", scratchpadStore) != -1) { var scratchpadSplit = split("/", scratchpadStore); - if (size(scratchpadSplit[0]) == 0) { - if (num(scratchpadSplit[1]) != nil and (size(scratchpadSplit[1]) == 4 or size(scratchpadSplit[1]) == 5) and scratchpadSplit[1] >= 0 and scratchpadSplit[1] <= 39000) { - me.wp.setAltitude(math.round(scratchpadSplit[1], 10), "at"); + if (size(scratchpadSplit[0]) != 0) { + if (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350) { + me.wp.setSpeed(scratchpadSplit[0], "at"); mcdu_scratchpad.scratchpads[me.computer].empty(); } else { mcdu_message(me.computer, "FORMAT ERROR"); } + } + + if (right(scratchpadSplit[1], 1) == "+") { + validateAltCstrFpln(left(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "above", me); + } elsif (right(scratchpadSplit[1], 1) == "-") { + validateAltCstrFpln(left(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "below", me); + } elsif (left(scratchpadSplit[1], 1) == "+") { + validateAltCstrFpln(right(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "above", me); + } elsif (left(scratchpadSplit[1], 1) == "-") { + validateAltCstrFpln(right(scratchpadSplit[1], size(scratchpadSplit[1]) - 1), "below", me); } else { - if (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350 and - num(scratchpadSplit[1]) != nil and (size(scratchpadSplit[1]) == 4 or size(scratchpadSplit[1]) == 5) and scratchpadSplit[1] >= 0 and scratchpadSplit[1] <= 39000) { - me.wp.setSpeed(scratchpadSplit[0], "at"); - me.wp.setAltitude(math.round(scratchpadSplit[1], 10), "at"); - mcdu_scratchpad.scratchpads[me.computer].empty(); - } elsif (num(scratchpadSplit[0]) != nil and size(scratchpadSplit[0]) == 3 and scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 350 and size(scratchpadSplit[1]) == 0) { - me.wp.setSpeed(scratchpadSplit[0], "at"); - mcdu_scratchpad.scratchpads[me.computer].empty(); - } else { - mcdu_message(me.computer, "FORMAT ERROR"); - } + validateAltCstrFpln(scratchpadSplit[1], "at", me); } } elsif (num(scratchpadStore) != nil and size(scratchpadStore) == 3 and scratchpadStore >= 100 and scratchpadStore <= 350) { me.wp.setSpeed(scratchpadStore, "at"); @@ -240,6 +246,19 @@ var fplnItem = { }, }; +var validateAltCstrFpln = func(scratchpadStore, type, self) { + if (num(scratchpadStore) != nil and (size(scratchpadStore) >= 3 and size(scratchpadStore) <= 5)) { + if (scratchpadStore >= 100 and scratchpadStore <= 39000) { + self.wp.setAltitude(math.round(scratchpadStore, 10), type); + mcdu_scratchpad.scratchpads[self.computer].empty(); + } else { + mcdu_message(self.computer, "ENTRY OUT OF RANGE"); + } + } else { + mcdu_message(self.computer, "FORMAT ERROR"); + } +} + var staticText = { new: func(computer, text) { var sT = {parents:[staticText]}; diff --git a/Nasal/MCDU/VERTREV.nas b/Nasal/MCDU/VERTREV.nas index e3ced48d..000ec6d3 100644 --- a/Nasal/MCDU/VERTREV.nas +++ b/Nasal/MCDU/VERTREV.nas @@ -55,11 +55,17 @@ var vertRev = { getAlt: func() { if (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) { var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed + var cstrAlt = ""; + if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) { - return [sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)) ~ " ", tcol]; + cstrAlt = "FL" ~ math.round(num(me.wp.alt_cstr) / 100); } else { - return [sprintf("%5.0f", me.wp.alt_cstr) ~ " ", tcol]; + cstrAlt = me.wp.alt_cstr; } + + cstrAlt = (me.wp.alt_cstr_type == "above") ? "+" ~ cstrAlt : cstrAlt; + cstrAlt = (me.wp.alt_cstr_type == "below") ? "-" ~ cstrAlt : cstrAlt; + return [cstrAlt ~ (size(cstrAlt) == 6 ? "" : " "), tcol]; } else { return [nil,nil]; } @@ -242,18 +248,38 @@ var vertRev = { mcdu_scratchpad.scratchpads[me.computer].empty(); me._setupPageWithData(); canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); - } elsif (num(scratchpadStore) != nil and (size(scratchpadStore) == 4 or size(scratchpadStore) == 5) and scratchpadStore >= 0 and scratchpadStore <= 39000) { - me.wp.setAltitude(math.round(scratchpadStore, 10), "at"); - mcdu_scratchpad.scratchpads[me.computer].empty(); - me._setupPageWithData(); - canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); } else { - mcdu_message(me.computer, "FORMAT ERROR"); + if (right(scratchpadStore, 1) == "+") { + validateAltCstr(left(scratchpadStore, size(scratchpadStore) - 1), "above", me); + } elsif (right(scratchpadStore, 1) == "-") { + validateAltCstr(left(scratchpadStore, size(scratchpadStore) - 1), "below", me); + } elsif (left(scratchpadStore, 1) == "+") { + validateAltCstr(right(scratchpadStore, size(scratchpadStore) - 1), "above", me); + } elsif (left(scratchpadStore, 1) == "-") { + validateAltCstr(right(scratchpadStore, size(scratchpadStore) - 1), "below", me); + } else { + validateAltCstr(scratchpadStore, "at", me); + } } } }, }; +var validateAltCstr = func(scratchpadStore, type, self) { + if (num(scratchpadStore) != nil and (size(scratchpadStore) >= 3 and size(scratchpadStore) <= 5)) { + if (scratchpadStore >= 100 and scratchpadStore <= 39000) { + self.wp.setAltitude(math.round(scratchpadStore, 10), type); + mcdu_scratchpad.scratchpads[self.computer].empty(); + self._setupPageWithData(); + canvas_mcdu.pageSwitch[self.computer].setBoolValue(0); + } else { + mcdu_message(self.computer, "ENTRY OUT OF RANGE"); + } + } else { + mcdu_message(self.computer, "FORMAT ERROR"); + } +} + var updateCrzLvlCallback = func () { if (canvas_mcdu.myVertRev[0] != nil) { canvas_mcdu.myVertRev[0].updateR5(); From fa634ef032056f97efb5e68205e12b0f958de082 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 6 Jan 2022 17:47:03 +0000 Subject: [PATCH 27/42] Add SD pages to level 1 warnings --- Nasal/ECAM/ECAM-logic.nas | 38 +++++++++-- Nasal/ECAM/ECAM-messages.nas | 61 ++++++++++-------- Nasal/ECAM/ECAM-nodes.nas | 1 + Nasal/Systems/hydraulics.nas | 7 ++ Systems/a320-fwc.xml | 120 +++++++++++++++++++++-------------- Systems/ecam-proprules.xml | 22 +++++++ 6 files changed, 168 insertions(+), 81 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index fe6a4406..056a0064 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -626,7 +626,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(park_brk_config); } - if (lrElevFault.clearFlag == 0 and warningNodes.Timers.LRElevFault.getValue()) { + if (lrElevFault.clearFlag == 0 and warningNodes.Timers.LRElevFault.getValue() == 1) { lrElevFault.active = 1; if (lrElevFaultSpeed.clearFlag == 0) { lrElevFaultSpeed.active = 1; @@ -829,6 +829,32 @@ var messages_priority_3 = func { ECAM_controller.warningReset(lavatorySmokeComm); } + # CAB PRESS EXESS RESIDUAL PRESS + if (excessResidPress.clearFlag == 0 and warningNodes.Logic.excessPress.getValue() == 1 and phaseVar == 10) { + if (excessResidPressPack1.clearFlag == 0) { + excessResidPressPack1.active = 1; + } else { + ECAM_controller.warningReset(excessResidPressPack1); + } + + if (excessResidPressPack2.clearFlag == 0) { + excessResidPressPack2.active = 1; + } else { + ECAM_controller.warningReset(excessResidPressPack2); + } + + if (excessResidPressCabCr.clearFlag == 0) { + excessResidPressCabCr.active = 1; + } else { + ECAM_controller.warningReset(excessResidPressCabCr); + } + } else { + ECAM_controller.warningReset(excessResidPress); + ECAM_controller.warningReset(excessResidPressPack1); + ECAM_controller.warningReset(excessResidPressPack2); + ECAM_controller.warningReset(excessResidPressCabCr); + } + # ESS on BAT # NEW EMER ELEC CONFIG if (essBusOnBat.clearFlag == 0 and warningNodes.Timers.staticInverter.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) { @@ -977,13 +1003,13 @@ var messages_priority_3 = func { ECAM_controller.warningReset(hydBYloPrRat); } - if (hydBYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and systems.HYD.Qty.yellow.getValue() >= 3.5) { + if (hydBYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and !systems.HYD.Pump.yellowElecFail.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and !systems.HYD.Fail.yellowReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.yellowReservoirOvht.getBoolValue() and !systems.HYD.Warnings.yellowLoLvl.getBoolValue()) { hydBYloPrYElec.active = 1; } else { ECAM_controller.warningReset(hydBYloPrYElec); } - if (hydBYloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 2.4) { + if (hydBYloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 1.8 and !systems.HYD.Fail.blueReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.blueReservoirOvht.getBoolValue() and !systems.HYD.Warnings.blueLoLvl.getBoolValue()) { hydBYloPrRatOn.active = 1; } else { ECAM_controller.warningReset(hydBYloPrRatOn); @@ -1052,7 +1078,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(hydGBloPrRat); } - if (hydGBloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 2.4) { + if (hydGBloPrRatOn.clearFlag == 0 and systems.HYD.Rat.position.getValue() == 0 and systems.HYD.Qty.blue.getValue() >= 1.8 and !systems.HYD.Fail.blueReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.blueReservoirOvht.getBoolValue() and !systems.HYD.Warnings.blueLoLvl.getBoolValue()) { hydGBloPrRatOn.active = 1; } else { ECAM_controller.warningReset(hydGBloPrRatOn); @@ -1105,7 +1131,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(hydGBloPrFmsPredict); } - if (hydGYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.greenYellow.getValue()) { + if (hydGYloPr.clearFlag == 0 and warningNodes.Logic.greenYellow.getValue()) { hydGYloPr.active = 1; if (hydGYloPrPtu.clearFlag == 0 and systems.HYD.Switch.ptu.getValue() != 0) { hydGYloPrPtu.active = 1; @@ -1125,7 +1151,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(hydGYloPrYEng); } - if (hydGYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and systems.HYD.Qty.yellow.getValue() >= 3.5) { + if (hydGYloPrYElec.clearFlag == 0 and !systems.HYD.Pump.yellowElec.getValue() and !systems.HYD.Pump.yellowElecFail.getValue() and systems.ELEC.Bus.ac2.getValue() >= 110 and !systems.HYD.Fail.yellowReservoirAirPressLow.getBoolValue() and !systems.HYD.Warnings.yellowReservoirOvht.getBoolValue() and !systems.HYD.Warnings.yellowLoLvl.getBoolValue()) { hydGYloPrYElec.active = 1; } else { ECAM_controller.warningReset(hydGYloPrYElec); diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 0be5d0d9..16f2b6dc 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -18,7 +18,7 @@ var warnings = std.Vector.new([ var overspeedGear = warning.new(msg: "-VLE...........280 /.67", colour: "r"), var overspeedFlap = warning.new(msg: "-VFE................XXX", colour: "r"), - var allEngFail = warning.new(msg: "ENG ALL ENGINES FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var allEngFail = warning.new(msg: "ENG ALL ENGINES FAILURE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var allEngFailElec = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"), var allEngFailSPD1 = warning.new(msg: " OPT RELIGHT SPD.260/.77", colour: "c"), var allEngFailSPD2 = warning.new(msg: " OPT RELIGHT SPD.270/.77", colour: "c"), @@ -40,7 +40,7 @@ var warnings = std.Vector.new([ var eng2ThrLvrAbvIdle2 = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"), # ENG 1 FIRE (flight) - var eng1Fire = warning.new(msg: "ENG 1 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var eng1Fire = warning.new(msg: "ENG 1 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var eng1FireFllever = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"), var eng1FireFlmaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"), var eng1FireFlPB = warning.new(msg: " -ENG 1 FIRE P/B....PUSH", colour: "c"), @@ -63,7 +63,7 @@ var warnings = std.Vector.new([ var eng1FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"), # ENG 2 FIRE (flight) - var eng2Fire = warning.new(msg: "ENG 2 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var eng2Fire = warning.new(msg: "ENG 2 FIRE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var eng2FireFllever = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"), var eng2FireFlmaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"), var eng2FireFlPB = warning.new(msg: " -ENG 2 FIRE P/B....PUSH", colour: "c"), @@ -85,6 +85,13 @@ var warnings = std.Vector.new([ var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"), var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"), + # APU FIRE + var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apuPage"), + var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"), + var apuFireAgentTimer = warning.new(msg: " -AGENT AFT 10 S...DISCH", colour: "c"), + var apuFireAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), + var apuFireMaster = warning.new(msg: " -MASTER SW..........OFF", 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"), @@ -99,28 +106,28 @@ var warnings = std.Vector.new([ 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 - var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apuPage"), - var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"), - var apuFireAgentTimer = warning.new(msg: " -AGENT AFT 10 S...DISCH", colour: "c"), - var apuFireAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), - var apuFireMaster = warning.new(msg: " -MASTER SW..........OFF", colour: "c"), - # Config var slats_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0), var slats_config_1 = warning.new(msg: "SLATS NOT IN T.O. CONFIG", colour: "r", aural: 0, light: 0), var flaps_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0), var flaps_config_1 = warning.new(msg: "FLAPS NOT IN T.O. CONFIG", colour: "r", aural: 0, light: 0), - var spd_brk_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0), + var spd_brk_config = warning.new(msg: "CONFIG", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"), var spd_brk_config_1 = warning.new(msg: "SPD BRK NOT RETRACTED", colour: "r", aural: 0, light: 0), - var pitch_trim_config = warning.new(msg: "CONFIG PITCH TRIM", colour: "r", aural: 0, light: 0), + var pitch_trim_config = warning.new(msg: "CONFIG PITCH TRIM", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"), var pitch_trim_config_1 = warning.new(msg: " NOT IN T.O. RANGE", colour: "r", aural: 0, light: 0), - var rud_trim_config = warning.new(msg: "CONFIG RUD TRIM", colour: "r", aural: 0, light: 0), + var rud_trim_config = warning.new(msg: "CONFIG RUD TRIM", colour: "r", aural: 0, light: 0, sdPage: "fctlPage"), var rud_trim_config_1 = warning.new(msg: " NOT IN T.O. RANGE", colour: "r", aural: 0, light: 0), var park_brk_config = warning.new(msg: "CONFIG PARK BRK ON", colour: "r", aural: 0, light: 0), + var l_sidestick_fault = warning.new(msg: "CONFIG L SIDESTICK FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var l_sidestick_fault_to = warning.new(msg: " (BY TAKE OVER)", colour: "r"), + var l_sidestick_fault_pb = warning.new(msg: " -L TAKE OVER....DEPRESS", colour: "c"), + var r_sidestick_fault = warning.new(msg: "CONFIG R SIDESTICK FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var r_sidestick_fault_to = warning.new(msg: " (BY TAKE OVER)", colour: "r"), + var r_sidestick_fault_pb = warning.new(msg: " -R TAKE OVER....DEPRESS", colour: "c"), + # EXCESS CAB ALT - var excessCabAlt = warning.new(msg: "CAB PR EXCESS CAB ALT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var excessCabAlt = warning.new(msg: "CAB PR EXCESS CAB ALT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "cabPressPage"), var excessCabAltMask = warning.new(msg: " -CREW OXY MASKS.....USE", colour: "c"), var excessCabAltSigns = warning.new(msg: " -SIGNS...............ON", colour: "c"), var excessCabAltEmerD = warning.new(msg: " •EMER DESCENT:", colour: "w"), @@ -137,21 +144,21 @@ var warnings = std.Vector.new([ var excessCabAltMasks = warning.new(msg: " -PAX OXY MASKS...MAN ON", colour: "c"), # ENG 1 OIL LO PR - var eng1OilLoPr = warning.new(msg: "ENG 1 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var eng1OilLoPr = warning.new(msg: "ENG 1 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var eng1OilLoPrIf = warning.new(msg: " •IF OIL PR < 13 PSI :", colour: "w"), var eng1OilLoPrIf2 = warning.new(msg: " •IF OIL PR < 60 PSI :", colour: "w"), var eng1OilLoPrThrot = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"), var eng1OilLoPrMaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"), # ENG 2 OIL LO PR - var eng2OilLoPr = warning.new(msg: "ENG 2 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var eng2OilLoPr = warning.new(msg: "ENG 2 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "enginePage"), var eng2OilLoPrIf = warning.new(msg: " •IF OIL PR < 13 PSI :", colour: "w"), var eng2OilLoPrIf2 = warning.new(msg: " •IF OIL PR < 60 PSI :", colour: "w"), var eng2OilLoPrThrot = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"), var eng2OilLoPrMaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"), # FCTL L+R ELEV FAULT - var lrElevFault = warning.new(msg: "F/CTL L+R ELEV FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var lrElevFault = warning.new(msg: "F/CTL L+R ELEV FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "fctlPage"), var lrElevFaultSpeed = warning.new(msg: " MAX SPEED.......320/.77", colour: "c"), var lrElevFaultTrim = warning.new(msg: " -MAN PITCH TRIM.....USE", colour: "c"), var lrElevFaultSpdBrk = warning.new(msg: " SPD BRK......DO NOT USE", colour: "c"), @@ -159,7 +166,7 @@ var warnings = std.Vector.new([ # Gear not down var gearNotDown = warning.new(msg: "L/G GEAR NOT DOWN", colour: "r", aural: 0, light: 0, isMainMsg: 1), - var gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "wheelPage"), var gearNotDownLockedRec = warning.new(msg: " -L/G LEVER......RECYCLE", colour: "c"), var gearNotDownLockedWork = warning.new(msg: " •IF UNSUCCESSFUL:", colour: "w"), var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "w"), @@ -169,14 +176,14 @@ var warnings = std.Vector.new([ var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0, isMainMsg: 1), # Cargo smoke - var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "condPage"), var cargoSmokeFwdFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"), var cargoSmokeFwdGrdClsd = warning.new(msg: " •IF FWD CRG CLSD:", colour: "w"), var cargoSmokeFwdAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), var cargoSmokeFwdGrd = warning.new(msg: " •WHEN ON GROUND", colour: "w"), var cargoSmokeFwdDoors = warning.new(msg: " BEFORE OPEN CRG DOORS:", colour: "w"), var cargoSmokeFwdDisemb = warning.new(msg: "-PAX..........DISEMBARK", colour: "c"), - var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "condPage"), var cargoSmokeAftFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"), var cargoSmokeAftGrdClsd = warning.new(msg: " •IF AFT CRG CLSD:", colour: "w"), var cargoSmokeAftAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), @@ -189,18 +196,18 @@ var warnings = std.Vector.new([ 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 excessResidPress = warning.new(msg: "CAB PR EXCES RESIDUAL PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "cabPressPage"), 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 essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "elecPage"), 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), + var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "elecPage"), var emerconfigMinRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"), var emerconfigGen = warning.new(msg: " -GEN 1+2....OFF THEN ON", colour: "c"), var emerconfigGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"), @@ -219,7 +226,7 @@ var warnings = std.Vector.new([ 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), + var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"), var hydBYloPrRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"), var hydBYloPrYElec = warning.new(msg: " -YELLOW ELEC PUMP....ON", colour: "c"), var hydBYloPrRatOn = warning.new(msg: " -RAT.............MAN ON", colour: "c"), @@ -232,7 +239,7 @@ var warnings = std.Vector.new([ var hydBYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), # G + B LO PR - var hydGBloPr = warning.new(msg: "HYD G+B SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var hydGBloPr = warning.new(msg: "HYD G+B SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"), var hydGBloPrRat = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"), var hydGBloPrRatOn = warning.new(msg: " -RAT.............MAN ON", colour: "c"), var hydGBloPrBElec = warning.new(msg: " -BLUE ELEC PUMP.....OFF", colour: "c"), @@ -243,7 +250,7 @@ var warnings = std.Vector.new([ var hydGBloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), # G + Y LO PR - var hydGYloPr = warning.new(msg: "HYD G+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var hydGYloPr = warning.new(msg: "HYD G+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "hydraulicPage"), var hydGYloPrPtu = warning.new(msg: " -PTU................OFF", colour: "c"), var hydGYloPrGEng = warning.new(msg: " -GREEN ENG 1 PUMP...OFF", colour: "c"), var hydGYloPrYEng = warning.new(msg: " -YELLOW ENG 2 PUMP..OFF", colour: "c"), @@ -253,7 +260,7 @@ var warnings = std.Vector.new([ var hydGYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), # AIR BLEED LEAK - var airBleedLeak = warning.new(msg: "AIR BLEED LEAK ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var airBleedLeak = warning.new(msg: "AIR BLEED LEAK ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "bleedPage"), var airBleedLeakShut = warning.new(msg: " -X BLEED..........SHUT", colour: "c"), # LEVEL 2 WARN diff --git a/Nasal/ECAM/ECAM-nodes.nas b/Nasal/ECAM/ECAM-nodes.nas index d19bf137..b13bb41a 100644 --- a/Nasal/ECAM/ECAM-nodes.nas +++ b/Nasal/ECAM/ECAM-nodes.nas @@ -151,6 +151,7 @@ var warningNodes = { gen1Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-1-off"), gen2Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-2-off"), spdBrkOut: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-still-out"), + excessPress: props.globals.initNode("/ECAM/warnings/press/exess-residual-pressure"), }, Timers: { apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), diff --git a/Nasal/Systems/hydraulics.nas b/Nasal/Systems/hydraulics.nas index b0d1ff60..a6c0faac 100644 --- a/Nasal/Systems/hydraulics.nas +++ b/Nasal/Systems/hydraulics.nas @@ -44,6 +44,7 @@ var HYD = { }, Pump: { yellowElec: props.globals.getNode("/systems/hydraulic/sources/yellow-elec/pump-operate"), + yellowElecFail: props.globals.getNode("/ECAM/warnings/hyd/yellow-elec-pump-fail"), }, Qty: { blueInput: props.globals.initNode("/systems/hydraulic/blue-qty-input", 0, "INT"), @@ -74,6 +75,12 @@ var HYD = { blueAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/blue-abnorm-lo-pr"), greenAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/green-abnorm-lo-pr"), yellowAbnormLoPr: props.globals.getNode("/ECAM/warnings/hyd/yellow-abnorm-lo-pr"), + blueLoLvl: props.globals.getNode("/systems/hydraulic/relays/blue-reservoir-low-qty-switch"), + greenLoLvl: props.globals.getNode("/systems/hydraulic/relays/green-reservoir-low-qty-switch"), + yellowLoLvl: props.globals.getNode("/systems/hydraulic/relays/yellow-reservoir-low-qty-switch"), + blueReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/blue-reservoir-overheat"), + greenReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/green-reservoir-overheat"), + yellowReservoirOvht: props.globals.getNode("/systems/hydraulic/relays/yellow-reservoir-overheat"), }, init: func() { me.resetFail(); diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index b59f0d73..5e52b0f8 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -3146,6 +3146,38 @@ + + + + + + /ECAM/phases/phase-calculation/engines-1-2-not-running eq 1 + /ECAM/timer/ground-calc eq 1 + + + + + /ECAM/warnings/press/exess-residual-pressure-ground-input + 0.14285714285 + 100 + + + + + + /ECAM/warnings/press/exess-residual-pressure-ground eq 1 + /systems/pressurization/deltap-norm ge 0.1 + + + + + /ECAM/warnings/press/exess-residual-pressure-input + 0.2 + 100 + + + + @@ -3644,9 +3676,9 @@ - - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + + /ECAM/warnings/logic/eng/JE1NORUN eq 0 + /ECAM/warnings/logic/eng/JE2NORUN eq 0 @@ -3659,8 +3691,8 @@ - /engines/engine[0]/state ne 3 - /engines/engine[1]/state ne 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 /ECAM/timer/ground-calc eq 0 @@ -3674,7 +3706,7 @@ - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 0 /ECAM/warning-phase ne 1 /ECAM/warning-phase ne 2 @@ -3693,7 +3725,7 @@ - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 0 /ECAM/warning-phase ne 1 /ECAM/warning-phase ne 2 @@ -3781,21 +3813,8 @@ - - - - /ECAM/warning-phase le 2 - /ECAM/warning-phase ge 9 - - /engines/engine[0]/state eq 3 - - - /ECAM/warning-phase gt 2 - /ECAM/warning-phase lt 9 - /ECAM/warning-phase ne 4 - /ECAM/warning-phase ne 5 - - + /ECAM/warning-phase ne 4 + /ECAM/warning-phase ne 5 /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1 @@ -3804,21 +3823,8 @@ - - - - /ECAM/warning-phase le 2 - /ECAM/warning-phase ge 9 - - /engines/engine[1]/state eq 3 - - - /ECAM/warning-phase gt 2 - /ECAM/warning-phase lt 9 - /ECAM/warning-phase ne 4 - /ECAM/warning-phase ne 5 - - + /ECAM/warning-phase ne 4 + /ECAM/warning-phase ne 5 /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1 @@ -3827,8 +3833,7 @@ - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/dual-failure eq 0 /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1 /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1 @@ -3837,18 +3842,16 @@ - /ECAM/timer/ground-calc eq 0 - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + /ECAM/timer/ground-calc ne 1 + /ECAM/warnings/logic/eng/dual-failure eq 0 - /ECAM/timer/ground-calc eq 0 - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + /ECAM/timer/ground-calc ne 1 + /ECAM/warnings/logic/eng/dual-failure eq 0 /ECAM/warnings/logic/SFLAPEXT eq 1 @@ -3872,9 +3875,8 @@ - /ECAM/timer/ground-calc eq 0 - /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 + /ECAM/timer/ground-calc ne 1 + /ECAM/warnings/logic/eng/dual-failure eq 0 /ECAM/warnings/logic/SFLAPEXT eq 1 @@ -3900,6 +3902,28 @@ + + + + /systems/hydraulic/sources/yellow-elec/pump-operate eq 1 + /systems/hydraulic/yellow-psi lt 1450 + + + + + + + + /systems/hydraulic/sources/yellow-elec/pump-operate eq 1 + /systems/hydraulic/yellow-psi ge 1450 + + + /ECAM/warnings/logic/phase-2-pulse-input eq 1 + /ECAM/warnings/logic/phase-2-pulse eq 1 + + + + diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index f389f971..2d30dc21 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -586,6 +586,17 @@ /ECAM/warnings/timer/phase-1-pulse + + monostable + + + /ECAM/warnings/logic/phase-2-pulse-input + + /ECAM/warnings/logic/phase-2-pulse + + monostable + + + RS + + /ECAM/warnings/hyd/yellow-elec-pump-fail-set + + + /ECAM/warnings/hyd/yellow-elec-pump-fail-reset + + /ECAM/warnings/hyd/yellow-elec-pump-fail + From fd5d4676ffaf0e816bbce17ad0d8bb9950ce3348 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 6 Jan 2022 18:41:15 +0000 Subject: [PATCH 28/42] Excess cabin press --- Nasal/ECAM/ECAM-logic.nas | 137 ++++++++++++++++++++++++++++++++++- Nasal/ECAM/ECAM-messages.nas | 1 + Nasal/ECAM/ECAM-nodes.nas | 5 ++ Systems/a320-fwc.xml | 92 +++++++++++++++++++++-- Systems/ecam-proprules.xml | 44 +++++++++++ 5 files changed, 269 insertions(+), 10 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index 056a0064..ee4f4747 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -626,6 +626,139 @@ var messages_priority_3 = func { ECAM_controller.warningReset(park_brk_config); } + if (excessCabAlt.clearFlag == 0 and warningNodes.Logic.excessCabAlt.getValue() == 1 and phaseVar3 == 6) { + excessCabAlt.active = 1; + + if (excessCabAltMask.clearFlag == 0 and warningNodes.Flipflops.cabPressExcessFlipflopTop.getValue()) { + excessCabAltMask.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltMask); + } + + if (warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { + if (excessCabAltSigns.clearFlag == 0 and (!pts.Controls.Lighting.noSmokingSign.getValue() or !pts.Controls.Lighting.seatbeltSign.getValue())) { + excessCabAltSigns.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltSigns); + } + + if (excessCabAltEmerD.clearFlag == 0) { + excessCabAltEmerD.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltEmerD); + } + } else { + ECAM_controller.warningReset(excessCabAltSigns); + ECAM_controller.warningReset(excessCabAltEmerD); + } + + if (excessCabAltDES.clearFlag == 0 and warningNodes.Flipflops.cabPressExcessFlipflopTop.getValue()) { + excessCabAltDES.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltDES); + } + + if (warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { + if (excessCabAltTHRLVR.clearFlag == 0 and !fmgc.Output.athr.getBoolValue() and warningNodes.Logic.JE1TLAI.getValue() != 0 and warningNodes.Logic.JE2TLAI.getValue() != 0) { + excessCabAltTHRLVR.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltTHRLVR); + } + + if (excessCabAltSPDBRK.clearFlag == 0 and pts.Controls.Flight.speedbrake.getValue() != 1) { + excessCabAltSPDBRK.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltSPDBRK); + } + + if (excessCabAltSPD.clearFlag == 0) { + excessCabAltSPD.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltSPD); + } + + if (excessCabAltENG.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 1) { + excessCabAltENG.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltENG); + } + + if (excessCabAltATC.clearFlag == 0) { + excessCabAltATC.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltATC); + } + } else { + ECAM_controller.warningReset(excessCabAltTHRLVR); + ECAM_controller.warningReset(excessCabAltSPDBRK); + ECAM_controller.warningReset(excessCabAltSPD); + ECAM_controller.warningReset(excessCabAltENG); + ECAM_controller.warningReset(excessCabAltATC); + } + + if (warningNodes.Flipflops.cabPressExcessFlipflopTop.getValue() and !warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { + if (excessCabAltCAB.clearFlag == 0) { + excessCabAltCAB.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltCAB); + } + } else { + ECAM_controller.warningReset(excessCabAltCAB); + } + + if (warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { + if (excessCabAltPA.clearFlag == 0) { + excessCabAltPA.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltPA); + } + + if (excessCabAltXPDR.clearFlag == 0) { + excessCabAltXPDR.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltXPDR); + } + } else { + ECAM_controller.warningReset(excessCabAltPA); + ECAM_controller.warningReset(excessCabAltXPDR); + } + + if (excessCabAltMEA.clearFlag == 0) { + excessCabAltMEA.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltMEA); + } + + if (excessCabAltCabAlt.clearFlag == 0) { + excessCabAltCabAlt.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltCabAlt); + } + + if (excessCabAltMasks.clearFlag == 0) { + excessCabAltMasks.active = 1; + } else { + ECAM_controller.warningReset(excessCabAltMasks); + } + } else { + ECAM_controller.warningReset(excessCabAlt); + ECAM_controller.warningReset(excessCabAltMask); + ECAM_controller.warningReset(excessCabAltSigns); + ECAM_controller.warningReset(excessCabAltEmerD); + ECAM_controller.warningReset(excessCabAltDES); + ECAM_controller.warningReset(excessCabAltTHRLVR); + ECAM_controller.warningReset(excessCabAltSPDBRK); + ECAM_controller.warningReset(excessCabAltSPD); + ECAM_controller.warningReset(excessCabAltENG); + ECAM_controller.warningReset(excessCabAltCAB); + ECAM_controller.warningReset(excessCabAltATC); + ECAM_controller.warningReset(excessCabAltPA); + ECAM_controller.warningReset(excessCabAltXPDR); + ECAM_controller.warningReset(excessCabAltMEA); + ECAM_controller.warningReset(excessCabAltCabAlt); + ECAM_controller.warningReset(excessCabAltMasks); + } + if (lrElevFault.clearFlag == 0 and warningNodes.Timers.LRElevFault.getValue() == 1) { lrElevFault.active = 1; if (lrElevFaultSpeed.clearFlag == 0) { @@ -3340,7 +3473,7 @@ var messages_config_memo = func { toMemoLine1.colour = "c"; } - if (pts.Controls.Switches.seatbeltSwitch.getValue() and pts.Controls.Switches.noSmokingSwitch.getValue()) { + if (pts.Controls.Lighting.seatbeltSign.getValue() and pts.Controls.Lighting.noSmokingSign.getValue()) { toMemoLine2.msg = " SIGNS ON"; toMemoLine2.colour = "g"; } else { @@ -3406,7 +3539,7 @@ var messages_config_memo = func { ldgMemoLine1.colour = "c"; } - if (pts.Controls.Switches.seatbeltSwitch.getValue() and pts.Controls.Switches.noSmokingSwitch.getValue()) { + if (pts.Controls.Lighting.seatbeltSign.getValue() and pts.Controls.Lighting.noSmokingSign.getValue()) { ldgMemoLine2.msg = " SIGNS ON"; ldgMemoLine2.colour = "g"; } else { diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 16f2b6dc..fb10fbeb 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -136,6 +136,7 @@ var warnings = std.Vector.new([ var excessCabAltSPDBRK = warning.new(msg: " -SPD BRK...........FULL", colour: "c"), var excessCabAltSPD = warning.new(msg: " SPD.....MAX/APPROPRIATE", colour: "c"), var excessCabAltENG = warning.new(msg: " -ENG MODE...........IGN", colour: "c"), + var excessCabAltATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"), var excessCabAltCAB = warning.new(msg: " -CABIN CREW......ADVISE", colour: "c"), var excessCabAltPA = warning.new(msg: " -EMER DES (PA).ANNOUNCE", colour: "c"), var excessCabAltXPDR = warning.new(msg: " -XPDR 7700.....CONSIDER", colour: "c"), diff --git a/Nasal/ECAM/ECAM-nodes.nas b/Nasal/ECAM/ECAM-nodes.nas index b13bb41a..1fcddb63 100644 --- a/Nasal/ECAM/ECAM-nodes.nas +++ b/Nasal/ECAM/ECAM-nodes.nas @@ -74,6 +74,8 @@ var FWC = { var warningNodes = { Logic: { + JE1TLAI: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-tla-idle"), + JE2TLAI: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-tla-idle"), altitudeAlert: props.globals.initNode("/ECAM/warnings/altitude-alert/c-chord"), altitudeAlertSteady: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-steady"), altitudeAlertFlash: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-flash"), @@ -152,6 +154,7 @@ var warningNodes = { gen2Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-2-off"), spdBrkOut: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-still-out"), excessPress: props.globals.initNode("/ECAM/warnings/press/exess-residual-pressure"), + excessCabAlt: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt"), }, Timers: { apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), @@ -215,5 +218,7 @@ var warningNodes = { parkBrk: props.globals.initNode("/ECAM/warnings/config/park-brk/park-brk-output"), eng1ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle"), eng2ThrLvrAbvIdle: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle"), + cabPressExcessFlipflopTop: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt-flipflop-top"), + cabPressExcessFlipflop: props.globals.initNode("/ECAM/warnings/logic/press/excess-cabin-alt-flipflop"), }, }; \ No newline at end of file diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index 5e52b0f8..aa8db4c7 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -2673,9 +2673,9 @@ /ECAM/warnings/logic/eng/eng-1-tla-abv-6-output eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 /ECAM/warnings/logic/eng/eng-2-reverse eq 1 @@ -2692,9 +2692,9 @@ /ECAM/warnings/logic/eng/eng-1-tla-abv-6-2-output eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 /ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1 @@ -2711,9 +2711,9 @@ /ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 /ECAM/warnings/logic/eng/eng-1-reverse eq 1 @@ -2730,9 +2730,9 @@ /ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1 - /engines/engine[1]/state eq 3 + /ECAM/warnings/logic/eng/JE2NORUN eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/JE1NORUN eq 1 /ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1 @@ -3176,6 +3176,82 @@ 100 + + + + /systems/pressurization/cabinalt-norm ge 9550 + + + + + /ECAM/warnings/timer/press/excess-cabin-alt-input + 1 + 100 + + + + + + /ECAM/warnings/timer/press/excess-cabin-alt eq 1 + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 10 + + + + + + + + + /systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 10000 + /systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 10000 + /systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 10000 + + + /systems/navigation/adr/operating-1 eq 0 + /systems/navigation/adr/operating-2 eq 0 + /systems/navigation/adr/operating-3 eq 0 + + + /ECAM/warnings/logic/press/excess-cabin-alt eq 1 + /ECAM/warnings/logic/press/excess-cabin-alt-pulse eq 1 + + + + + + + + + /systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 16000 + /systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 16000 + /systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 16000 + + + /systems/navigation/adr/operating-1 eq 0 + /systems/navigation/adr/operating-2 eq 0 + /systems/navigation/adr/operating-3 eq 0 + + + /ECAM/warnings/logic/press/excess-cabin-alt eq 1 + /ECAM/warnings/logic/press/excess-cabin-alt-pulse eq 1 + + + + + + + /ECAM/warnings/logic/phase-3-10-pulse-input eq 1 + /ECAM/warnings/logic/phase-3-10-pulse eq 1 + + + diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index 2d30dc21..fe3297cf 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -630,6 +630,17 @@ /ECAM/warnings/logic/phase-9-pulse + + monostable + + + /ECAM/warnings/logic/phase-3-10-pulse-input + + /ECAM/warnings/logic/phase-3-10-pulse + + monostable + + monostable + + + /ECAM/warnings/logic/press/excess-cabin-alt + + /ECAM/warnings/logic/press/excess-cabin-alt-pulse + + monostable + + + SR + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-set + + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-reset + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop + + + + SR + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-top-set + + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-reset + + /ECAM/warnings/logic/press/excess-cabin-alt-flipflop-top + From d7a8bcdf2740ef76b3b21235797580c137c4ad06 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 6 Jan 2022 19:08:12 +0000 Subject: [PATCH 29/42] ADR 1+2+3 FAULT --- Nasal/ECAM/ECAM-logic.nas | 113 +++++++++++++++++++++++++++++++++++++- Nasal/ECAM/ECAM-nodes.nas | 3 + Systems/a320-fwc.xml | 39 +++++++++++-- 3 files changed, 149 insertions(+), 6 deletions(-) diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index ee4f4747..cc08febc 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -574,6 +574,61 @@ var messages_priority_3 = func { ECAM_controller.warningReset(apuFireMaster); } + if (ADR123Fault.clearFlag == 0 and warningNodes.Logic.adr123Fault.getValue() and phaseVar3 != 4 and phaseVar3 != 8) { + ADR123Fault.active = 1; + + if (ADR123FaultAP.clearFlag == 0 and (fmgc.Output.ap1.getBoolValue() or fmgc.Output.ap2.getBoolValue() or fmgc.Output.fd1.getBoolValue() or fmgc.Output.fd2.getBoolValue())) { + ADR123FaultAP.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultAP); + } + + if (ADR123FaultATHR.clearFlag == 0 and fmgc.Output.athr.getBoolValue()) { + ADR123FaultATHR.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultATHR); + } + + if (ADR123FaultPRBW.clearFlag == 0) { + ADR123FaultPRBW.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultPRBW); + } + + if (ADR123FaultADRPB.clearFlag == 0 and (systems.ADIRS.Switches.adrSw[0].getBoolValue() or systems.ADIRS.Switches.adrSw[1].getBoolValue() or systems.ADIRS.Switches.adrSw[2].getBoolValue())) { + ADR123FaultADRPB.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultADRPB); + } + + if (ADR123FaultSPD.clearFlag == 0) { + ADR123FaultSPD.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultSPD); + } + + if (ADR123FaultSTBY.clearFlag == 0) { + ADR123FaultSTBY.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultSTBY); + } + + if (ADR123FaultPROC.clearFlag == 0) { + ADR123FaultPROC.active = 1; + } else { + ECAM_controller.warningReset(ADR123FaultPROC); + } + } else { + ECAM_controller.warningReset(ADR123Fault); + ECAM_controller.warningReset(ADR123FaultAP); + ECAM_controller.warningReset(ADR123FaultATHR); + ECAM_controller.warningReset(ADR123FaultPRBW); + ECAM_controller.warningReset(ADR123FaultADRPB); + ECAM_controller.warningReset(ADR123FaultSPD); + ECAM_controller.warningReset(ADR123FaultSTBY); + ECAM_controller.warningReset(ADR123FaultPROC); + } + if ((ecamConfigTest.getValue() and (phaseVar3 == 1 or phaseVar3 == 2 or phaseVar3 == 9)) or phaseVar3 == 3 or phaseVar3 == 4) { takeoffConfig = 1; } else { @@ -659,7 +714,7 @@ var messages_priority_3 = func { } if (warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { - if (excessCabAltTHRLVR.clearFlag == 0 and !fmgc.Output.athr.getBoolValue() and warningNodes.Logic.JE1TLAI.getValue() != 0 and warningNodes.Logic.JE2TLAI.getValue() != 0) { + if (excessCabAltTHRLVR.clearFlag == 0 and !fmgc.Output.athr.getBoolValue() and warningNodes.Logic.JE1TLAI.getValue() == 0 and warningNodes.Logic.JE2TLAI.getValue() == 0) { excessCabAltTHRLVR.active = 1; } else { ECAM_controller.warningReset(excessCabAltTHRLVR); @@ -695,7 +750,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(excessCabAltENG); ECAM_controller.warningReset(excessCabAltATC); } - + if (warningNodes.Flipflops.cabPressExcessFlipflopTop.getValue() and !warningNodes.Flipflops.cabPressExcessFlipflop.getValue()) { if (excessCabAltCAB.clearFlag == 0) { excessCabAltCAB.active = 1; @@ -759,6 +814,60 @@ var messages_priority_3 = func { ECAM_controller.warningReset(excessCabAltMasks); } + if (eng1OilLoPr.clearFlag == 0 and warningNodes.Logic.eng1OilLoPr.getBoolValue() and phaseVar3 != 1 and phaseVar3 != 10) { + eng1OilLoPr.active = 1; + + if (eng1OilLoPrIf.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) { + eng1OilLoPrIf.active = 1; + } else { + ECAM_controller.warningReset(eng1OilLoPrIf); + } + + if (eng1OilLoPrThrot.clearFlag == 0 and !warningNodes.Logic.JE1TLAI.getValue()) { + eng1OilLoPrThrot.active = 1; + } else { + ECAM_controller.warningReset(eng1OilLoPrThrot); + } + + if (eng1OilLoPrMaster.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) { + eng1OilLoPrMaster.active = 1; + } else { + ECAM_controller.warningReset(eng1OilLoPrMaster); + } + } else { + ECAM_controller.warningReset(eng1OilLoPr); + ECAM_controller.warningReset(eng1OilLoPrIf); + ECAM_controller.warningReset(eng1OilLoPrThrot); + ECAM_controller.warningReset(eng1OilLoPrMaster); + } + + if (eng2OilLoPr.clearFlag == 0 and warningNodes.Logic.eng2OilLoPr.getBoolValue() and phaseVar3 != 1 and phaseVar3 != 10) { + eng2OilLoPr.active = 1; + + if (eng2OilLoPrIf.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) { + eng2OilLoPrIf.active = 1; + } else { + ECAM_controller.warningReset(eng2OilLoPrIf); + } + + if (eng2OilLoPrThrot.clearFlag == 0 and !warningNodes.Logic.JE2TLAI.getValue()) { + eng2OilLoPrThrot.active = 1; + } else { + ECAM_controller.warningReset(eng2OilLoPrThrot); + } + + if (eng2OilLoPrMaster.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) { + eng2OilLoPrMaster.active = 1; + } else { + ECAM_controller.warningReset(eng2OilLoPrMaster); + } + } else { + ECAM_controller.warningReset(eng2OilLoPr); + ECAM_controller.warningReset(eng2OilLoPrIf); + ECAM_controller.warningReset(eng2OilLoPrThrot); + ECAM_controller.warningReset(eng2OilLoPrMaster); + } + if (lrElevFault.clearFlag == 0 and warningNodes.Timers.LRElevFault.getValue() == 1) { lrElevFault.active = 1; if (lrElevFaultSpeed.clearFlag == 0) { diff --git a/Nasal/ECAM/ECAM-nodes.nas b/Nasal/ECAM/ECAM-nodes.nas index 1fcddb63..f14b0d0c 100644 --- a/Nasal/ECAM/ECAM-nodes.nas +++ b/Nasal/ECAM/ECAM-nodes.nas @@ -76,6 +76,9 @@ var warningNodes = { Logic: { JE1TLAI: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-tla-idle"), JE2TLAI: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-tla-idle"), + adr123Fault: props.globals.initNode("/ECAM/warnings/navigation/ADR123-fault"), + eng1OilLoPr: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-oil-lo-pr"), + eng2OilLoPr: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-oil-lo-pr"), altitudeAlert: props.globals.initNode("/ECAM/warnings/altitude-alert/c-chord"), altitudeAlertSteady: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-steady"), altitudeAlertFlash: props.globals.initNode("/ECAM/warnings/altitude-alert/altitude-alert-flash"), diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index aa8db4c7..8b626bdd 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -3124,6 +3124,36 @@ + + /controls/engines/engine[0]/cutoff-switch + 0.03333333333 + 100 + + + + + + /ECAM/warnings/logic/eng/eng-1-oil-lo-pr-cutoff-delay eq 0 + /ECAM/warnings/logic/eng/JE1NORUN eq 0 + /engines/engine[0]/oil-psi-actual lt 13 + + + + + /controls/engines/engine[1]/cutoff-switch + 0.03333333333 + 100 + + + + + + /ECAM/warnings/logic/eng/eng-2-oil-lo-pr-cutoff-delay eq 0 + /ECAM/warnings/logic/eng/JE2NORUN eq 0 + /engines/engine[1]/oil-psi-actual lt 13 + + + @@ -4222,7 +4252,7 @@ - + From b1b380f9865889c5b735c8028c39d01ba6860dc0 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 6 Jan 2022 19:18:40 +0000 Subject: [PATCH 30/42] Bugfix --- Nasal/ECAM/ECAM-messages.nas | 2 +- Systems/a320-fwc.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index fb10fbeb..63e389d8 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -93,7 +93,7 @@ var warnings = std.Vector.new([ var apuFireMaster = warning.new(msg: " -MASTER SW..........OFF", 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 ADR123Fault = warning.new(msg: "NAV ADR 1+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"), diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index 8b626bdd..6ce25114 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -1623,7 +1623,7 @@ - /engines/engine[0]/n2-actual ge 59.4 + /engines/engine[1]/n2-actual ge 59.4 From 9003b1cf18236aa75d33dd078872e142d7d9f7cb Mon Sep 17 00:00:00 2001 From: Josh Davidson Date: Thu, 6 Jan 2022 21:22:20 -0500 Subject: [PATCH 31/42] DU: Add BUSS to PFD graphics --- Models/Instruments/PFD/PFD.nas | 11 +++- Models/Instruments/PFD/res/pfd.svg | 92 +++++++++++++++++++++++++++--- 2 files changed, 92 insertions(+), 11 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 7fb55d11..f083c729 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -770,6 +770,10 @@ var canvas_pfd = { obj.AI_fpv_rot = obj["FPV"].createTransform(); obj.page = obj.group; + # temporarily hidden + obj["ASI_buss"].hide(); + obj["ASI_index_middle"].hide(); + # end temporary hide return obj; }, @@ -779,9 +783,10 @@ var canvas_pfd = { "FMA_athr_box","FMA_Middle1","FMA_Middle2","ALPHA_MAX","ALPHA_PROT","ALPHA_SW","ALPHA_bars","VLS_min","ASI_max","ASI_scale","ASI_target","ASI_mach","ASI_mach_decimal","ASI_trend_up","ASI_trend_down","ASI_digit_UP","ASI_digit_DN","ASI_decimal_UP", "ASI_decimal_DN","ASI_index","ASI_error","ASI_group","ASI_frame","AI_center","AI_bank","AI_bank_lim","AI_bank_lim_X","AI_pitch_lim","AI_pitch_lim_X","AI_slipskid","AI_horizon","AI_horizon_ground","AI_horizon_sky","AI_stick","AI_stick_pos","AI_heading", "AI_agl_g","AI_agl","AI_error","AI_group","FD_roll","FD_pitch","ALT_box_flash","ALT_box","ALT_box_amber","ALT_scale","ALT_target","ALT_target_digit","ALT_one","ALT_two","ALT_three","ALT_four","ALT_five","ALT_digits","ALT_tens","ALT_digit_UP", - "ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer","HDG_target","HDG_scale", - "HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend","ILS_HDG_R","ILS_HDG_L", - "ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd","Metric_box","Metric_letter","Metric_cur_alt"]; + "ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer", + "HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend", + "ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd", + "Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_index_middle"]; }, getKeysTest: func() { return ["Test_white","Test_text"]; diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 28c3d817..563ec4d6 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -8,7 +8,7 @@ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" sodipodi:docname="pfd.svg" - inkscape:version="0.92.4 (5da689c313, 2019-01-14)" + inkscape:version="0.91 r13725" id="svg2" version="1.1" viewBox="0 0 1024 1024" @@ -40,14 +40,14 @@ inkscape:current-layer="svg2" inkscape:window-maximized="1" inkscape:window-y="-8" - inkscape:window-x="-8" - inkscape:cy="1074.3176" - inkscape:cx="955.3885" - inkscape:zoom="2" - showgrid="true" + inkscape:window-x="1592" + inkscape:cy="732.64766" + inkscape:cx="-141.75866" + inkscape:zoom="1.4142136" + showgrid="false" id="namedview371" - inkscape:window-height="705" - inkscape:window-width="1366" + inkscape:window-height="1030" + inkscape:window-width="1920" inkscape:pageshadow="2" inkscape:pageopacity="1" guidetolerance="10" @@ -1416,6 +1416,14 @@ width="111.28601" id="ASI_grey" style="fill:#4c4c4c;fill-opacity:1;stroke:none;stroke-width:2.4000001;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + + + + + + FAST + + SLOW + + From 5359cdb3ec48487ec0764eea67c204554a7c0b83 Mon Sep 17 00:00:00 2001 From: legoboyvdlp Date: Fri, 7 Jan 2022 13:43:55 +0000 Subject: [PATCH 32/42] Switches and options (#262) * Cockpit door switch and basic lock logic * Little fix for leftturnoff light * Toottip for transponder knob (it's very hard to me guess the mode selected) * Foot warmer switches cpt and fo * FGCamera compatibility for 0-9 view selection keys * Enable mouse wheel for landing light switches Co-authored-by: Inuyaksa --- A320-main.xml | 88 ++++++++++- AircraftConfig/acconfig.nas | 3 + AircraftConfig/main.xml | 21 +++ Models/FlightDeck/a320.flightdeck.xml | 201 ++++++++++++++++++++++++- Models/Instruments/OHpanel/OHpanel.xml | 4 + Nasal/Libraries/libraries.nas | 22 +++ Nasal/Libraries/sounds.nas | 14 +- Sounds/A320-common-sound.xml | 22 +++ Sounds/Cockpit/cockpitdoor_lock.wav | Bin 0 -> 33728 bytes Sounds/Cockpit/cockpitdoor_unlock.wav | Bin 0 -> 18722 bytes Systems/a320-lights.xml | 2 +- 11 files changed, 372 insertions(+), 5 deletions(-) create mode 100644 Sounds/Cockpit/cockpitdoor_lock.wav create mode 100644 Sounds/Cockpit/cockpitdoor_unlock.wav diff --git a/A320-main.xml b/A320-main.xml index 823c5cf0..531020ec 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -812,6 +812,10 @@ 0 0 + + 0 + 0 + 0 0 @@ -819,6 +823,9 @@ 0 0 + + 0 + true @@ -1604,6 +1611,7 @@ 0 + 0 0 0 @@ -2240,11 +2248,20 @@ nasal + + + /options/system/fgcamera-keys-enabled + + fgcamera-select + 1 + aircraft + /FMGC/keyboard-left /FMGC/keyboard-right /options/system/keyboard-mode + /options/system/fgcamera-keys-enabled property-assign /sim/current-view/view-number @@ -2278,11 +2295,20 @@ nasal + + + /options/system/fgcamera-keys-enabled + + fgcamera-select + 2 + aircraft + /FMGC/keyboard-left /FMGC/keyboard-right /options/system/keyboard-mode + /options/system/fgcamera-keys-enabled property-assign /sim/current-view/view-number @@ -2317,11 +2343,20 @@ nasal + + + /options/system/fgcamera-keys-enabled + + fgcamera-select + 3 + aircraft + /FMGC/keyboard-left /FMGC/keyboard-right /options/system/keyboard-mode + /options/system/fgcamera-keys-enabled property-assign /sim/current-view/view-number @@ -2356,11 +2391,20 @@ nasal + + + /options/system/fgcamera-keys-enabled + + fgcamera-select + 4 + aircraft + /FMGC/keyboard-left /FMGC/keyboard-right /options/system/keyboard-mode + /options/system/fgcamera-keys-enabled property-assign /sim/current-view/view-number @@ -2395,11 +2439,20 @@ nasal + + + /options/system/fgcamera-keys-enabled + + fgcamera-select + 5 + aircraft + /FMGC/keyboard-left /FMGC/keyboard-right /options/system/keyboard-mode + /options/system/fgcamera-keys-enabled property-assign /sim/current-view/view-number @@ -2436,11 +2489,20 @@ nasal + + + /options/system/fgcamera-keys-enabled + + fgcamera-select + 6 + aircraft + /FMGC/keyboard-left /FMGC/keyboard-right /options/system/keyboard-mode + /options/system/fgcamera-keys-enabled property-assign /sim/current-view/view-number @@ -2485,6 +2547,14 @@ /sim/current-view/view-number + + + /options/system/fgcamera-keys-enabled + + fgcamera-select + 7 + aircraft + /FMGC/keyboard-left @@ -2513,6 +2583,14 @@ nasal + + + /options/system/fgcamera-keys-enabled + + fgcamera-select + 8 + aircraft + diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index ad3a2f8f..107874a8 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -850,6 +850,19 @@ + + + set-tooltip + atc_stby_mode + + controls/atc/mode-knob + nasal + + + @@ -1505,6 +1518,122 @@ + + + rotate + CockpitDoorSwitch + CockpitDoorSwitch.mark + controls/doors/doorc-switch + + -1-25 + 0 0 + 1 25 + + + CockpitDoorSwitch.axis + + + + pick + CockpitDoorSwitch + CockpitDoorSwitch.mark + + + false + + + devices/status/keyboard/shift + + property-assign + controls/doors/doorc-switch + 1 + + + + devices/status/keyboard/shift + + property-assign + controls/doors/doorc-switch + -1 + + + property-assign + /sim/sounde/switch1 + 1 + + + + property-assign + controls/doors/doorc-switch + 0 + + + + + + false + + property-assign + controls/doors/doorc-switch + -1 + + + property-assign + /sim/sounde/switch1 + 1 + + + + property-assign + controls/doors/doorc-switch + 0 + + + + + + set-tooltip + doorc-switch-lock + + + + + + + select + CockpitDoorOpen + CockpitDoorSwitch.mark + + + + controls/switches/annun-test + 1 + + + sim/model/door-positions/doorc/lock-status + 1 + + + + + + + select + CockpitDoorFault + + + + controls/switches/annun-test + 1 + + + sim/model/door-positions/doorc/lock-status + -9 + + + + + pick @@ -2132,6 +2261,76 @@ + + + + rotate + foot_warmer_cpt_sw + foot_warmer_cpt_sw.mark + controls/cabin/footwarmer-cpt + + 1-20 + 020 + + + foot_warmer_cpt_sw.axis + + + + pick + foot_warmer_cpt_sw + foot_warmer_cpt_sw.mark + + + false + + property-cycle + controls/cabin/footwarmer-cpt + 1 + 0 + + + property-toggle + /sim/sounde/switch1 + + + + + + rotate + foot_warmer_fo_sw + foot_warmer_fo_sw.mark + controls/cabin/footwarmer-fo + + + 120 + 0-20 + + + foot_warmer_fo_sw.axis + + + + pick + foot_warmer_fo_sw + foot_warmer_fo_sw.mark + + + false + + property-cycle + controls/cabin/footwarmer-fo + 1 + 0 + + + property-toggle + /sim/sounde/switch1 + + + + + pick @@ -8286,8 +8485,6 @@ pedals_block_capt pedals_indicator_1 Pedestal-Low - CockpitDoorFault - CockpitDoorOpen CockpitDoorSwitch CockpitDoorSwitch.mark CockpitDoorVideoButton diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml index 7a241247..c4167219 100644 --- a/Models/Instruments/OHpanel/OHpanel.xml +++ b/Models/Instruments/OHpanel/OHpanel.xml @@ -5186,6 +5186,7 @@ LandingLtLSwtch + false property-cycle @@ -5201,6 +5202,7 @@ + false property-cycle @@ -5222,6 +5224,7 @@ LandingLtRSwtch + false property-cycle @@ -5237,6 +5240,7 @@ + false property-cycle diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index 1b76fb13..87c78923 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -64,6 +64,10 @@ var cargofwd = aircraft.door.new("/sim/model/door-positions/cargofwd", 10); # Seat armrests in the flight deck (unused) var armrests = aircraft.door.new("/sim/model/door-positions/armrests", 2); +# Cockpit door - TODO animation +var cockpitdoor = aircraft.door.new("/sim/model/door-positions/doorc", 1); +setprop("/sim/model/door-positions/doorc/lock-status",0); + # door opener/closer var triggerDoor = func(door, doorName, doorDesc) { if (getprop("/sim/model/door-positions/" ~ doorName ~ "/position-norm") > 0) { @@ -79,6 +83,24 @@ var triggerDoor = func(door, doorName, doorDesc) { } }; +setlistener("/controls/doors/doorc-switch",func(a){ + if (getprop("systems/electrical/bus/dc-2")>25 or getprop("systems/electrical/bus/dc-1")>25) { + var pos = a.getValue(); + var current = getprop("/sim/model/door-positions/doorc/lock-status"); + if (pos == 1 and current == 0) { ## LOCK + settimer( func { + if (a.getValue() == pos) setprop("/sim/model/door-positions/doorc/lock-status",1); + },0.4); + } + else if (pos == -1 and current == 1) { ## UNLOCK + settimer( func { + if (a.getValue() == pos) setprop("/sim/model/door-positions/doorc/lock-status",0); + },0.2); + } + #setprop("/sim/model/door-positions/doorc/lock-status",-9); ## FAULT + } +}); + ########### # Systems # ########### diff --git a/Nasal/Libraries/sounds.nas b/Nasal/Libraries/sounds.nas index 280e25be..6a84802d 100644 --- a/Nasal/Libraries/sounds.nas +++ b/Nasal/Libraries/sounds.nas @@ -7,6 +7,11 @@ # Sounds # ########## +var playSoundOnce = func(path,delay) { + setprop(path,1); + settimer(func {setprop(path,0);},delay); +} + setlistener("/sim/sounde/btn1", func { if (!getprop("/sim/sounde/btn1")) { return; @@ -122,4 +127,11 @@ var pushbuttonSound = props.globals.getNode("/sim/sounde/pushbutton"); var pushbutton = func() { pushbuttonSound.setValue(1); settimer(func {pushbuttonSound.setValue(0);},0.20); -} \ No newline at end of file +} + +setlistener("/sim/model/door-positions/doorc/lock-status",func(lock) { + if (lock.getValue() == 1) + playSoundOnce("/sim/sounde/doorc_locking",0.5); + else + playSoundOnce("/sim/sounde/doorc_unlocking",0.5); +},0,0); diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml index 08fd2ad7..ae370208 100644 --- a/Sounds/A320-common-sound.xml +++ b/Sounds/A320-common-sound.xml @@ -1800,6 +1800,28 @@ + + CockpitDoorLocking + once + Aircraft/A320-family/Sounds/Cockpit/cockpitdoor_lock.wav + /sim/sounde/doorc_locking + + /sim/current-view/internal + 1 + + + + + CockpitDoorUnlocking + once + Aircraft/A320-family/Sounds/Cockpit/cockpitdoor_unlock.wav + /sim/sounde/doorc_unlocking + + /sim/current-view/internal + 0.8 + + + fa_boarding once diff --git a/Sounds/Cockpit/cockpitdoor_lock.wav b/Sounds/Cockpit/cockpitdoor_lock.wav new file mode 100644 index 0000000000000000000000000000000000000000..4a13663f6f7cade8d7a4b2deac39f0b2b5d8f2cc GIT binary patch literal 33728 zcmb`wcbrpI_dR@WNivlgdhbmXrArf~ccd4kC?F_EQ$WB%2SpG>5D*Xqm8vuq5Tyzt zA_z!R5R~4TVOnzQyH>XO@qGV(C!b7`n|sgMXYaMw-lyD?POX|Z-#$gD?v1)N8#r`S z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8%!ho$<_wOEkN)3IECZ34n(XI4C9$z8zaVdF^AD7oZdq7Y0^+YUb zGgkOZyJ+2_W2e>Nu|?a&b}iZ_w2{vZNr4lSU35HMp|7!T8G6 z<7?LZvPxx)m(Zb;9DV4hiRJOFV`8Uba;}L3lKKywFeSF^h@t()j~Xy&=!k(8t5&K~ zDZVO_;-LfLW8Ks>jaSi_Q14DHI#t65lk5sIJ9X>U4IhK>?l^kTgvm+c2L9h6J0-Mk XjO$ - + /controls/lighting/turnoff-light-switch eq 1 From 60af6c024be782681ca325bd5d4a9bec3532c110 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 7 Jan 2022 13:45:00 +0000 Subject: [PATCH 33/42] change to a knob animation --- Models/FlightDeck/a320.flightdeck.xml | 79 ++++++++------------------- 1 file changed, 24 insertions(+), 55 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 107874a8..9e3a3e04 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -1519,9 +1519,10 @@ + - rotate - CockpitDoorSwitch + knob + CockpitDoorSwitch CockpitDoorSwitch.mark controls/doors/doorc-switch @@ -1532,64 +1533,31 @@ CockpitDoorSwitch.axis - - - pick - CockpitDoorSwitch - CockpitDoorSwitch.mark - - - false - - - devices/status/keyboard/shift - - property-assign - controls/doors/doorc-switch - 1 - - - - devices/status/keyboard/shift - - property-assign - controls/doors/doorc-switch - -1 - - - property-assign - /sim/sounde/switch1 - 1 - - - - property-assign - controls/doors/doorc-switch - 0 - - - - - false - - property-assign + + property-cycle controls/doors/doorc-switch -1 + 0 + 1 + false - - property-assign - /sim/sounde/switch1 - 1 + + nasal + - - - property-assign - controls/doors/doorc-switch - 0 - - + + + property-assign + controls/doors/doorc-switch + 0 + + + nasal + + + set-tooltip @@ -1602,7 +1570,6 @@ select CockpitDoorOpen - CockpitDoorSwitch.mark @@ -8485,6 +8452,8 @@ pedals_block_capt pedals_indicator_1 Pedestal-Low + CockpitDoorFault + CockpitDoorOpen CockpitDoorSwitch CockpitDoorSwitch.mark CockpitDoorVideoButton From 8890a073b95f259deef288f142b7cea780b6e751 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Fri, 7 Jan 2022 18:43:09 +0000 Subject: [PATCH 34/42] use correct nodes for elec --- Nasal/Libraries/libraries.nas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index 87c78923..d3c089d6 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -84,7 +84,7 @@ var triggerDoor = func(door, doorName, doorDesc) { }; setlistener("/controls/doors/doorc-switch",func(a){ - if (getprop("systems/electrical/bus/dc-2")>25 or getprop("systems/electrical/bus/dc-1")>25) { + if (systems.ELEC.Bus.dc1.getValue() > 25 or systems.ELEC.Bus.dc2.getValue() > 25) { var pos = a.getValue(); var current = getprop("/sim/model/door-positions/doorc/lock-status"); if (pos == 1 and current == 0) { ## LOCK From 8a95f30a29dba74d0899f56d8060ccbb9ae3147c Mon Sep 17 00:00:00 2001 From: Inuyaksa Date: Fri, 7 Jan 2022 22:58:57 +0100 Subject: [PATCH 35/42] Cockpit door switch with vertical selection --- Models/FlightDeck/a320.flightdeck.xml | 66 +++++++++++++-------------- Nasal/Libraries/libraries.nas | 5 +- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 9e3a3e04..1b00c24a 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -1521,7 +1521,39 @@ - knob + slider + CockpitDoorSwitch + CockpitDoorSwitch.mark + controls/doors/doorc-switch + vertical + + + property-adjust + controls/doors/doorc-switch + -1 + -1 + 1 + 0 + + + + + property-assign + controls/doors/doorc-switch + 0 + + + + + set-tooltip + doorc-switch-lock + + + + + + + rotate CockpitDoorSwitch CockpitDoorSwitch.mark controls/doors/doorc-switch @@ -1533,38 +1565,6 @@ CockpitDoorSwitch.axis - - - property-cycle - controls/doors/doorc-switch - -1 - 0 - 1 - false - - - nasal - - - - - - property-assign - controls/doors/doorc-switch - 0 - - - nasal - - - - - - set-tooltip - doorc-switch-lock - - - diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index d3c089d6..fbe52f13 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -84,6 +84,7 @@ var triggerDoor = func(door, doorName, doorDesc) { }; setlistener("/controls/doors/doorc-switch",func(a){ + setprop("sim/sounde/switch1", 1); if (systems.ELEC.Bus.dc1.getValue() > 25 or systems.ELEC.Bus.dc2.getValue() > 25) { var pos = a.getValue(); var current = getprop("/sim/model/door-positions/doorc/lock-status"); @@ -95,11 +96,11 @@ setlistener("/controls/doors/doorc-switch",func(a){ else if (pos == -1 and current == 1) { ## UNLOCK settimer( func { if (a.getValue() == pos) setprop("/sim/model/door-positions/doorc/lock-status",0); - },0.2); + },0.3); } #setprop("/sim/model/door-positions/doorc/lock-status",-9); ## FAULT } -}); +},0,0); ########### # Systems # From 879168d1a3daa08dd91ef89744e5a5e28f22c4b9 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 8 Jan 2022 13:25:51 +0000 Subject: [PATCH 36/42] Stall warning: add IR sourcing; bugfix condition. BUSS: enable when 3 ADRs are off --- Models/Instruments/PFD/PFD.nas | 38 ++- Models/Instruments/PFD/res/pfd.svg | 498 +++++++++++++++-------------- Systems/a320-fwc.xml | 80 +++-- Systems/a320-misc.xml | 36 +++ 4 files changed, 380 insertions(+), 272 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index f083c729..7592feba 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -770,8 +770,6 @@ var canvas_pfd = { obj.AI_fpv_rot = obj["FPV"].createTransform(); obj.page = obj.group; - # temporarily hidden - obj["ASI_buss"].hide(); obj["ASI_index_middle"].hide(); # end temporary hide @@ -786,7 +784,7 @@ var canvas_pfd = { "ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer", "HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend", "ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd", - "Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_index_middle"]; + "Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_buss_ref","ASI_index_middle"]; }, getKeysTest: func() { return ["Test_white","Test_text"]; @@ -796,6 +794,7 @@ var canvas_pfd = { }, aoa: 0, showMetricAlt: 0, + ASItrendIsShown: 0, update: func(notification) { me.updatePower(notification); @@ -877,6 +876,8 @@ var canvas_pfd = { if (dmc.DMController.DMCs[me.number].outputs[0] != nil) { me.ind_spd = dmc.DMController.DMCs[me.number].outputs[0].getValue(); me["ASI_error"].hide(); + me["ASI_buss"].hide(); + me["ASI_buss_ref"].hide(); me["ASI_frame"].setColor(1,1,1); me["ASI_group"].show(); me["VLS_min"].hide(); @@ -1219,17 +1220,23 @@ var canvas_pfd = { me["ASI_trend_up"].setTranslation(0, math.clamp(me.ASItrend, 0, 50) * -6.6); me["ASI_trend_down"].setTranslation(0, math.clamp(me.ASItrend, -50, 0) * -6.6); - if (me.ASItrend >= 2) { - me["ASI_trend_up"].show(); - me["ASI_trend_down"].hide(); - } else if (me.ASItrend <= -2) { - me["ASI_trend_down"].show(); - me["ASI_trend_up"].hide(); + if (notification.fac1 or notification.fac2) { + if (me.ASItrend >= 2 or (me.ASItrendIsShown and me.ASItrend >= 1)) { + me["ASI_trend_up"].show(); + me["ASI_trend_down"].hide(); + me.ASItrendIsShown = 1; + } else if (me.ASItrend <= -2 or (me.ASItrendIsShown and me.ASItrend <= -1)) { + me["ASI_trend_up"].hide(); + me["ASI_trend_down"].show(); + me.ASItrendIsShown = 1; + } else { + me["ASI_trend_up"].hide(); + me["ASI_trend_down"].hide(); + } } else { me["ASI_trend_up"].hide(); me["ASI_trend_down"].hide(); } - if (-notification.agl >= -565 and -notification.agl <= 565) { me["ground_ref"].show(); @@ -1238,7 +1245,16 @@ var canvas_pfd = { } } else { me["ASI_group"].hide(); - me["ASI_error"].show(); + if (!systems.ADIRS.Operating.adr[0].getValue() and !systems.ADIRS.Operating.adr[1].getValue() and !systems.ADIRS.Operating.adr[2].getValue()) { + me["ASI_buss"].show(); + me["ASI_buss_ref"].show(); + me["ASI_buss"].setTranslation(0, getprop("/instrumentation/pfd/buss/translate")); + me["ASI_error"].hide(); + } else { + me["ASI_buss"].hide(); + me["ASI_buss_ref"].hide(); + me["ASI_error"].show(); + } me["ASI_frame"].setColor(1,0,0); me["clean_speed"].hide(); me["S_target"].hide(); diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 563ec4d6..582b9b7f 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -1,19 +1,19 @@ + width="1024pt" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> @@ -39,14 +39,14 @@ showguides="true" inkscape:current-layer="svg2" inkscape:window-maximized="1" - inkscape:window-y="-8" - inkscape:window-x="1592" - inkscape:cy="732.64766" - inkscape:cx="-141.75866" - inkscape:zoom="1.4142136" + inkscape:window-y="-11" + inkscape:window-x="-11" + inkscape:cy="728.67352" + inkscape:cx="100.32077" + inkscape:zoom="5.6568544" showgrid="false" id="namedview371" - inkscape:window-height="1030" + inkscape:window-height="986" inkscape:window-width="1920" inkscape:pageshadow="2" inkscape:pageopacity="1" @@ -55,7 +55,9 @@ objecttolerance="20" borderopacity="1" bordercolor="#666666" - pagecolor="#000000"> + pagecolor="#000000" + inkscape:pagecheckerboard="0" + inkscape:document-units="pt"> + style="opacity:1;fill:#368acd;fill-opacity:1;stroke:none;stroke-width:2.58922;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20011;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.20025;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;stroke:#ff0000;stroke-width:5.7;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#ff0000;stroke-width:6.6;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#ff0000;stroke-width:7.425;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.2;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="opacity:1;fill:#368acd;fill-opacity:1;stroke:none;stroke-width:2.58922;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:2.73024;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:4.30556;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:8.10006;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#c9cc15;stroke-width:3.99994;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> @@ -1032,9 +1034,9 @@ inkscape:connector-curvature="0" id="path3932" d="m 340.35189,239.5184 5.62182,14.20878" - style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19994998;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#0dc04b;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 0000 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:45px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#0dc04b;fill-opacity:1;stroke-width:0.657577">0000 + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> + style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;paint-order:fill markers stroke" /> 00 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.8348px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">00 + id="ASI_group" + style="display:inline"> - - - - - FAST - - SLOW - . + + + + + FAST + + SLOW + + + + + + id="ASI_error" + style="display:inline"> MM + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#bb6100;fill-opacity:1;stroke-width:0.75">MM OM + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#179ab7;fill-opacity:1;stroke-width:0.75">OM 402000806040200080 NE-800 + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.9995px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#179ab7;fill-opacity:1;stroke-width:0.657577">-800 11070 M + style="font-size:38.3994px;line-height:1.25;fill:#179ab7;fill-opacity:1;stroke-width:0.75">M + + aero/alpha-deg-corrected ge 13.5 + + /systems/navigation/aligned-1 eq 1 + /systems/navigation/aligned-2 eq 1 + /systems/navigation/aligned-3 eq 1 + + /systems/navigation/adr/output/aoa-1 ge 13.5 /systems/navigation/adr/operating-1 eq 1 @@ -2396,23 +2404,41 @@ /it-fbw/law eq 0 /fdm/jsbsim/fcs/slat-pos-deg ge 15 - - /systems/navigation/adr/output/aoa-1 ge 22 - /systems/navigation/adr/operating-1 eq 1 - - - /systems/navigation/adr/output/aoa-2 ge 22 - /systems/navigation/adr/operating-2 eq 1 - - - /systems/navigation/adr/output/aoa-3 ge 22 - /systems/navigation/adr/operating-3 eq 1 + + + aero/alpha-deg-corrected ge 22 + + /systems/navigation/aligned-1 eq 1 + /systems/navigation/aligned-2 eq 1 + /systems/navigation/aligned-3 eq 1 + + + + /systems/navigation/adr/output/aoa-1 ge 22 + /systems/navigation/adr/operating-1 eq 1 + + + /systems/navigation/adr/output/aoa-2 ge 22 + /systems/navigation/adr/operating-2 eq 1 + + + /systems/navigation/adr/output/aoa-3 ge 22 + /systems/navigation/adr/operating-3 eq 1 + /it-fbw/law ne 0 /fdm/jsbsim/fcs/slat-pos-deg lt 15 + + aero/alpha-deg-corrected ge 8 + + /systems/navigation/aligned-1 eq 1 + /systems/navigation/aligned-2 eq 1 + /systems/navigation/aligned-3 eq 1 + + /systems/navigation/adr/output/aoa-1 ge 8 /systems/navigation/adr/operating-1 eq 1 @@ -2430,17 +2456,27 @@ /it-fbw/law ne 0 /fdm/jsbsim/fcs/slat-pos-deg ge 15 - - /systems/navigation/adr/output/aoa-1 ge 14 - /systems/navigation/adr/operating-1 eq 1 - - - /systems/navigation/adr/output/aoa-2 ge 14 - /systems/navigation/adr/operating-2 eq 1 - - - /systems/navigation/adr/output/aoa-3 ge 14 - /systems/navigation/adr/operating-3 eq 1 + + + aero/alpha-deg-corrected ge 14 + + /systems/navigation/aligned-1 eq 1 + /systems/navigation/aligned-2 eq 1 + /systems/navigation/aligned-3 eq 1 + + + + /systems/navigation/adr/output/aoa-1 ge 14 + /systems/navigation/adr/operating-1 eq 1 + + + /systems/navigation/adr/output/aoa-2 ge 14 + /systems/navigation/adr/operating-2 eq 1 + + + /systems/navigation/adr/output/aoa-3 ge 14 + /systems/navigation/adr/operating-3 eq 1 + diff --git a/Systems/a320-misc.xml b/Systems/a320-misc.xml index 27d5feb0..098b24eb 100644 --- a/Systems/a320-misc.xml +++ b/Systems/a320-misc.xml @@ -466,4 +466,40 @@ + + + + + + + + /fdm/jsbsim/fcs/slat-pos-deg + 15 + +
+ aero/alpha-deg-corrected + + -1.5 136.409 + 0.0 53.447 + 3.0 0 + 6.5 -53.447 + 8.0 -136.409 + +
+ + aero/alpha-deg-corrected + + -1.5 136.409 + 0.0 53.447 + 3.0 0 + 12.5 -53.447 + 14.0 -136.409 + +
+ +
+
+ +
+ From efe7d9c977927a47cd43f290d076a9cec648226b Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 8 Jan 2022 13:36:05 +0000 Subject: [PATCH 37/42] Add blue reference arrow --- Models/Instruments/PFD/PFD.nas | 10 ++++++++-- Models/Instruments/PFD/res/pfd.svg | 15 +++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 7592feba..42b7ee94 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -784,7 +784,7 @@ var canvas_pfd = { "ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer", "HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend", "ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd", - "Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_buss_ref","ASI_index_middle"]; + "Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_buss_ref","ASI_buss_ref_blue","ASI_index_middle"]; }, getKeysTest: func() { return ["Test_white","Test_text"]; @@ -878,6 +878,7 @@ var canvas_pfd = { me["ASI_error"].hide(); me["ASI_buss"].hide(); me["ASI_buss_ref"].hide(); + me["ASI_buss_ref_blue"].hide(); me["ASI_frame"].setColor(1,1,1); me["ASI_group"].show(); me["VLS_min"].hide(); @@ -1248,11 +1249,14 @@ var canvas_pfd = { if (!systems.ADIRS.Operating.adr[0].getValue() and !systems.ADIRS.Operating.adr[1].getValue() and !systems.ADIRS.Operating.adr[2].getValue()) { me["ASI_buss"].show(); me["ASI_buss_ref"].show(); - me["ASI_buss"].setTranslation(0, getprop("/instrumentation/pfd/buss/translate")); + me["ASI_buss_ref_blue"].show(); + me["ASI_buss"].setTranslation(0, notification.bussTranslate); + me["ASI_buss_ref_blue"].setTranslation(0, notification.bussTranslate); me["ASI_error"].hide(); } else { me["ASI_buss"].hide(); me["ASI_buss_ref"].hide(); + me["ASI_buss_ref_blue"].hide(); me["ASI_error"].show(); } me["ASI_frame"].setColor(1,0,0); @@ -2053,6 +2057,8 @@ var input = { decel: "/FMGC/internal/decel", radio: "/FMGC/internal/radio", baro: "/FMGC/internal/baro", + + bussTranslate: "/instrumentation/pfd/buss/translate", }; foreach (var name; keys(input)) { diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 582b9b7f..04207315 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -41,9 +41,9 @@ inkscape:window-maximized="1" inkscape:window-y="-11" inkscape:window-x="-11" - inkscape:cy="728.67352" - inkscape:cx="100.32077" - inkscape:zoom="5.6568544" + inkscape:cy="676.96634" + inkscape:cx="183.00807" + inkscape:zoom="11.313709" showgrid="false" id="namedview371" inkscape:window-height="986" @@ -2657,7 +2657,7 @@ inkscape:label="#g4375" id="ALPHA_bars"> . + From c202b1e67eab690ba06036c7b7050fa7900a59cf Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 8 Jan 2022 18:36:17 +0000 Subject: [PATCH 38/42] Managed speed: rewrite control loop. Add CLB / DES SPD LIM feature --- Models/Instruments/MCDU/MCDU.nas | 6 + Nasal/FMGC/FMGC.nas | 182 +++++++++++-------------------- Nasal/MCDU/MCDU.nas | 4 +- Nasal/MCDU/VERTREV.nas | 69 +++++++++++- Systems/a320-misc.xml | 22 ++++ 5 files changed, 161 insertions(+), 122 deletions(-) diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 29e8c013..d563cce5 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -5223,6 +5223,12 @@ var canvas_MCDU_base = { me.colorRight(myVertRev[i].R1[2],myVertRev[i].R2[2],myVertRev[i].R3[2],myVertRev[i].R4[2],myVertRev[i].R5[2],myVertRev[i].R6[2]); } + + if (myVertRev[i] != nil and (myVertRev[i].type == 1 and fmgc.FMGCInternal.desSpdLimSet) or (myVertRev[i].type != 1 and fmgc.FMGCInternal.clbSpdLimSet)) { + me["Simple_L2"].setFontSize(normal); + } else { + me["Simple_L2"].setFontSize(small); + } pageSwitch[i].setBoolValue(1); } } else if (page == "DEPARTURE") { diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index ab1c1097..0fde9d8c 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -27,8 +27,6 @@ var alt = 0; var altitude = 0; var flap = 0; var flaps = 0; -var ias = 0; -var mach = 0; var ktsmach = 0; var kts_sel = 0; var mach_sel = 0; @@ -82,6 +80,12 @@ var FMGCInternal = { phase: 0, minspeed: 0, maxspeed: 0, + clbSpdLim: 250, + desSpdLim: 250, + clbSpdLimAlt: 10000, + desSpdLimAlt: 10000, + clbSpdLimSet: 0, + desSpdLimSet: 0, takeoffState: 0, # speeds @@ -257,9 +261,12 @@ var postInit = func() { var FMGCNodes = { costIndex: props.globals.initNode("/FMGC/internal/cost-index", 0, "DOUBLE"), + decel: props.globals.initNode("/FMGC/internal/decel", 0, "BOOL"), flexSet: props.globals.initNode("/FMGC/internal/flex-set", 0, "BOOL"), flexTemp: props.globals.initNode("/FMGC/internal/flex", 0, "INT"), mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"), + ktsToMachFactor: props.globals.getNode("/FMGC/internal/kts-to-mach-factor"), + machToKtsFactor: props.globals.getNode("/FMGC/internal/mach-to-kts-factor"), mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"), toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"), toState: props.globals.initNode("/FMGC/internal/to-state", 0, "BOOL"), @@ -338,11 +345,8 @@ var updateFuel = func { final_fuel = 1000 * FMGCInternal.finalFuel; zfw = 1000 * FMGCInternal.zfw; final_time = final_fuel / (2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903)); # x2 for 2 engines - if (final_time < 0) { - final_time = 0; - } elsif (final_time > 480) { - final_time = 480; - } + final_time = math.clamp(final_time, 0, 480); + if (num(final_time) >= 60) { final_min = int(math.mod(final_time, 60)); final_hour = int((final_time - final_min) / 60); @@ -360,11 +364,8 @@ var updateFuel = func { } zfw = 1000 * FMGCInternal.zfw; final_fuel = final_time * 2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903); # x2 for 2 engines - if (final_fuel < 0) { - final_fuel = 0; - } elsif (final_fuel > 80000) { - final_fuel = 80000; - } + final_fuel = math.clamp(final_fuel, 0, 80000); + FMGCInternal.finalFuel = final_fuel / 1000; } @@ -376,11 +377,8 @@ var updateFuel = func { alt_fuel = 1000 * num(FMGCInternal.altFuel); zfw = 1000 * FMGCInternal.zfw; alt_time = alt_fuel / (2.0 * ((zfw*zfw*-2e-10) + (zfw*0.0003) + 2.8903)); # x2 for 2 engines - if (alt_time < 0) { - alt_time = 0; - } elsif (alt_time > 480) { - alt_time = 480; - } + alt_time = math.clamp(alt_time, 0, 480); + if (num(alt_time) >= 60) { alt_min = int(math.mod(alt_time, 60)); alt_hour = int((alt_time - alt_min) / 60); @@ -417,21 +415,14 @@ var updateFuel = func { #trip_fuel = 4.003e+02 + (dist * -5.399e+01) + (dist * dist * -7.322e-02) + (dist * dist * dist * 1.091e-05) + (dist * dist * dist * dist * 2.962e-10) + (dist * dist * dist * dist * dist * -1.178e-13) + (dist * dist * dist * dist * dist * dist * 6.322e-18) + (crz * 5.387e+01) + (dist * crz * 1.583e+00) + (dist * dist * crz * 7.695e-04) + (dist * dist * dist * crz * -1.057e-07) + (dist * dist * dist * dist * crz * 1.138e-12) + (dist * dist * dist * dist * dist * crz * 1.736e-16) + (crz * crz * -1.171e+00) + (dist * crz * crz * -1.219e-02) + (dist * dist * crz * crz * -2.879e-06) + (dist * dist * dist * crz * crz * 3.115e-10) + (dist * dist * dist * dist * crz * crz * -4.093e-15) + (crz * crz * crz * 9.160e-03) + (dist * crz * crz * crz * 4.311e-05) + (dist * dist * crz * crz * crz * 4.532e-09) + (dist * dist * dist * crz * crz * crz * -2.879e-13) + (crz * crz * crz * crz * -3.338e-05) + (dist * crz * crz * crz * crz * -7.340e-08) + (dist * dist * crz * crz * crz * crz * -2.494e-12) + (crz * crz * crz * crz * crz * 5.849e-08) + (dist * crz * crz * crz * crz * crz * 4.898e-11) + (crz * crz * crz * crz * crz * crz * -3.999e-11); trip_fuel = 4.018e+02 + (dist*3.575e+01) + (dist*dist*-4.260e-02) + (dist*dist*dist*-1.446e-05) + (dist*dist*dist*dist*4.101e-09) + (dist*dist*dist*dist*dist*-6.753e-13) + (dist*dist*dist*dist*dist*dist*5.074e-17) + (crz*-2.573e+01) + (dist*crz*-1.583e-01) + (dist*dist*crz*8.147e-04) + (dist*dist*dist*crz*4.485e-08) + (dist*dist*dist*dist*crz*-7.656e-12) + (dist*dist*dist*dist*dist*crz*4.503e-16) + (crz*crz*4.427e-01) + (dist*crz*crz*-1.137e-03) + (dist*dist*crz*crz*-4.409e-06) + (dist*dist*dist*crz*crz*-3.345e-11) + (dist*dist*dist*dist*crz*crz*4.985e-15) + (crz*crz*crz*-2.471e-03) + (dist*crz*crz*crz*1.223e-05) + (dist*dist*crz*crz*crz*9.660e-09) + (dist*dist*dist*crz*crz*crz*-2.127e-14) + (crz*crz*crz*crz*5.714e-06) + (dist*crz*crz*crz*crz*-3.546e-08) + (dist*dist*crz*crz*crz*crz*-7.536e-12) + (crz*crz*crz*crz*crz*-4.061e-09) + (dist*crz*crz*crz*crz*crz*3.355e-11) + (crz*crz*crz*crz*crz*crz*-1.451e-12); - if (trip_fuel < 400) { - trip_fuel = 400; - } elsif (trip_fuel > 80000) { - trip_fuel = 80000; - } + trip_fuel = math.clamp(trip_fuel, 400, 80000); # cruize temp correction trip_fuel = trip_fuel + (0.033 * (temp - 15 + (2 * crz / 10)) * flightPlanController.arrivalDist); trip_time = 9.095e-02 + (dist*-3.968e-02) + (dist*dist*4.302e-04) + (dist*dist*dist*2.005e-07) + (dist*dist*dist*dist*-6.876e-11) + (dist*dist*dist*dist*dist*1.432e-14) + (dist*dist*dist*dist*dist*dist*-1.177e-18) + (crz*7.348e-01) + (dist*crz*3.310e-03) + (dist*dist*crz*-8.700e-06) + (dist*dist*dist*crz*-4.214e-10) + (dist*dist*dist*dist*crz*5.652e-14) + (dist*dist*dist*dist*dist*crz*-6.379e-18) + (crz*crz*-1.449e-02) + (dist*crz*crz*-7.508e-06) + (dist*dist*crz*crz*4.529e-08) + (dist*dist*dist*crz*crz*3.699e-13) + (dist*dist*dist*dist*crz*crz*8.466e-18) + (crz*crz*crz*1.108e-04) + (dist*crz*crz*crz*-4.126e-08) + (dist*dist*crz*crz*crz*-9.645e-11) + (dist*dist*dist*crz*crz*crz*-1.544e-16) + (crz*crz*crz*crz*-4.123e-07) + (dist*crz*crz*crz*crz*1.831e-10) + (dist*dist*crz*crz*crz*crz*7.438e-14) + (crz*crz*crz*crz*crz*7.546e-10) + (dist*crz*crz*crz*crz*crz*-1.921e-13) + (crz*crz*crz*crz*crz*crz*-5.453e-13); - if (trip_time < 10) { - trip_time = 10; - } elsif (trip_time > 480) { - trip_time = 480; - } + trip_time = math.clamp(trip_time, 10, 480); + # if (low air conditioning) { # trip_fuel = trip_fuel * 0.995; #} @@ -444,11 +435,7 @@ var updateFuel = func { zfw = FMGCInternal.zfw; landing_weight_correction = 9.951e+00 + (dist*-2.064e+00) + (dist*dist*2.030e-03) + (dist*dist*dist*8.179e-08) + (dist*dist*dist*dist*-3.941e-11) + (dist*dist*dist*dist*dist*2.443e-15) + (crz*2.771e+00) + (dist*crz*3.067e-02) + (dist*dist*crz*-1.861e-05) + (dist*dist*dist*crz*2.516e-10) + (dist*dist*dist*dist*crz*5.452e-14) + (crz*crz*-4.483e-02) + (dist*crz*crz*-1.645e-04) + (dist*dist*crz*crz*5.212e-08) + (dist*dist*dist*crz*crz*-8.721e-13) + (crz*crz*crz*2.609e-04) + (dist*crz*crz*crz*3.898e-07) + (dist*dist*crz*crz*crz*-4.617e-11) + (crz*crz*crz*crz*-6.488e-07) + (dist*crz*crz*crz*crz*-3.390e-10) + (crz*crz*crz*crz*crz*5.835e-10); trip_fuel = trip_fuel + (landing_weight_correction * (FMGCInternal.lw * 1000 - 121254.24421) / 2204.622622); - if (trip_fuel < 400) { - trip_fuel = 400; - } elsif (trip_fuel > 80000) { - trip_fuel = 80000; - } + trip_fuel = math.clamp(trip_fuel, 400, 80000); FMGCInternal.tripFuel = trip_fuel / 1000; if (num(trip_time) >= 60) { @@ -502,11 +489,8 @@ var updateFuel = func { FMGCInternal.extraFuel = extra_fuel / 1000; lw = 1000 * FMGCInternal.lw; extra_time = extra_fuel / (2.0 * ((lw*lw*-2e-10) + (lw*0.0003) + 2.8903)); # x2 for 2 engines - if (extra_time < 0) { - extra_time = 0; - } elsif (extra_time > 480) { - extra_time = 480; - } + extra_time = math.clamp(extra_time, 0, 480); + if (num(extra_time) >= 60) { extra_min = int(math.mod(extra_time, 60)); extra_hour = int((extra_time - extra_min) / 60); @@ -631,7 +615,7 @@ var masterFMGC = maketimer(0.2, func { } } } elsif (FMGCInternal.phase == 4) { - if (getprop("/FMGC/internal/decel")) { + if (FMGCNodes.decel.getValue()) { newphase = 5; } } elsif (FMGCInternal.phase == 5) { @@ -648,9 +632,9 @@ var masterFMGC = maketimer(0.2, func { if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { #todo decel pseudo waypoint - setprop("/FMGC/internal/decel", 1); - } elsif (getprop("/FMGC/internal/decel") == 1 and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) { - setprop("/FMGC/internal/decel", 0); + FMGCNodes.decel.setValue(1); + } elsif (FMGCNodes.decel.getValue() and (FMGCInternal.phase == 0 or FMGCInternal.phase == 6)) { + FMGCNodes.decel.setValue(0); } @@ -955,8 +939,8 @@ var updateAirportRadios = func { }; -setlistener(FMGCNodes.phase, updateAirportRadios,0,0); -setlistener(flightPlanController.changed, updateAirportRadios,0,0); +setlistener(FMGCNodes.phase, updateAirportRadios, 0, 0); +setlistener(flightPlanController.changed, updateAirportRadios, 0, 0); var reset_FMGC = func { FMGCInternal.phase = 0; @@ -1007,110 +991,76 @@ var reset_FMGC = func { ################# # Managed Speed # ################# +var srsSpeedNode = props.globals.getNode("/it-autoflight/settings/togaspd", 1); +var ktToMach = func(val) { return val * FMGCNodes.ktsToMachFactor.getValue(); } +var machToKt = func(val) { return val * FMGCNodes.machToKtsFactor.getValue(); } + var ManagedSPD = maketimer(0.25, func { if (FMGCInternal.crzSet and FMGCInternal.costIndexSet) { if (Custom.Input.spdManaged.getBoolValue()) { altitude = pts.Instrumentation.Altimeter.indicatedFt.getValue(); - mode = Modes.PFD.FMA.pitchMode.getValue(); - ias = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue(); - mach = pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue(); + decel = FMGCNodes.decel.getValue(); ktsmach = Input.ktsMach.getValue(); - kts_sel = Input.kts.getValue(); - mach_sel = Input.mach.getValue(); - srsSPD = getprop("/it-autoflight/settings/togaspd"); - phase = FMGCInternal.phase; # 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done - flap = pts.Controls.Flight.flapsPos.getValue(); - decel = getprop("/FMGC/internal/decel"); + mode = Modes.PFD.FMA.pitchMode.getValue(); + srsSPD = srsSpeedNode.getValue(); mng_alt_spd = math.round(FMGCNodes.mngSpdAlt.getValue(), 1); mng_alt_mach = math.round(FMGCNodes.mngMachAlt.getValue(), 0.001); - if (mach > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) { + # Phase: 0 is Preflight 1 is Takeoff 2 is Climb 3 is Cruise 4 is Descent 5 is Decel/Approach 6 is Go Around 7 is Done + if (pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue() > mng_alt_mach and (FMGCInternal.phase == 2 or FMGCInternal.phase == 3)) { FMGCInternal.machSwitchover = 1; - } elsif (ias > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) { + } elsif (pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue() > mng_alt_spd and (FMGCInternal.phase == 4 or FMGCInternal.phase == 5)) { FMGCInternal.machSwitchover = 0; } if ((mode == " " or mode == "SRS") and (FMGCInternal.phase == 0 or FMGCInternal.phase == 1)) { - if (FMGCInternal.mngKtsMach) { + FMGCInternal.mngKtsMach = 0; + FMGCInternal.mngSpdCmd = srsSPD; + } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= FMGCInternal.clbSpdLimAlt) { + # Speed is maximum of greendot / climb speed limit + FMGCInternal.mngKtsMach = 0; + FMGCInternal.mngSpdCmd = decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.clbSpdLim, FMGCInternal.clean, 999); + } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > (FMGCInternal.clbSpdLimAlt + 20)) { + FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; + } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude > (FMGCInternal.desSpdLimAlt + 20)) { + if (decel) { FMGCInternal.mngKtsMach = 0; - } - if (FMGCInternal.mngSpdCmd != srsSPD) { - FMGCInternal.mngSpdCmd = srsSPD; - } - } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude <= 10050) { - if (FMGCInternal.mngKtsMach) { - FMGCInternal.mngKtsMach = 0; - } - if (FMGCInternal.mngSpdCmd != 250 and !decel) { - FMGCInternal.mngSpdCmd = 250; - } elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) { - FMGCInternal.mngSpdCmd = FMGCInternal.minspeed; - } - } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and !FMGCInternal.machSwitchover) { - if (FMGCInternal.mngKtsMach) { - FMGCInternal.mngKtsMach = 0; - } - if (FMGCInternal.mngSpdCmd != mng_alt_spd) { - FMGCInternal.mngSpdCmd = mng_alt_spd; - } - } elsif ((FMGCInternal.phase == 2 or FMGCInternal.phase == 3) and altitude > 10070 and FMGCInternal.machSwitchover) { - if (!FMGCInternal.mngKtsMach) { - FMGCInternal.mngKtsMach = 1; - } - if (FMGCInternal.mngSpdCmd != mng_alt_mach) { - FMGCInternal.mngSpdCmd = mng_alt_mach; - } - } elsif (FMGCInternal.phase == 4 and altitude > 11000 and !FMGCInternal.machSwitchover) { - if (FMGCInternal.mngKtsMach) { - FMGCInternal.mngKtsMach = 0; - } - if (FMGCInternal.mngSpdCmd != mng_alt_spd) { - FMGCInternal.mngSpdCmd = mng_alt_spd; - } - } elsif (FMGCInternal.phase == 4 and altitude > 11000 and FMGCInternal.machSwitchover) { - if (!FMGCInternal.mngKtsMach) { - FMGCInternal.mngKtsMach = 1; - } - if (FMGCInternal.mngSpdCmd != mng_alt_mach) { - FMGCInternal.mngSpdCmd = mng_alt_mach; - } - } elsif ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude > 11000 and !FMGCInternal.machSwitchover) { - if (FMGCInternal.mngKtsMach) { - FMGCInternal.mngKtsMach = 0; - } - if (FMGCInternal.mngSpdCmd != mng_alt_spd and !decel) { - FMGCInternal.mngSpdCmd = mng_alt_spd; - } elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) { - FMGCInternal.mngSpdCmd = FMGCInternal.minspeed; - } - } elsif ((FMGCInternal.phase == 4 or FMGCInternal.phase == 5 or FMGCInternal.phase == 6) and altitude <= 10980) { - if (FMGCInternal.mngKtsMach) { - FMGCInternal.mngKtsMach = 0; - } - if (FMGCInternal.mngSpdCmd != 250 and !decel) { - FMGCInternal.mngSpdCmd = 250; - } elsif (FMGCInternal.mngSpdCmd != FMGCInternal.minspeed and decel) { FMGCInternal.mngSpdCmd = FMGCInternal.minspeed; + } else { + FMGCInternal.mngKtsMach = FMGCInternal.machSwitchover ? 1 : 0; + FMGCInternal.mngSpdCmd = FMGCInternal.machSwitchover ? mng_alt_mach : mng_alt_spd; } + } elsif ((FMGCInternal.phase >= 4 and FMGCInternal.phase <= 6) and altitude <= FMGCInternal.desSpdLimAlt) { + FMGCInternal.mngKtsMach = 0; + # Speed is maximum of greendot / descent speed limit + FMGCInternal.mngSpdCmd = decel ? FMGCInternal.minspeed : math.clamp(FMGCInternal.desSpdLim, FMGCInternal.clean, 999); } - if (FMGCInternal.mngSpdCmd > FMGCInternal.maxspeed - 5) { - FMGCInternal.mngSpd = (FMGCInternal.maxspeed - 5); + # Clamp to minspeed, maxspeed + if (FMGCInternal.phase >= 2) { + if (!FMGCInternal.mngKtsMach) { + FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, FMGCInternal.minspeed, FMGCInternal.maxspeed); + } else { + FMGCInternal.mngSpd = math.clamp(FMGCInternal.mngSpdCmd, ktToMach(FMGCInternal.minspeed), ktToMach(FMGCInternal.maxspeed)); + } } else { FMGCInternal.mngSpd = FMGCInternal.mngSpdCmd; } + # Update value of ktsMach if (ktsmach and !FMGCInternal.mngKtsMach) { Input.ktsMach.setValue(0); } elsif (!ktsmach and FMGCInternal.mngKtsMach) { Input.ktsMach.setValue(1); } - if (kts_sel != FMGCInternal.mngSpd and !ktsmach) { + # Set target speed + if (Input.kts.getValue() != FMGCInternal.mngSpd and !ktsmach) { Input.kts.setValue(FMGCInternal.mngSpd); - } elsif (mach_sel != FMGCInternal.mngSpd and ktsmach) { + } elsif (Input.mach.getValue() != FMGCInternal.mngSpd and ktsmach) { Input.mach.setValue(FMGCInternal.mngSpd); } } else { diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index f54a2a5d..60d363d8 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -15,7 +15,7 @@ var MCDU_init = func(i) { var MCDU_reset = func(i) { setprop("/MCDU[" ~ i ~ "]/active", 0); setprop("/MCDU[" ~ i ~ "]/atsu-active", 0); - setprop("it-autoflight/settings/togaspd", 157); #aka v2 clone + setprop("/it-autoflight/settings/togaspd", 157); #aka v2 clone setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", "STATUS"); setprop("/MCDU[" ~ i ~ "]/last-atsu-page", "ATSUDLINK"); setprop("/MCDU[" ~ i ~ "]/active-system",""); @@ -496,6 +496,8 @@ var lskbutton = func(btn, i) { mcdu_scratchpad.scratchpads[i].empty(); } } + } else if (page == "VERTREV") { + canvas_mcdu.myVertRev[i].pushButtonLeft(2); } else if (page == "MCDUTEXT") { atsu.freeTexts[i].selection = 1; atsu.freeTexts[i].changed = 1; diff --git a/Nasal/MCDU/VERTREV.nas b/Nasal/MCDU/VERTREV.nas index 000ec6d3..6cd6df08 100644 --- a/Nasal/MCDU/VERTREV.nas +++ b/Nasal/MCDU/VERTREV.nas @@ -1,4 +1,5 @@ var scratchpadStore = nil; +var scratchpadSplit = nil; var vertRev = { title: [nil, nil, nil], @@ -77,7 +78,7 @@ var vertRev = { me.title = ["VERT REV", " AT ", "PPOS"]; me.L1 = ["", " EFOB ---.-", "wht"]; me.R1 = ["", "EXTRA ---.- ", "wht"]; - me.L2 = ["250/10000", " CLB SPD LIM", "mag"]; + me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"]; me.L4 = [" CONSTANT MACH", nil, "wht"]; me.L5 = [" WIND DATA", nil, "wht"]; me.L6 = [" RETURN", nil, "wht"]; @@ -90,7 +91,7 @@ var vertRev = { me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0]]; me.L1 = ["", " EFOB ---.-", "wht"]; me.R1 = ["", "EXTRA ---.- ", "wht"]; - me.L2 = ["250/10000", " CLB SPD LIM", "mag"]; + me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"]; me.speed = me.getSpd(); if (me.speed[0] == nil) { me.L3 = [" [ ]", " SPD CSTR", "blu"]; @@ -130,7 +131,7 @@ var vertRev = { } me.L1 = ["", " EFOB ---.-", "wht"]; me.R1 = ["", "EXTRA ---.- ", "wht"]; - me.L2 = ["250/10000", " CLB SPD LIM", "mag"]; + me.L2 = [fmgc.FMGCInternal.clbSpdLim ~ "/" ~ fmgc.FMGCInternal.clbSpdLimAlt, " CLB SPD LIM", "mag"]; me.L4 = [" CONSTANT MACH", nil, "wht"]; me.L5 = [" WIND DATA", nil, "wht"]; me.L6 = [" RETURN", nil, "wht"]; @@ -146,7 +147,7 @@ var vertRev = { } me.L1 = ["", " EFOB ---.-", "wht"]; me.R1 = ["", "EXTRA ---.- ", "wht"]; - me.L2 = ["250/10000", " DES SPD LIM", "mag"]; + me.L2 = [fmgc.FMGCInternal.desSpdLim ~ "/" ~ fmgc.FMGCInternal.desSpdLimAlt, " DES SPD LIM", "mag"]; me.L4 = [" CONSTANT MACH", nil, "wht"]; me.L5 = [" WIND DATA", nil, "wht"]; me.L6 = [" RETURN", nil, "wht"]; @@ -180,7 +181,65 @@ var vertRev = { }, pushButtonLeft: func(index) { scratchpadStore = mcdu_scratchpad.scratchpads[me.computer].scratchpad; - if (index == 3 and me.type == 2) { + if (index == 2) { + if (scratchpadStore == "CLR") { + if (me.type == 1) { + fmgc.FMGCInternal.desSpdLim = 250; + fmgc.FMGCInternal.desSpdLimAlt = 10000; + fmgc.FMGCInternal.desSpdLimSet = 0; + } else { + fmgc.FMGCInternal.clbSpdLim = 250; + fmgc.FMGCInternal.clbSpdLimAlt = 10000; + fmgc.FMGCInternal.clbSpdLimSet = 0; + } + mcdu_scratchpad.scratchpads[me.computer].empty(); + me._setupPageWithData(); + canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); + } elsif (find("/", scratchpadStore) != -1) { + scratchpadSplit = split("/", scratchpadStore); + if (size(scratchpadSplit[0]) == 3 and num(scratchpadSplit[0]) != nil and size(scratchpadSplit[1]) >= 3 and size(scratchpadSplit[1]) <= 5 and num(scratchpadSplit[1]) != nil) { + if (scratchpadSplit[0] >= 100 and scratchpadSplit[0] <= 340 and scratchpadSplit[1] >= 100 and scratchpadSplit[1] <= 39000) { + if (me.type == 1) { + fmgc.FMGCInternal.desSpdLim = scratchpadSplit[0]; + fmgc.FMGCInternal.desSpdLimSet = 1; + if (size(scratchpadSplit[1]) != 0) { + fmgc.FMGCInternal.desSpdLimAlt = scratchpadSplit[1]; + } + } else { + fmgc.FMGCInternal.clbSpdLim = scratchpadSplit[0]; + fmgc.FMGCInternal.clbSpdLimSet = 1; + if (size(scratchpadSplit[1]) != 0) { + fmgc.FMGCInternal.clbSpdLimAlt = scratchpadSplit[1]; + } + } + mcdu_scratchpad.scratchpads[me.computer].empty(); + me._setupPageWithData(); + canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); + } else { + mcdu_message(me.computer, "ENTRY OUT OF RANGE"); + } + } else { + mcdu_message(me.computer, "FORMAT ERROR"); + } + } elsif (num(scratchpadStore) != nil and size(scratchpadStore) == 3) { + if (scratchpadStore >= 100 and scratchpadStore <= 340) { + if (me.type == 1) { + fmgc.FMGCInternal.desSpdLim = scratchpadStore; + fmgc.FMGCInternal.desSpdLimSet = 1; + } else { + fmgc.FMGCInternal.clbSpdLim = scratchpadStore; + fmgc.FMGCInternal.clbSpdLimSet = 1; + } + mcdu_scratchpad.scratchpads[me.computer].empty(); + me._setupPageWithData(); + canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); + } else { + mcdu_message(me.computer, "ENTRY OUT OF RANGE"); + } + } else { + mcdu_message(me.computer, "FORMAT ERROR"); + } + } elsif (index == 3 and me.type == 2) { if (scratchpadStore == "CLR") { me.wp.setSpeed("delete"); mcdu_scratchpad.scratchpads[me.computer].empty(); diff --git a/Systems/a320-misc.xml b/Systems/a320-misc.xml index 098b24eb..95f983ca 100644 --- a/Systems/a320-misc.xml +++ b/Systems/a320-misc.xml @@ -502,4 +502,26 @@ + + + + + + /instrumentation/airspeed-indicator/indicated-mach + /instrumentation/airspeed-indicator/indicated-speed-kt + + + + + + + + /instrumentation/airspeed-indicator/indicated-mach + /instrumentation/airspeed-indicator/indicated-speed-kt + + + + + + From 27a90d952574ac08a26d9c2aa33f1b0291b4cf16 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 8 Jan 2022 21:43:33 +0000 Subject: [PATCH 39/42] small changes --- Nasal/FMGC/FMGC.nas | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 0fde9d8c..c2465e1a 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -14,8 +14,6 @@ var n1_right = 0; var modelat = ""; var mode = 0; var gs = 0; -var cruiseft = 0; -var cruiseft_b = 0; var state1 = 0; var state2 = 0; var accel_agl_ft = 0; @@ -572,8 +570,6 @@ var masterFMGC = maketimer(0.2, func { mode = Modes.PFD.FMA.pitchMode.getValue(); gs = pts.Velocities.groundspeed.getValue(); alt = pts.Instrumentation.Altimeter.indicatedFt.getValue(); - # cruiseft = FMGCInternal.crzFt; - # cruiseft_b = FMGCInternal.crzFt - 200; state1 = pts.Systems.Thrust.state[0].getValue(); state2 = pts.Systems.Thrust.state[1].getValue(); accel_agl_ft = Setting.reducAglFt.getValue(); @@ -713,6 +709,7 @@ var masterFMGC = maketimer(0.2, func { if (altitude > 20000) { FMGCInternal.clean += (altitude - 20000) / 1000; } + FMGCInternal.vs1g_clean = 0.0024 * weight_lbs * weight_lbs + 0.124 * weight_lbs + 88.942; FMGCInternal.vs1g_conf_1 = -0.0007 * weight_lbs * weight_lbs + 0.6795 * weight_lbs + 44.673; FMGCInternal.vs1g_conf_1f = -0.0001 * weight_lbs * weight_lbs + 0.5211 * weight_lbs + 49.027; @@ -723,13 +720,11 @@ var masterFMGC = maketimer(0.2, func { FMGCInternal.flap2 = FMGCInternal.vs1g_conf_2 * 1.47; FMGCInternal.flap3 = FMGCInternal.vs1g_conf_3 * 1.36; if (FMGCInternal.ldgConfig3) { - FMGCInternal.vls = FMGCInternal.vs1g_conf_3 * 1.23; + FMGCInternal.vls = math.clamp(FMGCInternal.vs1g_conf_3 * 1.23, 113, 999); } else { - FMGCInternal.vls = FMGCInternal.vs1g_conf_full * 1.23 - } - if (FMGCInternal.vls < 113) { - FMGCInternal.vls = 113; + FMGCInternal.vls = math.clamp(FMGCInternal.vs1g_conf_full * 1.23, 113, 999); } + if (!fmgc.FMGCInternal.vappSpeedSet) { if (FMGCInternal.destWind < 5) { FMGCInternal.vapp = FMGCInternal.vls + 5; From 5e0ff63f60f48d57b1285be421a4502cb4afc78d Mon Sep 17 00:00:00 2001 From: Josh Davidson Date: Sat, 8 Jan 2022 17:16:24 -0500 Subject: [PATCH 40/42] DU: Remove unused object --- Models/Instruments/PFD/PFD.nas | 4 +--- Models/Instruments/PFD/res/pfd.svg | 37 ++++++++++++------------------ 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 42b7ee94..cedffb3f 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -770,8 +770,6 @@ var canvas_pfd = { obj.AI_fpv_rot = obj["FPV"].createTransform(); obj.page = obj.group; - obj["ASI_index_middle"].hide(); - # end temporary hide return obj; }, @@ -784,7 +782,7 @@ var canvas_pfd = { "ALT_digit_DN","ALT_digit_UP_metric","ALT_error","ALT_neg","ALT_group","ALT_group2","ALT_frame","VS_pointer","VS_box","VS_digit","VS_error","VS_group","QNH","QNH_setting","QNH_std","QNH_box","LOC_pointer","LOC_scale","GS_scale","GS_pointer","CRS_pointer", "HDG_target","HDG_scale","HDG_one","HDG_two","HDG_three","HDG_four","HDG_five","HDG_six","HDG_seven","HDG_digit_L","HDG_digit_R","HDG_error","HDG_group","HDG_frame","TRK_pointer","machError","ilsError","ils_code","ils_freq","dme_dist","dme_dist_legend", "ILS_HDG_R","ILS_HDG_L","ILS_right","ILS_left","outerMarker","middleMarker","innerMarker","v1_group","v1_text","vr_speed","F_target","S_target","FS_targets","flap_max","clean_speed","ground","ground_ref","FPV","spdLimError","vsFMArate","tailstrikeInd", - "Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_buss_ref","ASI_buss_ref_blue","ASI_index_middle"]; + "Metric_box","Metric_letter","Metric_cur_alt","ASI_buss","ASI_buss_ref","ASI_buss_ref_blue"]; }, getKeysTest: func() { return ["Test_white","Test_text"]; diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg index 04207315..d8ba7c1d 100644 --- a/Models/Instruments/PFD/res/pfd.svg +++ b/Models/Instruments/PFD/res/pfd.svg @@ -1,19 +1,19 @@ + width="1024pt"> @@ -39,14 +39,14 @@ showguides="true" inkscape:current-layer="svg2" inkscape:window-maximized="1" - inkscape:window-y="-11" - inkscape:window-x="-11" - inkscape:cy="676.96634" - inkscape:cx="183.00807" - inkscape:zoom="11.313709" + inkscape:window-y="-8" + inkscape:window-x="1592" + inkscape:cy="650.95194" + inkscape:cx="172.61297" + inkscape:zoom="4.0000002" showgrid="false" id="namedview371" - inkscape:window-height="986" + inkscape:window-height="1030" inkscape:window-width="1920" inkscape:pageshadow="2" inkscape:pageopacity="1" @@ -5585,13 +5585,6 @@ inkscape:connector-curvature="0" sodipodi:nodetypes="cc" /> - From a1e8320e0c70903b84f2ffa8111fcc900cb11b46 Mon Sep 17 00:00:00 2001 From: Josh Davidson Date: Sun, 9 Jan 2022 10:59:14 -0500 Subject: [PATCH 41/42] FMGC: Fix buggy behavior with boxchk --- Nasal/FMGC/FMGC-b.nas | 20 ++++++++++++++------ Nasal/FMGC/FMGC-c.nas | 38 +++++--------------------------------- Nasal/FMGC/FMGC.nas | 1 - 3 files changed, 19 insertions(+), 40 deletions(-) diff --git a/Nasal/FMGC/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas index 76acb10f..bdd332cb 100644 --- a/Nasal/FMGC/FMGC-b.nas +++ b/Nasal/FMGC/FMGC-b.nas @@ -173,7 +173,7 @@ var Custom = { spdManaged: props.globals.getNode("/it-autoflight/input/spd-managed", 1), }, Output: { - fmaPower: props.globals.initNode("/it-autoflight/output/fma-pwr", 0, "BOOL"), + fmaPower: 0, vsFCU: props.globals.initNode("/it-autoflight/output/vs-fcu-display", "", "STRING"), }, Sound: { @@ -229,7 +229,7 @@ var ITAF = { Text.lat.setValue(" "); Text.vert.setValue(" "); Custom.showHdg.setBoolValue(1); - Custom.Output.fmaPower.setBoolValue(1); + Custom.Output.fmaPower = 1; ManagedSPD.stop(); loopTimer.start(); slowLoopTimer.start(); @@ -448,8 +448,8 @@ var ITAF = { ap1Master: func(s) { if (s == 1) { if (Output.vert.getValue() != 6 and !Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue() and systems.ELEC.Bus.acEss.getValue() >= 110 and fbw.FBW.apOff == 0 and Position.gearAglFt.getValue() >= 100) { - me.revertBasicMode(); Output.ap1.setBoolValue(1); + me.updateFma(); Output.latTemp = Output.lat.getValue(); if (Output.ap2.getBoolValue() and !Output.apprArm.getBoolValue() and Output.latTemp != 2 and Output.latTemp != 4) { me.ap2Master(0); @@ -465,12 +465,13 @@ var ITAF = { if (Input.ap1.getBoolValue() != Output.ap1Temp) { Input.ap1.setBoolValue(Output.ap1Temp); } + fmaAp(); }, ap2Master: func(s) { if (s == 1) { if (Output.vert.getValue() != 6 and !Gear.wow1.getBoolValue() and !Gear.wow2.getBoolValue() and systems.ELEC.Bus.acEss.getValue() >= 110 and fbw.FBW.apOff == 0 and Position.gearAglFt.getValue() >= 100) { - me.revertBasicMode(); Output.ap2.setBoolValue(1); + me.updateFma(); Output.latTemp = Output.lat.getValue(); if (Output.ap1.getBoolValue() and !Output.apprArm.getBoolValue() and Output.latTemp != 2 and Output.latTemp != 4) { me.ap1Master(0); @@ -486,6 +487,7 @@ var ITAF = { if (Input.ap2.getBoolValue() != Output.ap2Temp) { Input.ap2.setBoolValue(Output.ap2Temp); } + fmaAp(); }, apOffFunction: func() { if (!Output.ap1.getBoolValue() and !Output.ap2.getBoolValue()) { # Only do if both APs are off @@ -515,6 +517,7 @@ var ITAF = { if (Input.athr.getBoolValue() != Output.athrTemp) { Input.athr.setBoolValue(Output.athrTemp); } + fmaAthr(); }, fd1Master: func(s) { if (s == 1) { @@ -530,6 +533,7 @@ var ITAF = { if (Input.fd1.getBoolValue() != Output.fd1Temp) { Input.fd1.setBoolValue(Output.fd1Temp); } + fmaFd(); }, fd2Master: func(s) { if (s == 1) { @@ -545,6 +549,7 @@ var ITAF = { if (Input.fd2.getBoolValue() != Output.fd2Temp) { Input.fd2.setBoolValue(Output.fd2Temp); } + fmaFd(); }, setLatMode: func(n) { Output.vertTemp = Output.vert.getValue(); @@ -596,7 +601,9 @@ var ITAF = { Text.lat.setValue("T/O"); me.armTextCheck(); } else if (n == 9) { # NONE + Output.lnavArm.setBoolValue(0); Output.locArm.setBoolValue(0); + Output.apprArm.setBoolValue(0); Output.lat.setValue(9); Custom.showHdg.setBoolValue(1); Text.lat.setValue(" "); @@ -882,9 +889,10 @@ var ITAF = { me.setLatMode(9); me.setVertMode(9); me.setLatArm(0); - Custom.Output.fmaPower.setBoolValue(0); + Custom.Output.fmaPower = 0; } else { - Custom.Output.fmaPower.setBoolValue(1); + if (!Custom.Output.fmaPower) showAllBoxes(); + Custom.Output.fmaPower = 1; me.revertBasicMode(); } }, diff --git a/Nasal/FMGC/FMGC-c.nas b/Nasal/FMGC/FMGC-c.nas index f47947ab..b918532f 100644 --- a/Nasal/FMGC/FMGC-c.nas +++ b/Nasal/FMGC/FMGC-c.nas @@ -513,7 +513,7 @@ setlistener("/it-autoflight/output/appr-armed", func { }); # AP -var ap = func { +var fmaAp = func { ap1 = Output.ap1.getValue(); ap2 = Output.ap2.getValue(); newap = Modes.PFD.FMA.apMode.getValue(); @@ -529,7 +529,7 @@ var ap = func { } # FD -var fd = func { +var fmaFd = func { fd1 = Output.fd1.getValue(); fd2 = Output.fd2.getValue(); newfd = Modes.PFD.FMA.fdMode.getValue(); @@ -544,8 +544,8 @@ var fd = func { } } -# AT -var atMode = func { +# A/THR +var fmaAthr = func { at = Output.athr.getValue(); if (at and Modes.PFD.FMA.athrMode.getValue() != "A/THR") { Modes.PFD.FMA.athrMode.setValue("A/THR"); @@ -554,14 +554,7 @@ var atMode = func { } } -var boxchk = func { - if ((Output.ap1.getValue() or Output.ap2.getValue() or Output.fd1.getValue() or Output.fd2.getValue()) and !Custom.Output.fmaPower.getValue()) { - Input.lat.setValue(3); - boxchk_b(); - } -} - -var boxchk_b = func { +var showAllBoxes = func { if (Modes.PFD.FMA.rollMode.getValue() != " ") { Modes.PFD.FMA.rollModeTime.setValue(pts.Sim.Time.elapsedSec.getValue()); } @@ -579,27 +572,6 @@ var boxchk_b = func { } } -# Update AP FD ATHR -setlistener("/it-autoflight/output/ap1", func { - ap(); - boxchk(); -}); -setlistener("/it-autoflight/output/ap2", func { - ap(); - boxchk(); -}); -setlistener("/it-autoflight/output/fd1", func { - fd(); - boxchk(); -}); -setlistener("/it-autoflight/output/fd2", func { - fd(); - boxchk(); -}); -setlistener("/it-autoflight/output/athr", func { - atMode(); -}); - # Boxes setlistener("/modes/pfd/fma/ap-mode", func { if (Modes.PFD.FMA.apMode.getValue() != " ") { diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index c2465e1a..00760980 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -42,7 +42,6 @@ var tempOverspeed = nil; setprop("/position/gear-agl-ft", 0); setprop("/it-autoflight/settings/accel-agl-ft", 1500); #eventually set to 1500 above runway setprop("/it-autoflight/internal/vert-speed-fpm", 0); -setprop("/it-autoflight/output/fma-pwr", 0); setprop("/instrumentation/nav[0]/nav-id", "XXX"); setprop("/instrumentation/nav[1]/nav-id", "XXX"); From 6acd065c00aeccd77c9817c13a421a318ebbe5c9 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 9 Jan 2022 19:29:43 +0000 Subject: [PATCH 42/42] Simbrief: fix bug when airport doesn't exist due to scenery --- Nasal/FMGC/SimbriefParser.nas | 1 - 1 file changed, 1 deletion(-) diff --git a/Nasal/FMGC/SimbriefParser.nas b/Nasal/FMGC/SimbriefParser.nas index 6312b49c..b215dc29 100644 --- a/Nasal/FMGC/SimbriefParser.nas +++ b/Nasal/FMGC/SimbriefParser.nas @@ -120,7 +120,6 @@ var SimbriefParser = { fmgc.updateArptLatLon(); fmgc.updateARPT(); } else { - me.cleanupInvalid(); return nil; }