From c0ae1c58f49e4428f3c954e0585e6c5f201503a4 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Tue, 28 Dec 2021 12:43:14 +0000 Subject: [PATCH 1/7] 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 2/7] 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 3/7] 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 4/7] 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 5/7] 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 6/7] 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 7/7] 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