From 45545281c442cdc0d278f55a4f8e3481a3b7ca38 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sat, 25 Sep 2021 20:23:41 +0100 Subject: [PATCH 1/6] Clarify ADR power supply, improve formulas for calculating mach / cas / tas / TAT / SAT based on AMM --- Nasal/Panels/SwitchingPanel.nas | 3 + Nasal/Systems/ADIRS/ADR.nas | 5 +- Systems/a320-adr.xml | 184 +++++++++++++++++--------------- 3 files changed, 100 insertions(+), 92 deletions(-) diff --git a/Nasal/Panels/SwitchingPanel.nas b/Nasal/Panels/SwitchingPanel.nas index abc9962b..57f38ef0 100644 --- a/Nasal/Panels/SwitchingPanel.nas +++ b/Nasal/Panels/SwitchingPanel.nas @@ -27,6 +27,9 @@ var SwitchingPanel = { }, doAttHdg: func(newAttHdg) { if (newAttHdg < -1 or newAttHdg > 1) { return; } + + systems.ADIRS.backupSupply[2][1] = newAttHdg == -1 ? 0 : 1; + me.Switches.attHdg.setValue(newAttHdg); foreach (var predicate; keys(canvas_nd.ND_1.NDCpt.predicates)) { call(canvas_nd.ND_1.NDCpt.predicates[predicate]); diff --git a/Nasal/Systems/ADIRS/ADR.nas b/Nasal/Systems/ADIRS/ADR.nas index 7d29e6ef..6987df3d 100644 --- a/Nasal/Systems/ADIRS/ADR.nas +++ b/Nasal/Systems/ADIRS/ADR.nas @@ -264,9 +264,8 @@ var ADIRS = { ADIRunits: [nil, nil, nil], # Electrical - mainSupply: [systems.ELEC.Bus.acEss, systems.ELEC.Bus.ac2, systems.ELEC.Bus.ac1], - backupSupply: [[systems.ELEC.Source.Bat2.volt, 0], [systems.ELEC.Source.Bat2.volt, 1], [systems.ELEC.Source.Bat1.volt, 1]], - # ADIRS power directly from a separate bus connected to battery (no c.b. unlike main hot bus), as they are so critical + mainSupply: [systems.ELEC.Bus.acEssShed, systems.ELEC.Bus.ac2, systems.ELEC.Bus.ac1], + backupSupply: [[systems.ELEC.Bus.dcHot1, 0], [systems.ELEC.Bus.dcHot2, 1], [systems.ELEC.Bus.dcHot1, 1]], # PTS Lights: { diff --git a/Systems/a320-adr.xml b/Systems/a320-adr.xml index 4490f7db..bf207379 100644 --- a/Systems/a320-adr.xml +++ b/Systems/a320-adr.xml @@ -11,11 +11,11 @@ aero/alpha-deg - /velocities/groundspeed-kt + /velocities/airspeed-kt - 0 0.0 - 29 0.0 - 30 1.0 + 0.00 0.0 + 59.99 0.0 + 60.00 1.0
@@ -51,32 +51,62 @@ /systems/pitot[0]/measured-total-pressure-inhg + + 18 + 2.953 + 41.34 + /systems/pitot[1]/measured-total-pressure-inhg + + 18 + 2.953 + 41.34 + /systems/pitot[2]/measured-total-pressure-inhg + + 18 + 2.953 + 41.34 + /systems/static[0]/pressure-inhg + + 18 + 2.953 + 32.48 + /systems/static[1]/pressure-inhg + + 18 + 2.953 + 32.48 + /systems/static[2]/pressure-inhg + + 18 + 2.953 + 32.48 + - 0.995 + 0.995 propulsion/tat-c @@ -85,7 +115,7 @@ - 0.996 + 0.996 propulsion/tat-c @@ -95,8 +125,8 @@ /systems/navigation/probes/tat-1/compute-tat 11 - -256 - 256 + -60 + 99 @@ -104,8 +134,8 @@ /systems/navigation/probes/tat-2/compute-tat 11 - -256 - 256 + -60 + 99 @@ -117,8 +147,8 @@ /instrumentation/altimeter[0]/pressure-alt-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -126,8 +156,8 @@ /instrumentation/altimeter[1]/pressure-alt-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -135,8 +165,8 @@ /instrumentation/altimeter[2]/pressure-alt-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -144,8 +174,8 @@ /instrumentation/altimeter[3]/pressure-alt-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -153,8 +183,8 @@ /instrumentation/altimeter[4]/pressure-alt-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -162,8 +192,8 @@ /instrumentation/altimeter[5]/pressure-alt-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -171,8 +201,8 @@ /instrumentation/altimeter[0]/indicated-altitude-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -180,8 +210,8 @@ /instrumentation/altimeter[1]/indicated-altitude-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -189,8 +219,8 @@ /instrumentation/altimeter[2]/indicated-altitude-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -198,8 +228,8 @@ /instrumentation/altimeter[3]/indicated-altitude-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -207,8 +237,8 @@ /instrumentation/altimeter[4]/indicated-altitude-ft 17 - -65536 - 65536 + -2000 + 50000 @@ -216,8 +246,8 @@ /instrumentation/altimeter[5]/indicated-altitude-ft 17 - -65536 - 65536 + -2000 + 50000> @@ -255,7 +285,7 @@ - 661.47 + 661.4746 /systems/navigation/adr/computation/cas-1-product 0.5 @@ -298,7 +328,7 @@ - 661.47 + 661.4746 /systems/navigation/adr/computation/cas-2-product 0.5 @@ -341,7 +371,7 @@ - 661.47 + 661.4746 /systems/navigation/adr/computation/cas-3-product 0.5 @@ -355,7 +385,7 @@ 14 0 - 1024 + 450 @@ -364,7 +394,7 @@ 14 0 - 1024 + 450 @@ -373,7 +403,7 @@ 14 0 - 1024 + 450 @@ -502,7 +532,7 @@ 16 0 - 4.096 + 1.0 @@ -511,7 +541,7 @@ 16 0 - 4.096 + 1.0 @@ -520,31 +550,16 @@ 16 0 - 4.096 + 1.0 - - - - /systems/navigation/probes/tat-1/tat - - - /instrumentation/airspeed-indicator/true-speed-kt - 2 - - 7569 - - - - - /environment/temperature-degc 11 - -256 - 256 + -99 + 80 @@ -552,24 +567,21 @@ /environment/temperature-degc 11 - -256 - 256 + -99 + 80 - 661.47 + 38.96695 /systems/navigation/adr/computation/mach-1 - - - /systems/navigation/adr/computation/sat-1 - 273.15 - - 288.15 - + + /systems/navigation/adr/computation/sat-1 + 273.15 + 0.5 @@ -579,16 +591,13 @@ - 661.47 + 38.96695 /systems/navigation/adr/computation/mach-2 - - - /systems/navigation/adr/computation/sat-2 - 273.15 - - 288.15 - + + /systems/navigation/adr/computation/sat-2 + 273.15 + 0.5 @@ -598,16 +607,13 @@ - 661.47 + 38.96695 /systems/navigation/adr/computation/mach-3 - - - /systems/navigation/adr/computation/sat-1 - 273.15 - - 288.15 - + + /systems/navigation/adr/computation/sat-1 + 273.15 + 0.5 @@ -619,7 +625,7 @@ 15 0 - 2048 + 599 @@ -628,7 +634,7 @@ 15 0 - 2048 + 599 @@ -637,7 +643,7 @@ 15 0 - 2048 + 599 From e2080544d90e4523aaaaf2ea6c06a9792d215ad9 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 26 Sep 2021 16:36:29 +0100 Subject: [PATCH 2/6] Improve StatInv display on Lower ECAM --- Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas index 5f7e62ad..678075fc 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM-elec.nas @@ -653,15 +653,19 @@ var canvas_lowerECAMPageElec = obj["ELEC-Line-ACESS-TRESS"].hide(); } }), - props.UpdateManager.FromHashList(["elec15XE2","statInvVolts","statInvHertz"], nil, func(val) { - if (val.elec15XE2) { + props.UpdateManager.FromHashValue("elec15XE2", nil, func(val) { + if (val) { obj["STATINV-group"].show(); - obj["StatVolt"].setText(sprintf("%s",val.statInvVolts)); - obj["StatHertz"].setText(sprintf("%s",val.statInvHertz)); } else { obj["STATINV-group"].hide(); } }), + props.UpdateManager.FromHashValue("statInvVolts", 0.1, func(val) { + obj["StatVolt"].setText(sprintf("%s",math.round(val))); + }), + props.UpdateManager.FromHashValue("statInvHertz", 0.5, func(val) { + obj["StatHz"].setText(sprintf("%s",math.round(val))); + }), ]; obj.displayedGForce = 0; From 91e0cf821f28da64c3ddb214025253f919e69266 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 3 Oct 2021 17:40:11 +0100 Subject: [PATCH 3/6] Improve automatic RAT deployment conditions per AMM --- Systems/a320-electrical.xml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index 95ebf1db..8c1597d8 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -826,13 +826,29 @@ + + + + /systems/navigation/adr/output/cas-1 gt 100 + /systems/navigation/adr/operating-1 eq 1 + + + + + /systems/electrical/some-electric-thingie/speed-abv-100 + 120 + 1 + + - /instrumentation/airspeed-indicator/indicated-speed-kt gt 100 + /systems/electrical/bus/dc-hot-1 ge 25 + /systems/electrical/some-electric-thingie/speed-abv-100-output eq 1 + /controls/electrical/switches/emer-gen-test eq 0 /sim/time/elapsed-sec gt 30 - /systems/electrical/bus/ac-1 eq 0 - /systems/electrical/bus/ac-2 eq 0 + /systems/electrical/bus/ac-1 lt 1 + /systems/electrical/bus/ac-2 lt 1 /controls/electrical/switches/emer-elec-man-on eq 0 From 9939f0855ee004d5523ee37119993fc596b9cc9b Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 3 Oct 2021 18:04:20 +0100 Subject: [PATCH 4/6] Slats: SFCC should use ADIRS values. TODO - need to consider ADIRS failure --- Systems/a320-fcs.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Systems/a320-fcs.xml b/Systems/a320-fcs.xml index 0ad34c56..0b85affc 100644 --- a/Systems/a320-fcs.xml +++ b/Systems/a320-fcs.xml @@ -836,10 +836,10 @@ fcs/slat-locked-cmd eq 1 /gear/gear[1]/wow ne 1 - /velocities/airspeed-kt ge 60 + /systems/navigation/adr/output/cas-1 ge 60 - aero/alpha-deg gt 7.6 + /systems/navigation/adr/output/aoa-1 gt 7.6 /systems/navigation/adr/output/cas-1 lt 154 @@ -848,10 +848,10 @@ /controls/flight/flaps-input ne 0 /gear/gear[1]/wow ne 1 - /velocities/airspeed-kt ge 60 + /systems/navigation/adr/output/cas-1 ge 60 - aero/alpha-deg gt 8.5 + /systems/navigation/adr/output/aoa-1 gt 8.5 /systems/navigation/adr/output/cas-1 lt 148 From 6271aa50b4c5394c5c8361d8eb803b77f0fd7ad8 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Sun, 3 Oct 2021 18:27:23 +0100 Subject: [PATCH 5/6] Clarify power supply per documentation for VOR / ILS etc, and connect VHF radio to power supply --- Systems/a320-electrical.xml | 28 ++++++++++++++++++++++------ Systems/instrumentation.xml | 13 ++++--------- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index 8c1597d8..5bc4dd30 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -2213,8 +2213,6 @@ /systems/electrical/bus/dc-2 ge 25 - /systems/electrical/outputs/efis /systems/electrical/outputs/fcp-power /systems/electrical/outputs/fuel-pump[0] @@ -2222,13 +2220,31 @@ /systems/electrical/outputs/fuel-pump[2] /systems/electrical/outputs/gps /systems/electrical/outputs/mk-viii - /systems/electrical/outputs/tacan /systems/electrical/outputs/turn-coordinator + + + + + /systems/electrical/bus/dc-ess ge 25 + + + + + + + /systems/electrical/bus/dc-2 ge 25 + + + + + + + /systems/electrical/bus/dc-1 ge 25 + + + diff --git a/Systems/instrumentation.xml b/Systems/instrumentation.xml index f8910b0f..b18758d3 100644 --- a/Systems/instrumentation.xml +++ b/Systems/instrumentation.xml @@ -140,7 +140,7 @@ dme 2 - /systems/electrical/bus/ac-ess-shed + /systems/electrical/bus/ac-ess 109.9 @@ -178,19 +178,14 @@ marker-beacon 0 - /systems/electrical/bus/ac-ess-shed + /systems/electrical/bus/ac-ess 109.9 - - marker-beacon - 0 - - nav 0 - /systems/electrical/bus/ac-ess-shed + /systems/electrical/bus/ac-ess 109.9 @@ -204,7 +199,7 @@ nav 2 - /systems/electrical/bus/ac-ess-shed + /systems/electrical/bus/ac-ess 109.9 From 72611e986df0f64d5ecba5fb318296a79ce29ac1 Mon Sep 17 00:00:00 2001 From: Jonathan Redpath Date: Thu, 7 Oct 2021 19:38:49 +0100 Subject: [PATCH 6/6] A little experimental change to electrical power --- Systems/a320-electrical.xml | 27 +++++++++++++++++++++++++++ Systems/a320-fbw.xml | 21 +++++++++++++++------ 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index 5bc4dd30..b893f27f 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -2125,6 +2125,33 @@ 1.0 + + + + /systems/electrical/sources/bat-1/volt + 1.0 + + + + /systems/electrical/sources/bat-2/volt + 1.0 + + + + /systems/electrical/bus/dc-2 + 1.0 + + + + /systems/electrical/bus/dc-2 + 1.0 + + + + /systems/electrical/bus/dc-2 + 1.0 + + diff --git a/Systems/a320-fbw.xml b/Systems/a320-fbw.xml index 27dc5285..1612ae69 100644 --- a/Systems/a320-fbw.xml +++ b/Systems/a320-fbw.xml @@ -267,7 +267,10 @@ /systems/failures/fctl/elac1 eq 0 /systems/electrical/bus/dc-ess ge 25 - /systems/electrical/bus/dc-hot-1 ge 25 + + /systems/electrical/bus/sub-bus/dc-hot-1-703 ge 25 + /gear/gear[1]/wow eq 0 + @@ -286,8 +289,11 @@ /controls/fctl/switches/elac2 eq 1 /systems/failures/fctl/elac2 eq 0 - /systems/electrical/bus/dc-2 ge 25 - /systems/electrical/bus/dc-hot-2 ge 25 + /systems/electrical/bus/sub-bus/dc-2-202 ge 25 + + /systems/electrical/bus/sub-bus/dc-hot-2-704 ge 25 + /gear/gear[1]/wow eq 0 + @@ -307,7 +313,10 @@ /systems/failures/fctl/sec1 eq 0 /systems/electrical/bus/dc-ess ge 25 - /systems/electrical/bus/dc-hot-1 ge 25 + + /systems/electrical/bus/sub-bus/dc-hot-1-703 ge 25 + /gear/gear[1]/wow eq 0 + @@ -325,7 +334,7 @@ /controls/fctl/switches/sec2 eq 1 /systems/failures/fctl/sec2 eq 0 - /systems/electrical/bus/dc-2 ge 25 + /systems/electrical/bus/sub-bus/dc-2-204 ge 25 @@ -342,7 +351,7 @@ /controls/fctl/switches/sec3 eq 1 /systems/failures/fctl/sec3 eq 0 - /systems/electrical/bus/dc-2 ge 25 + /systems/electrical/bus/sub-bus/dc-2-204 ge 25