diff --git a/A320-100-CFM-set.xml b/A320-100-CFM-set.xml
index 41d624ca..26b3a9d6 100644
--- a/A320-100-CFM-set.xml
+++ b/A320-100-CFM-set.xml
@@ -1,4 +1,4 @@
-
+
@@ -163,6 +163,14 @@
+
+
+
+ wing flexer property rule
+ Aircraft/Generic/wingflexer.xml
+
+
+
Aircraft/A320-family/Systems/fadec-cfm.xml
@@ -171,7 +179,7 @@
Aircraft/A320-family/Systems/cfm56-sound.xml
-
+
@@ -197,7 +205,7 @@
- Aircraft/A320-family/Nasal/a320livery-cfm-100.nas
+ Aircraft/A320-family/Nasal/Sim/a320livery-cfm-100.nas
diff --git a/A320-100-CFM.xml b/A320-100-CFM.xml
index 68189533..e79ddbcd 100644
--- a/A320-100-CFM.xml
+++ b/A320-100-CFM.xml
@@ -1,4 +1,4 @@
-
+
@@ -29,7 +29,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
2.2
1
- 4
+ 5
14.3962788
@@ -55,7 +55,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
2.2
-1
- 5
+ 6
14.3962788
@@ -162,13 +162,15 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
-
+
+
+
diff --git a/A320-200-CFM-set.xml b/A320-200-CFM-set.xml
index 09cc01ef..a6ac1cb6 100644
--- a/A320-200-CFM-set.xml
+++ b/A320-200-CFM-set.xml
@@ -1,4 +1,4 @@
-
+
@@ -163,6 +163,14 @@
+
+
+
+ wing flexer property rule
+ Aircraft/Generic/wingflexer.xml
+
+
+
Aircraft/A320-family/Systems/fadec-cfm.xml
@@ -171,7 +179,7 @@
Aircraft/A320-family/Systems/cfm56-sound.xml
-
+
@@ -197,7 +205,7 @@
- Aircraft/A320-family/Nasal/a320livery-cfm.nas
+ Aircraft/A320-family/Nasal/Sim/a320livery-cfm.nas
diff --git a/A320-200-CFM.xml b/A320-200-CFM.xml
index 7aa13e60..c731d0f4 100644
--- a/A320-200-CFM.xml
+++ b/A320-200-CFM.xml
@@ -79,7 +79,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
1523.00
1523.00
4.0
- 0
+ 1
6.71
50
@@ -92,7 +92,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
12591.95
6000.00
28.0
- 0
+ 1
6.71
50
@@ -105,7 +105,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
14623.00
42
23.20
- 0
+ 1
6.71
50
@@ -118,7 +118,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
12591.95
6000.00
28.0
- 0
+ 1
6.71
50
@@ -131,7 +131,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
1523.00
1523.00
4.0
- 0
+ 1
6.71
50
@@ -161,6 +161,7 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
@@ -168,6 +169,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320-200-IAE-set.xml b/A320-200-IAE-set.xml
index e4e8051b..bce14a48 100644
--- a/A320-200-IAE-set.xml
+++ b/A320-200-IAE-set.xml
@@ -1,4 +1,4 @@
-
+
@@ -163,6 +163,14 @@
+
+
+
+ wing flexer property rule
+ Aircraft/Generic/wingflexer.xml
+
+
+
Aircraft/A320-family/Systems/fadec-iae.xml
@@ -171,7 +179,7 @@
Aircraft/A320-family/Systems/v2500-sound.xml
-
+
@@ -197,7 +205,7 @@
- Aircraft/A320-family/Nasal/a320livery-iae.nas
+ Aircraft/A320-family/Nasal/Sim/a320livery-iae.nas
diff --git a/A320-200-IAE.xml b/A320-200-IAE.xml
index dfcbc9f4..fd7dac96 100644
--- a/A320-200-IAE.xml
+++ b/A320-200-IAE.xml
@@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320-main.xml b/A320-main.xml
index 2f35b418..9fd68ed9 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -1,4 +1,4 @@
-
+
@@ -139,6 +139,10 @@
Aircraft/A320-family/Systems/a320-lights-proprules.xml
+
+ Aircraft/A320-family/Systems/ecam-proprules.xml
+
+ Aircraft/A320-family/Systems/pitot-static.xml
@@ -319,6 +323,15 @@
+ -
+
+
+ nasal
+
+
+
-
@@ -493,13 +506,19 @@
0
+ 0
0
- 33
+ 33
0
+ 0
0
0
+ 0
+
+ 350
+
@@ -508,6 +527,7 @@
+ 0
0
@@ -627,6 +647,26 @@
0
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
0
0
@@ -651,6 +691,19 @@
0
0
+
+ 0
+ 0
+ 0
+ 0
+ 0.5
+ 0.5
+ 0.5
+ 0.5
+ 0
+ 0.5
+ 12.0
+
0
@@ -705,6 +758,40 @@
0
0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ 0
+ 0
+
+
0
@@ -877,6 +964,15 @@
0
0
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
0
0
@@ -906,6 +1002,11 @@
0
+ 0
+ 0
+ 0
+ 0
+ 0
0
0
@@ -955,6 +1056,30 @@
0
0
+
+
+ 1
+
+
+
+ 1
+
+
+
+ 1
+
+
+
+ 1
+
+
+
+
+ 0
+ 0
+ 0
+
+
@@ -968,6 +1093,26 @@
+
+ true
+
+
+
+ true
+
+
+
+ true
+
+
+
+ true
+
+
+
+ true
+
+
0
0
@@ -1056,6 +1201,10 @@
1.0
+
+ true
+
+
@@ -1616,46 +1798,50 @@
- Aircraft/A320-family/Nasal/property-tree-setup.nas
+ Aircraft/A320-family/Nasal/Sim/property-tree-setup.nas
- Aircraft/A320-family/Nasal/libraries.nas
- Aircraft/A320-family/Nasal/buttons.nas
- Aircraft/A320-family/Nasal/efis.nas
- Aircraft/A320-family/Nasal/ECAM.nas
- Aircraft/A320-family/Nasal/shake.nas
- Aircraft/A320-family/Nasal/light-manager.nas
- Aircraft/A320-family/Nasal/zoom-views.nas
+ Aircraft/A320-family/Nasal/ECAM/ECAM-main.nas
+ Aircraft/A320-family/Nasal/Effects/light-manager.nas
+ Aircraft/A320-family/Nasal/Sim/libraries.nas
+ Aircraft/A320-family/Nasal/Sim/buttons.nas
+ Aircraft/A320-family/Nasal/Sim/shake.nas
+ Aircraft/A320-family/Nasal/Sim/zoom-views.nas
+ Aircraft/A320-family/Nasal/Systems/efis.nas
Aircraft/A320-family/AircraftConfig/acconfig.nas
- Aircraft/A320-family/Nasal/electrical.nas
- Aircraft/A320-family/Nasal/pneumatics.nas
- Aircraft/A320-family/Nasal/hydraulics.nas
- Aircraft/A320-family/Nasal/fuel.nas
- Aircraft/A320-family/Nasal/engines-common.nas
- Aircraft/A320-family/Nasal/ADIRS.nas
- Aircraft/A320-family/Nasal/fire.nas
- Aircraft/A320-family/Nasal/brakes.nas
- Aircraft/A320-family/Nasal/ground_services.nas
- Aircraft/A320-family/Nasal/payload.nas
- Aircraft/A320-family/Nasal/effects.nas
+ Aircraft/A320-family/Nasal/Effects/effects.nas
+ Aircraft/A320-family/Nasal/Systems/electrical.nas
+ Aircraft/A320-family/Nasal/Systems/pneumatics.nas
+ Aircraft/A320-family/Nasal/Systems/hydraulics.nas
+ Aircraft/A320-family/Nasal/Systems/fuel.nas
+ Aircraft/A320-family/Nasal/Systems/FADEC/engines-common.nas
+ Aircraft/A320-family/Nasal/Systems/ADIRS/ADIRS.nas
+ Aircraft/A320-family/Nasal/Systems/ADIRS/ADR.nas
+ Aircraft/A320-family/Nasal/Systems/ADIRS/SwitchingPanel.nas
+ Aircraft/A320-family/Nasal/Systems/fire.nas
+ Aircraft/A320-family/Nasal/Systems/brakes.nas
+ Aircraft/A320-family/Nasal/Systems/brakesystem.nas
+ Aircraft/A320-family/Nasal/Systems/tyresmoke.nas
+ Aircraft/A320-family/Nasal/Systems/ground_services.nas
+ Aircraft/A320-family/Nasal/Systems/payload.nas
- Aircraft/A320-family/Nasal/fadec-common.nas
+ Aircraft/A320-family/Nasal/Systems/FADEC/fadec-common.nas
- Aircraft/A320-family/Nasal/it-fbw.nas
+ Aircraft/A320-family/Nasal/FBW/it-fbw.nas
Aircraft/A320-family/Nasal/FMGC/FCU.nas
- Aircraft/A320-family/Nasal/FMGC.nas
- Aircraft/A320-family/Nasal/FMGC-b.nas
- Aircraft/A320-family/Nasal/FMGC-c.nas
+ Aircraft/A320-family/Nasal/FMGC/FMGC.nas
+ Aircraft/A320-family/Nasal/FMGC/FMGC-b.nas
+ Aircraft/A320-family/Nasal/FMGC/FMGC-c.nas
Aircraft/A320-family/Nasal/MCDU/MCDU.nas
@@ -1692,29 +1878,35 @@
Aircraft/A320-family/Nasal/ECAM/ECAM-phases.nas
- Aircraft/A320-family/Nasal/icing.nas
+ Aircraft/A320-family/Nasal/Systems/icing.nas
- Aircraft/A320-family/Nasal/autopush.nas
+ Aircraft/A320-family/Nasal/Autopush/autopush.nas
- Aircraft/A320-family/Nasal/autopush_driver.nas
+ Aircraft/A320-family/Nasal/Autopush/autopush_driver.nas
- Aircraft/A320-family/Nasal/dynarr.nas
+ Aircraft/A320-family/Nasal/Autopush/dynarr.nas
- Aircraft/A320-family/Nasal/autopush_route.nas
+ Aircraft/A320-family/Nasal/Autopush/autopush_route.nas
- Aircraft/A320-family/Nasal/rmp.nas
+ Aircraft/A320-family/Nasal/Panels/rmp.nas
- Aircraft/A320-family/Nasal/acp.nas
+ Aircraft/A320-family/Nasal/Panels/acp.nas
- Aircraft/A320-family/Nasal/atc.nas
+ Aircraft/A320-family/Nasal/Panels/atc.nas
+
+ Aircraft/A320-family/Nasal/Systems/DMC.nas
+
+
+ Aircraft/A320-family/gui/dialogs/refuel.nas
+
diff --git a/A320neo-CFM-set.xml b/A320neo-CFM-set.xml
index 29a36caf..d2c937a0 100644
--- a/A320neo-CFM-set.xml
+++ b/A320neo-CFM-set.xml
@@ -1,4 +1,4 @@
-
+
@@ -163,6 +163,14 @@
+
+
+
+ wing flexer property rule
+ Aircraft/Generic/wingflexer.xml
+
+
+
Aircraft/A320-family/Systems/fadec-cfm.xml
@@ -171,7 +179,7 @@
Aircraft/A320-family/Systems/leapx-sound.xml
-
+
@@ -197,7 +205,7 @@
- Aircraft/A320-family/Nasal/a320livery-neocfm.nas
+ Aircraft/A320-family/Nasal/Sim/a320livery-neocfm.nas
diff --git a/A320neo-CFM.xml b/A320neo-CFM.xml
index 618a4d46..67cb63e2 100644
--- a/A320neo-CFM.xml
+++ b/A320neo-CFM.xml
@@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/A320neo-PW-set.xml b/A320neo-PW-set.xml
index 91c2c291..695d6d63 100644
--- a/A320neo-PW-set.xml
+++ b/A320neo-PW-set.xml
@@ -1,4 +1,4 @@
-
+
@@ -163,6 +163,14 @@
+
+
+
+ wing flexer property rule
+ Aircraft/Generic/wingflexer.xml
+
+
+
Aircraft/A320-family/Systems/fadec-cfm.xml
@@ -171,7 +179,7 @@
Aircraft/A320-family/Systems/leapx-sound.xml
-
+
@@ -197,7 +205,7 @@
- Aircraft/A320-family/Nasal/a320livery-neopw.nas
+ Aircraft/A320-family/Nasal/Sim/a320livery-neopw.nas
diff --git a/A320neo-PW.xml b/A320neo-PW.xml
index 2cde3fd4..78827afc 100644
--- a/A320neo-PW.xml
+++ b/A320neo-PW.xml
@@ -168,6 +168,8 @@ xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
+
+
diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas
index 17b7e14d..bb827dae 100644
--- a/AircraftConfig/acconfig.nas
+++ b/AircraftConfig/acconfig.nas
@@ -135,9 +135,9 @@ setlistener("/systems/acconfig/new-revision", func {
});
var mismatch_chk = func {
- if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201910) {
+ if (num(string.replace(getprop("/sim/version/flightgear"),".","")) < 201912) {
setprop("/systems/acconfig/mismatch-code", "0x121");
- setprop("/systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.1.0.");
+ setprop("/systems/acconfig/mismatch-reason", "FGFS version is too old! Please update FlightGear to at least 2019.1.2.");
if (getprop("/systems/acconfig/out-of-date") != 1) {
error_mismatch.open();
}
@@ -273,6 +273,9 @@ var colddark = func {
setprop("/controls/switches/landing-lights-l", 0.0);
setprop("/controls/switches/landing-lights-r", 0.0);
setprop("/controls/atc/mode-knob", 0);
+ setprop("/controls/lighting/fcu-panel-knb", 0);
+ setprop("/controls/lighting/main-panel-knb", 0);
+ setprop("/controls/lighting/overhead-panel-knb", 0);
atc.transponderPanel.modeSwitch(1);
libraries.systemsInit();
failResetOld();
@@ -345,12 +348,15 @@ var beforestart = func {
}
var beforestart_b = func {
# Continue with engine start prep.
- setprop("/controls/fuel/tank0pump1", 1);
- setprop("/controls/fuel/tank0pump2", 1);
- setprop("/controls/fuel/tank1pump1", 1);
- setprop("/controls/fuel/tank1pump2", 1);
- setprop("/controls/fuel/tank2pump1", 1);
- setprop("/controls/fuel/tank2pump2", 1);
+ systems.FUEL.Switches.pumpLeft1.setValue(1);
+ systems.FUEL.Switches.pumpLeft2.setValue(1);
+ systems.FUEL.Switches.pumpCenter1.setValue(1);
+ systems.FUEL.Switches.pumpCenter2.setValue(1);
+ systems.FUEL.Switches.pumpRight1.setValue(1);
+ systems.FUEL.Switches.pumpRight2.setValue(1);
+ setprop("/controls/lighting/fcu-panel-knb", 1);
+ setprop("/controls/lighting/main-panel-knb", 1);
+ setprop("/controls/lighting/overhead-panel-knb", 1);
setprop("/controls/electrical/switches/apu", 1);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/gen-1", 1);
@@ -363,6 +369,12 @@ var beforestart_b = func {
setprop("/controls/adirs/ir[0]/knob","1");
setprop("/controls/adirs/ir[1]/knob","1");
setprop("/controls/adirs/ir[2]/knob","1");
+ systems.ADIRSControlPanel.adrSw(0);
+ systems.ADIRSControlPanel.adrSw(1);
+ systems.ADIRSControlPanel.adrSw(2);
+ systems.ADIRSControlPanel.irModeSw(0, 1);
+ systems.ADIRSControlPanel.irModeSw(1, 1);
+ systems.ADIRSControlPanel.irModeSw(2, 1);
systems.ADIRS.skip(0);
systems.ADIRS.skip(1);
systems.ADIRS.skip(2);
@@ -427,12 +439,15 @@ var taxi = func {
}
var taxi_b = func {
# Continue with engine start prep, and start engines.
- setprop("/controls/fuel/tank0pump1", 1);
- setprop("/controls/fuel/tank0pump2", 1);
- setprop("/controls/fuel/tank1pump1", 1);
- setprop("/controls/fuel/tank1pump2", 1);
- setprop("/controls/fuel/tank2pump1", 1);
- setprop("/controls/fuel/tank2pump2", 1);
+ systems.FUEL.Switches.pumpLeft1.setValue(1);
+ systems.FUEL.Switches.pumpLeft2.setValue(1);
+ systems.FUEL.Switches.pumpCenter1.setValue(1);
+ systems.FUEL.Switches.pumpCenter2.setValue(1);
+ systems.FUEL.Switches.pumpRight1.setValue(1);
+ systems.FUEL.Switches.pumpRight2.setValue(1);
+ setprop("/controls/lighting/fcu-panel-knb", 1);
+ setprop("/controls/lighting/main-panel-knb", 1);
+ setprop("/controls/lighting/overhead-panel-knb", 1);
setprop("/controls/electrical/switches/apu", 1);
setprop("/controls/electrical/switches/galley", 1);
setprop("/controls/electrical/switches/gen-1", 1);
@@ -445,6 +460,12 @@ var taxi_b = func {
setprop("/controls/adirs/ir[0]/knob","1");
setprop("/controls/adirs/ir[1]/knob","1");
setprop("/controls/adirs/ir[2]/knob","1");
+ systems.ADIRSControlPanel.adrSw(0);
+ systems.ADIRSControlPanel.adrSw(1);
+ systems.ADIRSControlPanel.adrSw(2);
+ systems.ADIRSControlPanel.irModeSw(0, 1);
+ systems.ADIRSControlPanel.irModeSw(1, 1);
+ systems.ADIRSControlPanel.irModeSw(2, 1);
systems.ADIRS.skip(0);
systems.ADIRS.skip(1);
systems.ADIRS.skip(2);
diff --git a/AircraftConfig/fail.xml b/AircraftConfig/fail.xml
index a773c8ff..40269955 100644
--- a/AircraftConfig/fail.xml
+++ b/AircraftConfig/fail.xml
@@ -57,7 +57,7 @@
left
- /systems/failures/elac1
+ /systems/failures/fctl/elac1
dialog-apply
@@ -67,7 +67,7 @@
left
- /systems/failures/elac2
+ /systems/failures/fctl/elac2
dialog-apply
@@ -77,7 +77,7 @@
left
- /systems/failures/sec1
+ /systems/failures/fctl/sec1
dialog-apply
@@ -87,7 +87,7 @@
left
- /systems/failures/sec2
+ /systems/failures/fctl/sec2
dialog-apply
@@ -97,17 +97,7 @@
left
- /systems/failures/sec3
-
- dialog-apply
-
- true
-
-
-
-
- left
- /systems/failures/fac2
+ /systems/failures/fctl/sec3
dialog-apply
@@ -117,7 +107,17 @@
left
- /systems/failures/fac1
+ /systems/failures/fctl/fac1
+
+ dialog-apply
+
+ true
+
+
+
+
+ left
+ /systems/failures/fctl/fac2
dialog-apply
diff --git a/AircraftConfig/fuel.xml b/AircraftConfig/fuel.xml
index ce0c1eb6..da20f183 100644
--- a/AircraftConfig/fuel.xml
+++ b/AircraftConfig/fuel.xml
@@ -6,6 +6,15 @@
+
+
+
+
+
+
+
fuel-dlg
vbox
@@ -132,11 +141,22 @@
nasal
diff --git a/Models/A320-100-CFM.xml b/Models/A320-100-CFM.xml
index 2f488be3..177a1bc6 100644
--- a/Models/A320-100-CFM.xml
+++ b/Models/A320-100-CFM.xml
@@ -1,4 +1,4 @@
-
+
@@ -308,6 +308,87 @@
+
+
+ Aircraft/Generic/Effects/tyre-smoke-nose.xml
+ tyre-smoke-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-port.xml
+ tyre-smoke-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-stbd.xml
+ tyre-smoke-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-nose.xml
+ rain-splash-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-port.xml
+ rain-splash-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-stbd.xml
+ rain-splash-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-left.xml
+ tire-smoke-l
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-right.xml
+ tire-smoke-r
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
Pushback
@@ -319,6 +400,43 @@
+
+
+
+ Firetruck1
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 60.0
+ 10.0
+ -4.4
+
+
+
+
+ Firetruck2
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 80.0
+ -8.0
+ -4.4
+
+
+
+
+ select
+ Firetruck1
+ Firetruck2
+
+
+ sim/animation/fire-services
+
+ velocities/groundspeed-kt
+ 40
+
+
+
+
+
diff --git a/Models/A320-200-CFM.xml b/Models/A320-200-CFM.xml
index 2ecc8cd7..776d6987 100644
--- a/Models/A320-200-CFM.xml
+++ b/Models/A320-200-CFM.xml
@@ -338,6 +338,87 @@
+
+
+ Aircraft/Generic/Effects/tyre-smoke-nose.xml
+ tyre-smoke-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-port.xml
+ tyre-smoke-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-stbd.xml
+ tyre-smoke-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-nose.xml
+ rain-splash-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-port.xml
+ rain-splash-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-stbd.xml
+ rain-splash-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-left.xml
+ tire-smoke-l
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-right.xml
+ tire-smoke-r
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
Pushback
@@ -349,6 +430,43 @@
+
+
+
+ Firetruck1
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 60.0
+ 10.0
+ -4.4
+
+
+
+
+ Firetruck2
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 80.0
+ -8.0
+ -4.4
+
+
+
+
+ select
+ Firetruck1
+ Firetruck2
+
+
+ sim/animation/fire-services
+
+ velocities/groundspeed-kt
+ 40
+
+
+
+
+
diff --git a/Models/A320-200-IAE.xml b/Models/A320-200-IAE.xml
index 31c7e8da..2fdeb2c0 100644
--- a/Models/A320-200-IAE.xml
+++ b/Models/A320-200-IAE.xml
@@ -1,4 +1,4 @@
-
+
@@ -115,6 +115,7 @@
32.2535728
+
@@ -336,7 +337,88 @@
-1.25
-
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-nose.xml
+ tyre-smoke-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-port.xml
+ tyre-smoke-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-stbd.xml
+ tyre-smoke-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-nose.xml
+ rain-splash-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-port.xml
+ rain-splash-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-stbd.xml
+ rain-splash-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-left.xml
+ tire-smoke-l
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-right.xml
+ tire-smoke-r
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
Pushback
@@ -348,6 +430,43 @@
+
+
+
+ Firetruck1
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 60.0
+ 10.0
+ -4.4
+
+
+
+
+ Firetruck2
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 80.0
+ -8.0
+ -4.4
+
+
+
+
+ select
+ Firetruck1
+ Firetruck2
+
+
+ sim/animation/fire-services
+
+ velocities/groundspeed-kt
+ 40
+
+
+
+
+
diff --git a/Models/A320neo-CFM.xml b/Models/A320neo-CFM.xml
index e61a1eb6..a98f3a22 100644
--- a/Models/A320neo-CFM.xml
+++ b/Models/A320neo-CFM.xml
@@ -317,6 +317,87 @@
+
+
+ Aircraft/Generic/Effects/tyre-smoke-nose.xml
+ tyre-smoke-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-port.xml
+ tyre-smoke-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-stbd.xml
+ tyre-smoke-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-nose.xml
+ rain-splash-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-port.xml
+ rain-splash-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-stbd.xml
+ rain-splash-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-left.xml
+ tire-smoke-l
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-right.xml
+ tire-smoke-r
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
Pushback
@@ -328,6 +409,43 @@
+
+
+
+ Firetruck1
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 60.0
+ 10.0
+ -4.4
+
+
+
+
+ Firetruck2
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 80.0
+ -8.0
+ -4.4
+
+
+
+
+ select
+ Firetruck1
+ Firetruck2
+
+
+ sim/animation/fire-services
+
+ velocities/groundspeed-kt
+ 40
+
+
+
+
+
@@ -358,7 +476,6 @@
-
ground_services
diff --git a/Models/A320neo-PW.xml b/Models/A320neo-PW.xml
index d9de8944..cf7dce0f 100644
--- a/Models/A320neo-PW.xml
+++ b/Models/A320neo-PW.xml
@@ -317,6 +317,87 @@
+
+
+ Aircraft/Generic/Effects/tyre-smoke-nose.xml
+ tyre-smoke-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-port.xml
+ tyre-smoke-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/tyre-smoke-stbd.xml
+ tyre-smoke-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-nose.xml
+ rain-splash-n
+
+ 7.83
+ 0
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-port.xml
+ rain-splash-p
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/Generic/Effects/rain-stbd.xml
+ rain-splash-s
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-left.xml
+ tire-smoke-l
+
+ 20.3180764
+ -3.795
+ -3.9669424
+
+
+
+
+ Aircraft/A320-family/Models/Effects/tire-smoke-right.xml
+ tire-smoke-r
+
+ 20.3180764
+ 3.795
+ -3.9669424
+
+
+
Pushback
@@ -328,6 +409,43 @@
+
+
+
+ Firetruck1
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 60.0
+ 10.0
+ -4.4
+
+
+
+
+ Firetruck2
+ Models/Airport/Vehicle/hoskosh-ti-1500.ac
+
+ 80.0
+ -8.0
+ -4.4
+
+
+
+
+ select
+ Firetruck1
+ Firetruck2
+
+
+ sim/animation/fire-services
+
+ velocities/groundspeed-kt
+ 40
+
+
+
+
+
diff --git a/Models/Effects/tire-smoke-left.xml b/Models/Effects/tire-smoke-left.xml
index 0bcd36d7..680048d4 100644
--- a/Models/Effects/tire-smoke-left.xml
+++ b/Models/Effects/tire-smoke-left.xml
@@ -1,4 +1,4 @@
-
+
@@ -17,8 +17,10 @@
- gear/gear[1]/tyre-smoke
- 1
+
+ gear/Lbrake-smoke
+ 1
+
world
@@ -48,9 +50,9 @@
- velocities/speed-down-fps
- 1
- 50
+ gear/Lbrake-thermal-energy
+ 20
+ 70
@@ -110,4 +112,4 @@
-
\ No newline at end of file
+
diff --git a/Models/Effects/tire-smoke-nose.xml b/Models/Effects/tire-smoke-nose.xml
deleted file mode 100644
index 4b082ec4..00000000
--- a/Models/Effects/tire-smoke-nose.xml
+++ /dev/null
@@ -1,113 +0,0 @@
-
-
-
-
-
-
-
- tyre-smoke-n
- tiresmoke.png
- false
- false
-
-
- 0
- 0
- 0
-
-
-
- gear/gear[0]/tyre-smoke
- 1
-
-
- world
-
-
- point
-
-
-
- 45
- 85
- -60
- 60
-
- 50
- 5
-
-
- 15
- -15
- 15
- -15
- 15
- -15
-
-
-
-
-
- velocities/speed-down-fps
- 1
- 50
-
-
-
- billboard
-
-
-
-
-
- 0.8
-
-
- 0.8
-
-
- 0.8
-
-
- 0.5
-
-
-
- 1.5
-
-
-
-
-
- 0.7
-
-
- 0.7
-
-
- 0.7
-
-
- 0.005
-
-
-
- 10
-
-
-
- 1
-
- 0.025
- 0.175
-
-
-
- air
- false
- true
-
-
-
-
-
\ No newline at end of file
diff --git a/Models/Effects/tire-smoke-right.xml b/Models/Effects/tire-smoke-right.xml
index c0ecc2a3..ceba6592 100644
--- a/Models/Effects/tire-smoke-right.xml
+++ b/Models/Effects/tire-smoke-right.xml
@@ -1,4 +1,4 @@
-
+
@@ -17,8 +17,10 @@
- gear/gear[2]/tyre-smoke
- 1
+
+ gear/Rbrake-smoke
+ 1
+
world
@@ -48,9 +50,9 @@
- velocities/speed-down-fps
- 1
- 50
+ gear/Rbrake-thermal-energy
+ 20
+ 70
@@ -110,4 +112,4 @@
-
\ No newline at end of file
+
diff --git a/Models/Effects/wet-runway-nose.xml b/Models/Effects/wet-runway-nose.xml
deleted file mode 100644
index c141b161..00000000
--- a/Models/Effects/wet-runway-nose.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
-
-
-
- tyre-smoke-l
- tiresmoke.png
- false
- false
-
-
- 0
- 0
- 0
-
-
-
-
-
- environment/rain-norm
- 0.2
-
-
- velocities/groundspeed-kt
- 60
-
- gear/gear[0]/wow
- 1
-
-
-
- world
-
-
- point
-
-
-
- 45
- 85
- -60
- 60
-
- 50
- 5
-
-
- 15
- -15
- 15
- -15
- 15
- -15
-
-
-
-
-
- 40
- 70
-
-
-
- billboard
-
-
-
-
-
- 0.8
-
-
- 0.8
-
-
- 0.8
-
-
- 0.8
-
-
-
- 1.5
-
-
-
-
-
- 0.7
-
-
- 0.7
-
-
- 0.7
-
-
- 0.005
-
-
-
- 10
-
-
-
- 1
-
- 0.001
- 0.25
-
-
-
- air
- false
- true
-
-
-
-
-
diff --git a/Models/Effects/wet-runway.xml b/Models/Effects/wet-runway.xml
deleted file mode 100644
index a02cd8d9..00000000
--- a/Models/Effects/wet-runway.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
-
-
-
- tyre-smoke-l
- tiresmoke.png
- false
- false
-
-
- 0
- 0
- 0
-
-
-
-
-
- environment/rain-norm
- 0.2
-
-
- velocities/groundspeed-kt
- 60
- >
- gear/gear[1]/wow
- 1
-
-
-
- world
-
-
- point
-
-
-
- 45
- 85
- -60
- 60
-
- 50
- 5
-
-
- 15
- -15
- 15
- -15
- 15
- -15
-
-
-
-
-
- 40
- 70
-
-
-
- billboard
-
-
-
-
-
- 0.8
-
-
- 0.8
-
-
- 0.8
-
-
- 0.8
-
-
-
- 1.5
-
-
-
-
-
- 0.7
-
-
- 0.7
-
-
- 0.7
-
-
- 0.005
-
-
-
- 10
-
-
-
- 0.8
-
- 0.0005
- 0.4
-
-
-
- air
- false
- true
-
-
-
-
-
diff --git a/Models/Engines/XMLs/a320.nacelle.cfm.xml b/Models/Engines/XMLs/a320.nacelle.cfm.xml
index 46b5db87..13766373 100644
--- a/Models/Engines/XMLs/a320.nacelle.cfm.xml
+++ b/Models/Engines/XMLs/a320.nacelle.cfm.xml
@@ -6,6 +6,19 @@
../Models/a320.nacelle.cfm.ac
+
+
+ translate
+ Reverser
+
+ 0.50
+
+ 1
+ 0
+ 0
+
+
+
Chrome shader
diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml
index 6aa50709..2056f527 100644
--- a/Models/FlightDeck/a320.flightdeck.xml
+++ b/Models/FlightDeck/a320.flightdeck.xml
@@ -1209,7 +1209,7 @@
nasal
-
+
@@ -1228,7 +1228,7 @@
nasal
-
+
@@ -1247,7 +1247,7 @@
nasal
-
+
@@ -1266,7 +1266,7 @@
nasal
-
+
@@ -1285,7 +1285,7 @@
nasal
-
+
@@ -1304,7 +1304,7 @@
nasal
-
+
@@ -1323,7 +1323,7 @@
nasal
-
+
@@ -1342,7 +1342,7 @@
nasal
-
+
@@ -1361,7 +1361,7 @@
nasal
-
+
@@ -1380,7 +1380,7 @@
nasal
-
+
@@ -1399,7 +1399,7 @@
nasal
-
+
@@ -1418,7 +1418,7 @@
nasal
-
+
@@ -1655,6 +1655,23 @@
+
+
+ select
+ ecam_sts_led
+
+
+
+ ECAM/Lower/light/sts
+ 1
+
+
+ controls/switches/annun-test
+ 1
+
+
+
+
pick
@@ -1671,7 +1688,7 @@
nasal
@@ -1702,7 +1719,7 @@
nasal
@@ -6070,7 +6087,66 @@
-
+
+
+ rotate
+ ecam_air_data
+ ecam_air_data.mark
+ 30
+ /controls/navigation/switching/air-data
+
+ -0.428673
+ -0.022557
+ -0.051784
+ -0.430086
+ -0.022557
+ -0.060321
+
+
+
+
+ pick
+ ecam_air_data
+
+
+
+ true
+
+ nasal
+
+
+
+ nasal
+
+
+
+
+
+
+ true
+
+ nasal
+
+
+
+ nasal
+
+
+
+
+
material
diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
index 56b8e43a..8af98e21 100644
--- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
+++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas
@@ -548,8 +548,22 @@ var canvas_lowerECAM_base = {
}
},
updateBottomStatus: func() {
- me["TAT"].setText(sprintf("%2.0f", temperature_degc.getValue()));
- me["SAT"].setText(sprintf("%2.0f", temperature_degc.getValue()));
+ if (dmc.DMController.DMCs[1].outputs[4] != nil) {
+ me["SAT"].setText(sprintf("%2.0f", dmc.DMController.DMCs[1].outputs[4].getValue()));
+ me["SAT"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ me["SAT"].setText(sprintf("%s", "XX"));
+ me["SAT"].setColor(0.7333,0.3803,0);
+ }
+
+ if (dmc.DMController.DMCs[1].outputs[5] != nil) {
+ me["TAT"].setText(sprintf("%2.0f", dmc.DMController.DMCs[1].outputs[5].getValue()));
+ me["TAT"].setColor(0.0509,0.7529,0.2941);
+ } else {
+ me["TAT"].setText(sprintf("%s", "XX"));
+ me["TAT"].setColor(0.7333,0.3803,0);
+ }
+
me["UTCh"].setText(sprintf("%02d", hour.getValue()));
me["UTCm"].setText(sprintf("%02d", minute.getValue()));
if (acconfig_weight_kgs.getValue() == 1) {
@@ -989,8 +1003,14 @@ var canvas_lowerECAM_crz = {
if (acconfig_weight_kgs.getValue() == 1) {
me["Fused-weight-unit"].setText("KG");
+ me["FUsed1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10)));
+ me["FUsed2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue() * LBS2KGS, 10)));
+ me["FUsed"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue() * LBS2KGS, 10) + math.round(fuel_used_lbs2.getValue(), 10))));
} else {
me["Fused-weight-unit"].setText("LBS");
+ me["FUsed1"].setText(sprintf("%s", math.round(fuel_used_lbs1.getValue(), 10)));
+ me["FUsed2"].setText(sprintf("%s", math.round(fuel_used_lbs2.getValue(), 10)));
+ me["FUsed"].setText(sprintf("%s", (math.round(fuel_used_lbs1.getValue(), 10) + math.round(fuel_used_lbs2.getValue(), 10))));
}
me.updateBottomStatus();
diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml
index 59ac5dd0..cad8a698 100644
--- a/Models/Instruments/OHpanel/OHpanel.xml
+++ b/Models/Instruments/OHpanel/OHpanel.xml
@@ -61,7 +61,6 @@
IR2Btn2A
IR3Btn1F
IR3Btn2A
- IrsOnBatLightOB
RamAirBtn2O
SEC1Btn1F
SEC1Btn2O
@@ -521,11 +520,14 @@
false
- property-cycle
- controls/adirs/ir[0]/knob
- 0
- 1
- 2
+ nasal
+
nasal
@@ -537,11 +539,14 @@
false
- property-cycle
- controls/adirs/ir[0]/knob
- 2
- 1
- 0
+ nasal
+
nasal
@@ -553,7 +558,7 @@
rotate
IR1ModeKnb
- controls/adirs/ir[0]/knob
+ controls/navigation/adirscp/switches/ir-1-mode
0-35
10
@@ -575,7 +580,7 @@
- controls/adirs/ir[0]/fault
+ controls/navigation/adirscp/lights/ir-1-fault
1
@@ -591,7 +596,7 @@
- controls/adirs/ir[0]/align
+ controls/navigation/adirscp/lights/ir-1-off
1
@@ -611,11 +616,14 @@
false
- property-cycle
- controls/adirs/ir[1]/knob
- 0
- 1
- 2
+ nasal
+
nasal
@@ -627,11 +635,14 @@
false
- property-cycle
- controls/adirs/ir[1]/knob
- 2
- 1
- 0
+ nasal
+
nasal
@@ -643,7 +654,7 @@
rotate
IR2ModeKnb
- controls/adirs/ir[1]/knob
+ controls/navigation/adirscp/switches/ir-2-mode
0-35
10
@@ -665,7 +676,7 @@
- controls/adirs/ir[1]/fault
+ controls/navigation/adirscp/lights/ir-2-fault
1
@@ -681,7 +692,7 @@
- controls/adirs/ir[1]/align
+ controls/navigation/adirscp/lights/ir-2-off
1
@@ -701,11 +712,14 @@
false
- property-cycle
- controls/adirs/ir[2]/knob
- 0
- 1
- 2
+ nasal
+
nasal
@@ -717,11 +731,14 @@
false
- property-cycle
- controls/adirs/ir[2]/knob
- 2
- 1
- 0
+ nasal
+
nasal
@@ -733,7 +750,7 @@
rotate
IR3ModeKnb
- controls/adirs/ir[2]/knob
+ controls/navigation/adirscp/switches/ir-3-mode
0-35
10
@@ -755,7 +772,7 @@
- controls/adirs/ir[2]/fault
+ controls/navigation/adirscp/lights/ir-3-fault
1
@@ -771,7 +788,7 @@
- controls/adirs/ir[2]/align
+ controls/navigation/adirscp/lights/ir-3-off
1
@@ -789,7 +806,7 @@
- controls/adirs/onbat
+ controls/navigation/adirscp/lights/on-bat
1
@@ -818,8 +835,8 @@
25
- property-toggle
- controls/adirs/adr[0]/off
+ nasal
+
nasal
@@ -834,7 +851,7 @@
- controls/adirs/adr[0]/fault
+ controls/navigation/adirscp/lights/adr-1-fault
1
@@ -844,13 +861,14 @@
+
select
ADR1Btn2O
- controls/adirs/adr[0]/off
+ controls/navigation/adirscp/lights/adr-1-off
1
@@ -879,8 +897,8 @@
25
- property-toggle
- controls/adirs/adr[1]/off
+ nasal
+
nasal
@@ -895,7 +913,7 @@
- controls/adirs/adr[1]/fault
+ controls/navigation/adirscp/lights/adr-2-fault
1
@@ -905,13 +923,14 @@
+
select
ADR2Btn2O
- controls/adirs/adr[1]/off
+ controls/navigation/adirscp/lights/adr-2-off
1
@@ -940,8 +959,8 @@
25
- property-toggle
- controls/adirs/adr[2]/off
+ nasal
+
nasal
@@ -956,7 +975,7 @@
- controls/adirs/adr[2]/fault
+ controls/navigation/adirscp/lights/adr-3-fault
1
@@ -966,13 +985,14 @@
+
select
ADR3Btn2O
- controls/adirs/adr[2]/off
+ controls/navigation/adirscp/lights/adr-3-off
1
@@ -1174,7 +1194,7 @@
property-toggle
- controls/fctl/elac1
+ controls/fctl/switches/elac1
nasal
@@ -1208,7 +1228,7 @@
- controls/fctl/elac1
+ controls/fctl/switches/elac1
0
@@ -1237,7 +1257,7 @@
property-toggle
- controls/fctl/sec1
+ controls/fctl/switches/sec1
nasal
@@ -1257,7 +1277,7 @@
1
- controls/fctl/sec1
+ controls/fctl/switches/sec1
1
@@ -1275,7 +1295,7 @@
- controls/fctl/sec1
+ controls/fctl/switches/sec1
0
@@ -1304,7 +1324,7 @@
property-toggle
- controls/fctl/fac1
+ controls/fctl/switches/fac1
nasal
@@ -1324,7 +1344,7 @@
1
- controls/fctl/fac1
+ controls/fctl/switches/fac1
1
@@ -1342,7 +1362,7 @@
- controls/fctl/fac1
+ controls/fctl/switches/fac1
0
@@ -1371,7 +1391,7 @@
property-toggle
- controls/fctl/elac2
+ controls/fctl/switches/elac2
nasal
@@ -1391,7 +1411,7 @@
1
- controls/fctl/elac2
+ controls/fctl/switches/elac2
1
@@ -1409,7 +1429,7 @@
- controls/fctl/elac2
+ controls/fctl/switches/elac2
0
@@ -1438,7 +1458,7 @@
property-toggle
- controls/fctl/sec2
+ controls/fctl/switches/sec2
nasal
@@ -1458,7 +1478,7 @@
1
- controls/fctl/sec2
+ controls/fctl/switches/sec2
1
@@ -1476,7 +1496,7 @@
- controls/fctl/sec2
+ controls/fctl/switches/sec2
0
@@ -1505,7 +1525,7 @@
property-toggle
- controls/fctl/sec3
+ controls/fctl/switches/sec3
nasal
@@ -1525,7 +1545,7 @@
1
- controls/fctl/sec3
+ controls/fctl/switches/sec3
1
@@ -1543,7 +1563,7 @@
- controls/fctl/sec3
+ controls/fctl/switches/sec3
0
@@ -1572,7 +1592,7 @@
property-toggle
- controls/fctl/fac2
+ controls/fctl/switches/fac2
nasal
@@ -1592,7 +1612,7 @@
1
- controls/fctl/fac2
+ controls/fctl/switches/fac2
1
@@ -1610,7 +1630,7 @@
- controls/fctl/fac2
+ controls/fctl/switches/fac2
0
diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas
index 35bdd075..c3e91595 100644
--- a/Models/Instruments/PFD/PFD.nas
+++ b/Models/Instruments/PFD/PFD.nas
@@ -13,11 +13,6 @@ var PFD2_display = nil;
var updateL = 0;
var updateR = 0;
var elapsedtime = 0;
-var ASI = 0;
-var ASItrgt = 0;
-var ASItrgtdiff = 0;
-var ASImax = 0;
-var ASItrend = 0;
var altTens = 0;
var altPolarity = "";
@@ -133,7 +128,9 @@ var hdg_diff = props.globals.initNode("/instrumentation/pfd/hdg-diff", 0.0, "DOU
var hdg_scale = props.globals.initNode("/instrumentation/pfd/heading-scale", 0.0, "DOUBLE");
var track = props.globals.initNode("/instrumentation/pfd/track-deg", 0.0, "DOUBLE");
var track_diff = props.globals.initNode("/instrumentation/pfd/track-hdg-diff", 0.0, "DOUBLE");
-var speed_pred = props.globals.initNode("/instrumentation/pfd/speed-lookahead", 0.0, "DOUBLE");
+var speed_pred_1 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-1", 0.0, "DOUBLE");
+var speed_pred_2 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-2", 0.0, "DOUBLE");
+var speed_pred_3 = props.globals.initNode("/instrumentation/pfd/speed-lookahead-3", 0.0, "DOUBLE");
var du1_test = props.globals.initNode("/instrumentation/du/du1-test", 0, "BOOL");
var du1_test_time = props.globals.initNode("/instrumentation/du/du1-test-time", 0.0, "DOUBLE");
var du1_test_amount = props.globals.initNode("/instrumentation/du/du1-test-amount", 0.0, "DOUBLE");
@@ -197,7 +194,7 @@ var canvas_PFD_base = {
"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_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_error","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"];
+ "TRK_pointer","machError"];
},
update: func() {
elapsedtime_act = elapsedtime.getValue();
@@ -609,119 +606,6 @@ var canvas_PFD_base = {
}
},
updateCommonFast: func() {
- # Airspeed
- ind_spd = ind_spd_kt.getValue();
- # Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
- if (ind_spd <= 30) {
- ASI = 0;
- } else if (ind_spd >= 420) {
- ASI = 390;
- } else {
- ASI = ind_spd - 30;
- }
-
- FMGC_max = FMGC_max_spd.getValue();
- if (FMGC_max <= 30) {
- ASImax = 0 - ASI;
- } else if (FMGC_max >= 420) {
- ASImax = 390 - ASI;
- } else {
- ASImax = FMGC_max - 30 - ASI;
- }
-
- me["ASI_scale"].setTranslation(0, ASI * 6.6);
- me["ASI_max"].setTranslation(0, ASImax * -6.6);
-
- ind_mach = ind_spd_mach.getValue();
- if (ind_mach >= 0.5) {
- me["ASI_mach_decimal"].show();
- me["ASI_mach"].show();
- } else {
- me["ASI_mach_decimal"].hide();
- me["ASI_mach"].hide();
- }
-
- if (ind_mach >= 0.999) {
- me["ASI_mach"].setText("999");
- } else {
- me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
- }
-
- if (managed_spd.getValue() == 1) {
- me["ASI_target"].setColor(0.6901,0.3333,0.7450);
- me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
- me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
- me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
- me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
- } else {
- me["ASI_target"].setColor(0.0901,0.6039,0.7176);
- me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
- me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
- me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
- me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
- }
-
- tgt_ias = at_tgt_ias.getValue();
- if (tgt_ias <= 30) {
- ASItrgt = 0 - ASI;
- } else if (tgt_ias >= 420) {
- ASItrgt = 390 - ASI;
- } else {
- ASItrgt = tgt_ias - 30 - ASI;
- }
-
- ASItrgtdiff = tgt_ias - ind_spd;
-
- if (ASItrgtdiff >= -42 and ASItrgtdiff <= 42) {
- me["ASI_target"].setTranslation(0, ASItrgt * -6.6);
- me["ASI_digit_UP"].hide();
- me["ASI_decimal_UP"].hide();
- me["ASI_digit_DN"].hide();
- me["ASI_decimal_DN"].hide();
- me["ASI_target"].show();
- } else if (ASItrgtdiff < -42) {
- if (at_mach_mode.getValue() == 1) {
- me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
- me["ASI_decimal_UP"].hide();
- me["ASI_decimal_DN"].show();
- } else {
- me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
- me["ASI_decimal_UP"].hide();
- me["ASI_decimal_DN"].hide();
- }
- me["ASI_digit_DN"].show();
- me["ASI_digit_UP"].hide();
- me["ASI_target"].hide();
- } else if (ASItrgtdiff > 42) {
- if (at_mach_mode.getValue() == 1) {
- me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
- me["ASI_decimal_UP"].show();
- me["ASI_decimal_DN"].hide();
- } else {
- me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
- me["ASI_decimal_UP"].hide();
- me["ASI_decimal_DN"].hide();
- }
- me["ASI_digit_UP"].show();
- me["ASI_digit_DN"].hide();
- me["ASI_target"].hide();
- }
-
- ASItrend = speed_pred.getValue() - ASI;
- me["ASI_trend_up"].setTranslation(0, math.clamp(ASItrend, 0, 50) * -6.6);
- me["ASI_trend_down"].setTranslation(0, math.clamp(ASItrend, -50, 0) * -6.6);
-
- if (ASItrend >= 2) {
- me["ASI_trend_up"].show();
- me["ASI_trend_down"].hide();
- } else if (ASItrend <= -2) {
- me["ASI_trend_down"].show();
- me["ASI_trend_up"].hide();
- } else {
- me["ASI_trend_up"].hide();
- me["ASI_trend_down"].hide();
- }
-
# Attitude Indicator
pitch_cur = pitch.getValue();
roll_cur = roll.getValue();
@@ -789,69 +673,6 @@ var canvas_PFD_base = {
me["AI_stick_pos"].setTranslation(aileron_input.getValue() * 196.8, elevator_input.getValue() * 151.5);
- # Altitude
- me.altitude = altitude.getValue();
- me.altOffset = me.altitude / 500 - int(me.altitude / 500);
- me.middleAltText = roundaboutAlt(me.altitude / 100);
- me.middleAltOffset = nil;
- if (me.altOffset > 0.5) {
- me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
- } else {
- me.middleAltOffset = -me.altOffset * 243.3424;
- }
- me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
- me["ALT_scale"].update();
- me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
- me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
- me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
- me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
- me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
-
- if (altitude.getValue() < 0) {
- altPolarity = "-";
- } else {
- altPolarity = "";
- }
- me["ALT_digits"].setText(sprintf("%s%d", altPolarity, altitude_pfd.getValue()));
- altTens = num(right(sprintf("%02d", altitude.getValue()), 2));
- me["ALT_tens"].setTranslation(0, altTens * 1.392);
-
- ap_alt_cur = ap_alt.getValue();
- alt_diff_cur = alt_diff.getValue();
- if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
- me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
- me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
- me["ALT_digit_UP"].hide();
- me["ALT_digit_DN"].hide();
- me["ALT_target"].show();
- } else if (alt_diff_cur < -565) {
- if (alt_std_mode.getValue() == 1) {
- if (ap_alt_cur < 10000) {
- me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
- } else {
- me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
- }
- } else {
- me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
- }
- me["ALT_digit_DN"].show();
- me["ALT_digit_UP"].hide();
- me["ALT_target"].hide();
- } else if (alt_diff_cur > 565) {
- if (alt_std_mode.getValue() == 1) {
- if (ap_alt_cur < 10000) {
- me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
- } else {
- me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
- }
- } else {
- me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
- }
- me["ALT_digit_UP"].show();
- me["ALT_digit_DN"].hide();
- me["ALT_target"].hide();
- }
-
# Vertical Speed
me["VS_pointer"].setRotation(vs_needle.getValue() * D2R);
@@ -947,6 +768,12 @@ var canvas_PFD_base = {
};
var canvas_PFD_1 = {
+ ASI: 0,
+ ASImax: 0,
+ ASItrend: 0,
+ ASItrgt: 0,
+ ASItrgtdiff: 0,
+ FMGC_max: 0,
new: func(canvas_group, file) {
var m = {parents: [canvas_PFD_1, canvas_PFD_base]};
m.init(canvas_group, file);
@@ -964,26 +791,10 @@ var canvas_PFD_1 = {
# Errors
if ((adirs0_active.getValue() == 1) or (air_switch.getValue() == -1 and adirs2_active.getValue() == 1)) {
- me["ASI_group"].show();
- me["ALT_group"].show();
- me["ALT_group2"].show();
- me["ALT_scale"].show();
me["VS_group"].show();
- me["ASI_error"].hide();
- me["ASI_frame"].setColor(1,1,1);
- me["ALT_error"].hide();
- me["ALT_frame"].setColor(1,1,1);
me["VS_error"].hide();
} else {
- me["ASI_error"].show();
- me["ASI_frame"].setColor(1,0,0);
- me["ALT_error"].show();
- me["ALT_frame"].setColor(1,0,0);
me["VS_error"].show();
- me["ASI_group"].hide();
- me["ALT_group"].hide();
- me["ALT_group2"].hide();
- me["ALT_scale"].hide();
me["VS_group"].hide();
}
@@ -1037,11 +848,225 @@ var canvas_PFD_1 = {
me.updateCommon();
},
updateFast: func() {
+ # Airspeed
+ # ind_spd = ind_spd_kt.getValue();
+ # Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
+
+ if (dmc.DMController.DMCs[0].outputs[0] != nil) {
+ ind_spd = dmc.DMController.DMCs[0].outputs[0].getValue();
+ me["ASI_error"].hide();
+ me["ASI_frame"].setColor(1,1,1);
+ me["ASI_group"].show();
+
+ if (ind_spd <= 30) {
+ me.ASI = 0;
+ } else if (ind_spd >= 420) {
+ me.ASI = 390;
+ } else {
+ me.ASI = ind_spd - 30;
+ }
+
+ me.FMGC_max = FMGC_max_spd.getValue();
+ if (me.FMGC_max <= 30) {
+ me.ASImax = 0 - me.ASI;
+ } else if (me.FMGC_max >= 420) {
+ me.ASImax = 390 - me.ASI;
+ } else {
+ me.ASImax = me.FMGC_max - 30 - me.ASI;
+ }
+
+ me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
+ me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
+
+ if (managed_spd.getValue() == 1) {
+ me["ASI_target"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
+ } else {
+ me["ASI_target"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
+ }
+
+ tgt_ias = at_tgt_ias.getValue();
+ if (tgt_ias <= 30) {
+ me.ASItrgt = 0 - me.ASI;
+ } else if (tgt_ias >= 420) {
+ me.ASItrgt = 390 - me.ASI;
+ } else {
+ me.ASItrgt = tgt_ias - 30 - me.ASI;
+ }
+
+ me.ASItrgtdiff = tgt_ias - ind_spd;
+
+ if (me.ASItrgtdiff >= -42 and me.ASItrgtdiff <= 42) {
+ me["ASI_target"].setTranslation(0, me.ASItrgt * -6.6);
+ me["ASI_digit_UP"].hide();
+ me["ASI_decimal_UP"].hide();
+ me["ASI_digit_DN"].hide();
+ me["ASI_decimal_DN"].hide();
+ me["ASI_target"].show();
+ } else if (me.ASItrgtdiff < -42) {
+ if (at_mach_mode.getValue() == 1) {
+ me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].show();
+ } else {
+ me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].hide();
+ }
+ me["ASI_digit_DN"].show();
+ me["ASI_digit_UP"].hide();
+ me["ASI_target"].hide();
+ } else if (me.ASItrgtdiff > 42) {
+ if (at_mach_mode.getValue() == 1) {
+ me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
+ me["ASI_decimal_UP"].show();
+ me["ASI_decimal_DN"].hide();
+ } else {
+ me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].hide();
+ }
+ me["ASI_digit_UP"].show();
+ me["ASI_digit_DN"].hide();
+ me["ASI_target"].hide();
+ }
+
+ me.ASItrend = speed_pred_1.getValue() - me.ASI;
+ 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();
+ } else {
+ me["ASI_trend_up"].hide();
+ me["ASI_trend_down"].hide();
+ }
+ } else {
+ me["ASI_group"].hide();
+ me["ASI_error"].show();
+ me["ASI_frame"].setColor(1,0,0);
+ }
+
+ if (dmc.DMController.DMCs[0].outputs[2] != nil) {
+ ind_mach = dmc.DMController.DMCs[0].outputs[2].getValue();
+ me["machError"].hide();
+ if (ind_mach >= 0.5) {
+ me["ASI_mach_decimal"].show();
+ me["ASI_mach"].show();
+ } else {
+ me["ASI_mach_decimal"].hide();
+ me["ASI_mach"].hide();
+ }
+
+ if (ind_mach >= 0.999) {
+ me["ASI_mach"].setText("999");
+ } else {
+ me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
+ }
+ } else {
+ me["machError"].show();
+ }
+
+ # Altitude
+ if (dmc.DMController.DMCs[0].outputs[1] != nil) {
+ me["ALT_error"].hide();
+ me["ALT_frame"].setColor(1,1,1);
+ me["ALT_group"].show();
+ me["ALT_group2"].show();
+ me["ALT_scale"].show();
+
+ me.altitude = dmc.DMController.DMCs[0].outputs[1].getValue();
+ me.altOffset = me.altitude / 500 - int(me.altitude / 500);
+ me.middleAltText = roundaboutAlt(me.altitude / 100);
+ me.middleAltOffset = nil;
+ if (me.altOffset > 0.5) {
+ me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
+ } else {
+ me.middleAltOffset = -me.altOffset * 243.3424;
+ }
+ me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
+ me["ALT_scale"].update();
+ me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
+ me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
+ me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
+ me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
+ me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
+
+ if (altitude.getValue() < 0) {
+ altPolarity = "-";
+ } else {
+ altPolarity = "";
+ }
+
+ me["ALT_digits"].setText(sprintf("%s%d", altPolarity, dmc.DMController.DMCs[0].outputs[3].getValue()));
+ altTens = num(right(sprintf("%02d", me.altitude), 2));
+ me["ALT_tens"].setTranslation(0, altTens * 1.392);
+
+ ap_alt_cur = ap_alt.getValue();
+ alt_diff_cur = alt_diff.getValue();
+ if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
+ me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
+ me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
+ me["ALT_digit_UP"].hide();
+ me["ALT_digit_DN"].hide();
+ me["ALT_target"].show();
+ } else if (alt_diff_cur < -565) {
+ if (alt_std_mode.getValue() == 1) {
+ if (ap_alt_cur < 10000) {
+ me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ } else {
+ me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ }
+ } else {
+ me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
+ }
+ me["ALT_digit_DN"].show();
+ me["ALT_digit_UP"].hide();
+ me["ALT_target"].hide();
+ } else if (alt_diff_cur > 565) {
+ if (alt_std_mode.getValue() == 1) {
+ if (ap_alt_cur < 10000) {
+ me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ } else {
+ me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ }
+ } else {
+ me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
+ }
+ me["ALT_digit_UP"].show();
+ me["ALT_digit_DN"].hide();
+ me["ALT_target"].hide();
+ }
+ } else {
+ me["ALT_error"].show();
+ me["ALT_frame"].setColor(1,0,0);
+ me["ALT_group"].hide();
+ me["ALT_group2"].hide();
+ me["ALT_scale"].hide();
+ }
+
me.updateCommonFast();
},
};
var canvas_PFD_2 = {
+ ASI: 0,
+ ASImax: 0,
+ ASItrend: 0,
+ ASItrgt: 0,
+ ASItrgtdiff: 0,
+ FMGC_max: 0,
new: func(canvas_group, file) {
var m = {parents: [canvas_PFD_2, canvas_PFD_base]};
m.init(canvas_group, file);
@@ -1059,19 +1084,14 @@ var canvas_PFD_2 = {
# Errors
if ((adirs1_active.getValue() == 1) or (air_switch.getValue() == 1 and adirs2_active.getValue() == 1)) {
- me["ASI_group"].show();
me["ALT_group"].show();
me["ALT_group2"].show();
me["ALT_scale"].show();
me["VS_group"].show();
- me["ASI_error"].hide();
- me["ASI_frame"].setColor(1,1,1);
me["ALT_error"].hide();
me["ALT_frame"].setColor(1,1,1);
me["VS_error"].hide();
} else {
- me["ASI_error"].show();
- me["ASI_frame"].setColor(1,0,0);
me["ALT_error"].show();
me["ALT_frame"].setColor(1,0,0);
me["VS_error"].show();
@@ -1132,6 +1152,213 @@ var canvas_PFD_2 = {
me.updateCommon();
},
updateFast: func() {
+ # Airspeed
+ # ind_spd = ind_spd_kt.getValue();
+ # Subtract 30, since the scale starts at 30, but don"t allow less than 0, or more than 420 situations
+
+ if (dmc.DMController.DMCs[1].outputs[0] != nil) {
+ ind_spd = dmc.DMController.DMCs[1].outputs[0].getValue();
+ me["ASI_error"].hide();
+ me["ASI_frame"].setColor(1,1,1);
+ me["ASI_group"].show();
+
+ if (ind_spd <= 30) {
+ me.ASI = 0;
+ } else if (ind_spd >= 420) {
+ me.ASI = 390;
+ } else {
+ me.ASI = ind_spd - 30;
+ }
+
+ me.FMGC_max = FMGC_max_spd.getValue();
+ if (me.FMGC_max <= 30) {
+ me.ASImax = 0 - me.ASI;
+ } else if (me.FMGC_max >= 420) {
+ me.ASImax = 390 - me.ASI;
+ } else {
+ me.ASImax = me.FMGC_max - 30 - me.ASI;
+ }
+
+ me["ASI_scale"].setTranslation(0, me.ASI * 6.6);
+ me["ASI_max"].setTranslation(0, me.ASImax * -6.6);
+
+ if (managed_spd.getValue() == 1) {
+ me["ASI_target"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_digit_UP"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_decimal_UP"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_digit_DN"].setColor(0.6901,0.3333,0.7450);
+ me["ASI_decimal_DN"].setColor(0.6901,0.3333,0.7450);
+ } else {
+ me["ASI_target"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_digit_UP"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_decimal_UP"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_digit_DN"].setColor(0.0901,0.6039,0.7176);
+ me["ASI_decimal_DN"].setColor(0.0901,0.6039,0.7176);
+ }
+
+ tgt_ias = at_tgt_ias.getValue();
+ if (tgt_ias <= 30) {
+ me.ASItrgt = 0 - me.ASI;
+ } else if (tgt_ias >= 420) {
+ me.ASItrgt = 390 - me.ASI;
+ } else {
+ me.ASItrgt = tgt_ias - 30 - me.ASI;
+ }
+
+ me.ASItrgtdiff = tgt_ias - ind_spd;
+
+ if (me.ASItrgtdiff >= -42 and me.ASItrgtdiff <= 42) {
+ me["ASI_target"].setTranslation(0, me.ASItrgt * -6.6);
+ me["ASI_digit_UP"].hide();
+ me["ASI_decimal_UP"].hide();
+ me["ASI_digit_DN"].hide();
+ me["ASI_decimal_DN"].hide();
+ me["ASI_target"].show();
+ } else if (me.ASItrgtdiff < -42) {
+ if (at_mach_mode.getValue() == 1) {
+ me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].show();
+ } else {
+ me["ASI_digit_DN"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].hide();
+ }
+ me["ASI_digit_DN"].show();
+ me["ASI_digit_UP"].hide();
+ me["ASI_target"].hide();
+ } else if (me.ASItrgtdiff > 42) {
+ if (at_mach_mode.getValue() == 1) {
+ me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_mach.getValue() * 1000));
+ me["ASI_decimal_UP"].show();
+ me["ASI_decimal_DN"].hide();
+ } else {
+ me["ASI_digit_UP"].setText(sprintf("%3.0f", at_input_spd_kts.getValue()));
+ me["ASI_decimal_UP"].hide();
+ me["ASI_decimal_DN"].hide();
+ }
+ me["ASI_digit_UP"].show();
+ me["ASI_digit_DN"].hide();
+ me["ASI_target"].hide();
+ }
+
+ me.ASItrend = speed_pred_2.getValue() - me.ASI;
+ 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();
+ } else {
+ me["ASI_trend_up"].hide();
+ me["ASI_trend_down"].hide();
+ }
+ } else {
+ me["ASI_error"].show();
+ me["ASI_frame"].setColor(1,0,0);
+ me["ASI_group"].hide();
+ }
+
+ if (dmc.DMController.DMCs[1].outputs[2] != nil) {
+ ind_mach = dmc.DMController.DMCs[1].outputs[2].getValue();
+ me["machError"].hide();
+ if (ind_mach >= 0.5) {
+ me["ASI_mach_decimal"].show();
+ me["ASI_mach"].show();
+ } else {
+ me["ASI_mach_decimal"].hide();
+ me["ASI_mach"].hide();
+ }
+
+ if (ind_mach >= 0.999) {
+ me["ASI_mach"].setText("999");
+ } else {
+ me["ASI_mach"].setText(sprintf("%3.0f", ind_mach * 1000));
+ }
+ } else {
+ me["machError"].show();
+ }
+
+ if (dmc.DMController.DMCs[1].outputs[1] != nil) {
+ me["ALT_error"].hide();
+ me["ALT_frame"].setColor(1,1,1);
+ me["ALT_group"].show();
+ me["ALT_group2"].show();
+ me["ALT_scale"].show();
+
+ me.altitude = dmc.DMController.DMCs[1].outputs[1].getValue();
+ me.altOffset = me.altitude / 500 - int(me.altitude / 500);
+ me.middleAltText = roundaboutAlt(me.altitude / 100);
+ me.middleAltOffset = nil;
+ if (me.altOffset > 0.5) {
+ me.middleAltOffset = -(me.altOffset - 1) * 243.3424;
+ } else {
+ me.middleAltOffset = -me.altOffset * 243.3424;
+ }
+ me["ALT_scale"].setTranslation(0, -me.middleAltOffset);
+ me["ALT_scale"].update();
+ me["ALT_five"].setText(sprintf("%03d", abs(me.middleAltText+10)));
+ me["ALT_four"].setText(sprintf("%03d", abs(me.middleAltText+5)));
+ me["ALT_three"].setText(sprintf("%03d", abs(me.middleAltText)));
+ me["ALT_two"].setText(sprintf("%03d", abs(me.middleAltText-5)));
+ me["ALT_one"].setText(sprintf("%03d", abs(me.middleAltText-10)));
+
+ if (altitude.getValue() < 0) {
+ altPolarity = "-";
+ } else {
+ altPolarity = "";
+ }
+
+ me["ALT_digits"].setText(sprintf("%s%d", altPolarity, dmc.DMController.DMCs[1].outputs[3].getValue()));
+ altTens = num(right(sprintf("%02d", me.altitude), 2));
+ me["ALT_tens"].setTranslation(0, altTens * 1.392);
+
+ ap_alt_cur = ap_alt.getValue();
+ alt_diff_cur = alt_diff.getValue();
+ if (alt_diff_cur >= -565 and alt_diff_cur <= 565) {
+ me["ALT_target"].setTranslation(0, (alt_diff_cur / 100) * -48.66856);
+ me["ALT_target_digit"].setText(sprintf("%03d", math.round(ap_alt_cur / 100)));
+ me["ALT_digit_UP"].hide();
+ me["ALT_digit_DN"].hide();
+ me["ALT_target"].show();
+ } else if (alt_diff_cur < -565) {
+ if (alt_std_mode.getValue() == 1) {
+ if (ap_alt_cur < 10000) {
+ me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ } else {
+ me["ALT_digit_DN"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ }
+ } else {
+ me["ALT_digit_DN"].setText(sprintf("%5.0f", ap_alt_cur));
+ }
+ me["ALT_digit_DN"].show();
+ me["ALT_digit_UP"].hide();
+ me["ALT_target"].hide();
+ } else if (alt_diff_cur > 565) {
+ if (alt_std_mode.getValue() == 1) {
+ if (ap_alt_cur < 10000) {
+ me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ } else {
+ me["ALT_digit_UP"].setText(sprintf("%s", "FL " ~ ap_alt_cur / 100));
+ }
+ } else {
+ me["ALT_digit_UP"].setText(sprintf("%5.0f", ap_alt_cur));
+ }
+ me["ALT_digit_UP"].show();
+ me["ALT_digit_DN"].hide();
+ me["ALT_target"].hide();
+ }
+ } else {
+ me["ALT_error"].show();
+ me["ALT_frame"].setColor(1,0,0);
+ me["ALT_group"].hide();
+ me["ALT_group2"].hide();
+ me["ALT_scale"].hide();
+ }
+
me.updateCommonFast();
},
};
diff --git a/Models/Instruments/PFD/res/pfd.svg b/Models/Instruments/PFD/res/pfd.svg
index df26ecef..b334de65 100644
--- a/Models/Instruments/PFD/res/pfd.svg
+++ b/Models/Instruments/PFD/res/pfd.svg
@@ -12,7 +12,7 @@
viewBox="0 0 1024 1024"
version="1.1"
id="svg2"
- inkscape:version="0.91 r13725"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
sodipodi:docname="pfd.svg">
@@ -37,14 +37,14 @@
guidetolerance="10"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:window-width="1920"
- inkscape:window-height="1027"
+ inkscape:window-width="1366"
+ inkscape:window-height="705"
id="namedview371"
showgrid="false"
- inkscape:zoom="0.70710678"
- inkscape:cx="1179.7256"
- inkscape:cy="481.71975"
- inkscape:window-x="1592"
+ inkscape:zoom="2.0149341"
+ inkscape:cx="51.385843"
+ inkscape:cy="279.39354"
+ inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg2"
@@ -577,7 +577,7 @@
inkscape:label="#g4699">
10
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">10
20
20
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">20
30
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">30
40
40
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">40
50
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">50
60
60
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">60
70
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">70
80
80
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">80
90
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">90
10
10
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">10
20
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">20
30
30
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">30
40
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">40
50
50
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">50
60
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">60
70
70
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">70
80
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">80
90
90
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:32px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">90
@@ -1124,12 +1124,11 @@
transform="translate(0,97.08285)">
X
X
X
X
1
2
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:29.77171135px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">2
6
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.75603485px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">6
2
1
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:31.75603485px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">1
000
+ 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';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000
000
+ 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';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000
000
+ 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';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">000
TOGA
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.65757734">TOGA
ALT
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;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.65757734">ALT
CLB
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948883px;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.65757734">CLB
FL 000
FL 000
+ 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';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75">FL 000
1013
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:38.39944839px;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.75">1013
40200080604020008060
AP 1+2
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">AP 1+2
A/THR
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">A/THR
DUAL
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">DUAL
FLARE
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;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.65757734">FLARE
DH
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#cecdce;fill-opacity:1;stroke-width:0.65757734">DH
LVR CLB
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:35.99948502px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.65757734">LVR CLB
@@ -3150,7 +3143,7 @@
style="fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:3.19995403;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:42px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">00
00
00
+ 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';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">00
00
+ 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';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">00
00
+ 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';text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:0.75">00
000
000
+ 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';text-align:end;text-anchor:end;fill:#179ab7;fill-opacity:1;stroke-width:0.75">000
140
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">140
120
100
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">100
080
060
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">060
040
180
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">180
200
220
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">220
240
260
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">260
280
300
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">300
320
340
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">340
360
380
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">380
400
420
+ 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';text-align:end;text-anchor:end;fill:#ffffff;fill-opacity:1;stroke-width:0.75">420
000
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:48.83483124px;line-height:1.25;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;text-anchor:start;fill:#0dc04b;fill-opacity:1;stroke-width:0.75">000
.
000
+ 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';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75">000
.
.
+ 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';text-align:start;text-anchor:start;fill:#179ab7;fill-opacity:1;stroke-width:0.75">.
ALT
VV/S
HDG
+ MACH
diff --git a/Models/Instruments/Pedestal_up/Pedestal_up.xml b/Models/Instruments/Pedestal_up/Pedestal_up.xml
index 683c0310..4c2133d5 100644
--- a/Models/Instruments/Pedestal_up/Pedestal_up.xml
+++ b/Models/Instruments/Pedestal_up/Pedestal_up.xml
@@ -484,4 +484,5 @@
+
diff --git a/Models/RAT/RAT.xml b/Models/RAT/RAT.xml
index ba1ed27a..eeb2422c 100644
--- a/Models/RAT/RAT.xml
+++ b/Models/RAT/RAT.xml
@@ -32,7 +32,7 @@
fan
holder
- controls/hydraulic/rat-deployed
+ /systems/hydraulic/sources/rat/position
diff --git a/Nasal/autopush.nas b/Nasal/Autopush/autopush.nas
similarity index 100%
rename from Nasal/autopush.nas
rename to Nasal/Autopush/autopush.nas
diff --git a/Nasal/autopush_driver.nas b/Nasal/Autopush/autopush_driver.nas
similarity index 100%
rename from Nasal/autopush_driver.nas
rename to Nasal/Autopush/autopush_driver.nas
diff --git a/Nasal/autopush_route.nas b/Nasal/Autopush/autopush_route.nas
similarity index 100%
rename from Nasal/autopush_route.nas
rename to Nasal/Autopush/autopush_route.nas
diff --git a/Nasal/dynarr.nas b/Nasal/Autopush/dynarr.nas
similarity index 100%
rename from Nasal/dynarr.nas
rename to Nasal/Autopush/dynarr.nas
diff --git a/Nasal/ECAM.nas b/Nasal/ECAM.nas
deleted file mode 100644
index 3f12bafb..00000000
--- a/Nasal/ECAM.nas
+++ /dev/null
@@ -1,497 +0,0 @@
-# A3XX ECAM
-# Joshua Davidson (Octal450)
-
-# Copyright (c) 2019 Joshua Davidson (Octal450)
-
-var stateL = 0;
-var stateR = 0;
-var thrustL = 0;
-var thrustR = 0;
-var elec = 0;
-var speed = 0;
-var wow = 0;
-var altitude = 0;
-var phase = 1;
-var toPowerSet = 0;
-var eng = "XX";
-var eprlim = 0;
-var n1lim = 0;
-var mode = "XX";
-var modeI = "XX";
-var man_sel = 0;
-var fault_sel = 0;
-var fault_page = "";
-var warnPhase = 1;
-var page = "door";
-var aileron = 0;
-var elevator = 0;
-var elapsedSec = 0;
-var fctlCounting = 0;
-var fctlTime = 0;
-var showAPUPage = 0;
-var APUMaster = 0;
-var APURPM = 0;
-var APUTime = 0;
-var APUCounting = 0;
-var engModeSel = 0;
-var showENGPage = 0;
-var ENGTime = 0;
-var ENGCounting = 0;
-var flapLever = 0;
-var CRZTime = 0;
-var CRZCondition = 0;
-var CRZCounting = 0;
-var agl = 0;
-var ap_active = 0;
-var athr_active = 0;
-setprop("/ECAM/left-msg", "NONE");
-setprop("/position/gear-agl-ft", 0);
-# w = White, b = Blue, g = Green, a = Amber, r = Red
-
-var ECAM = {
- init: func() {
- setprop("/ECAM/engine-start-time", 0);
- setprop("/ECAM/engine-start-time-switch", 0);
- setprop("/systems/gear/landing-gear-warning-light", 0);
- setprop("/ECAM/Lower/page", "door");
- setprop("/ECAM/Lower/man-select", 0);
- setprop("/ECAM/Lower/fault-select", 0);
- setprop("/ECAM/Lower/fault-page", "");
- setprop("/ECAM/Lower/apu-timer", 0);
- setprop("/ECAM/Lower/eng-timer", 0);
- setprop("/ECAM/Lower/fctl-timer", 0);
- setprop("/ECAM/Lower/light/apu", 0);
- setprop("/ECAM/Lower/light/bleed", 0);
- setprop("/ECAM/Lower/light/cond", 0);
- setprop("/ECAM/Lower/light/door", 0);
- setprop("/ECAM/Lower/light/elec", 0);
- setprop("/ECAM/Lower/light/eng", 0);
- setprop("/ECAM/Lower/light/fctl", 0);
- setprop("/ECAM/Lower/light/fuel", 0);
- setprop("/ECAM/Lower/light/hyd", 0);
- setprop("/ECAM/Lower/light/press", 0);
- setprop("/ECAM/Lower/light/sts", 0);
- setprop("/ECAM/Lower/light/wheel", 0);
- setprop("/ECAM/Lower/light/clr", 0);
- setprop("/ECAM/warning-phase", 1);
- setprop("/ECAM/warning-phase-10-time", 0);
- setprop("/ECAM/ap-off-time", 0);
- setprop("/ECAM/athr-off-time", 0);
- setprop("/it-autoflight/output/ap-warning", 0);
- setprop("/it-autoflight/output/athr-warning", 0);
- var ap_off_time = getprop("/ECAM/ap-off-time");
- var athr_off_time = getprop("/ECAM/athr-off-time");
- LowerECAM.reset();
- },
- MSGclr: func() {
- setprop("/ECAM/ecam-checklist-active", 0);
- setprop("/ECAM/left-msg", "NONE");
- setprop("/ECAM/msg/line1", "");
- setprop("/ECAM/msg/line2", "");
- setprop("/ECAM/msg/line3", "");
- setprop("/ECAM/msg/line4", "");
- setprop("/ECAM/msg/line5", "");
- setprop("/ECAM/msg/line6", "");
- setprop("/ECAM/msg/line7", "");
- setprop("/ECAM/msg/line8", "");
- setprop("/ECAM/msg/linec1", "w");
- setprop("/ECAM/msg/linec2", "w");
- setprop("/ECAM/msg/linec3", "w");
- setprop("/ECAM/msg/linec4", "w");
- setprop("/ECAM/msg/linec5", "w");
- setprop("/ECAM/msg/linec6", "w");
- setprop("/ECAM/msg/linec7", "w");
- setprop("/ECAM/msg/linec8", "w");
- setprop("/ECAM/rightmsg/line1", "");
- setprop("/ECAM/rightmsg/line2", "");
- setprop("/ECAM/rightmsg/line3", "");
- setprop("/ECAM/rightmsg/line4", "");
- setprop("/ECAM/rightmsg/line5", "");
- setprop("/ECAM/rightmsg/line6", "");
- setprop("/ECAM/rightmsg/line7", "");
- setprop("/ECAM/rightmsg/line8", "");
- setprop("/ECAM/rightmsg/linec1", "w");
- setprop("/ECAM/rightmsg/linec2", "w");
- setprop("/ECAM/rightmsg/linec3", "w");
- setprop("/ECAM/rightmsg/linec4", "w");
- setprop("/ECAM/rightmsg/linec5", "w");
- setprop("/ECAM/rightmsg/linec6", "w");
- setprop("/ECAM/rightmsg/linec7", "w");
- setprop("/ECAM/rightmsg/linec8", "w");
- },
- loop: func() {
- stateL = getprop("/engines/engine[0]/state");
- stateR = getprop("/engines/engine[1]/state");
- thrustL = getprop("/systems/thrust/state1");
- thrustR = getprop("/systems/thrust/state2");
- elec = getprop("/systems/electrical/on");
- speed = getprop("/instrumentation/airspeed-indicator/indicated-speed-kt");
- wow = getprop("/gear/gear[0]/wow");
- eng = getprop("/options/eng");
-
- if (stateL != 3 or stateR != 3) {
- if (getprop("/ECAM/engine-start-time-switch") != 0) {
- setprop("/ECAM/engine-start-time-switch", 0);
- setprop("/ECAM/engine-start-time", 0);
- }
- } else if (stateL == 3 and stateR == 3 and wow == 1) {
- if (getprop("/ECAM/engine-start-time-switch") != 1) {
- setprop("/ECAM/engine-start-time", getprop("/sim/time/elapsed-sec"));
- setprop("/ECAM/engine-start-time-switch", 1);
- }
- } else if (wow == 1) {
- if (getprop("/ECAM/engine-start-time-switch") != 0) {
- setprop("/ECAM/engine-start-time-switch", 0);
- }
- }
-
- if (getprop("/ECAM/show-left-msg") == 1) {
- setprop("/ECAM/left-msg", "MSG");
- } else {
- setprop("/ECAM/left-msg", "NONE");
- }
-
- if (getprop("/ECAM/show-right-msg") == 1) {
- setprop("/ECAM/right-msg", "MSG");
- } else {
- setprop("/ECAM/right-msg", "NONE");
- }
-
- # AP / ATHR warnings
- if (ap_active == 1 and getprop("/it-autoflight/output/ap-warning") == 0) {
- ap_active = 0;
- } elsif (ap_active == 1 and getprop("/it-autoflight/output/ap-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/ap-off-time") + 9)) {
- ap_active = 0;
- setprop("/it-autoflight/output/ap-warning", 0);
- } elsif (ap_active == 0 and getprop("/it-autoflight/output/ap-warning") != 0) {
- ap_active = 1;
- }
-
- if (ap_active == 1 and getprop("/it-autoflight/output/ap-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/ap-off-time") + 3) and getprop("/ECAM/warnings/master-warning-light") == 1) {
- setprop("/ECAM/warnings/master-warning-light", 0);
- }
-
- if (getprop("/it-autoflight/output/ap-warning") == 2 and (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1)) {
- setprop("/it-autoflight/output/ap-warning", 0);
- }
-
- if (athr_active == 1 and getprop("/it-autoflight/output/athr-warning") == 0) {
- athr_active = 0;
- } elsif (athr_active == 1 and getprop("/it-autoflight/output/athr-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/athr-off-time") + 9)) {
- athr_active = 0;
- setprop("/it-autoflight/output/athr-warning", 0);
- } elsif (athr_active == 0 and getprop("/it-autoflight/output/athr-warning") != 0) {
- athr_active = 1;
- }
-
-
- if (athr_active == 1 and getprop("/it-autoflight/output/athr-warning") == 1 and getprop("/sim/time/elapsed-sec") > (getprop("/ECAM/athr-off-time") + 3) and getprop("/ECAM/warnings/master-caution-light") == 1) {
- setprop("/ECAM/warnings/master-caution-light", 0);
- }
-
- if (getprop("/it-autoflight/output/athr-warning") == 2 and getprop("/it-autoflight/output/athr") == 1) {
- setprop("/it-autoflight/output/athr-warning", 0);
- }
-
- LowerECAM.loop();
- },
-};
-
-ECAM.MSGclr();
-
-# Lower ECAM Pages
-
-var LowerECAM = {
- button: func(b) {
- man_sel = getprop("/ECAM/Lower/man-select");
- if (b == "clr" and getprop("/it-autoflight/output/athr-warning") == 2) {
- setprop("/it-autoflight/output/athr-warning", 0);
- setprop("/ECAM/Lower/light/clr", 0);
- setprop("/ECAM/warnings/master-caution-light", 0);
- return;
- }
-
- if (b == "clr" and getprop("/it-autoflight/output/ap-warning") == 2) {
- setprop("/it-autoflight/output/ap-warning", 0);
- setprop("/ECAM/Lower/light/clr", 0);
- setprop("/ECAM/warnings/master-warning-light", 0);
- return;
- }
-
- if (b == "clr") {
- ecam.ECAM_controller.clear();
- return;
- }
-
- if (getprop("/ECAM/Lower/fault-select") == 0) {
- if (b != "clr") {
- if (!man_sel) {
- setprop("/ECAM/Lower/man-select", 1);
- setprop("/ECAM/Lower/page", b);
- setprop("/ECAM/Lower/light/" ~ b, 1);
- } else {
- if (b == getprop("/ECAM/Lower/page")) {
- setprop("/ECAM/Lower/man-select", 0);
- LowerECAM.loop();
- setprop("/ECAM/Lower/light/" ~ b, 0);
- } else {
- setprop("/ECAM/Lower/light/" ~ getprop("/ECAM/Lower/page"), 0);
- setprop("/ECAM/Lower/page", b);
- setprop("/ECAM/Lower/light/" ~ b, 1);
- }
- }
- } elsif (getprop("/ECAM/Lower/light/clr") == 1) {
- setprop("/ECAM/Lower/light/clr", 0);
- }
- } else {
- if (b == "clr") {
- setprop("/ECAM/Lower/light/clr", 0);
- setprop("/ECAM/Lower/fault-select", 0);
- setprop("/ECAM/Lower/fault-page", "");
- LowerECAM.loop();
- } elsif (!man_sel) {
- setprop("/ECAM/Lower/man-select", 1);
- setprop("/ECAM/Lower/page", b);
- setprop("/ECAM/Lower/light/" ~ b, 1);
- } else {
- if (b == getprop("/ECAM/Lower/page")) {
- setprop("/ECAM/Lower/man-select", 0);
- setprop("/ECAM/Lower/light/" ~ b, 0);
- setprop("/ECAM/Lower/fault-select", 1);
- setprop("/ECAM/Lower/page", getprop("/ECAM/Lower/fault-page"));
- } else {
- setprop("/ECAM/Lower/light/" ~ getprop("/ECAM/Lower/page"), 0);
- setprop("/ECAM/Lower/page", b);
- setprop("/ECAM/Lower/light/" ~ b, 1);
- }
- }
- }
- },
- loop: func() {
- man_sel = getprop("/ECAM/Lower/man-select");
- fault_sel = getprop("/ECAM/Lower/fault-select");
- fault_page = getprop("/ECAM/Lower/fault-page");
- page = getprop("/ECAM/Lower/page");
-
- if (!man_sel) {
- if (!fault_sel) {
- warnPhase = getprop("/ECAM/warning-phase");
- aileron = getprop("/fdm/jsbsim/fbw/aileron-sidestick");
- elevator = getprop("/fdm/jsbsim/fbw/elevator-sidestick");
- APUMaster = getprop("/controls/APU/master");
- APURPM = getprop("/systems/apu/rpm");
- stateL = getprop("/engines/engine[0]/state");
- stateR = getprop("/engines/engine[1]/state");
- engModeSel = getprop("/controls/engines/engine-start-switch");
- elapsedSec = getprop("/sim/time/elapsed-sec");
-
- if (warnPhase == 2) {
- if (abs(aileron) > 0.3 or abs(elevator) > 0.3) {
- fctlTime = elapsedSec;
- fctlCounting = 1;
- } else if (fctlCounting) {
- if (fctlTime + 20 < elapsedSec) {
- fctlCounting = 0;
- }
- }
- } else {
- fctlCounting = 0;
- }
-
- if (APURPM > 95) {
- if (APUTime + 10 < elapsedSec) {
- APUCounting = 0;
- }
- } else {
- if (APUMaster) {
- APUTime = elapsedSec;
- APUCounting = 1;
- } else {
- APUCounting = 0;
- }
- }
-
- if ((APURPM <= 95 or APUCounting) and APUMaster) {
- showAPUPage = 1;
- } else {
- showAPUPage = 0;
- }
-
- if (stateL == 3 or stateR == 3) {
- if (ENGCounting and ENGTime + 10 < elapsedSec) {
- ENGCounting = 0;
- }
- }
-
- if (((stateL > 0 and stateL != 3) or (stateR > 0 and stateR != 3)) and engModeSel == 2) {
- ENGTime = elapsedSec;
- ENGCounting = 1;
- } else if ((stateL == 0 and stateR == 0) or engModeSel == 1) {
- ENGCounting = 0;
- }
-
- if (ENGCounting or engModeSel == 0) {
- showENGPage = 1;
- } else {
- showENGPage = 0;
- }
-
- if (warnPhase == 1 or warnPhase == 10) {
- if (showENGPage) {
- if (page != "eng") {
- setprop("/ECAM/Lower/page", "eng");
- }
- } else if (showAPUPage) {
- if (page != "apu") {
- setprop("/ECAM/Lower/page", "apu");
- }
- } else if (page != "door") {
- setprop("/ECAM/Lower/page", "door");
- }
- } else if (warnPhase == 2) {
-
- if (showENGPage) {
- if (page != "eng") {
- setprop("/ECAM/Lower/page", "eng");
- }
- } else if (showAPUPage) {
- if (page != "apu") {
- setprop("/ECAM/Lower/page", "apu");
- }
- } else if (fctlCounting == 1) {
- if (page != "fctl") {
- setprop("/ECAM/Lower/page", "fctl");
- }
- } else if (page != "wheel") {
- setprop("/ECAM/Lower/page", "wheel");
- }
- } else if (warnPhase >= 3 and warnPhase <= 5) {
- if (page != "eng") {
- setprop("/ECAM/Lower/page", "eng");
- }
- } else if (warnPhase >= 7 and warnPhase <= 9) {
- if (showENGPage) {
- if (page != "eng") {
- setprop("/ECAM/Lower/page", "eng");
- }
- } else if (showAPUPage) {
- if (page != "apu") {
- setprop("/ECAM/Lower/page", "apu");
- }
- } else if (page != "wheel") {
- setprop("/ECAM/Lower/page", "wheel");
- }
- } else if (warnPhase == 6) {
- flapLever = getprop("/controls/flight/flap-lever");
- gearLever = getprop("/controls/gear/gear-down");
- agl = pts.Position.gearAglFt.getValue();
-
- if (CRZCounting and (toPowerSet or flapLever > 0) and !CRZCondition) {
- if (CRZTime + 60 < elapsedSec) {
- CRZCondition = 1;
- CRZCounting = 0;
- } else {
- CRZCondition = 0;
- }
- }
-
- if (!CRZCounting and (toPowerSet or flapLever > 0) and !CRZCondition) {
- CRZTime = elapsedSec;
- CRZCondition = 0;
- CRZCounting = 1;
- }
-
- if (CRZCondition or (flapLever == 0 and !toPowerSet)) {
- if (gearLever and agl <= 16000) {
- if (page != "wheel") {
- setprop("/ECAM/Lower/page", "wheel");
- }
- } else if (page != "crz") {
- setprop("/ECAM/Lower/page", "crz");
- }
- } else {
- if (showENGPage) {
- if (page != "eng") {
- setprop("/ECAM/Lower/page", "eng");
- }
- } else if (showAPUPage) {
- if (page != "apu") {
- setprop("/ECAM/Lower/page", "apu");
- }
- } else if (page != "eng") {
- setprop("/ECAM/Lower/page", "eng");
- }
- }
- }
- } else {
- setprop("/ECAM/Lower/light/apu", 0);
- setprop("/ECAM/Lower/light/bleed", 0);
- setprop("/ECAM/Lower/light/cond", 0);
- setprop("/ECAM/Lower/light/door", 0);
- setprop("/ECAM/Lower/light/elec", 0);
- setprop("/ECAM/Lower/light/eng", 0);
- setprop("/ECAM/Lower/light/fctl", 0);
- setprop("/ECAM/Lower/light/fuel", 0);
- setprop("/ECAM/Lower/light/hyd", 0);
- setprop("/ECAM/Lower/light/press", 0);
- setprop("/ECAM/Lower/light/sts", 0);
- setprop("/ECAM/Lower/light/wheel", 0);
- }
- }
- },
- reset: func() {
- setprop("/ECAM/Lower/page", "door");
- setprop("/ECAM/Lower/man-select", 0);
- setprop("/ECAM/Lower/fault-select", 0);
- setprop("/ECAM/Lower/light/apu", 0);
- setprop("/ECAM/Lower/light/bleed", 0);
- setprop("/ECAM/Lower/light/cond", 0);
- setprop("/ECAM/Lower/light/door", 0);
- setprop("/ECAM/Lower/light/elec", 0);
- setprop("/ECAM/Lower/light/eng", 0);
- setprop("/ECAM/Lower/light/fctl", 0);
- setprop("/ECAM/Lower/light/fuel", 0);
- setprop("/ECAM/Lower/light/hyd", 0);
- setprop("/ECAM/Lower/light/press", 0);
- setprop("/ECAM/Lower/light/sts", 0);
- setprop("/ECAM/Lower/light/wheel", 0);
- },
- failCall: func(page) {
- setprop("/ECAM/Lower/man-select", 0);
- setprop("/ECAM/Lower/fault-select", 1);
- setprop("/ECAM/Lower/fault-page", page);
- setprop("/ECAM/Lower/page", page);
- setprop("/ECAM/Lower/light/clr", 1);
- },
- clrLight: func() {
- setprop("/ECAM/Lower/light/clr", 1);
- }
-};
-
-# Autoflight Warnings
-var doAthrWarn = func(type) {
- if (type == "none") {
- return;
- } elsif (type == "soft") {
- setprop("/ECAM/athr-off-time", getprop("/sim/time/elapsed-sec"));
- setprop("/it-autoflight/output/athr-warning", 1);
- } else {
- libraries.LowerECAM.clrLight();
- setprop("/it-autoflight/output/athr-warning", 2);
- }
- setprop("/ECAM/warnings/master-caution-light", 1);
-}
-
-var doApWarn = func(type) {
- if (type == "none") {
- return;
- } elsif (type == "soft") {
- setprop("/ECAM/ap-off-time", getprop("/sim/time/elapsed-sec"));
- setprop("/it-autoflight/output/ap-warning", 1);
- setprop("/ECAM/warnings/master-warning-light", 1);
- } else {
- setprop("/it-autoflight/output/ap-warning", 2);
- # master warning handled by warning system in this case
- libraries.LowerECAM.clrLight();
- }
-}
diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas
index a5cdec2c..3b9c2ca4 100644
--- a/Nasal/ECAM/ECAM-controller.nas
+++ b/Nasal/ECAM/ECAM-controller.nas
@@ -1,9 +1,6 @@
# A3XX Electronic Centralised Aircraft Monitoring System
# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
-var leftmsgEnable = props.globals.initNode("/ECAM/show-left-msg", 1, "BOOL");
-var rightmsgEnable = props.globals.initNode("/ECAM/show-right-msg", 1, "BOOL");
-
var lines = [props.globals.getNode("/ECAM/msg/line1", 1), props.globals.getNode("/ECAM/msg/line2", 1), props.globals.getNode("/ECAM/msg/line3", 1), props.globals.getNode("/ECAM/msg/line4", 1), props.globals.getNode("/ECAM/msg/line5", 1), props.globals.getNode("/ECAM/msg/line6", 1), props.globals.getNode("/ECAM/msg/line7", 1), props.globals.getNode("/ECAM/msg/line8", 1)];
var linesCol = [props.globals.getNode("/ECAM/msg/linec1", 1), props.globals.getNode("/ECAM/msg/linec2", 1), props.globals.getNode("/ECAM/msg/linec3", 1), props.globals.getNode("/ECAM/msg/linec4", 1), props.globals.getNode("/ECAM/msg/linec5", 1), props.globals.getNode("/ECAM/msg/linec6", 1), props.globals.getNode("/ECAM/msg/linec7", 1), props.globals.getNode("/ECAM/msg/linec8", 1)];
var rightLines = [props.globals.getNode("/ECAM/rightmsg/line1", 1), props.globals.getNode("/ECAM/rightmsg/line2", 1), props.globals.getNode("/ECAM/rightmsg/line3", 1), props.globals.getNode("/ECAM/rightmsg/line4", 1), props.globals.getNode("/ECAM/rightmsg/line5", 1), props.globals.getNode("/ECAM/rightmsg/line6", 1), props.globals.getNode("/ECAM/rightmsg/line7", 1), props.globals.getNode("/ECAM/rightmsg/line8", 1)];
@@ -18,7 +15,7 @@ var overflow = props.globals.initNode("/ECAM/warnings/overflow", 0, "BOOL");
var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess", 1);
var lights = [props.globals.initNode("/ECAM/warnings/master-warning-light", 0, "BOOL"), props.globals.initNode("/ECAM/warnings/master-caution-light", 0, "BOOL")];
-var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL")];
+var aural = [props.globals.initNode("/sim/sound/warnings/crc", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/chime", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL")];
var warningFlash = props.globals.initNode("/ECAM/warnings/master-warning-flash", 0, "BOOL");
var lineIndex = 0;
@@ -46,11 +43,13 @@ var warning = {
t.sdPage = sdPage;
t.isMemo = isMemo;
t.hasCalled = 0;
+ t.wasActive = 0;
return t
},
write: func() {
if (me.active == 0) { return; }
+ me.wasActive = 1;
lineIndex = 0;
while (lineIndex < 7 and lines[lineIndex].getValue() != "") {
lineIndex = lineIndex + 1; # go to next line until empty line
@@ -68,23 +67,37 @@ var warning = {
}
},
warnlight: func() {
- if (me.light > 1 or me.noRepeat == 1 or me.active == 0) {return;}
+ if (me.light > 1) { return; }
+ if (me.active == 0 and me.wasActive == 1) {
+ lights[me.light].setBoolValue(0);
+ me.wasActive = 0;
+ }
+
+ if (me.noRepeat == 1 or me.active == 0) { return; }
+
lights[me.light].setBoolValue(1);
me.noRepeat = 1;
},
sound: func() {
- if (me.aural > 1 or me.noRepeat2 == 1 or me.active == 0) {return;}
+ if (me.aural > 2) { return; }
+ if (me.active == 0 and me.wasActive == 1) {
+ aural[me.aural].setBoolValue(0);
+ me.wasActive = 0;
+ }
+
+ if (me.noRepeat2 == 1 or me.active == 0) { return; }
+
if (me.aural != 0) {
aural[me.aural].setBoolValue(0);
}
- me.noRepeat2 = 1;
+ me.noRepeat2 = 1;
settimer(func() {
aural[me.aural].setBoolValue(1);
}, 0.15);
},
callPage: func() {
if (me.sdPage == "nil" or me.hasCalled == 1) { return; }
- #libraries.LowerECAM.failCall(me.sdPage);
+ libraries.SystemDisplay.failCall(me.sdPage);
me.hasCalled = 1;
}
};
@@ -147,6 +160,7 @@ var status = {
var ECAM_controller = {
_recallCounter: 0,
+ _noneActive: 0,
init: func() {
ECAMloopTimer.start();
me.reset();
@@ -193,6 +207,9 @@ var ECAM_controller = {
w.warnlight();
w.sound();
counter += 1;
+ } elsif (w.wasActive == 1) {
+ w.warnlight();
+ w.sound();
}
}
}
@@ -277,6 +294,7 @@ var ECAM_controller = {
w.clearFlag = 1;
hasCleared = 1;
statusFlag = 1;
+ libraries.ECAMControlPanel.lightOff("clr");
}
}
} else {
@@ -285,17 +303,19 @@ var ECAM_controller = {
w.clearFlag = 1;
hasCleared = 1;
statusFlag = 1;
+ libraries.ECAMControlPanel.lightOff("clr");
break;
}
}
}
if (statusFlag == 1) {
- libraries.LowerECAM.failCall("sts");
+ libraries.SystemDisplay.manCall("sts");
statusFlag = 0;
}
},
recall: func() {
+ me._noneActive = 1;
me._recallCounter = 0;
foreach (var w; warnings.vector) {
if (w.clearFlag == 1) {
@@ -303,9 +323,13 @@ var ECAM_controller = {
w.clearFlag = 0;
me._recallCounter += 1;
}
+
+ if (w.active == 1) {
+ me._noneActive = 0;
+ }
}
- if (me._recallCounter == 0) {
+ if (me._recallCounter == 0 and me._noneActive) {
FWC.Btn.recallStsNormal.setValue(1);
settimer(func() {
if (FWC.Btn.recallStsNormal.getValue() == 1) { # catch unexpected error, trying something new here
@@ -320,6 +344,9 @@ var ECAM_controller = {
warning.active = 0;
warning.noRepeat = 0;
warning.noRepeat2 = 0;
+ if (warning.aural == 2) {
+ aural[2].setValue(0);
+ }
},
};
diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas
index 96e88e48..0c27deff 100644
--- a/Nasal/ECAM/ECAM-logic.nas
+++ b/Nasal/ECAM/ECAM-logic.nas
@@ -6,12 +6,11 @@
var dualFailNode = props.globals.initNode("/ECAM/dual-failure-enabled", 0, "BOOL");
var phaseNode = props.globals.getNode("/ECAM/warning-phase", 1);
-var leftMsgNode = props.globals.getNode("/ECAM/left-msg", 1);
var apWarn = props.globals.getNode("/it-autoflight/output/ap-warning", 1);
var athrWarn = props.globals.getNode("/it-autoflight/output/athr-warning", 1);
var emerGen = props.globals.getNode("/controls/electrical/switches/emer-gen", 1);
-var fac1Node = props.globals.getNode("/controls/fctl/fac1", 1);
+var fac1Node = props.globals.getNode("/controls/fctl/switches/fac1", 1);
var state1Node = props.globals.getNode("/engines/engine[0]/state", 1);
var state2Node = props.globals.getNode("/engines/engine[1]/state", 1);
var wowNode = props.globals.getNode("/fdm/jsbsim/position/wow", 1);
@@ -22,6 +21,7 @@ var apu_bleedSw = props.globals.getNode("/controls/pneumatic/switches/bleedapu
var gear = props.globals.getNode("/gear/gear-pos-norm", 1);
var cutoff1 = props.globals.getNode("/controls/engines/engine[0]/cutoff-switch", 1);
var cutoff2 = props.globals.getNode("/controls/engines/engine[1]/cutoff-switch", 1);
+var stallVoice = props.globals.initNode("/sim/sound/warnings/stall-voice", 0, "BOOL");
var engOpt = props.globals.getNode("/options/eng", 1);
# local variables
@@ -29,11 +29,53 @@ var phaseVar = nil;
var dualFailFACActive = 1;
var emerConfigFACActive = 1;
var gear_agl_cur = nil;
-
var messages_priority_3 = func {
phaseVar = phaseNode.getValue();
- # FCTL
+ # Stall
+ # todo - altn law and emer cancel flipflops page 2440
+ if (phaseVar >= 5 and phaseVar <= 7 and (getprop("/fdm/jsbsim/fcs/slat-pos-deg") <= 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 15 or getprop("/systems/navigation/adr/output/aoa-2") > 15 or getprop("/systems/navigation/adr/output/aoa-3") > 15)) or (getprop("/fdm/jsbsim/fcs/slat-pos-deg") > 15 and (getprop("/systems/navigation/adr/output/aoa-1") > 23 or getprop("/systems/navigation/adr/output/aoa-2") > 23 or getprop("/systems/navigation/adr/output/aoa-3") > 23))) {
+ stall.active = 1;
+ } else {
+ ECAM_controller.warningReset(stall);
+ }
+
+ if (stall.active) {
+ stallVoice.setValue(1);
+ } else {
+ stallVoice.setValue(0);
+ }
+
+ if ((phaseVar == 1 or (phaseVar >= 5 and phaseVar <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) {
+ overspeed.active = 1;
+ if (getprop("/systems/navigation/adr/computation/overspeed-vmo") or getprop("/systems/navigation/adr/computation/overspeed-mmo")) {
+ overspeedVMO.active = 1;
+ } else {
+ ECAM_controller.warningReset(overspeedVMO);
+ }
+
+ if (getprop("/systems/navigation/adr/computation/overspeed-vle")) {
+ overspeedGear.active = 1;
+ } else {
+ ECAM_controller.warningReset(overspeedGear);
+ }
+
+ if (getprop("/systems/navigation/adr/computation/overspeed-vfe")) {
+ overspeedFlap.active = 1;
+ overspeedFlap.msg = "-VFE................" ~ (systems.ADIRSnew.overspeedVFE.getValue() - 4);
+ } else {
+ ECAM_controller.warningReset(overspeedFlap);
+ overspeedFlap.msg = "-VFE................XXX";
+ }
+ } else {
+ ECAM_controller.warningReset(overspeed);
+ ECAM_controller.warningReset(overspeedVMO);
+ ECAM_controller.warningReset(overspeedGear);
+ ECAM_controller.warningReset(overspeedFlap);
+ overspeedFlap.msg = "-VFE................XXX";
+ }
+
+ # FCTL FLAPS NOT ZERO
if ((flap_not_zero.clearFlag == 0) and phaseVar == 6 and getprop("/controls/flight/flap-lever") != 0 and getprop("/instrumentation/altimeter/indicated-altitude-ft") > 22000) {
flap_not_zero.active = 1;
} else {
@@ -930,7 +972,7 @@ var messages_priority_3 = func {
var messages_priority_2 = func {
phaseVar = phaseNode.getValue();
# DC EMER CONFIG
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcEmerconfig.clearFlag == 0) {
dcEmerconfig.active = 1;
dcEmerconfigManOn.active = 1;
} else {
@@ -938,7 +980,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcEmerconfigManOn);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and dcBus12Fault.clearFlag == 0) {
dcBus12Fault.active = 1;
dcBus12FaultBlower.active = 1;
dcBus12FaultExtract.active = 1;
@@ -954,7 +996,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus12FaultBrking);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBusEssFault.clearFlag == 0) {
AcBusEssFault.active = 1;
if (!systems.ELEC.Switch.acEssFeed.getBoolValue()) {
AcBusEssFaultFeed.active = 1;
@@ -968,7 +1010,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBusEssFaultAtc);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus1Fault.clearFlag == 0) {
AcBus1Fault.active = 1;
AcBus1FaultBlower.active = 1;
} else {
@@ -976,7 +1018,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBus1FaultBlower);
}
- if (!dcEmerconfig.active and systems.ELEC.Bus.dcEss.getValue() < 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!dcEmerconfig.active and systems.ELEC.Bus.dcEss.getValue() < 25 and phaseVar != 4 and phaseVar != 8 and DcEssBusFault.clearFlag == 0) {
DcEssBusFault.active = 1;
DcEssBusFaultRadio.active = 1;
DcEssBusFaultRadio2.active = 1;
@@ -990,7 +1032,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(DcEssBusFaultGPWS);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar != 4 and phaseVar != 8 and AcBus2Fault.clearFlag == 0) {
AcBus2Fault.active = 1;
AcBus2FaultExtract.active = 1;
} else {
@@ -998,7 +1040,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(AcBus2FaultExtract);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBus1Fault.clearFlag == 0) {
dcBus1Fault.active = 1;
dcBus1FaultBlower.active = 1;
dcBus1FaultExtract.active = 1;
@@ -1008,7 +1050,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus1FaultExtract);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar != 4 and phaseVar != 8 and dcBus2Fault.clearFlag == 0) {
dcBus2Fault.active = 1;
dcBus2FaultAirData.active = 1;
dcBus2FaultBaro.active = 1;
@@ -1018,13 +1060,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBus2FaultBaro);
}
- if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar != 4 and phaseVar != 5 and phaseVar != 7 and phaseVar != 8) {
+ if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar != 4 and phaseVar != 5 and phaseVar != 7 and phaseVar != 8 and dcBusBatFault.clearFlag == 0) {
dcBusBatFault.active = 1;
} else {
ECAM_controller.warningReset(dcBusBatFault);
}
- if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar != 4 and phaseVar != 8) {
+ if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar != 4 and phaseVar != 8 and dcBusEssShed.clearFlag == 0) {
dcBusEssShed.active = 1;
dcBusEssShedExtract.active = 1;
dcBusEssShedIcing.active = 1;
@@ -1034,7 +1076,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(dcBusEssShedIcing);
}
- if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar != 4 and phaseVar != 8) {
+ if (!(getprop("/systems/electrical/some-electric-thingie/emer-elec-config") and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar != 4 and phaseVar != 8 and acBusEssShed.clearFlag == 0) {
acBusEssShed.active = 1;
if (!getprop("/systems/electrical/some-electric-thingie/emer-elec-config")) {
acBusEssShedAtc.active = 1;
@@ -1046,7 +1088,13 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(acBusEssShedAtc);
}
- if (fcu.FCUController.FCU1.failed and fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and systems.ELEC.Bus.dcEss.getValue() >= 25) {
+ if (getprop("/instrumentation/tcas/serviceable") == 0 and phaseVar != 3 and phaseVar != 4 and phaseVar != 7 and systems.ELEC.Bus.ac1.getValue() and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 1 and tcasFault.clearFlag == 0) {
+ tcasFault.active = 1;
+ } else {
+ ECAM_controller.warningReset(tcasFault);
+ }
+
+ if (fcu.FCUController.FCU1.failed and fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and fcuFault.clearFlag == 0) {
fcuFault.active = 1;
fcuFaultBaro.active = 1;
} else {
@@ -1054,7 +1102,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(fcuFaultBaro);
}
- if (fcu.FCUController.FCU1.failed and !fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25) {
+ if (fcu.FCUController.FCU1.failed and !fcu.FCUController.FCU2.failed and systems.ELEC.Bus.dcEss.getValue() >= 25 and fcuFault1.clearFlag == 0) {
fcuFault1.active = 1;
fcuFault1Baro.active = 1;
} else {
@@ -1062,7 +1110,7 @@ var messages_priority_2 = func {
ECAM_controller.warningReset(fcuFault1Baro);
}
- if (fcu.FCUController.FCU2.failed and !fcu.FCUController.FCU1.failed and systems.ELEC.Bus.dc2.getValue() >= 25) {
+ if (fcu.FCUController.FCU2.failed and !fcu.FCUController.FCU1.failed and systems.ELEC.Bus.dc2.getValue() >= 25 and fcuFault2.clearFlag == 0) {
fcuFault2.active = 1;
fcuFault2Baro.active = 1;
} else {
@@ -1574,7 +1622,7 @@ var messages_right_memo = func {
}
# Listeners
-setlistener("/controls/fctl/fac1", func() {
+setlistener("/controls/fctl/switches/fac1", func() {
if (dualFail.active == 0 and emerconfig.active == 0) { return; }
if (fac1Node.getBoolValue() and dualFail.active == 1) {
diff --git a/Nasal/ECAM/ECAM-main.nas b/Nasal/ECAM/ECAM-main.nas
new file mode 100644
index 00000000..61334c2f
--- /dev/null
+++ b/Nasal/ECAM/ECAM-main.nas
@@ -0,0 +1,417 @@
+# A3XX ECAM
+# Joshua Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
+
+# Copyright (c) 2019 Joshua Davidson (Octal450) and Jonathan Redpath (legoboyvdlp)
+
+var ap_active = 0;
+var athr_active = 0;
+var phase = 0;
+var aileron = 0;
+var elevator = 0;
+var stateL = 0;
+var stateR = 0;
+var engModeSel = 0;
+var APUMaster = 0;
+var APURPM = 0;
+var elapsedSec = 0;
+var gearDown = 0;
+var agl = 0;
+var apOffTime = 0;
+var athrOffTime = 0;
+var apWarnNode = 0;
+var athrWarnNode = 0;
+var leftMsg = 0;
+var rightMsg = 0;
+var engStrtTimeSw = 0;
+var engStrtTime = 0;
+var page = 0;
+var apuLight = 0;
+var bleedLight = 0;
+var condLight = 0;
+var doorLight = 0;
+var elecLight = 0;
+var engLight = 0;
+var fctlLight = 0;
+var fuelLight = 0;
+var hydLight = 0;
+var pressLight = 0;
+var stsLight = 0;
+var wheelLight = 0;
+var clrLight = 0;
+
+var ECAM = {
+ _cachePage: "",
+ init: func() {
+ setprop("/systems/gear/landing-gear-warning-light", 0);
+ page = props.globals.initNode("/ECAM/Lower/page", "door", "STRING");
+ apuLight = props.globals.initNode("/ECAM/Lower/light/apu", 0, "BOOL");
+ bleedLight = props.globals.initNode("/ECAM/Lower/light/bleed", 0, "BOOL");
+ condLight = props.globals.initNode("/ECAM/Lower/light/cond", 0, "BOOL");
+ doorLight = props.globals.initNode("/ECAM/Lower/light/door", 0, "BOOL");
+ elecLight = props.globals.initNode("/ECAM/Lower/light/elec", 0, "BOOL");
+ engLight = props.globals.initNode("/ECAM/Lower/light/eng", 0, "BOOL");
+ fctlLight = props.globals.initNode("/ECAM/Lower/light/fctl", 0, "BOOL");
+ fuelLight = props.globals.initNode("/ECAM/Lower/light/fuel", 0, "BOOL");
+ hydLight = props.globals.initNode("/ECAM/Lower/light/hyd", 0, "BOOL");
+ pressLight = props.globals.initNode("/ECAM/Lower/light/press", 0, "BOOL");
+ stsLight = props.globals.initNode("/ECAM/Lower/light/sts", 0, "BOOL");
+ wheelLight = props.globals.initNode("/ECAM/Lower/light/wheel", 0, "BOOL");
+ clrLight = props.globals.initNode("/ECAM/Lower/light/clr", 0, "BOOL");
+
+ phase = props.globals.initNode("/ECAM/warning-phase", 0, "INT");
+ apOffTime = props.globals.initNode("/ECAM/ap-off-time", 0, "INT");
+ athrOffTime = props.globals.initNode("/ECAM/athr-off-time", 0, "INT");
+ leftMsg = props.globals.initNode("/ECAM/left-msg", "MSG", "STRING");
+ rightMsg = props.globals.initNode("/ECAM/right-msg", "MSG", "STRING");
+ engStrtTimeSw = props.globals.initNode("/ECAM/engine-start-time-switch", 0, "BOOL");
+ engStrtTime = props.globals.initNode("/ECAM/engine-start-time", 0.0, "DOUBLE");
+ apWarnNode = props.globals.initNode("/it-autoflight/output/ap-warning", 0, "INT");
+ athrWarnNode = props.globals.initNode("/it-autoflight/output/athr-warning", 0, "INT");
+ me.reset();
+ },
+ reset: func() {
+ setprop("/ECAM/msg/line1", "");
+ setprop("/ECAM/msg/line2", "");
+ setprop("/ECAM/msg/line3", "");
+ setprop("/ECAM/msg/line4", "");
+ setprop("/ECAM/msg/line5", "");
+ setprop("/ECAM/msg/line6", "");
+ setprop("/ECAM/msg/line7", "");
+ setprop("/ECAM/msg/line8", "");
+ setprop("/ECAM/msg/linec1", "w");
+ setprop("/ECAM/msg/linec2", "w");
+ setprop("/ECAM/msg/linec3", "w");
+ setprop("/ECAM/msg/linec4", "w");
+ setprop("/ECAM/msg/linec5", "w");
+ setprop("/ECAM/msg/linec6", "w");
+ setprop("/ECAM/msg/linec7", "w");
+ setprop("/ECAM/msg/linec8", "w");
+ setprop("/ECAM/rightmsg/line1", "");
+ setprop("/ECAM/rightmsg/line2", "");
+ setprop("/ECAM/rightmsg/line3", "");
+ setprop("/ECAM/rightmsg/line4", "");
+ setprop("/ECAM/rightmsg/line5", "");
+ setprop("/ECAM/rightmsg/line6", "");
+ setprop("/ECAM/rightmsg/line7", "");
+ setprop("/ECAM/rightmsg/line8", "");
+ setprop("/ECAM/rightmsg/linec1", "w");
+ setprop("/ECAM/rightmsg/linec2", "w");
+ setprop("/ECAM/rightmsg/linec3", "w");
+ setprop("/ECAM/rightmsg/linec4", "w");
+ setprop("/ECAM/rightmsg/linec5", "w");
+ setprop("/ECAM/rightmsg/linec6", "w");
+ setprop("/ECAM/rightmsg/linec7", "w");
+ setprop("/ECAM/rightmsg/linec8", "w");
+
+ page.setValue("door");
+ apuLight.setValue(0);
+ bleedLight.setValue(0);
+ condLight.setValue(0);
+ doorLight.setValue(0);
+ elecLight.setValue(0);
+ engLight.setValue(0);
+ fctlLight.setValue(0);
+ fuelLight.setValue(0);
+ hydLight.setValue(0);
+ pressLight.setValue(0);
+ stsLight.setValue(0);
+ wheelLight.setValue(0);
+ clrLight.setValue(0);
+ },
+ loop: func() {
+ stateL = pts.Engines.Engine1.state.getValue();
+ stateR = pts.Engines.Engine2.state.getValue();
+ wow = pts.Gear.wow[0].getValue();
+ elapsedTime = pts.Sim.Time.elapsedSec.getValue();
+
+ if (stateL != 3 or stateR != 3) {
+ if (engStrtTimeSw.getBoolValue()) {
+ engStrtTimeSw.setBoolValue(0);
+ engStrtTime.setValue(0);
+ }
+ } else if (stateL == 3 and stateR == 3 and wow == 1) {
+ if (!engStrtTimeSw.getBoolValue()) {
+ engStrtTime.setValue(elapsedTime);
+ engStrtTimeSw.setBoolValue(1);
+ }
+ } else if (wow == 1) {
+ if (engStrtTimeSw.getBoolValue()) {
+ engStrtTimeSw.setBoolValue(0);
+ }
+ }
+
+ # AP / ATHR warnings
+ if (ap_active == 1 and apWarnNode.getValue() == 0) {
+ ap_active = 0;
+ } elsif (ap_active == 1 and apWarnNode.getValue() == 1 and elapsedTime > (apOffTime.getValue() + 9)) {
+ ap_active = 0;
+ apWarnNode.setValue(0);
+ } elsif (ap_active == 0 and apWarnNode.getValue() != 0) {
+ ap_active = 1;
+ }
+
+ if (ap_active == 1 and apWarnNode.getValue() == 1 and elapsedTime > (apOffTime.getValue() + 3) and ecam.lights[0].getBoolValue()) {
+ ecam.lights[0].setBoolValue(0);
+ }
+
+ if (apWarnNode.getValue() == 2 and (fmgc.Output.ap1.getValue() == 1 or fmgc.Output.ap2.getValue() == 1)) {
+ apWarnNode.setValue(0);
+ }
+
+ if (athr_active == 1 and athrWarnNode.getValue() == 0) {
+ athr_active = 0;
+ } elsif (athr_active == 1 and athrWarnNode.getValue() == 1 and elapsedTime > (athrOffTime.getValue() + 9)) {
+ athr_active = 0;
+ athrWarnNode.setValue(0);
+ } elsif (athr_active == 0 and athrWarnNode.getValue() != 0) {
+ athr_active = 1;
+ }
+
+
+ if (athr_active == 1 and athrWarnNode.getValue() == 1 and elapsedTime > (athrOffTime.getValue() + 3) and ecam.lights[1].getBoolValue()) {
+ ecam.lights[1].setValue(0);
+ }
+
+ if (athrWarnNode.getValue() == 2 and fmgc.Output.athr.getValue() == 1) {
+ athrWarnNode.setValue(0);
+ }
+
+ SystemDisplay.update();
+
+ if (me._cachePage != SystemDisplay.page) {
+ me._cachePage = SystemDisplay.page;
+ page.setValue(SystemDisplay.page);
+ }
+ },
+ clrLight: func() {
+ clrLight.setValue(1);
+ }
+};
+
+var SystemDisplay = {
+ page: "",
+
+ manShownPage: 0,
+ failShownPage: 0,
+ APU10sec: 9,
+ eng10sec: 9,
+ fctl20sc: 9,
+ _apuTime: 0,
+ _engTime: 0,
+ _fctlTime: 0,
+
+ failCall: func(page) {
+ if (me.manShownPage) {
+ me.manShownPage = 0;
+ ECAMControlPanel.lightOff(me.page);
+ }
+ ECAMControlPanel.lightOn(page);
+ me.page = page;
+ me.failShownPage = 1;
+ },
+ manCall: func(page) {
+ ECAMControlPanel.lightOff(me.page);
+ ECAMControlPanel.lightOn(page);
+ me.page = page;
+ me.manShownPage = 1;
+ },
+ autoCall: func(page) {
+ if (me.manShownPage or me.failShownPage) { return; }
+ if (me.page != page) {
+ me.page = page;
+ }
+ },
+ update: func() {
+ phase = pts.ECAM.fwcWarningPhase.getValue();
+ APUMaster = pts.APU.masterSw.getValue();
+ APURPM = pts.APU.rpm.getValue();
+ engModeSel = pts.Controls.Engines.startSw.getValue();
+ elapsedSec = pts.Sim.Time.elapsedSec.getValue();
+
+ if (APUMaster == 1 and me.APU10sec != 1) {
+ me.autoCall("apu");
+ me.fctl20sec = 9;
+
+ if (me.APU10sec == 9 and APURPM >= 95.0) {
+ me.APU10sec = 0;
+ me._apuTime = elapsedSec;
+ }
+
+ if (me.APU10sec != 9 and elapsedSec > me._apuTime + 10) {
+ me.APU10sec = 1;
+ }
+ } elsif (engModeSel == 0 or engModeSel == 2 or (engModeSel == 1 and me.eng10sec == 0)) {
+ me.autoCall("eng");
+ me.fctl20sec = 9;
+
+ if (me.eng10sec == 9 and engModeSel == 1) {
+ me.eng10sec = 0;
+ me._engTime = elapsedSec;
+ }
+
+ if (me.eng10sec != 9 and elapsedSec > me._engTime + 10) {
+ me.eng10sec = 1;
+ }
+ } else {
+ # Reset variables
+ me.APU10sec = 9;
+ me.eng10sec = 9;
+
+ # Phase logic
+ if (phase == 1) {
+ me.autoCall("door");
+ me.fctl20sec = 9;
+ } elsif (phase == 2) {
+ aileron = pts.JSBSim.FBW.aileron.getValue();
+ elevator = pts.JSBSim.FBW.elevator.getValue();
+
+ if (abs(aileron) >= 0.15 or abs(elevator) >= 0.15 and me.fctl20sec == 9) {
+ me.autoCall("fctl");
+
+ if (me.fctl20sec == 9) {
+ me.fctl20sec = 0;
+ me._fctlTime = elapsedSec;
+ }
+
+ if (me.fctl20sec != 9 and elapsedSec > me._fctlTime + 20) {
+ me.fctl20sec = 1;
+ }
+ } elsif (me.fctl20sec == 0) {
+ if (me.fctl20sec != 9 and elapsedSec > me._fctlTime + 20) {
+ me.fctl20sec = 1;
+ }
+ } else {
+ me.autoCall("wheel");
+ me.fctl20sec = 9;
+ }
+ } elsif (phase >= 3 and phase <= 5) {
+ me.autoCall("eng");
+ me.fctl20sec = 9;
+ } elsif (phase == 6) {
+ gearLever = pts.Controls.Gear.gearDown.getValue();
+ agl = pts.Position.gearAglFt.getValue();
+
+ if (gearLever and agl <= 16000) {
+ me.autoCall("wheel");
+ } else {
+ me.autoCall("crz");
+ }
+ me.fctl20sec = 9;
+ } elsif (phase >= 7 and phase <= 9) {
+ me.autoCall("wheel");
+ me.fctl20sec = 9;
+ } elsif (phase == 10) {
+ me.autoCall("door");
+ me.fctl20sec = 9;
+ }
+ }
+ },
+};
+
+var ECAMControlPanel = {
+ sysPageBtn: func(page) {
+ if (SystemDisplay.page != page) {
+ SystemDisplay.manCall(page);
+ } else {
+ me.lightOff(SystemDisplay.page);
+ SystemDisplay.manShownPage = 0;
+ }
+ },
+ rclBtn: func() {
+ ecam.ECAM_controller.recall();
+ },
+ clrBtn: func() {
+ me.lightOff("clr");
+ if (athrWarnNode.getValue == 2) {
+ athrWarnNode.setValue(0);
+ return;
+ }
+ if (apWarnNode.getValue() == 2) {
+ apWarnNode.setValue(0);
+ return;
+ }
+
+ if (SystemDisplay.manShownPage) {
+ me.lightOff(SystemDisplay.page);
+ SystemDisplay.manShownPage = 0;
+ return;
+ }
+
+ if (SystemDisplay.failShownPage) {
+ me.lightOff(SystemDisplay.page);
+ SystemDisplay.failShownPage = 0;
+ return;
+ }
+
+ ecam.ECAM_controller.clear();
+ },
+ stsBtn: func() {
+ SystemDisplay.manCall("sts");
+ },
+ allBtn: func() {
+ # todo
+ },
+ toConfigBtn: func() {
+ # todo
+ },
+ emerCancBtn: func() {
+ # todo
+ },
+ lightOff: func(page) {
+ if (page == "clr") { clrLight.setBoolValue(0); }
+ elsif (page == "apu") { apuLight.setBoolValue(0); }
+ elsif (page == "bleed") { bleedLight.setBoolValue(0); }
+ elsif (page == "cond") { condLight.setBoolValue(0); }
+ elsif (page == "door") { doorLight.setBoolValue(0); }
+ elsif (page == "elec") { elecLight.setBoolValue(0); }
+ elsif (page == "eng") { engLight.setBoolValue(0); }
+ elsif (page == "fctl") { fctlLight.setBoolValue(0); }
+ elsif (page == "fuel") { fuelLight.setBoolValue(0); }
+ elsif (page == "hyd") { hydLight.setBoolValue(0); }
+ elsif (page == "press") { pressLight.setBoolValue(0); }
+ elsif (page == "sts") { stsLight.setBoolValue(0); }
+ elsif (page == "wheel") { wheelLight.setBoolValue(0); }
+ },
+ lightOn: func(page) {
+ if (page == "clr") { clrLight.setBoolValue(1); }
+ elsif (page == "apu") { apuLight.setBoolValue(1); }
+ elsif (page == "bleed") { bleedLight.setBoolValue(1); }
+ elsif (page == "cond") { condLight.setBoolValue(1); }
+ elsif (page == "door") { doorLight.setBoolValue(1); }
+ elsif (page == "elec") { elecLight.setBoolValue(1); }
+ elsif (page == "eng") { engLight.setBoolValue(1); }
+ elsif (page == "fctl") { fctlLight.setBoolValue(1); }
+ elsif (page == "fuel") { fuelLight.setBoolValue(1); }
+ elsif (page == "hyd") { hydLight.setBoolValue(1); }
+ elsif (page == "press") { pressLight.setBoolValue(1); }
+ elsif (page == "sts") { stsLight.setBoolValue(1); }
+ elsif (page == "wheel") { wheelLight.setBoolValue(1); }
+ },
+};
+
+# Autoflight Warnings
+var doAthrWarn = func(type) {
+ if (type == "none") {
+ return;
+ } elsif (type == "soft") {
+ athrOffTime.setValue(pts.Sim.Time.elapsedSec.getValue());
+ athrWarnNode.setValue(1);
+ } else {
+ ECAMControlPanel.lightOn("clr");
+ athrWarnNode.setValue(2);
+ }
+ ecam.lights[1].setBoolValue(1);
+}
+
+var doApWarn = func(type) {
+ if (type == "none") {
+ return;
+ } elsif (type == "soft") {
+ apOffTime.setValue(pts.Sim.Time.elapsedSec.getValue());
+ apWarnNode.setValue(1);
+ ecam.lights[0].setBoolValue(1);
+ } else {
+ apWarnNode.setValue(2);
+ # master warning handled by warning system in this case
+ }
+}
\ No newline at end of file
diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas
index 54832420..b4e74496 100644
--- a/Nasal/ECAM/ECAM-messages.nas
+++ b/Nasal/ECAM/ECAM-messages.nas
@@ -10,8 +10,14 @@
# Left E/WD
var warnings = std.Vector.new([
+ var stall = warning.new(msg: "", aural: 2),
var flap_not_zero = warning.new(msg: "F/CTL FLAP LVR NOT ZERO", colour: "r", aural: 0, light: 0),
+ var overspeed = warning.new(msg: "OVER SPEED", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
+ var overspeedVMO = warning.new(msg: "-VMO/MMO.......350 /.82", colour: "r"),
+ var overspeedGear = warning.new(msg: "-VLE...........280 /.67", colour: "r"),
+ var overspeedFlap = warning.new(msg: "-VFE................XXX", colour: "r"),
+
# DUAL ENG FAIL
var dualFail = warning.new(msg: "ENG DUAL FAILURE", colour: "r", aural: 0, light: 0, hasSubmsg: 1),
var dualFailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"),
@@ -118,11 +124,11 @@ var warnings = std.Vector.new([
# Autopilot
var ap_offw = warning.new(msg: "AUTO FLT AP OFF", colour: "r", light: 0),
- var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1),
+ var athr_offw = warning.new(msg: "AUTO FLT A/THR OFF", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_offw_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
- var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1),
+ var athr_lock = warning.new(msg: "ENG THRUST LOCKED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_lock_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
- var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1),
+ var athr_lim = warning.new(msg: "AUTO FLT A/THR LIMITED", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var athr_lim_1 = warning.new(msg: "-THR LEVERS........MOVE", colour: "c"),
# Cargo smoke
@@ -215,6 +221,9 @@ var warnings = std.Vector.new([
var acBusEssShed = warning.new(msg: "ELEC DC ESS BUS SHED", colour: "a", aural: 1, light: 1),
var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"),
+ # TCAS FAULT
+ var tcasFault = warning.new(msg: "NAV TCAS FAULT", colour: "a", aural: 1, light: 1),
+
# FCU fault
var fcuFault = warning.new(msg: "AUTO FLT FCU 1+2 FAULT", colour: "a", aural: 1, light: 1, hasSubmsg: 1),
var fcuFaultBaro = warning.new(msg: " -PFD BARO REF: STD ONLY", colour: "c"),
@@ -239,7 +248,6 @@ var warnings = std.Vector.new([
var apuLoopBFault = warning.new(msg: "APU FIRE LOOP B FAULT", colour: "a"),
var crgFwdFireDetFault = warning.new(msg: "FWD CRG DET FAULT", colour: "a"),
var crgAftFireDetFault = warning.new(msg: "AFT CRG DET FAULT", colour: "a"),
-
# Recall
var recallNormal = warning.new(msg: " ", colour: "g", hasSubmsg: 1),
var recallNormal1 = warning.new(msg: " ", colour: "g", hasSubmsg: 1),
diff --git a/Nasal/Effects/effects.nas b/Nasal/Effects/effects.nas
new file mode 100644
index 00000000..977b2a79
--- /dev/null
+++ b/Nasal/Effects/effects.nas
@@ -0,0 +1,4 @@
+#============================ Tyre Smoke ===================================
+aircraft.tyresmoke_system.new(0, 1, 2);
+
+aircraft.rain.init();
diff --git a/Nasal/light-manager.nas b/Nasal/Effects/light-manager.nas
similarity index 99%
rename from Nasal/light-manager.nas
rename to Nasal/Effects/light-manager.nas
index d1053964..5d041169 100644
--- a/Nasal/light-manager.nas
+++ b/Nasal/Effects/light-manager.nas
@@ -405,9 +405,4 @@ var light_manager = {
setprop("/sim/rendering/als-secondary-lights/lightspot/lightspot-b[4]", 0.0);
me.light5_is_on = 0;
},
-};
-
-light_manager.init();
-
-
-
+};
\ No newline at end of file
diff --git a/Nasal/FBW/it-fbw.nas b/Nasal/FBW/it-fbw.nas
new file mode 100644
index 00000000..4ea77502
--- /dev/null
+++ b/Nasal/FBW/it-fbw.nas
@@ -0,0 +1,381 @@
+# Airbus A3XX FBW/Flight Control Computer System
+# Joshua Davidson (Octal450)
+
+# Copyright (c) 2019 Joshua Davidson (Octal450)
+
+# If All ELACs Fail, Alternate Law
+
+var mmoIAS = 0;
+
+var elac1_sw = 0;
+var elac2_sw = 0;
+var sec1_sw = 0;
+var sec2_sw = 0;
+var sec3_sw = 0;
+var fac1_sw = 0;
+var fac2_sw = 0;
+
+var elac1_fail = 0;
+var elac2_fail = 0;
+var sec1_fail = 0;
+var sec2_fail = 0;
+var sec3_fail = 0;
+var fac1_fail = 0;
+var fac2_fail = 0;
+
+var ac_ess = 0;
+var dc_ess = 0;
+var dc_ess_shed = 0;
+var ac1 = 0;
+var ac2 = 0;
+var dc1 = 0;
+var dc2 = 0;
+var dcHot1 = 0;
+var dcHot2 = 0;
+var blue = 0;
+var green = 0;
+var yellow = 0;
+var ail = 0;
+var roll = 0;
+var rollback = 0;
+var battery1_sw = 0;
+var battery2_sw = 0;
+
+var law = 0;
+
+var FBW = {
+ degradeLaw: props.globals.getNode("/it-fbw/degrade-law"),
+ activeLaw: props.globals.getNode("/it-fbw/law"),
+ override: props.globals.getNode("/it-fbw/override"),
+ rollBack: props.globals.getNode("/it-fbw/roll-back"),
+ rollLim: props.globals.getNode("/it-fbw/roll-lim"),
+ Computers: {
+ elac1: props.globals.getNode("/systems/fctl/elac1"),
+ elac2: props.globals.getNode("/systems/fctl/elac2"),
+ sec1: props.globals.getNode("/systems/fctl/sec1"),
+ sec2: props.globals.getNode("/systems/fctl/sec2"),
+ sec3: props.globals.getNode("/systems/fctl/sec3"),
+ fac1: props.globals.getNode("/systems/fctl/fac1"),
+ fac2: props.globals.getNode("/systems/fctl/fac2"),
+ },
+ Failures: {
+ elac1: props.globals.getNode("/systems/failures/fctl/elac1"),
+ elac2: props.globals.getNode("/systems/failures/fctl/elac2"),
+ sec1: props.globals.getNode("/systems/failures/fctl/sec1"),
+ sec2: props.globals.getNode("/systems/failures/fctl/sec2"),
+ sec3: props.globals.getNode("/systems/failures/fctl/sec3"),
+ fac1: props.globals.getNode("/systems/failures/fctl/fac1"),
+ fac2: props.globals.getNode("/systems/failures/fctl/fac2"),
+ },
+ Lights: {
+ elac1: props.globals.getNode("/controls/fctl/lights/elac1-fault"),
+ elac2: props.globals.getNode("/controls/fctl/lights/elac2-fault"),
+ sec1: props.globals.getNode("/controls/fctl/lights/sec1-fault"),
+ sec2: props.globals.getNode("/controls/fctl/lights/sec2-fault"),
+ sec2: props.globals.getNode("/controls/fctl/lights/sec3-fault"),
+ fac1: props.globals.getNode("/controls/fctl/lights/fac1-fault"),
+ fac2: props.globals.getNode("/controls/fctl/lights/fac2-fault"),
+ },
+ Protections: {
+ overspeedRoll: props.globals.getNode("/it-fbw/protections/overspeed-roll-back"),
+ },
+ Switches: {
+ elac1Sw: props.globals.getNode("/controls/fctl/switches/elac1"),
+ elac2Sw: props.globals.getNode("/controls/fctl/switches/elac2"),
+ sec1Sw: props.globals.getNode("/controls/fctl/switches/sec1"),
+ sec2Sw: props.globals.getNode("/controls/fctl/switches/sec2"),
+ sec3Sw: props.globals.getNode("/controls/fctl/switches/sec3"),
+ fac1Sw: props.globals.getNode("/controls/fctl/switches/fac1"),
+ fac2Sw: props.globals.getNode("/controls/fctl/switches/fac2"),
+ },
+ init: func() {
+ if (updatet.isRunning) {
+ updatet.stop();
+ }
+ if (fbwt.isRunning) {
+ fbwt.stop();
+ }
+
+ me.resetFail();
+
+ me.Switches.elac1Sw.setBoolValue(1);
+ me.Switches.elac2Sw.setBoolValue(1);
+ me.Switches.sec1Sw.setBoolValue(1);
+ me.Switches.sec2Sw.setBoolValue(1);
+ me.Switches.sec3Sw.setBoolValue(1);
+ me.Switches.fac1Sw.setBoolValue(1);
+ me.Switches.fac2Sw.setBoolValue(1);
+ me.Computers.elac1.setBoolValue(0);
+ me.Computers.elac2.setBoolValue(0);
+ me.Computers.sec1.setBoolValue(0);
+ me.Computers.sec2.setBoolValue(0);
+ me.Computers.sec3.setBoolValue(0);
+ me.Computers.fac1.setBoolValue(0);
+ me.Computers.fac2.setBoolValue(0);
+ me.degradeLaw.setValue(0);
+ me.activeLaw.setValue(0);
+ me.override.setValue(0);
+
+ if (!updatet.isRunning) {
+ updatet.start();
+ }
+ if (!fbwt.isRunning) {
+ fbwt.start();
+ }
+ },
+ resetFail: func() {
+ me.Failures.elac1.setBoolValue(0);
+ me.Failures.elac2.setBoolValue(0);
+ me.Failures.sec1.setBoolValue(0);
+ me.Failures.sec2.setBoolValue(0);
+ me.Failures.sec3.setBoolValue(0);
+ me.Failures.fac1.setBoolValue(0);
+ me.Failures.fac2.setBoolValue(0);
+ },
+};
+
+var update_loop = func {
+ elac1_sw = FBW.Switches.elac1Sw.getValue();
+ elac2_sw = FBW.Switches.elac2Sw.getValue();
+ sec1_sw = FBW.Switches.sec1Sw.getValue();
+ sec2_sw = FBW.Switches.sec2Sw.getValue();
+ sec3_sw = FBW.Switches.sec3Sw.getValue();
+ fac1_sw = FBW.Switches.fac1Sw.getValue();
+ fac2_sw = FBW.Switches.fac2Sw.getValue();
+
+ elac1_fail = FBW.Failures.elac1.getValue();
+ elac2_fail = FBW.Failures.elac2.getValue();
+ sec1_fail = FBW.Failures.sec1.getValue();
+ sec2_fail = FBW.Failures.sec2.getValue();
+ sec3_fail = FBW.Failures.sec3.getValue();
+ fac1_fail = FBW.Failures.fac1.getValue();
+ fac2_fail = FBW.Failures.fac2.getValue();
+
+ ac_ess = systems.ELEC.Bus.acEss.getValue();
+ dc_ess = systems.ELEC.Bus.dcEss.getValue();
+ dc_ess_shed = systems.ELEC.Bus.dcEssShed.getValue();
+ ac1 = systems.ELEC.Bus.ac1.getValue();
+ ac2 = systems.ELEC.Bus.ac2.getValue();
+ dc1 = systems.ELEC.Bus.dc1.getValue();
+ dc2 = systems.ELEC.Bus.dc2.getValue();
+ dcHot1 = systems.ELEC.Bus.dcHot1.getValue();
+ dcHot2 = systems.ELEC.Bus.dcHot2.getValue();
+ battery1_sw = systems.ELEC.Switch.bat1.getValue();
+ battery2_sw = systems.ELEC.Switch.bat2.getValue();
+
+ if (elac1_sw and !elac1_fail and (dc_ess >= 25 or dcHot1 >= 25)) {
+ FBW.Computers.elac1.setValue(1);
+ FBW.Lights.elac1.setValue(0);
+ } else if (elac1_sw and (elac1_fail or (dc_ess < 25 and dcHot1 < 25))) {
+ FBW.Computers.elac1.setValue(0);
+ FBW.Lights.elac1.setValue(1);
+ }
+
+ if (elac2_sw and !elac2_fail and (dc2 >= 25 or dcHot2 >= 25)) {
+ FBW.Computers.elac2.setValue(1);
+ FBW.Lights.elac2.setValue(0);
+ } else if (elac1_sw and (elac2_fail or (dc2 < 25 and dcHot2 < 25))) {
+ FBW.Computers.elac2.setValue(0);
+ FBW.Lights.elac2.setValue(1);
+ }
+
+ if (sec1_sw and !sec1_fail and ac_ess >= 110) {
+ setprop("/systems/fctl/sec1", 1);
+ setprop("/systems/failures/spoiler-l3", 0);
+ setprop("/systems/failures/spoiler-r3", 0);
+ setprop("/systems/failures/spoiler-l4", 0);
+ setprop("/systems/failures/spoiler-r4", 0);
+ } else {
+ setprop("/systems/fctl/sec1", 0);
+ setprop("/systems/failures/spoiler-l3", 1);
+ setprop("/systems/failures/spoiler-r3", 1);
+ setprop("/systems/failures/spoiler-l4", 1);
+ setprop("/systems/failures/spoiler-r4", 1);
+ }
+
+ if (sec2_sw and !sec2_fail and ac_ess >= 110) {
+ setprop("/systems/fctl/sec2", 1);
+ setprop("/systems/failures/spoiler-l5", 0);
+ setprop("/systems/failures/spoiler-r5", 0);
+ } else {
+ setprop("/systems/fctl/sec2", 0);
+ setprop("/systems/failures/spoiler-l5", 1);
+ setprop("/systems/failures/spoiler-r5", 1);
+ }
+
+ if (sec3_sw and !sec3_fail and ac_ess >= 110) {
+ setprop("/systems/fctl/sec3", 1);
+ setprop("/systems/failures/spoiler-l1", 0);
+ setprop("/systems/failures/spoiler-r1", 0);
+ setprop("/systems/failures/spoiler-l2", 0);
+ setprop("/systems/failures/spoiler-r2", 0);
+ } else {
+ setprop("/systems/fctl/sec3", 0);
+ setprop("/systems/failures/spoiler-l1", 1);
+ setprop("/systems/failures/spoiler-r1", 1);
+ setprop("/systems/failures/spoiler-l2", 1);
+ setprop("/systems/failures/spoiler-r2", 1);
+ }
+
+ if (fac1_sw and !fac1_fail and (ac_ess >= 110 or dc_ess_shed >= 25)) {
+ setprop("/systems/fctl/fac1", 1);
+ setprop("/systems/failures/rudder", 0);
+ setprop("/systems/failures/fac1-fault", 0);
+ } else if (fac1_sw and (battery1_sw or battery2_sw) and (fac1_fail or ac_ess < 110 or dc_ess_shed < 25)) {
+ setprop("/systems/failures/fac1-fault", 1);
+ setprop("/systems/fctl/fac1", 0);
+ if (!fac2_sw or fac2_fail) {
+ setprop("/systems/failures/rudder", 1);
+ }
+ } else {
+ setprop("/systems/failures/fac1-fault", 0);
+ setprop("/systems/fctl/fac1", 0);
+ if (!fac2_sw or fac2_fail) {
+ setprop("/systems/failures/rudder", 1);
+ }
+ }
+
+ if (fac2_sw and !fac2_fail and (ac2 >= 110 or dc2 >= 25)) {
+ setprop("/systems/fctl/fac2", 1);
+ setprop("/systems/failures/fac2-fault", 0);
+ } else if (fac2_sw and (fac2_fail or ac2 < 110 or dc2 < 25)) {
+ setprop("/systems/failures/fac2-fault", 1);
+ setprop("/systems/fctl/fac2", 0);
+ if (!fac1_sw or fac1_fail) {
+ setprop("/systems/failures/rudder", 1);
+ }
+ } else {
+ setprop("/systems/fctl/fac2", 0);
+ setprop("/systems/failures/fac2-fault", 0);
+ if (!fac1_sw or fac1_fail) {
+ setprop("/systems/failures/rudder", 1);
+ }
+ }
+
+ var elac1 = getprop("/systems/fctl/elac1");
+ var elac2 = getprop("/systems/fctl/elac2");
+ var sec1 = getprop("/systems/fctl/sec1");
+ var sec2 = getprop("/systems/fctl/sec2");
+ var sec3 = getprop("/systems/fctl/sec3");
+ var fac1 = getprop("/systems/fctl/fac1");
+ var fac2 = getprop("/systems/fctl/fac2");
+ law = FBW.activeLaw.getValue();
+
+ # Degrade logic, all failures which degrade FBW need to go here. -JD
+ blue = systems.HYD.Psi.blue.getValue();
+ green = systems.HYD.Psi.green.getValue();
+ yellow = systems.HYD.Psi.yellow.getValue();
+ if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
+ if (!elac1 and !elac2) {
+ if (law == 0) {
+ FBW.degradeLaw.setValue(1);
+ }
+ }
+ if (ac_ess >= 110 and blue >= 1500 and green < 1500 and yellow < 1500) {
+ if (law == 0 or law == 1) {
+ FBW.degradeLaw.setValue(2);
+ }
+ }
+ if (ac_ess < 110 or (blue < 1500 and green < 1500 and yellow < 1500)) {
+ FBW.degradeLaw.setValue(3);
+ }
+ }
+
+ if (getprop("/controls/gear/gear-down") == 1 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
+ if (law == 1) {
+ FBW.degradeLaw.setValue(2);
+ }
+ }
+
+ # degrade loop runs faster; reset this variable
+ law = FBW.activeLaw.getValue();
+
+ # Mech Backup can always return to direct, if it can.
+ if (law == 3 and ac_ess >= 110 and (green >= 1500 or blue >= 1500 or yellow >= 1500)) {
+ FBW.degradeLaw.setValue(2);
+ }
+
+ mmoIAS = (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("/instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
+ if (mmoIAS < 350) {
+ setprop("/it-fbw/speeds/vmo-mmo", mmoIAS);
+ } else {
+ setprop("/it-fbw/speeds/vmo-mmo", 350);
+ }
+
+ if (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") > getprop("/it-fbw/speeds/vmo-mmo") + 6 and (law == 0 or law == 1)) {
+ if (getprop("/it-autoflight/input/ap1") == 1 or getprop("/it-autoflight/input/ap2") == 1) {
+ fcu.apOff("hard", 0);
+ }
+ if (getprop("/it-fbw/protections/overspeed") != 1) {
+ setprop("/it-fbw/protections/overspeed", 1);
+ }
+ } else {
+ if (getprop("/it-fbw/protections/overspeed") != 0) {
+ setprop("/it-fbw/protections/overspeed", 0);
+ }
+ }
+}
+
+var fbw_loop = func {
+ ail = pts.Controls.Flight.aileron.getValue();
+ roll = pts.Orientation.roll.getValue();
+ rollback = FBW.rollBack.getValue();
+
+ if (ail > 0.4 and roll >= -33.5) {
+ FBW.rollLim.setValue("67");
+ if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
+ FBW.rollBack.setValue(0);
+ } elsif (rollback == 0 and (roll > 33.5 or roll < -33.5)) {
+ FBW.rollBack.setValue(1);
+ }
+ } else if (ail < -0.4 and roll <= 33.5) {
+ FBW.rollLim.setValue("67");
+ if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
+ FBW.rollBack.setValue(0);
+ } elsif (rollback == 0 and (roll > 33.5 or roll < -33.5)) {
+ FBW.rollBack.setValue(1);
+ }
+ } else if (ail < 0.04 and ail > -0.04) {
+ FBW.rollLim.setValue("33");
+ if (rollback == 1 and roll <= 33.5 and roll >= -33.5) {
+ FBW.rollBack.setValue(0);
+ }
+ }
+
+ if (ail > 0.04 or ail < -0.04) {
+ FBW.Protections.overspeedRoll.setValue(0);
+ } else if (ail < 0.04 and ail > -0.04) {
+ FBW.Protections.overspeedRoll.setValue(1);
+ }
+
+ if (getprop("/it-fbw/override") == 0) {
+ var active = FBW.activeLaw.getValue();
+ var degrade = FBW.degradeLaw.getValue();
+ if (degrade == 0) {
+ if (active != 0) {
+ FBW.activeLaw.setValue(0);
+ }
+ } else if (degrade == 1) {
+ if (active != 1) {
+ FBW.activeLaw.setValue(1);
+ }
+ } else if (degrade == 2) {
+ if (active != 2) {
+ FBW.activeLaw.setValue(2);
+ }
+ } else if (degrade == 3) {
+ if (active != 3) {
+ FBW.activeLaw.setValue(3);
+ }
+ }
+ }
+
+ if (FBW.activeLaw.getValue() != 0) {
+ if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
+ fcu.apOff("hard", 0);
+ }
+ }
+}
+
+var updatet = maketimer(0.1, update_loop);
+var fbwt = maketimer(0.03, fbw_loop);
diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas
index dbda3922..03eee6f2 100644
--- a/Nasal/FMGC/FCU.nas
+++ b/Nasal/FMGC/FCU.nas
@@ -58,6 +58,7 @@ var FCU = {
var FCUController = {
FCU1: nil,
FCU2: nil,
+ activeFMGC: props.globals.getNode("/FMGC/active-fmgc-channel"),
FCUworking: 0,
_init: 0,
init: func() {
@@ -77,7 +78,19 @@ var FCUController = {
} else {
me.FCUworking = 0;
}
+
+ notification = nil;
+ foreach (var update_item; me.update_items) {
+ update_item.update(notification);
+ }
},
+ update_items: [
+ props.UpdateManager.FromPropertyHashList(["/it-autoflight/output/fd1","/it-autoflight/output/fd2", "/it-autoflight/output/ap1", "/it-autoflight/output/ap2"], 1, func(notification)
+ {
+ updateActiveFMGC();
+ }
+ ),
+ ],
resetFail: func() {
if (me._init == 0) { return; }
me.FCU1.restore();
@@ -103,7 +116,7 @@ var FCUController = {
},
ATHR: func() {
if (me.FCUworking) {
- if (!athr.getBoolValue()) {
+ if (!athr.getBoolValue() and !pts.FMGC.CasCompare.rejectAll.getBoolValue()) {
athrInput.setValue(1);
} else {
athrOff("hard");
@@ -441,6 +454,21 @@ var FCUController = {
},
};
+# Master / slave principle of operation depending on the autopilot / flight director engagement
+var updateActiveFMGC = func {
+ if (ap1.getBoolValue()) {
+ FCUController.activeFMGC.setValue(1);
+ } elsif (ap2.getBoolValue()) {
+ FCUController.activeFMGC.setValue(2);
+ } elsif (fd1.getBoolValue()) {
+ FCUController.activeFMGC.setValue(1);
+ } elsif (fd2.getBoolValue()) {
+ FCUController.activeFMGC.setValue(2);
+ } else {
+ FCUController.activeFMGC.setValue(1);
+ }
+}
+
# Autopilot Disconnection
var apOff = func(type, side) {
if (side == 0) {
diff --git a/Nasal/FMGC-b.nas b/Nasal/FMGC/FMGC-b.nas
similarity index 100%
rename from Nasal/FMGC-b.nas
rename to Nasal/FMGC/FMGC-b.nas
diff --git a/Nasal/FMGC-c.nas b/Nasal/FMGC/FMGC-c.nas
similarity index 100%
rename from Nasal/FMGC-c.nas
rename to Nasal/FMGC/FMGC-c.nas
diff --git a/Nasal/FMGC.nas b/Nasal/FMGC/FMGC.nas
similarity index 98%
rename from Nasal/FMGC.nas
rename to Nasal/FMGC/FMGC.nas
index 147478d6..8b983ef8 100644
--- a/Nasal/FMGC.nas
+++ b/Nasal/FMGC/FMGC.nas
@@ -264,24 +264,24 @@ var masterFMGC = maketimer(0.2, func {
reset_FMGC();
}
+ if (getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") != 1024) {
+ setprop("/FMGC/internal/maxspeed", getprop("/systems/navigation/adr/computation/overspeed-vfe-spd") - 4);
+ } else {
+ setprop("/FMGC/internal/maxspeed", getprop("/it-fbw/speeds/vmo-mmo"));
+ }
+
flap = getprop("/controls/flight/flap-pos");
if (flap == 0) { # 0
- setprop("/FMGC/internal/maxspeed", getprop("/it-fbw/speeds/vmo-mmo"));
setprop("/FMGC/internal/minspeed", 202);
} else if (flap == 1) { # 1
- setprop("/FMGC/internal/maxspeed", 230);
setprop("/FMGC/internal/minspeed", 184);
} else if (flap == 2) { # 1+F
- setprop("/FMGC/internal/maxspeed", 215);
setprop("/FMGC/internal/minspeed", 171);
} else if (flap == 3) { # 2
- setprop("/FMGC/internal/maxspeed", 200);
setprop("/FMGC/internal/minspeed", 156);
} else if (flap == 4) { # 3
- setprop("/FMGC/internal/maxspeed", 185);
setprop("/FMGC/internal/minspeed", 147);
} else if (flap == 5) { # FULL
- setprop("/FMGC/internal/maxspeed", 177);
setprop("/FMGC/internal/minspeed", 131);
}
diff --git a/Nasal/acp.nas b/Nasal/Panels/acp.nas
similarity index 100%
rename from Nasal/acp.nas
rename to Nasal/Panels/acp.nas
diff --git a/Nasal/atc.nas b/Nasal/Panels/atc.nas
similarity index 90%
rename from Nasal/atc.nas
rename to Nasal/Panels/atc.nas
index d6c205e4..167e568f 100644
--- a/Nasal/atc.nas
+++ b/Nasal/Panels/atc.nas
@@ -9,6 +9,9 @@ var guiModes = ['OFF', 'STANDBY', 'TEST', 'GROUND', 'ON', 'ALTITUDE'];
var guiNode = props.globals.getNode("/sim/gui/dialogs/radios/transponder-mode", 1);
var forLoopFlag = 0;
+var altimeter = props.globals.initNode("/instrumentation/transponder/altimeter-input-src", 0, "INT");
+var airspeed = props.globals.initNode("/instrumentation/transponder/airspeed-input-src", 0, "INT");
+
var Transponder = {
mode: 0,
code: "2000",
@@ -97,6 +100,8 @@ var Transponder = {
return;
}
me.activeADIRS = newADIRS;
+ altimeter.setValue(newADIRS);
+ airspeed.setValue(newADIRS);
},
modeSwitch: func(newMode) {
me.mode = newMode;
@@ -196,6 +201,8 @@ var transponderPanel = {
# update newly selected transponder
Transponders.vector[me.atcSel - 1].modeSwitch(me.modeSel);
me.atcFailLight(Transponders.vector[me.atcSel - 1].failed);
+
+ me.updateAirData();
},
modeSwitch: func(newMode) {
if (newMode < 0 or newMode > 5) {
@@ -223,11 +230,27 @@ var transponderPanel = {
me.codeDisp = me.code;
me.codeProp.setValue(sprintf("%s", me.codeDisp));
Transponders.vector[me.atcSel - 1].setCode(me.code);
- }
+ },
+ updateAirData: func() {
+ if (me.atcSel == 1) {
+ if (systems.SwitchingPanel.Switches.airData.getValue() == -1) {
+ Transponders.vector[0].switchADIRS(3);
+ } else {
+ Transponders.vector[0].switchADIRS(1);
+ }
+ } else {
+ if (systems.SwitchingPanel.Switches.airData.getValue() == 1) {
+ Transponders.vector[1].switchADIRS(3);
+ } else {
+ Transponders.vector[1].switchADIRS(2);
+ }
+ }
+ },
};
var init = func() {
transponderPanel.atcSwitch(1);
+ transponderPanel.updateAirData();
transponderTimer.start();
}
diff --git a/Nasal/rmp.nas b/Nasal/Panels/rmp.nas
similarity index 100%
rename from Nasal/rmp.nas
rename to Nasal/Panels/rmp.nas
diff --git a/Nasal/a320livery-cfm-100.nas b/Nasal/Sim/a320livery-cfm-100.nas
similarity index 100%
rename from Nasal/a320livery-cfm-100.nas
rename to Nasal/Sim/a320livery-cfm-100.nas
diff --git a/Nasal/a320livery-cfm.nas b/Nasal/Sim/a320livery-cfm.nas
similarity index 100%
rename from Nasal/a320livery-cfm.nas
rename to Nasal/Sim/a320livery-cfm.nas
diff --git a/Nasal/a320livery-iae.nas b/Nasal/Sim/a320livery-iae.nas
similarity index 100%
rename from Nasal/a320livery-iae.nas
rename to Nasal/Sim/a320livery-iae.nas
diff --git a/Nasal/a320livery-neocfm.nas b/Nasal/Sim/a320livery-neocfm.nas
similarity index 100%
rename from Nasal/a320livery-neocfm.nas
rename to Nasal/Sim/a320livery-neocfm.nas
diff --git a/Nasal/a320livery-neopw.nas b/Nasal/Sim/a320livery-neopw.nas
similarity index 100%
rename from Nasal/a320livery-neopw.nas
rename to Nasal/Sim/a320livery-neopw.nas
diff --git a/Nasal/buttons.nas b/Nasal/Sim/buttons.nas
similarity index 100%
rename from Nasal/buttons.nas
rename to Nasal/Sim/buttons.nas
diff --git a/Nasal/libraries.nas b/Nasal/Sim/libraries.nas
similarity index 99%
rename from Nasal/libraries.nas
rename to Nasal/Sim/libraries.nas
index faf62428..677bd04b 100644
--- a/Nasal/libraries.nas
+++ b/Nasal/Sim/libraries.nas
@@ -194,12 +194,14 @@ var triggerDoor = func(door, doorName, doorDesc) {
#######################
var systemsInit = func {
- fbw.fctlInit();
+ fbw.FBW.init();
+ light_manager.init();
systems.ELEC.init();
systems.PNEU.init();
systems.HYD.init();
systems.FUEL.init();
systems.ADIRS.init();
+ systems.ADIRSnew.init();
systems.eng_init();
systems.fire_init();
systems.autobrake_init();
@@ -219,6 +221,7 @@ var systemsInit = func {
ecam.ECAM_controller.init();
atc.init();
fcu.FCUController.init();
+ dmc.DMController.init();
}
setlistener("/sim/signals/fdm-initialized", func {
@@ -231,11 +234,13 @@ var systemsLoop = maketimer(0.1, func {
systems.HYD.loop();
systems.FUEL.loop();
systems.ADIRS.loop();
+ systems.ADIRSnew.loop();
libraries.ECAM.loop();
libraries.BUTTONS.update();
fadec.FADEC.loop();
rmp.rmpUpdate();
fcu.FCUController.loop();
+ dmc.DMController.loop();
if ((getprop("/controls/pneumatic/switches/groundair") or getprop("/controls/electrical/ground-cart")) and ((getprop("/velocities/groundspeed-kt") > 2) or (getprop("/controls/gear/brake-parking") == 0 and getprop("/services/chocks/nose") == 0 and getprop("/services/chocks/left") == 0 and getprop("/services/chocks/right") == 0))) {
setprop("/controls/electrical/ground-cart", 0);
diff --git a/Nasal/property-tree-setup.nas b/Nasal/Sim/property-tree-setup.nas
similarity index 69%
rename from Nasal/property-tree-setup.nas
rename to Nasal/Sim/property-tree-setup.nas
index 008c472d..99e2a9e3 100644
--- a/Nasal/property-tree-setup.nas
+++ b/Nasal/Sim/property-tree-setup.nas
@@ -5,6 +5,11 @@
# Anything that says Temp is set by another file to avoid multiple getValue calls
# Usage Example: pts.Class.SubClass.node.getValue()
+var APU = {
+ masterSw: props.globals.getNode("/controls/APU/master"),
+ rpm: props.globals.getNode("/systems/apu/rpm"),
+};
+
var Consumables = {
Fuel: {
totalFuelLbs: props.globals.getNode("/consumables/fuel/total-fuel-lbs"),
@@ -13,6 +18,7 @@ var Consumables = {
var Controls = {
Engines: {
+ startSw: props.globals.getNode("/controls/engines/engine-start-switch"),
Engine1: {
cutoffSw: props.globals.getNode("/controls/engines/engine[0]/cutoff-switch"),
firePb: props.globals.getNode("/controls/engines/engine[0]/fire-btn"),
@@ -24,6 +30,12 @@ var Controls = {
throttle: props.globals.getNode("/controls/engines/engine[1]/throttle"),
},
},
+ Flight: {
+ aileron: props.globals.getNode("/controls/flight/aileron"),
+ },
+ Gear: {
+ gearDown: props.globals.getNode("/controls/gear/gear-down"),
+ },
};
var ECAM = {
@@ -45,17 +57,40 @@ var Engines = {
},
};
+var FMGC = {
+ CasCompare: {
+ rejectAll: props.globals.getNode("/systems/fmgc/cas-compare/cas-reject-all"),
+ },
+};
+
var Gear = {
compression: [props.globals.getNode("/gear/gear[0]/compression-norm"),props.globals.getNode("/gear/gear[1]/compression-norm"),props.globals.getNode("/gear/gear[2]/compression-norm")],
+ wow: [props.globals.getNode("/gear/gear[0]/wow"),props.globals.getNode("/gear/gear[1]/wow"),props.globals.getNode("/gear/gear[2]/wow")],
};
var Instrumentation = {
AirspeedIndicator: {
indicatedSpdKt: props.globals.getNode("/instrumentation/airspeed-indicator/indicated-speed-kt"),
},
+ TCAS: {
+ Inputs: {
+ mode: props.globals.getNode("/instrumentation/tcas/inputs/mode"),
+ },
+ },
+};
+
+var JSBSIM = {
+ FCS: {
+ flapDeg: props.globals.getNode("/fdm/jsbsim/fcs/flap-pos-deg"),
+ slatDeg: props.globals.getNode("/fdm/jsbsim/fcs/slat-pos-deg"),
+ },
};
var JSBSim = {
+ FBW: {
+ aileron: props.globals.getNode("/fdm/jsbsim/fbw/aileron-sidestick"),
+ elevator: props.globals.getNode("/fdm/jsbsim/fbw/elevator-sidestick"),
+ },
Propulsion: {
Engine1: {
fuelUsed: props.globals.getNode("/fdm/jsbsim/propulsion/engine[0]/fuel-used-lbs"),
@@ -84,6 +119,12 @@ var Sim = {
},
};
+var Orientation = {
+ pitch: props.globals.getNode("/orientation/pitch-deg"),
+ roll: props.globals.getNode("/orientation/roll-deg"),
+ yaw: props.globals.getNode("/orientation/yaw-deg"),
+};
+
var PTSSystems = {
Thrust: {
flex: props.globals.getNode("/systems/thrust/lim-flex"),
diff --git a/Nasal/shake.nas b/Nasal/Sim/shake.nas
similarity index 100%
rename from Nasal/shake.nas
rename to Nasal/Sim/shake.nas
diff --git a/Nasal/zoom-views.nas b/Nasal/Sim/zoom-views.nas
similarity index 100%
rename from Nasal/zoom-views.nas
rename to Nasal/Sim/zoom-views.nas
diff --git a/Nasal/ADIRS.nas b/Nasal/Systems/ADIRS/ADIRS.nas
similarity index 84%
rename from Nasal/ADIRS.nas
rename to Nasal/Systems/ADIRS/ADIRS.nas
index 6940f8bf..e6fcbf93 100644
--- a/Nasal/ADIRS.nas
+++ b/Nasal/Systems/ADIRS/ADIRS.nas
@@ -16,18 +16,9 @@ setprop("/controls/adirs/align-time", 600);
var ADIRS = {
init: func() {
setprop("/controls/adirs/numm", 0);
- setprop("/instrumentation/adirs/adr[0]/active", 0);
- setprop("/instrumentation/adirs/adr[1]/active", 0);
- setprop("/instrumentation/adirs/adr[2]/active", 0);
setprop("/instrumentation/adirs/ir[0]/aligned", 0);
setprop("/instrumentation/adirs/ir[1]/aligned", 0);
setprop("/instrumentation/adirs/ir[2]/aligned", 0);
- setprop("/controls/adirs/adr[0]/fault", 0);
- setprop("/controls/adirs/adr[1]/fault", 0);
- setprop("/controls/adirs/adr[2]/fault", 0);
- setprop("/controls/adirs/adr[0]/off", 0);
- setprop("/controls/adirs/adr[1]/off", 0);
- setprop("/controls/adirs/adr[2]/off", 0);
setprop("/controls/adirs/ir[0]/align", 0);
setprop("/controls/adirs/ir[1]/align", 0);
setprop("/controls/adirs/ir[2]/align", 0);
@@ -40,7 +31,6 @@ var ADIRS = {
setprop("/controls/adirs/ir[0]/fault", 0);
setprop("/controls/adirs/ir[1]/fault", 0);
setprop("/controls/adirs/ir[2]/fault", 0);
- setprop("/controls/adirs/onbat", 0);
setprop("/controls/adirs/mcdu/mode1", ""); # INVAL ALIGN NAV ATT or off (blank)
setprop("/controls/adirs/mcdu/mode2", "");
setprop("/controls/adirs/mcdu/mode3", "");
@@ -82,22 +72,6 @@ var ADIRS = {
me.stopAlign(2,1);
}
}
-
- if (ac1 >= 110 or ac2 >= 110) {
- pwr_src = "AC";
- } else if (dcbat >= 25 and (getprop("/controls/adirs/ir[0]/knob") != 0 or getprop("/controls/adirs/ir[1]/knob") != 0 or getprop("/controls/adirs/ir[2]/knob") != 0)) {
- pwr_src = "BATT";
- } else {
- pwr_src = "XX";
- }
-
- if (getprop("/controls/adirs/ir[0]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[1]/time") + 3 >= getprop("/sim/time/elapsed-sec") or getprop("/controls/adirs/ir[2]/time") + 3 >= getprop("/sim/time/elapsed-sec")) {
- setprop("/controls/adirs/onbat", 1);
- } else if (pwr_src == "BATT") {
- setprop("/controls/adirs/onbat", 1);
- } else {
- setprop("/controls/adirs/onbat", 0);
- }
},
knob: func(k) {
knob = getprop("/controls/adirs/ir[" ~ k ~ "]/knob");
@@ -141,7 +115,6 @@ var ADIRS = {
} else if (n == 2) {
alignThree.stop();
}
- setprop("/instrumentation/adirs/adr[" ~ n ~ "]/active", 0);
setprop("/instrumentation/adirs/ir[" ~ n ~ "]/aligned", 0);
setprop("/controls/adirs/mcducbtn", 0);
},
diff --git a/Nasal/Systems/ADIRS/ADR.nas b/Nasal/Systems/ADIRS/ADR.nas
new file mode 100644
index 00000000..cb32b559
--- /dev/null
+++ b/Nasal/Systems/ADIRS/ADR.nas
@@ -0,0 +1,264 @@
+# A3XX ADIRS System
+# Jonathan Redpath (legoboyvdlp)
+
+# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
+
+var _NUMADIRU = 3;
+
+var _selfTestTime = nil;
+
+var ADIRU = {
+ # local vars
+ _voltageMain: 0,
+ _voltageBackup: 0,
+ _voltageLimitedTime: 0,
+ _noPowerTime: 0,
+ _timeVar: 0,
+
+ num: 0,
+ outputOn: 0, # 0 = disc, 1 = normal
+ mode: 0, # 0 = off, 1 = nav, 2 = att
+ energised: 0, # 0 = off, 1 = on
+ operative: 0, # 0 = off,
+ input: [],
+ output: [],
+
+ # methods
+ new: func(n) {
+ var adiru = { parents:[ADIRU] };
+ adiru.num = n;
+ return adiru;
+ },
+ updateEnergised: func(mode) {
+ me.energised = mode != 0 ? 1 : 0;
+ },
+ updatePower: func(elec) {
+ me._voltageMain = elec.getValue() or 0;
+ return me._voltageMain;
+ },
+ updateBackupPower: func(elec, isLimited) {
+ me._voltageBackup = elec.getValue() or 0;
+ me._voltageLimitedTime = isLimited;
+ return me._voltageBackup;
+ },
+ selfTest: func() {
+ ADIRSnew._selfTest = 1;
+ _selfTestTime = pts.Sim.Time.elapsedSec.getValue();
+
+ ADIRSnew.Lights.adrOff[me.num].setValue(1);
+ ADIRSnew.Lights.adrFault[me.num].setValue(1);
+ settimer(func() {
+ ADIRSnew.Lights.adrOff[me.num].setValue(0);
+ ADIRSnew.Lights.adrFault[me.num].setValue(0);
+ }, 0.1);
+ settimer(func() {
+ ADIRSnew.Lights.adrOff[me.num].setValue(1);
+ ADIRSnew.Lights.adrFault[me.num].setValue(1);
+ ADIRSnew.Lights.irFault[me.num].setValue(1);
+ ADIRSnew.Lights.irOff[me.num].setValue(1);
+ }, 1.0);
+ settimer(func() {
+ ADIRSnew.Lights.adrOff[me.num].setValue(0);
+ ADIRSnew.Lights.adrFault[me.num].setValue(0);
+ ADIRSnew.Lights.irFault[me.num].setValue(0);
+ ADIRSnew.Lights.irOff[me.num].setValue(0);
+ }, 1.1);
+
+ ADIRSnew.selfTest();
+ },
+ setOperative: func(newOperative) {
+ if (newOperative != me.operative) {
+ me.operative = newOperative;
+ if (newOperative) {
+ me.selfTest();
+ }
+ }
+ },
+ update: func() {
+ me._timeVar = pts.Sim.Time.elapsedSec.getValue();
+ if (me.energised and !me._voltageMain and me._voltageLimitedTime and me._noPowerTime == 0) {
+ me._noPowerTime = me._timeVar;
+ }
+
+ if (me.energised and me.mode) {
+ if (me._voltageMain) {
+ me._noPowerTime = 0;
+ me.setOperative(1);
+ if (!ADIRSnew._selfTest) {
+ ADIRSnew.Lights.onBat.setBoolValue(0);
+ }
+ } elsif (((me._timeVar < me._noPowerTime + 300 and me._voltageLimitedTime) or !me._voltageLimitedTime) and me._voltageBackup) {
+ me.setOperative(1);
+ if (!ADIRSnew._selfTest) {
+ ADIRSnew.Lights.onBat.setBoolValue(1);
+ }
+ } else {
+ me._noPowerTime = 0;
+ me.setOperative(0);
+ if (!ADIRSnew._selfTest) {
+ ADIRSnew.Lights.onBat.setBoolValue(0);
+ }
+ }
+ } else {
+ me._noPowerTime = 0;
+ me.setOperative(0);
+ if (!ADIRSnew._selfTest) {
+ ADIRSnew.Lights.onBat.setBoolValue(0);
+ }
+ }
+ },
+};
+
+var ADIRSControlPanel = {
+ adrSw: func(n) {
+ if (n < 0 or n > _NUMADIRU) { return; }
+ ADIRSnew._adrSwitchState = ADIRSnew.Switches.adrSw[n].getValue();
+ ADIRSnew.Switches.adrSw[n].setValue(!ADIRSnew._adrSwitchState);
+ if (ADIRSnew.ADIRunits[n] != nil) {
+ ADIRSnew.ADIRunits[n].outputOn = !ADIRSnew._adrSwitchState;
+ }
+ ADIRSnew.Lights.adrOff[n].setValue(ADIRSnew._adrSwitchState);
+ },
+ irSw: func(n) {
+ if (n < 0 or n > _NUMADIRU) { return; }
+ ADIRSnew._irSwitchState = ADIRSnew.Switches.irSw[n].getValue();
+ ADIRSnew.Switches.irSw[n].setValue(!ADIRSnew._irSwitchState);
+ if (ADIRSnew.IRunits[n] != nil) {
+ ADIRSnew.IRunits[n].outputOn = !ADIRSnew._irSwitchState;
+ }
+ ADIRSnew.Lights.irOff[n].setValue(ADIRSnew._adrSwitchState);
+ },
+ irModeSw: func(n, mode) {
+ if (n < 0 or n > _NUMADIRU) { return; }
+ if (mode < 0 or mode > 2) { return; }
+ me._irModeSwitchState = ADIRSnew.Switches.irModeSw[n].getValue();
+ if (ADIRSnew.ADIRunits[n] != nil) {
+ ADIRSnew.ADIRunits[n].mode = mode;
+ ADIRSnew.ADIRunits[n].updateEnergised(mode);
+ ADIRSnew.Switches.irModeSw[n].setValue(mode);
+ }
+ }
+};
+
+var ADIRSnew = {
+ # local vars
+ _adrSwitchState: 0,
+ _irSwitchState: 0,
+ _irModeSwitchState: 0,
+ _hasPower: 0,
+ _cacheOperative: [0, 0, 0],
+ _cacheOutputOn: [0, 0, 0],
+ _flapPos: nil,
+ _slatPos: nil,
+ _selfTest: 0,
+ _init: 0,
+
+ # ADIRS Units
+ ADIRunits: [nil, nil, nil],
+ #IRunits: [nil, nil, nil],
+
+ # Electrical
+ mainSupply: [systems.ELEC.Bus.acEss, systems.ELEC.Bus.ac2, systems.ELEC.Bus.ac1],
+ backupSupply: [[systems.ELEC.Bus.dcHot2, 0], [systems.ELEC.Bus.dcHot2, 1], [systems.ELEC.Bus.dcHot1, 1]],
+
+ # PTS
+ Lights: {
+ adrFault: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-fault")],
+ adrOff: [props.globals.getNode("/controls/navigation/adirscp/lights/adr-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/adr-3-off")],
+ irFault: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-fault"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-fault")],
+ irOff: [props.globals.getNode("/controls/navigation/adirscp/lights/ir-1-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-2-off"), props.globals.getNode("/controls/navigation/adirscp/lights/ir-3-off")],
+ onBat: props.globals.getNode("/controls/navigation/adirscp/lights/on-bat"),
+ },
+ Switches: {
+ adrSw: [props.globals.getNode("/controls/navigation/adirscp/switches/adr-1"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-2"), props.globals.getNode("/controls/navigation/adirscp/switches/adr-3")],
+ irModeSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2-mode"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3-mode")],
+ irSw: [props.globals.getNode("/controls/navigation/adirscp/switches/ir-1"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-2"), props.globals.getNode("/controls/navigation/adirscp/switches/ir-3")],
+ },
+ Operating: {
+ adr: [props.globals.getNode("/systems/navigation/adr/operating-1"), props.globals.getNode("/systems/navigation/adr/operating-2"), props.globals.getNode("/systems/navigation/adr/operating-3")],
+ },
+
+ # Nodes
+ overspeedVFE: props.globals.initNode("/systems/navigation/adr/computation/overspeed-vfe-spd", 0, "INT"),
+
+ # System
+ init: func() {
+ if (!me._init) {
+ for (i = 0; i < _NUMADIRU; i = i + 1) {
+ me.ADIRunits[i] = ADIRU.new(i);
+ me._init = 1;
+ }
+ }
+ },
+ update_items: [
+ props.UpdateManager.FromPropertyHashList(["/fdm/jsbsim/fcs/flap-pos-deg","/fdm/jsbsim/fcs/slat-pos-deg"], 0.1, func(notification)
+ {
+ me._flapPos = pts.JSBSIM.FCS.flapDeg.getValue();
+ me._slatPos = pts.JSBSIM.FCS.slatDeg.getValue();
+
+ if (me._flapPos >= 23 and me._slatPos >= 25) {
+ ADIRSnew.overspeedVFE.setValue(181);
+ } elsif (me._flapPos >= 18) {
+ ADIRSnew.overspeedVFE.setValue(189);
+ } elsif (me._flapPos >= 13 or me._slatPos > 20) {
+ ADIRSnew.overspeedVFE.setValue(204);
+ } elsif (me._slatPos <= 20 and me._flapPos > 2) {
+ ADIRSnew.overspeedVFE.setValue(219);
+ } elsif (me._slatPos >= 2 and me._slatPos <= 20) {
+ ADIRSnew.overspeedVFE.setValue(234);
+ } else {
+ ADIRSnew.overspeedVFE.setValue(1024);
+ }
+ }
+ ),
+ ],
+ loop: func() {
+ if (me._init) {
+ for (i = 0; i < _NUMADIRU; i = i + 1) {
+ # update ADR units power
+ me._hasPower = me.ADIRunits[i].updatePower(me.mainSupply[i]);
+ if (me._hasPower == 0) {
+ me.ADIRunits[i].updateBackupPower(me.backupSupply[i][0],me.backupSupply[i][1])
+ }
+
+ # Update ADR units
+ me.ADIRunits[i].update();
+
+ if (me.ADIRunits[i].operative != me._cacheOperative[i] or me.ADIRunits[i].outputOn != me._cacheOutputOn[i]) {
+ me._cacheOperative[i] = me.ADIRunits[i].operative;
+ me._cacheOutputOn[i] = me.ADIRunits[i].outputOn;
+ if (me.ADIRunits[i].outputOn) {
+ me.Operating.adr[i].setValue(me.ADIRunits[i].operative);
+ } else {
+ me.Operating.adr[i].setValue(0);
+ }
+ }
+ }
+
+ # Update VFE
+ notification = nil;
+ foreach (var update_item; me.update_items) {
+ update_item.update(notification);
+ }
+ }
+ },
+ selfTest: func() {
+ ADIRSnew.Lights.onBat.setBoolValue(1);
+ selfTestLoop.start();
+ },
+
+};
+
+setlistener("/systems/fmgc/cas-compare/cas-reject-all", func() {
+ if (pts.FMGC.CasCompare.rejectAll.getBoolValue()) {
+ fcu.athrOff("hard");
+ }
+}, 0, 0);
+
+selfTestLoop = maketimer(0.2, func() {
+ if (pts.Sim.Time.elapsedSec.getValue() > _selfTestTime + 5) {
+ ADIRSnew.Lights.onBat.setBoolValue(0);
+ selfTestLoop.stop();
+ ADIRSnew._selfTest = 0;
+ }
+});
\ No newline at end of file
diff --git a/Nasal/Systems/ADIRS/SwitchingPanel.nas b/Nasal/Systems/ADIRS/SwitchingPanel.nas
new file mode 100644
index 00000000..96066a20
--- /dev/null
+++ b/Nasal/Systems/ADIRS/SwitchingPanel.nas
@@ -0,0 +1,32 @@
+# A3XX Switching Panel
+# Jonathan Redpath (legoboyvdlp)
+
+# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
+
+var SwitchingPanel = {
+ Switches: {
+ attHdg: props.globals.getNode("/controls/navigation/switching/att-hdg"),
+ airData: props.globals.getNode("/controls/navigation/switching/air-data"),
+ eisDmc: props.globals.getNode("/controls/navigation/switching/eis-dmc"),
+ },
+
+ doAirData: func(newAirData) {
+ if (newAirData < -1 or newAirData > 1) { return; }
+ me.Switches.airData.setValue(newAirData);
+ atc.transponderPanel.updateAirData();
+ if (newAirData == -1) {
+ dmc.DMController.DMCs[0].changeActiveADIRS(2);
+ dmc.DMController.DMCs[1].changeActiveADIRS(1);
+ } elsif (newAirData == 1) {
+ dmc.DMController.DMCs[0].changeActiveADIRS(0);
+ dmc.DMController.DMCs[1].changeActiveADIRS(2);
+ } elsif (newAirData == 0) {
+ dmc.DMController.DMCs[0].changeActiveADIRS(0);
+ dmc.DMController.DMCs[1].changeActiveADIRS(1);
+ }
+ },
+ doEisDMC: func(newDMC) {
+ if (newDMC < -1 or newDMC > 1) { return; }
+ me.Switches.eisDMC.setValue(newDMC);
+ },
+};
\ No newline at end of file
diff --git a/Nasal/Systems/DMC.nas b/Nasal/Systems/DMC.nas
new file mode 100644
index 00000000..64283871
--- /dev/null
+++ b/Nasal/Systems/DMC.nas
@@ -0,0 +1,85 @@
+# A3XX Display System
+# Jonathan Redpath (legoboyvdlp)
+
+# Copyright (c) 2019 Jonathan Redpath (legoboyvdlp)
+
+var DMC = {
+ _set: 0,
+ _setNil: 0,
+
+ activeADIRS: -9,
+
+ airspeeds: [props.globals.getNode("/systems/navigation/adr/output/cas-1", 1), props.globals.getNode("/systems/navigation/adr/output/cas-2", 1), props.globals.getNode("/systems/navigation/adr/output/cas-3", 1)],
+ altitudes: [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-capt", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-capt", 1)],
+ machs: [props.globals.getNode("/systems/navigation/adr/output/mach-1", 1), props.globals.getNode("/systems/navigation/adr/output/mach-2", 1), props.globals.getNode("/systems/navigation/adr/output/mach-3", 1)],
+ altitudesPfd: [props.globals.getNode("/instrumentation/altimeter[0]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[1]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[2]/indicated-altitude-ft-pfd", 1)],
+ sats: [props.globals.getNode("/systems/navigation/adr/output/sat-1", 1), props.globals.getNode("/systems/navigation/adr/output/sat-2", 1), props.globals.getNode("/systems/navigation/adr/output/sat-3", 1)],
+ tats: [props.globals.getNode("/systems/navigation/adr/output/tat-1", 1), props.globals.getNode("/systems/navigation/adr/output/tat-2", 1), props.globals.getNode("/systems/navigation/adr/output/tat-3", 1)],
+ outputs: [nil, nil, nil, nil, nil, nil], # airspeed, altitude, mach, pfd altitude, sat, tat
+
+ new: func(num) {
+ var d = { parents:[DMC] };
+ d.activeADIRS = num;
+ d.outputs = [nil, nil, nil, nil, nil, nil];
+ return d;
+ },
+ changeActiveADIRS: func(newADIRS) {
+ me.activeADIRS = newADIRS;
+ me._set = 0;
+ },
+ setOutputs: func(ADIRS) {
+ me.outputs[0] = me.airspeeds[ADIRS];
+ me.outputs[1] = me.altitudes[ADIRS];
+ me.outputs[2] = me.machs[ADIRS];
+ me.outputs[3] = me.altitudesPfd[ADIRS];
+ me.outputs[4] = me.sats[ADIRS];
+ me.outputs[5] = me.tats[ADIRS];
+ },
+ setOutputsNil: func() {
+ me.outputs[0] = nil;
+ me.outputs[1] = nil;
+ me.outputs[2] = nil;
+ me.outputs[3] = nil;
+ me.outputs[4] = nil;
+ me.outputs[5] = nil;
+ },
+ update: func() {
+ if (systems.ADIRSnew.ADIRunits[me.activeADIRS].operative and systems.ADIRSnew.ADIRunits[me.activeADIRS].outputOn) {
+ if (me._set != 1) {
+ me._setNil = 0;
+ me.setOutputs(me.activeADIRS);
+ me._setADIRS = me.activeADIRS;
+ me._set = 1;
+ }
+ } else {
+ if (me._setNil != 1) {
+ me._set = 0;
+ me.setOutputsNil();
+ me._setNil = 1;
+ }
+ }
+ },
+};
+
+var DMController = {
+ _init: 0,
+ i: nil, # to make sure scope remains local use me.i
+ DMCs: [nil, nil, nil],
+
+ init: func() {
+ if (!me._init) {
+ me.DMCs = [DMC.new(0), DMC.new(1), DMC.new(2)];
+
+ # update DMC2 to correct properties for first officer PFD
+ me.DMCs[1].altitudes = [props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-1-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-2-fo", 1), props.globals.getNode("/systems/navigation/adr/output/baro-alt-corrected-3-fo", 1)];
+ me.DMCs[1].altitudesPfd = [props.globals.getNode("/instrumentation/altimeter[3]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[4]/indicated-altitude-ft-pfd", 1), props.globals.getNode("/instrumentation/altimeter[5]/indicated-altitude-ft-pfd", 1)];
+
+ me._init = 1;
+ }
+ },
+ loop: func() {
+ for (me.i = 0; me.i < 3; me.i = me.i + 1) {
+ me.DMCs[me.i].update();
+ }
+ },
+};
\ No newline at end of file
diff --git a/Nasal/engines-cfm.nas b/Nasal/Systems/FADEC/engines-cfm.nas
similarity index 100%
rename from Nasal/engines-cfm.nas
rename to Nasal/Systems/FADEC/engines-cfm.nas
diff --git a/Nasal/engines-common.nas b/Nasal/Systems/FADEC/engines-common.nas
similarity index 100%
rename from Nasal/engines-common.nas
rename to Nasal/Systems/FADEC/engines-common.nas
diff --git a/Nasal/engines-iae.nas b/Nasal/Systems/FADEC/engines-iae.nas
similarity index 99%
rename from Nasal/engines-iae.nas
rename to Nasal/Systems/FADEC/engines-iae.nas
index f13aa526..9be8ef66 100644
--- a/Nasal/engines-iae.nas
+++ b/Nasal/Systems/FADEC/engines-iae.nas
@@ -208,7 +208,7 @@ var auto_start_one = func {
}
var eng_one_auto_start = maketimer(0.5, func {
- if (getprop("/engines/engine[0]/n1-actual") >= 5.0) {
+ if (getprop("/engines/engine[0]/n1-actual") >= 4.7) {
eng_one_auto_start.stop();
setprop("/engines/engine[0]/state", 2);
setprop("/controls/engines/engine[0]/cutoff", 0);
@@ -271,7 +271,7 @@ var auto_start_two = func {
}
var eng_two_auto_start = maketimer(0.5, func {
- if (getprop("/engines/engine[1]/n1-actual") >= 5.0) {
+ if (getprop("/engines/engine[1]/n1-actual") >= 4.7) {
eng_two_auto_start.stop();
setprop("/engines/engine[1]/state", 2);
setprop("/controls/engines/engine[1]/cutoff", 0);
diff --git a/Nasal/fadec-cfm.nas b/Nasal/Systems/FADEC/fadec-cfm.nas
similarity index 100%
rename from Nasal/fadec-cfm.nas
rename to Nasal/Systems/FADEC/fadec-cfm.nas
diff --git a/Nasal/fadec-common.nas b/Nasal/Systems/FADEC/fadec-common.nas
similarity index 100%
rename from Nasal/fadec-common.nas
rename to Nasal/Systems/FADEC/fadec-common.nas
diff --git a/Nasal/fadec-iae.nas b/Nasal/Systems/FADEC/fadec-iae.nas
similarity index 100%
rename from Nasal/fadec-iae.nas
rename to Nasal/Systems/FADEC/fadec-iae.nas
diff --git a/Nasal/brakes.nas b/Nasal/Systems/brakes.nas
similarity index 100%
rename from Nasal/brakes.nas
rename to Nasal/Systems/brakes.nas
diff --git a/Nasal/Systems/brakesystem.nas b/Nasal/Systems/brakesystem.nas
new file mode 100755
index 00000000..023bf743
--- /dev/null
+++ b/Nasal/Systems/brakesystem.nas
@@ -0,0 +1,215 @@
+##########################################################################
+# Simple Brake Simulation System
+# 2010, Thorsten Brehm
+#
+# Simple simulation of brake energy absorption and cooling effects.
+#
+# This module computes (approximates... :-) ) an energy level which
+# (faintly) resembles the kinetic energy absorption and cooling effects
+# of a brake system. But instead of computing real temperatures, this
+# is just meant to distinguish normal energy levels from exceptionally
+# high levels. The target is to drive EICAS "brakes overheat" messages
+# and gear effects only, to "reward" pilots with exceptionally bad
+# landings...
+#
+# To avoid complicated calculations of different braking effects (roll/air
+# drag, reverse thrust etc), we simply assume the brake system to cause a
+# fixed deceleration (me.BrakeDecel). With this deceleration we approximate
+# the speed difference which would be caused by the brake system alone for
+# any given simulation interval. The difference of the kinetic energy level
+# at the current speed and the decelerated speed are then added up to the
+# total absorbed brake energy.
+# Units (knots/lbs/Kg) do not matter much here. Eventually a magic scaling
+# divisor is used to scale the output level. Any output > 1 means
+# "overheated brakes", any level <=1 means "brake temperature OK".
+# No exact science here - but good enough for now :-).
+##########################################################################
+
+var BrakeSystem =
+{
+ new : func()
+ {
+ var m = { parents : [BrakeSystem]};
+ # deceleration caused by brakes alone (knots/s2)
+ m.BrakeDecel = 1.0; # kt/s^2
+ #m.LBrakeDecel = getprop("systems/hydraulic/brakes/pressure-left-psi") / 1000 * getprop("controls/autobrake/decel-error"); # kt/s^2
+ #m.RBrakeDecel = getprop("systems/hydraulic/brakes/pressure-right-psi") / 1000 * getprop("controls/autobrake/decel-error"); # kt/s^2
+ # Higher value means quicker cooling
+ m.CoolingFactor = 0.005;
+ # Scaling divisor. Use this to scale the energy output.
+ # Manually tune this value: a total energy output
+ # at "/gear/brake-thermal-energy" > 1.0 means overheated brakes,
+ # anything below <= 1.0 means energy absorbed by brakes is OK.
+ #m.ScalingDivisor= 700000*450.0;
+ m.ScalingDivisor= 1;
+
+ m.LSmokeActive = 0;
+ m.LSmokeToggle = 0;
+ m.RSmokeActive = 0;
+ m.RSmokeToggle = 0;
+ m.nCoolFactor = math.ln(1-m.CoolingFactor);
+
+ m.reset();
+
+ return m;
+ },
+
+ reset : func()
+ {
+ # Initial thermal energy
+ setprop("gear/Lbrake-thermal-energy",0.0);
+ setprop("gear/Rbrake-thermal-energy",0.0);
+ setprop("gear/Lbrake-smoke",0);
+ setprop("gear/Rbrake-smoke",0);
+ setprop("sim/animation/fire-services",0);
+ me.LastSimTime = 0.0;
+ },
+
+ # update brake energy
+ update : func()
+ {
+ var CurrentTime = getprop("sim/time/elapsed-sec");
+ var dt = CurrentTime - me.LastSimTime;
+
+ if (dt<1.0)
+ {
+ var OnGround = getprop("gear/gear[1]/wow");
+ var LThermalEnergy = getprop("gear/Lbrake-thermal-energy");
+ var RThermalEnergy = getprop("gear/Rbrake-thermal-energy");
+ if (getprop("controls/gear/brake-parking"))
+ {
+ var LBrakeLevel=1.0;
+ var RBrakeLevel=1.0;
+ var BrakeLevel = (LBrakeLevel + RBrakeLevel)/2;
+ }
+ else
+ var LBrakeLevel = getprop("fdm/jsbsim/fcs/left-brake-cmd-norm");
+ var RBrakeLevel = getprop("fdm/jsbsim/fcs/right-brake-cmd-norm");
+ var BrakeLevel = (LBrakeLevel + RBrakeLevel)/2;
+ if ((OnGround)and(BrakeLevel>0))
+ {
+ # absorb more energy
+ var V1 = getprop("velocities/groundspeed-kt");
+ var Mass = getprop("fdm/jsbsim/inertia/weight-lbs")/(me.ScalingDivisor*200000000);
+ # absorb some kinetic energy:
+ # dE= 1/2 * m * V1^2 - 1/2 * m * V2^2)
+ var V2_L = V1 - me.BrakeDecel*dt * LBrakeLevel;
+ var V2_R = V1 - me.BrakeDecel*dt * RBrakeLevel;
+ # do not absorb more energy when plane is (almost) stopped
+ if (V2_L>0)
+ LThermalEnergy += Mass * (V1*V1 - V2_L*V2_L)/2;
+ if (V2_R>0)
+ RThermalEnergy += Mass * (V1*V1 - V2_R*V2_R)/2;
+ }
+
+ # cooling effect: reduce thermal energy by factor (1-m.CoolingFactor)^dt
+ LThermalEnergy = LThermalEnergy * math.exp(me.nCoolFactor * dt);
+ RThermalEnergy = RThermalEnergy * math.exp(me.nCoolFactor * dt);
+
+ setprop("gear/Lbrake-thermal-energy",LThermalEnergy);
+ setprop("gear/Rbrake-thermal-energy",RThermalEnergy);
+
+ if ((LThermalEnergy>1)and(!me.LSmokeActive))
+ {
+ # start smoke processing
+ me.LSmokeActive = 1;
+ settimer(func { BrakeSys.Lsmoke(); },0);
+ }
+ if ((RThermalEnergy>1)and(!me.RSmokeActive))
+ {
+ # start smoke processing
+ me.RSmokeActive = 1;
+ settimer(func { BrakeSys.Rsmoke(); },0);
+ }
+ }
+
+ me.LastSimTime = CurrentTime;
+ # 5 updates per second are good enough
+ settimer(func { BrakeSys.update(); },0.2);
+ },
+
+ # smoke processing
+ Lsmoke : func()
+ {
+ if ((me.LSmokeActive)and(getprop("gear/Lbrake-thermal-energy")>1))
+ {
+ # make density of smoke effect depend on energy level
+ var LSmokeDelay=0;
+ var LThermalEnergy = getprop("gear/Lbrake-thermal-energy");
+ if (LThermalEnergy < 1.5)
+ LSmokeDelay=(1.5-LThermalEnergy);
+ # No smoke when gear retracted
+ var LSmokeValue = (getprop("gear/gear[1]/position-norm")>0.5);
+ # toggle smoke to interpolate different densities
+ if (LSmokeDelay>0.05)
+ {
+ me.LSmokeToggle = !me.LSmokeToggle;
+ if (!me.LSmokeToggle)
+ LSmokeValue = 0;
+ else
+ LSmokeDelay = 0;
+ }
+ setprop("gear/Lbrake-smoke",LSmokeValue);
+ settimer(func { BrakeSys.Lsmoke(); },LSmokeDelay);
+ }
+ else
+ {
+ # stop smoke processing
+ setprop("gear/Lbrake-smoke",0);
+ setprop("sim/animation/fire-services",0);
+ me.LSmokeActive = 0;
+ }
+ if (getprop("gear/Lbrake-thermal-energy") > 1.5)
+ setprop("sim/animation/fire-services",1);
+ else
+ setprop("sim/animation/fire-services",0);
+ },
+
+ # smoke processing
+ Rsmoke : func()
+ {
+ if ((me.RSmokeActive)and(getprop("gear/Rbrake-thermal-energy")>1))
+ {
+ # make density of smoke effect depend on energy level
+ var RSmokeDelay=0;
+ var RThermalEnergy = getprop("gear/Rbrake-thermal-energy");
+ if (RThermalEnergy < 1.5)
+ RSmokeDelay=(1.5-RThermalEnergy);
+ # No smoke when gear retracted
+ var RSmokeValue = (getprop("gear/gear[2]/position-norm")>0.5);
+ # toggle smoke to interpolate different densities
+ if (RSmokeDelay>0.05)
+ {
+ me.RSmokeToggle = !me.RSmokeToggle;
+ if (!me.RSmokeToggle)
+ RSmokeValue = 0;
+ else
+ RSmokeDelay = 0;
+ }
+ setprop("gear/Rbrake-smoke",RSmokeValue);
+ settimer(func { BrakeSys.Rsmoke(); },RSmokeDelay);
+ }
+ else
+ {
+ # stop smoke processing
+ setprop("gear/Rbrake-smoke",0);
+ me.RSmokeActive = 0;
+ }
+ if (getprop("gear/Rbrake-thermal-energy") > 1.5)
+ setprop("sim/animation/fire-services",1);
+ else
+ setprop("sim/animation/fire-services",0);
+ },
+};
+
+var BrakeSys = BrakeSystem.new();
+
+setlistener("sim/signals/fdm-initialized",
+ # executed on _every_ FDM reset (but not installing new listeners)
+ func(idle) { BrakeSys.reset(); },
+ 0,0);
+
+settimer(func()
+ {
+ BrakeSys.update();
+ }, 5);
diff --git a/Nasal/efis.nas b/Nasal/Systems/efis.nas
similarity index 100%
rename from Nasal/efis.nas
rename to Nasal/Systems/efis.nas
diff --git a/Nasal/electrical.nas b/Nasal/Systems/electrical.nas
similarity index 99%
rename from Nasal/electrical.nas
rename to Nasal/Systems/electrical.nas
index 4aeb3067..e905f7b7 100644
--- a/Nasal/electrical.nas
+++ b/Nasal/Systems/electrical.nas
@@ -24,6 +24,7 @@ var ELEC = {
dc1: props.globals.getNode("/systems/electrical/bus/dc-1"),
dc2: props.globals.getNode("/systems/electrical/bus/dc-2"),
dcHot1: props.globals.getNode("/systems/electrical/bus/dc-hot-1"),
+ dcHot2: props.globals.getNode("/systems/electrical/bus/dc-hot-2"),
},
Fail: {
acEssBusFault: props.globals.getNode("/systems/failures/electrical/ac-ess-bus"),
diff --git a/Nasal/fire.nas b/Nasal/Systems/fire.nas
similarity index 100%
rename from Nasal/fire.nas
rename to Nasal/Systems/fire.nas
diff --git a/Nasal/fuel.nas b/Nasal/Systems/fuel.nas
similarity index 100%
rename from Nasal/fuel.nas
rename to Nasal/Systems/fuel.nas
diff --git a/Nasal/ground_services.nas b/Nasal/Systems/ground_services.nas
similarity index 100%
rename from Nasal/ground_services.nas
rename to Nasal/Systems/ground_services.nas
diff --git a/Nasal/hydraulics.nas b/Nasal/Systems/hydraulics.nas
similarity index 100%
rename from Nasal/hydraulics.nas
rename to Nasal/Systems/hydraulics.nas
diff --git a/Nasal/icing.nas b/Nasal/Systems/icing.nas
similarity index 100%
rename from Nasal/icing.nas
rename to Nasal/Systems/icing.nas
diff --git a/Nasal/payload.nas b/Nasal/Systems/payload.nas
similarity index 63%
rename from Nasal/payload.nas
rename to Nasal/Systems/payload.nas
index a392164b..4e06149b 100644
--- a/Nasal/payload.nas
+++ b/Nasal/Systems/payload.nas
@@ -2,6 +2,7 @@
# Jonathan Redpath
var fuelSvc = {
+ _needCenter: 0,
enable: props.globals.getNode("/services/fuel-truck/enable"),
connect: props.globals.getNode("/services/fuel-truck/connect"),
operate: props.globals.getNode("/services/fuel-truck/operate"),
@@ -34,16 +35,19 @@ var fuelSvc = {
systems.FUEL.Valves.refuelRight.setBoolValue(1);
if (pts.Sim.aero.getValue() == "A320-200-CFM" and me.Nodes.requestTotalLbs.getValue() > 28229.9) {
- systems.FUEL.Valves.refuelCenter.setBoolValue(1);
+ me._needCenter = 1;
} elsif ((pts.Sim.aero.getValue() == "A320-200-IAE" or pts.Sim.aero.getValue() == "A320-100-CFM") and me.Nodes.requestTotalLbs.getValue() > 27591.8) {
- systems.FUEL.Valves.refuelCenter.setBoolValue(1);
+ me._needCenter = 1;
} elsif ((pts.Sim.aero.getValue() == "A320neo-CFM" or pts.Sim.aero.getValue() == "A320neo-PW") and me.Nodes.requestTotalLbs.getValue() > 27357.8) {
- systems.FUEL.Valves.refuelCenter.setBoolValue(1);
+ me._needCenter = 1;
+ } else {
+ me._needCenter = 0;
}
},
stop: func() {
systems.FUEL.refuelling.setBoolValue(0);
+ # me.Nodes.requestLbs.setValue(0);
systems.FUEL.Valves.refuelLeft.setBoolValue(0);
systems.FUEL.Valves.refuelCenter.setBoolValue(0);
systems.FUEL.Valves.refuelRight.setBoolValue(0);
@@ -68,19 +72,44 @@ setlistener("/services/fuel-truck/connect", func() {
}, 0, 0);
var fuelTimer = maketimer(0.25, func() {
- if (systems.FUEL.Quantity.leftInnerPct.getValue() >= 0.999) {
+ if (Dialogs.valve_l.getValue() == 0.5) {
+ if (systems.FUEL.Quantity.leftInnerPct.getValue() >= 0.999) {
+ systems.FUEL.Valves.refuelLeft.setBoolValue(0);
+ } else {
+ systems.FUEL.Valves.refuelLeft.setBoolValue(1);
+ }
+ } elsif (Dialogs.valve_l.getValue() == 1.0 and systems.FUEL.Quantity.leftInnerPct.getValue() < 0.999) {
+ systems.FUEL.Valves.refuelLeft.setBoolValue(1);
+ } else {
systems.FUEL.Valves.refuelLeft.setBoolValue(0);
}
- if (systems.FUEL.Quantity.centerPct.getValue() >= 0.999) {
- systems.FUEL.Valves.refuelCenter.setBoolValue(0);
- }
-
- if (systems.FUEL.Quantity.rightInnerPct.getValue() >= 0.999) {
+ if (Dialogs.valve_r.getValue() == 0.5) {
+ if (systems.FUEL.Quantity.rightInnerPct.getValue() >= 0.999) {
+ systems.FUEL.Valves.refuelRight.setBoolValue(0);
+ } else {
+ systems.FUEL.Valves.refuelRight.setBoolValue(1);
+ }
+ } elsif (Dialogs.valve_r.getValue() == 1.0 and systems.FUEL.Quantity.rightInnerPct.getValue() < 0.999) {
+ systems.FUEL.Valves.refuelRight.setBoolValue(1);
+ } else {
systems.FUEL.Valves.refuelRight.setBoolValue(0);
}
- if (abs(pts.Consumables.Fuel.totalFuelLbs.getValue() - fuelSvc.Nodes.requestTotalLbs.getValue()) < 5) {
+ if (Dialogs.valve_c.getValue() == 0.5 and fuelSvc._needCenter == 1) {
+ if (systems.FUEL.Quantity.centerPct.getValue() >= 0.999 or systems.FUEL.Quantity.leftInnerPct.getValue() < 0.999 or systems.FUEL.Quantity.rightInnerPct.getValue() < 0.999) {
+ systems.FUEL.Valves.refuelCenter.setBoolValue(0);
+ } else {
+ systems.FUEL.Valves.refuelCenter.setBoolValue(1);
+ }
+ } elsif (Dialogs.valve_c.getValue() == 1.0 and systems.FUEL.Quantity.centerPct.getValue() < 0.999) {
+ systems.FUEL.Valves.refuelCenter.setBoolValue(1);
+ } else {
+ systems.FUEL.Valves.refuelCenter.setBoolValue(0);
+ }
+
+ if (fuelSvc.Nodes.requestTotalLbs.getValue() - pts.Consumables.Fuel.totalFuelLbs.getValue() <= 0) {
+ screen.log.write("Refuelling complete.", 0, 0.584, 1);
fuelSvc.stop();
fuelTimer.stop();
}
diff --git a/Nasal/pneumatics-old.nas b/Nasal/Systems/pneumatics-old.nas
similarity index 100%
rename from Nasal/pneumatics-old.nas
rename to Nasal/Systems/pneumatics-old.nas
diff --git a/Nasal/pneumatics.nas b/Nasal/Systems/pneumatics.nas
similarity index 100%
rename from Nasal/pneumatics.nas
rename to Nasal/Systems/pneumatics.nas
diff --git a/Nasal/Systems/tyresmoke.nas b/Nasal/Systems/tyresmoke.nas
new file mode 100755
index 00000000..e0736dd5
--- /dev/null
+++ b/Nasal/Systems/tyresmoke.nas
@@ -0,0 +1,55 @@
+# ==================================== timer stuff ===============================
+var run_tyresmoke0 = 0;
+var run_tyresmoke1 = 0;
+var run_tyresmoke2 = 0;
+var tyresmoke_0 = aircraft.tyresmoke.new(0, 0, 0.8, 0);
+var tyresmoke_1 = aircraft.tyresmoke.new(1, 0, 0.8, 0);
+var tyresmoke_2 = aircraft.tyresmoke.new(2, 0, 0.8, 0);
+
+# =============================== listeners ===============================
+setlistener("gear/gear[0]/position-norm", func {
+ var gear = getprop("gear/gear[0]/position-norm");
+ if (gear == 1 ){
+ run_tyresmoke0 = 1;
+ }else{
+ run_tyresmoke0 = 0;
+ }
+},1,0);
+
+setlistener("gear/gear[1]/position-norm", func {
+ var gear = getprop("gear/gear[1]/position-norm");
+ if (gear == 1 ){
+ run_tyresmoke1 = 1;
+ }else{
+ run_tyresmoke1 = 0;
+ }
+},1,0);
+
+setlistener("gear/gear[2]/position-norm", func {
+ var gear = getprop("gear/gear[2]/position-norm");
+ if (gear == 1 ){
+ run_tyresmoke2 = 1;
+ }else{
+ run_tyresmoke2 = 0;
+ }
+},1,0);
+
+#============================ Rain ===================================
+aircraft.rain.init();
+
+#==================== Tyre Smoke / Rain Effects ======================
+var tyresmoke_and_rain = func {
+ if (run_tyresmoke0)
+ tyresmoke_0.update();
+ if (run_tyresmoke1)
+ tyresmoke_1.update();
+ if (run_tyresmoke2)
+ tyresmoke_2.update();
+ aircraft.rain.update();
+ settimer(tyresmoke_and_rain, 0);
+}# end tyresmoke_and_rain
+
+# == fire it up ===
+tyresmoke_and_rain();
+
+# end
diff --git a/Nasal/effects.nas b/Nasal/effects.nas
deleted file mode 100644
index f4816f26..00000000
--- a/Nasal/effects.nas
+++ /dev/null
@@ -1,4 +0,0 @@
- #============================ Tyre Smoke ===================================
- aircraft.tyresmoke_system.new(0, 1, 2);
-
-aircraft.rain.init();
diff --git a/Nasal/it-fbw.nas b/Nasal/it-fbw.nas
deleted file mode 100644
index 1709f75e..00000000
--- a/Nasal/it-fbw.nas
+++ /dev/null
@@ -1,283 +0,0 @@
-# Airbus A3XX FBW/Flight Control Computer System
-# Joshua Davidson (Octal450)
-
-# Copyright (c) 2019 Joshua Davidson (Octal450)
-
-# If All ELACs Fail, Alternate Law
-
-setprop("/it-fbw/roll-back", 0);
-setprop("/it-fbw/spd-hold", 0);
-setprop("/it-fbw/protections/overspeed", 0);
-setprop("/it-fbw/protections/overspeed-roll-back", 0);
-setprop("/it-fbw/speeds/vmo-mmo", 350);
-var mmoIAS = 0;
-
-var fctlInit = func {
- setprop("/controls/fctl/elac1", 1);
- setprop("/controls/fctl/elac2", 1);
- setprop("/controls/fctl/sec1", 1);
- setprop("/controls/fctl/sec2", 1);
- setprop("/controls/fctl/sec3", 1);
- setprop("/controls/fctl/fac1", 1);
- setprop("/controls/fctl/fac2", 1);
- setprop("/systems/fctl/elac1", 0);
- setprop("/systems/fctl/elac2", 0);
- setprop("/systems/fctl/sec1", 0);
- setprop("/systems/fctl/sec2", 0);
- setprop("/systems/fctl/sec3", 0);
- setprop("/systems/fctl/fac1", 0);
- setprop("/systems/fctl/fac2", 0);
- setprop("/it-fbw/degrade-law", 0);
- setprop("/it-fbw/override", 0);
- setprop("/it-fbw/law", 0);
- updatet.start();
- fbwt.start();
-}
-
-var update_loop = func {
- var elac1_sw = getprop("/controls/fctl/elac1");
- var elac2_sw = getprop("/controls/fctl/elac2");
- var sec1_sw = getprop("/controls/fctl/sec1");
- var sec2_sw = getprop("/controls/fctl/sec2");
- var sec3_sw = getprop("/controls/fctl/sec3");
- var fac1_sw = getprop("/controls/fctl/fac1");
- var fac2_sw = getprop("/controls/fctl/fac2");
-
- var elac1_fail = getprop("/systems/failures/elac1");
- var elac2_fail = getprop("/systems/failures/elac2");
- var sec1_fail = getprop("/systems/failures/sec1");
- var sec2_fail = getprop("/systems/failures/sec2");
- var sec3_fail = getprop("/systems/failures/sec3");
- var fac1_fail = getprop("/systems/failures/fac1");
- var fac2_fail = getprop("/systems/failures/fac2");
-
- var ac_ess = props.globals.getNode("/systems/electrical/bus/ac-ess").getValue();
- var dc_ess = props.globals.getNode("/systems/electrical/bus/dc-ess").getValue();
- var dc_ess_shed = props.globals.getNode("/systems/electrical/bus/dc-ess-shed").getValue();
- var ac1 = props.globals.getNode("/systems/electrical/bus/ac-1").getValue();
- var ac2 = props.globals.getNode("/systems/electrical/bus/ac-2").getValue();
- var dc1 = props.globals.getNode("/systems/electrical/bus/dc-1").getValue();
- var dc2 = props.globals.getNode("/systems/electrical/bus/dc-2").getValue();
- var battery1_sw = props.globals.getNode("/controls/electrical/switches/bat-1").getValue();
- var battery2_sw = props.globals.getNode("/controls/electrical/switches/bat-2").getValue();
- var elac1_test = getprop("/systems/electrical/elac1-test");
- var elac2_test = getprop("/systems/electrical/elac2-test");
-
- if (elac1_sw and !elac1_fail and (dc_ess >= 25 or battery1_sw) and !elac1_test) {
- setprop("/systems/fctl/elac1", 1);
- setprop("/systems/failures/elac1-fault", 0);
- } else if (elac1_sw and (elac1_fail or (dc_ess < 25 and !battery1_sw)) and !elac1_test) {
- setprop("/systems/failures/elac1-fault", 1);
- setprop("/systems/fctl/elac1", 0);
- } else if (!elac1_test) {
- setprop("/systems/failures/elac1-fault", 0);
- setprop("/systems/fctl/elac1", 1);
- }
-
- if (elac2_sw and !elac2_fail and (dc2 >= 25 or battery2_sw) and !elac2_test) {
- setprop("/systems/fctl/elac2", 1);
- setprop("/systems/failures/elac2-fault", 0);
- } else if (elac2_sw and (elac2_fail or (dc2 < 25 and !battery2_sw)) and !elac2_test) {
- setprop("/systems/failures/elac2-fault", 1);
- setprop("/systems/fctl/elac2", 0);
- } else if (!elac2_test) {
- setprop("/systems/failures/elac2-fault", 0);
- setprop("/systems/fctl/elac2", 1);
- }
-
- if (sec1_sw and !sec1_fail and ac_ess >= 110) {
- setprop("/systems/fctl/sec1", 1);
- setprop("/systems/failures/spoiler-l3", 0);
- setprop("/systems/failures/spoiler-r3", 0);
- setprop("/systems/failures/spoiler-l4", 0);
- setprop("/systems/failures/spoiler-r4", 0);
- } else {
- setprop("/systems/fctl/sec1", 0);
- setprop("/systems/failures/spoiler-l3", 1);
- setprop("/systems/failures/spoiler-r3", 1);
- setprop("/systems/failures/spoiler-l4", 1);
- setprop("/systems/failures/spoiler-r4", 1);
- }
-
- if (sec2_sw and !sec2_fail and ac_ess >= 110) {
- setprop("/systems/fctl/sec2", 1);
- setprop("/systems/failures/spoiler-l5", 0);
- setprop("/systems/failures/spoiler-r5", 0);
- } else {
- setprop("/systems/fctl/sec2", 0);
- setprop("/systems/failures/spoiler-l5", 1);
- setprop("/systems/failures/spoiler-r5", 1);
- }
-
- if (sec3_sw and !sec3_fail and ac_ess >= 110) {
- setprop("/systems/fctl/sec3", 1);
- setprop("/systems/failures/spoiler-l1", 0);
- setprop("/systems/failures/spoiler-r1", 0);
- setprop("/systems/failures/spoiler-l2", 0);
- setprop("/systems/failures/spoiler-r2", 0);
- } else {
- setprop("/systems/fctl/sec3", 0);
- setprop("/systems/failures/spoiler-l1", 1);
- setprop("/systems/failures/spoiler-r1", 1);
- setprop("/systems/failures/spoiler-l2", 1);
- setprop("/systems/failures/spoiler-r2", 1);
- }
-
- if (fac1_sw and !fac1_fail and (ac_ess >= 110 or dc_ess_shed >= 25)) {
- setprop("/systems/fctl/fac1", 1);
- setprop("/systems/failures/rudder", 0);
- setprop("/systems/failures/fac1-fault", 0);
- } else if (fac1_sw and (battery1_sw or battery2_sw) and (fac1_fail or ac_ess < 110 or dc_ess_shed < 25)) {
- setprop("/systems/failures/fac1-fault", 1);
- setprop("/systems/fctl/fac1", 0);
- if (!fac2_sw or fac2_fail) {
- setprop("/systems/failures/rudder", 1);
- }
- } else {
- setprop("/systems/failures/fac1-fault", 0);
- setprop("/systems/fctl/fac1", 0);
- if (!fac2_sw or fac2_fail) {
- setprop("/systems/failures/rudder", 1);
- }
- }
-
- if (fac2_sw and !fac2_fail and (ac2 >= 110 or dc2 >= 25)) {
- setprop("/systems/fctl/fac2", 1);
- setprop("/systems/failures/fac2-fault", 0);
- } else if (fac2_sw and (fac2_fail or ac2 < 110 or dc2 < 25)) {
- setprop("/systems/failures/fac2-fault", 1);
- setprop("/systems/fctl/fac2", 0);
- if (!fac1_sw or fac1_fail) {
- setprop("/systems/failures/rudder", 1);
- }
- } else {
- setprop("/systems/fctl/fac2", 0);
- setprop("/systems/failures/fac2-fault", 0);
- if (!fac1_sw or fac1_fail) {
- setprop("/systems/failures/rudder", 1);
- }
- }
-
- var elac1 = getprop("/systems/fctl/elac1");
- var elac2 = getprop("/systems/fctl/elac2");
- var sec1 = getprop("/systems/fctl/sec1");
- var sec2 = getprop("/systems/fctl/sec2");
- var sec3 = getprop("/systems/fctl/sec3");
- var fac1 = getprop("/systems/fctl/fac1");
- var fac2 = getprop("/systems/fctl/fac2");
- var law = getprop("/it-fbw/law");
-
- # Degrade logic, all failures which degrade FBW need to go here. -JD
- if (getprop("/gear/gear[1]/wow") == 0 and getprop("/gear/gear[2]/wow") == 0) {
- if (!elac1 and !elac2) {
- if (law == 0) {
- setprop("/it-fbw/degrade-law", 1);
- }
- }
- if (ac_ess >= 110 and getprop("/systems/hydraulic/blue-psi") >= 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500) {
- if (law == 0 or law == 1) {
- setprop("/it-fbw/degrade-law", 2);
- }
- }
- if (ac_ess < 110 or (getprop("/systems/hydraulic/blue-psi") < 1500 and getprop("/systems/hydraulic/green-psi") < 1500 and getprop("/systems/hydraulic/yellow-psi") < 1500)) {
- setprop("/it-fbw/degrade-law", 3);
- }
- }
-
- if (getprop("/controls/gear/gear-down") == 1 and getprop("/it-autoflight/output/ap1") == 0 and getprop("/it-autoflight/output/ap2") == 0) {
- if (law == 1) {
- setprop("/it-fbw/degrade-law", 2);
- }
- }
-
- # degrade loop runs faster; reset this variable
- var law = getprop("/it-fbw/law");
-
- # Mech Backup can always return to direct, if it can.
- if (law == 3 and ac_ess >= 110 and (getprop("/systems/hydraulic/green-psi") >= 1500 or getprop("/systems/hydraulic/blue-psi") >= 1500 or getprop("/systems/hydraulic/yellow-psi") >= 1500)) {
- setprop("/it-fbw/degrade-law", 2);
- }
-
- mmoIAS = (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") / getprop("/instrumentation/airspeed-indicator/indicated-mach")) * 0.82;
- if (mmoIAS < 350) {
- setprop("/it-fbw/speeds/vmo-mmo", mmoIAS);
- } else {
- setprop("/it-fbw/speeds/vmo-mmo", 350);
- }
-
- if (getprop("/instrumentation/airspeed-indicator/indicated-speed-kt") > getprop("/it-fbw/speeds/vmo-mmo") + 6 and (law == 0 or law == 1)) {
- if (getprop("/it-autoflight/input/ap1") == 1 or getprop("/it-autoflight/input/ap2") == 1) {
- fcu.apOff("hard", 0);
- }
- if (getprop("/it-fbw/protections/overspeed") != 1) {
- setprop("/it-fbw/protections/overspeed", 1);
- }
- } else {
- if (getprop("/it-fbw/protections/overspeed") != 0) {
- setprop("/it-fbw/protections/overspeed", 0);
- }
- }
-}
-
-var fbw_loop = func {
- var ail = getprop("/controls/flight/aileron");
-
- if (ail > 0.4 and getprop("/orientation/roll-deg") >= -33.5) {
- setprop("/it-fbw/roll-lim", "67");
- if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
- setprop("/it-fbw/roll-back", 0);
- }
- if (getprop("/it-fbw/roll-back") == 0 and (getprop("/orientation/roll-deg") > 33.5 or getprop("/orientation/roll-deg") < -33.5)) {
- setprop("/it-fbw/roll-back", 1);
- }
- } else if (ail < -0.4 and getprop("/orientation/roll-deg") <= 33.5) {
- setprop("/it-fbw/roll-lim", "67");
- if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
- setprop("/it-fbw/roll-back", 0);
- }
- if (getprop("/it-fbw/roll-back") == 0 and (getprop("/orientation/roll-deg") > 33.5 or getprop("/orientation/roll-deg") < -33.5)) {
- setprop("/it-fbw/roll-back", 1);
- }
- } else if (ail < 0.04 and ail > -0.04) {
- setprop("/it-fbw/roll-lim", "33");
- if (getprop("/it-fbw/roll-back") == 1 and getprop("/orientation/roll-deg") <= 33.5 and getprop("/orientation/roll-deg") >= -33.5) {
- setprop("/it-fbw/roll-back", 0);
- }
- }
-
- if (ail > 0.04 or ail < -0.04) {
- setprop("/it-fbw/protections/overspeed-roll-back", 0);
- } else if (ail < 0.04 and ail > -0.04) {
- setprop("/it-fbw/protections/overspeed-roll-back", 1);
- }
-
- if (getprop("/it-fbw/override") == 0) {
- var degrade = getprop("/it-fbw/degrade-law");
- if (degrade == 0) {
- if (getprop("/it-fbw/law") != 0) {
- setprop("/it-fbw/law", 0);
- }
- } else if (degrade == 1) {
- if (getprop("/it-fbw/law") != 1) {
- setprop("/it-fbw/law", 1);
- }
- } else if (degrade == 2) {
- if (getprop("/it-fbw/law") != 2) {
- setprop("/it-fbw/law", 2);
- }
- } else if (degrade == 3) {
- if (getprop("/it-fbw/law") != 3) {
- setprop("/it-fbw/law", 3);
- }
- }
- }
-
- if (getprop("/it-fbw/law") != 0) {
- if (getprop("/it-autoflight/output/ap1") == 1 or getprop("/it-autoflight/output/ap2") == 1) {
- fcu.apOff("hard", 0);
- }
- }
-}
-
-var updatet = maketimer(0.1, update_loop);
-var fbwt = maketimer(0.03, fbw_loop);
diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml
index c31ba0a2..53846b25 100644
--- a/Sounds/A320-common-sound.xml
+++ b/Sounds/A320-common-sound.xml
@@ -1581,14 +1581,32 @@
100
+
+ Cricket
+ Aircraft/A320-family/Sounds/Cockpit/cricket.wav
+ looped
+ avionics
+
+ /sim/sound/warnings/cricket
+
+
+ 0.2
+
+ 10
+ 100
+
+
stall-voice
looped
Aircraft/A320-family/Sounds/Cockpit/stall_voice.wav
avionics
- warnings/stall/active
+ /sim/sound/warnings/stall-voice
+
+ 2.0
+
10
100.0
diff --git a/Sounds/Cockpit/cricket.wav b/Sounds/Cockpit/cricket.wav
index 0e23005a..54ba04ea 100644
Binary files a/Sounds/Cockpit/cricket.wav and b/Sounds/Cockpit/cricket.wav differ
diff --git a/Sounds/Cockpit/stall_voice.wav b/Sounds/Cockpit/stall_voice.wav
index ff066513..8d7ae005 100644
Binary files a/Sounds/Cockpit/stall_voice.wav and b/Sounds/Cockpit/stall_voice.wav differ
diff --git a/Systems/a320-100-fuel.xml b/Systems/a320-100-fuel.xml
deleted file mode 100644
index 4225d107..00000000
--- a/Systems/a320-100-fuel.xml
+++ /dev/null
@@ -1,417 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- /systems/fuel/pumps/all-eng-pump-off eq 1
-
- /systems/electrical/bus/ac-ess-shed ge 110
- /systems/electrical/bus/ac-si-bus ge 110
-
-
-
-
-
-
-
- /controls/fuel/switches/pump-left-1 eq 1
-
-
- /systems/electrical/sources/idg-1/pmg-volt ge 110
- /controls/electrical/switches/gen-1-line-contactor eq 1
-
- /systems/electrical/bus/ac-1 ge 110
-
-
-
-
-
-
-
- /controls/fuel/switches/pump-left-2 eq 1
- /systems/electrical/bus/ac-2 ge 110
-
-
-
-
-
-
- /controls/fuel/switches/pump-right-1 eq 1
-
-
- /systems/electrical/sources/idg-1/pmg-volt ge 110
- /controls/electrical/switches/gen-1-line-contactor eq 1
-
- /systems/electrical/bus/ac-1 ge 110
-
-
-
-
-
-
-
- /controls/fuel/switches/pump-right-2 eq 1
- /systems/electrical/bus/ac-2 ge 110
-
-
-
-
-
-
- /systems/fuel/left-inner-full eq 1
- propulsion/tank[1]/contents-lbs lt 11420
- propulsion/tank[1]/contents-lbs ge 10300
-
-
- propulsion/tank[1]/contents-lbs eq 11420
-
-
-
-
-
-
- /systems/fuel/right-inner-full eq 1
- propulsion/tank[2]/contents-lbs lt 11420
- propulsion/tank[2]/contents-lbs ge 10300
-
-
- propulsion/tank[2]/contents-lbs eq 11420
-
-
-
-
-
-
- /systems/fuel/pumps/wing-pump-left-1-operate eq 0
- /systems/fuel/pumps/wing-pump-left-2-operate eq 0
- /systems/fuel/pumps/wing-pump-right-1-operate eq 0
- /systems/fuel/pumps/wing-pump-right-2-operate eq 0
-
-
-
-
-
-
- propulsion/tank[1]/contents-lbs le 1650
-
-
-
-
-
-
- propulsion/tank[2]/contents-lbs le 1650
-
-
-
-
-
-
-
- /systems/fuel/valves/outer-inner-transfer-valve-1-cmd eq 1
- /systems/fuel/refuel/refuelling eq 0
-
-
- /systems/fuel/quantity/left-wing-inner-low eq 1
-
-
-
-
-
-
- /systems/electrical/bus/dc-ess-shed ge 25
-
-
-
-
- /systems/fuel/valves/outer-inner-transfer-valve-1-cmd
- /systems/fuel/valves/outer-inner-transfer-valve-1-power
-
-
-
-
-
- /systems/fuel/valves/outer-inner-transfer-valve-2-cmd eq 1
- /systems/fuel/refuel/refuelling eq 0
-
-
- /systems/fuel/quantity/right-wing-inner-low eq 1
-
-
-
-
-
-
- /systems/electrical/bus/dc-ess-shed ge 25
-
-
-
-
- /systems/fuel/valves/outer-inner-transfer-valve-2-cmd
- /systems/fuel/valves/outer-inner-transfer-valve-2-power
-
-
-
-
-
-
- /controls/fuel/switches/crossfeed eq 1
-
-
-
-
-
-
- /systems/electrical/bus/dc-2 ge 25
- /systems/electrical/bus/dc-ess-shed ge 25
-
-
-
-
- /systems/fuel/valves/crossfeed-valve-cmd
- /systems/fuel/valves/crossfeed-valve-power
-
-
-
-
-
-
- /controls/engines/engine[0]/fire-btn eq 0
- /controls/engines/engine[0]/cutoff-switch eq 0
-
-
-
-
-
-
- /systems/electrical/bus/dc-ess-shed ge 25
- /systems/electrical/bus/dc-2 ge 25
-
-
-
-
- /systems/fuel/valves/engine-1-lp-valve-cmd
- /systems/fuel/valves/engine-1-lp-valve-power
-
-
-
-
-
- /controls/engines/engine[1]/fire-btn eq 0
- /controls/engines/engine[1]/cutoff-switch eq 0
-
-
-
-
-
-
- /systems/electrical/bus/dc-ess-shed ge 25
- /systems/electrical/bus/dc-2 ge 25
-
-
-
-
- /systems/fuel/valves/engine-2-lp-valve-cmd
- /systems/fuel/valves/engine-2-lp-valve-power
-
-
-
-
-
- /controls/APU/master eq 1
- /controls/APU/fire-btn eq 0
-
-
-
-
-
-
- /systems/electrical/bus/dc-bat ge 25
- /systems/electrical/bus/dc-hot-1 ge 25
-
-
-
-
- /systems/fuel/valves/apu-lp-valve-cmd
- /systems/fuel/valves/apu-lp-valve-power
-
-
-
-
-
- /systems/fuel/pumps/apu-operate
- 25.3
-
-
-
- /systems/fuel/pumps/apu-psi-cmd
- 5
- 10
-
-
-
- /systems/fuel/pumps/wing-pump-left-1-operate
- 25.3
-
-
-
- /systems/fuel/pumps/wing-pump-left-1-psi-cmd
- 5
- 10
-
-
-
- /systems/fuel/pumps/wing-pump-left-2-operate
- 25.3
-
-
-
- /systems/fuel/pumps/wing-pump-left-2-psi-cmd
- 5
- 10
-
-
-
- /systems/fuel/pumps/wing-pump-right-1-operate
- 25.3
-
-
-
- /systems/fuel/pumps/wing-pump-right-1-psi-cmd
- 5
- 10
-
-
-
- /systems/fuel/pumps/wing-pump-right-2-operate
- 25.3
-
-
-
- /systems/fuel/pumps/wing-pump-right-2-psi-cmd
- 5
- 10
-
-
-
-
-
-
-
-
- /systems/fuel/pumps/wing-pump-left-1-operate eq 1
- /systems/fuel/pumps/wing-pump-left-2-operate eq 1
-
-
- /accelerations/pilot-gdamped ge 0.5
-
-
-
-
-
-
- /systems/fuel/pumps/wing-pump-right-1-operate eq 1
- /systems/fuel/pumps/wing-pump-right-2-operate eq 1
-
-
- /accelerations/pilot-gdamped ge 0.5
-
-
-
-
-
-
- /systems/fuel/feed-left-inner eq 1
- propulsion/tank[1]/contents-lbs gt 31.24
- propulsion/tank[4]/contents-lbs lt 9
-
-
-
-
-
-
- /systems/fuel/valves/crossfeed-valve eq 1
- propulsion/tank[2]/contents-lbs gt 31.24
- propulsion/tank[4]/contents-lbs lt 9
-
-
-
-
-
-
- /systems/fuel/valves/crossfeed-valve eq 1
- /systems/fuel/feed-left-inner eq 1
- propulsion/tank[1]/contents-lbs gt 31.24
- propulsion/tank[5]/contents-lbs lt 9
-
-
-
-
-
-
- /systems/fuel/feed-right-inner eq 1
- propulsion/tank[2]/contents-lbs gt 31.24
- propulsion/tank[5]/contents-lbs lt 9
-
-
-
-
-
-
- /systems/fuel/valves/outer-inner-transfer-valve-1 eq 1
- /accelerations/pilot-gdamped ge 0.5
-
-
-
-
-
-
- /systems/fuel/valves/outer-inner-transfer-valve-2 eq 1
- /accelerations/pilot-gdamped ge 0.5
-
-
-
-
- -/systems/fuel/internal/left-wing-outer-to-inner-tank
-
-
-
-
- /systems/fuel/internal/left-wing-outer-to-inner-tank
- -/systems/fuel/internal/left-wing-tank-eng-1
- -/systems/fuel/internal/left-wing-tank-eng-2
-
-
-
-
- /systems/fuel/internal/right-wing-outer-to-inner-tank
- -/systems/fuel/internal/right-wing-tank-eng-1
- -/systems/fuel/internal/right-wing-tank-eng-2
-
-
-
-
- -/systems/fuel/internal/right-wing-outer-to-inner-tank
-
-
-
-
- /systems/fuel/internal/left-wing-tank-eng-1
- /systems/fuel/internal/right-wing-tank-eng-1
-
-
-
-
- /systems/fuel/internal/left-wing-tank-eng-2
- /systems/fuel/internal/right-wing-tank-eng-2
-
-
-
-
-
diff --git a/Systems/a320-adr.xml b/Systems/a320-adr.xml
new file mode 100644
index 00000000..8e6b45b6
--- /dev/null
+++ b/Systems/a320-adr.xml
@@ -0,0 +1,1015 @@
+
+
+
+
+
+
+
+
+
+
+
+ aero/alpha-deg
+
+ /velocities/groundspeed-kt
+
+ 0 0.0
+ 5 0.0
+ 6 1.0
+
+
+
+
+
+
+
+ aero/alpha-deg-corrected
+
+ 12
+ -180
+ 180
+
+
+
+
+ aero/alpha-deg-corrected
+
+ 12
+ -180
+ 180
+
+
+
+
+ aero/alpha-deg-corrected
+
+ 12
+ -180
+ 180
+
+
+
+
+ /systems/pitot[0]/measured-total-pressure-inhg
+
+
+
+ /systems/pitot[1]/measured-total-pressure-inhg
+
+
+
+ /systems/pitot[2]/measured-total-pressure-inhg
+
+
+
+ /systems/static[0]/pressure-inhg
+
+
+
+ /systems/static[1]/pressure-inhg
+
+
+
+ /systems/static[2]/pressure-inhg
+
+
+
+
+
+
+
+ /environment/temperature-degc
+ 273.15
+
+
+ 1
+
+ 0.2
+ 0.995
+
+ velocities/mach
+ 2
+
+
+
+
+ 273.15
+
+
+
+
+
+
+
+
+
+ /environment/temperature-degc
+ 273.15
+
+
+ 1
+
+ 0.2
+ 0.996
+
+ velocities/mach
+ 2
+
+
+
+
+ 273.15
+
+
+
+
+
+ /systems/navigation/probes/tat-1/compute-tat
+
+ 11
+ -256
+ 256
+
+
+
+
+ /systems/navigation/probes/tat-2/compute-tat
+
+ 11
+ -256
+ 256
+
+
+
+
+
+
+
+
+ /instrumentation/altimeter[0]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[1]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[2]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[3]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[4]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[5]/pressure-alt-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[0]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[1]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[2]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[3]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[4]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+ /instrumentation/altimeter[5]/indicated-altitude-ft
+
+ 17
+ -65536
+ 65536
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-1
+ /systems/navigation/probes/static-1
+
+ 29.9212553
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 9999999999999999
+
+
+
+
+
+
+ 661.47
+
+ /systems/navigation/adr/computation/cas-1-product
+ 0.5
+
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-2
+ /systems/navigation/probes/static-2
+
+ 29.9212553
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 9999999999999999
+
+
+
+
+
+
+ 661.47
+
+ /systems/navigation/adr/computation/cas-2-product
+ 0.5
+
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-3
+ /systems/navigation/probes/static-3
+
+ 29.9212553
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 9999999999999999
+
+
+
+
+
+
+ 661.47
+
+ /systems/navigation/adr/computation/cas-3-product
+ 0.5
+
+
+
+
+
+
+ /systems/navigation/adr/computation/cas-1-compute
+
+ 14
+ 0
+ 1024
+
+
+
+
+ /systems/navigation/adr/computation/cas-2-compute
+
+ 14
+ 0
+ 1024
+
+
+
+
+ /systems/navigation/adr/computation/cas-3-compute
+
+ 14
+ 0
+ 1024
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-1
+ /systems/navigation/probes/static-1
+
+ /systems/navigation/probes/static-1
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 999999999999
+
+
+
+
+
+
+ /systems/navigation/adr/computation/mach-1-product
+ 0.5
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-2
+ /systems/navigation/probes/static-2
+
+ /systems/navigation/probes/static-2
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 999999999999
+
+
+
+
+
+
+ /systems/navigation/adr/computation/mach-2-product
+ 0.5
+
+
+
+
+
+
+
+ 5
+
+
+
+
+
+ /systems/navigation/probes/pitot-3
+ /systems/navigation/probes/static-3
+
+ /systems/navigation/probes/static-3
+
+ 1
+
+
+ 2
+ 7
+
+
+ 1
+
+
+
+
+ 0
+ 999999999999
+
+
+
+
+
+
+ /systems/navigation/adr/computation/mach-3-product
+ 0.5
+
+
+
+
+
+ /systems/navigation/adr/computation/mach-1-compute
+
+ 16
+ 0
+ 4.096
+
+
+
+
+ /systems/navigation/adr/computation/mach-2-compute
+
+ 16
+ 0
+ 4.096
+
+
+
+
+ /systems/navigation/adr/computation/mach-3-compute
+
+ 16
+ 0
+ 4.096
+
+
+
+
+
+
+ /systems/navigation/probes/tat-1/tat
+
+
+ /velocities/TAS
+ 2
+
+ 7569
+
+
+
+
+
+
+ /environment/temperature-degc
+
+ 11
+ -256
+ 256
+
+
+
+
+ /environment/temperature-degc
+
+ 11
+ -256
+ 256
+
+
+
+
+
+
+ 661.47
+ /systems/navigation/adr/computation/mach-1
+
+
+
+ /systems/navigation/adr/computation/sat-1
+ 273.15
+
+ 288.15
+
+ 0.5
+
+
+
+
+
+
+
+
+ 661.47
+ /systems/navigation/adr/computation/mach-2
+
+
+
+ /systems/navigation/adr/computation/sat-2
+ 273.15
+
+ 288.15
+
+ 0.5
+
+
+
+
+
+
+
+
+ 661.47
+ /systems/navigation/adr/computation/mach-3
+
+
+
+ /systems/navigation/adr/computation/sat-1
+ 273.15
+
+ 288.15
+
+ 0.5
+
+
+
+
+
+
+ /systems/navigation/adr/computation/tas-1-compute
+
+ 15
+ 0
+ 2048
+
+
+
+
+ /systems/navigation/adr/computation/tas-2-compute
+
+ 15
+ 0
+ 2048
+
+
+
+
+ /systems/navigation/adr/computation/tas-3-compute
+
+ 15
+ 0
+ 2048
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-1
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-3
+
+ 354
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/mach-1
+ /systems/navigation/adr/output/mach-2
+ /systems/navigation/adr/output/mach-3
+
+ 0.826
+
+ 1
+ 0
+
+
+
+
+
+
+
+ /systems/navigation/adr/computation/overspeed-vle-speed eq 1
+
+ /ECAM/Lower/door-left ne 0
+ /ECAM/Lower/door-right ne 0
+ /ECAM/Lower/door-nose-left ne 0
+ /ECAM/Lower/door-nose-right ne 0
+ /gear/gear[0]/position-norm ne 0
+ /gear/gear[1]/position-norm ne 0
+ /gear/gear[2]/position-norm ne 0
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-1
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-3
+
+ 284
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-1
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-3
+
+ /systems/navigation/adr/computation/overspeed-vfe-spd
+
+ 1
+ 0
+
+
+
+
+
+
+
+ /systems/navigation/adr/computation/overspeed-vmo
+ /systems/navigation/adr/computation/overspeed-mmo
+ /systems/navigation/adr/computation/overspeed-vle
+ /systems/navigation/adr/computation/overspeed-vfe
+
+
+
+
+
+
+
+
+
+ /systems/navigation/probes/aoa-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/probes/aoa-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/probes/aoa-3
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/baro-alt-1-capt
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/baro-alt-2-capt
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/baro-alt-3-capt
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/baro-alt-1-fo
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/baro-alt-2-fo
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/baro-alt-3-fo
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-1-capt
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-2-capt
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-3-capt
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-1-fo
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-2-fo
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/baro-alt-corrected-3-fo
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/cas-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/cas-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/cas-3
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/mach-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/mach-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/mach-3
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/sat-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/sat-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/sat-1
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/adr/computation/tas-1
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/adr/computation/tas-2
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/adr/computation/tas-3
+ /systems/navigation/adr/operating-3
+
+
+
+ /systems/navigation/probes/tat-1/tat
+ /systems/navigation/adr/operating-1
+
+
+
+ /systems/navigation/probes/tat-2/tat
+ /systems/navigation/adr/operating-2
+
+
+
+ /systems/navigation/probes/tat-1/tat
+ /systems/navigation/adr/operating-3
+
+
+
+
+
+ /systems/navigation/adr/operating-1
+ /systems/navigation/adr/operating-2
+ /systems/navigation/adr/operating-3
+
+
+
+
+
+ /systems/navigation/adr/computation/overspeed
+ /systems/navigation/adr/any-adr-on
+
+
+
+ /instrumentation/radar-altimeter[0]/radar-altitude-ft
+ 1
+
+ 0
+ 5000
+
+
+
+
+ /instrumentation/radar-altimeter[1]/radar-altitude-ft
+ 1
+
+ 0
+ 5000
+
+
+
+
+
+ /instrumentation/transponder/altimeter-input-src eq 1
+
+
+ /instrumentation/transponder/altimeter-input-src eq 2
+
+
+ /instrumentation/transponder/altimeter-input-src eq 3
+
+
+
+
+
+ /instrumentation/transponder/airspeed-input-src eq 1
+
+
+ /instrumentation/transponder/airspeed-input-src eq 2
+
+
+ /instrumentation/transponder/airspeed-input-src eq 3
+
+
+
+
+
+ /FMGC/active-fmgc-channel eq 1
+ /systems/fmgc/cas-compare/cas-reject-1 eq 0
+
+
+ /FMGC/active-fmgc-channel eq 2
+ /systems/fmgc/cas-compare/cas-reject-2 eq 0
+
+
+ /systems/fmgc/cas-compare/cas-reject-1 eq 1
+ /systems/fmgc/cas-compare/cas-reject-2 eq 1
+ /systems/fmgc/cas-compare/cas-reject-3 eq 0
+
+
+
+
+
+ /FMGC/active-fmgc-channel eq 1
+ /systems/fmgc/cas-compare/cas-reject-1 eq 0
+
+
+ /FMGC/active-fmgc-channel eq 2
+ /systems/fmgc/cas-compare/cas-reject-2 eq 0
+
+
+ /systems/fmgc/cas-compare/cas-reject-1 eq 1
+ /systems/fmgc/cas-compare/cas-reject-2 eq 1
+ /systems/fmgc/cas-compare/cas-reject-3 eq 0
+
+
+
+
+
diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml
index 1e28b9c8..5f3b8d4f 100644
--- a/Systems/a320-electrical.xml
+++ b/Systems/a320-electrical.xml
@@ -1348,8 +1348,8 @@
/systems/electrical/bus/dc-2 ge 25
-
-
+
@@ -1357,10 +1357,10 @@
-
+
@@ -1368,9 +1368,7 @@
-
-
diff --git a/Systems/a320-fmgc.xml b/Systems/a320-fmgc.xml
new file mode 100644
index 00000000..93919e38
--- /dev/null
+++ b/Systems/a320-fmgc.xml
@@ -0,0 +1,161 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-1
+ /systems/navigation/adr/output/cas-3
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-3
+
+
+
+
+
+
+
+
+
+ /systems/navigation/adr/output/cas-2
+ /systems/navigation/adr/output/cas-1
+
+
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-1-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-1
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-3
+ 5
+
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-1-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-1
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-3
+ 5
+
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-2-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-1
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-1-to-3
+ 5
+
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-1-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-3
+ 5
+
+
+ /systems/fmgc/cas-compare/cas-2-to-1
+ 5
+
+
+ 1
+ 0
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-reject-1
+ 1
+
+ 3
+ 1
+
+
+
+
+
+
+
+
+ /systems/fmgc/cas-compare/cas-reject-2
+ 1
+
+ 3
+ 2
+
+
+
+
+
+
diff --git a/Systems/a320-fuel.xml b/Systems/a320-fuel.xml
index 5af3f62b..25e125ed 100644
--- a/Systems/a320-fuel.xml
+++ b/Systems/a320-fuel.xml
@@ -194,6 +194,7 @@
/systems/fuel/refuel/refuelling eq 0
+ /systems/fuel/valves/outer-inner-transfer-valve-1-power ne 0
/systems/fuel/quantity/left-wing-inner-low eq 1
/systems/fuel/quantity/right-wing-inner-low eq 1
@@ -204,8 +205,9 @@
-
+
/systems/electrical/bus/dc-ess-shed ge 25
+ /systems/electrical/bus/dc-2 ge 25
@@ -221,6 +223,7 @@
/systems/fuel/refuel/refuelling eq 0
+ /systems/fuel/valves/outer-inner-transfer-valve-2-power ne 0
/systems/fuel/quantity/left-wing-inner-low eq 1
/systems/fuel/quantity/right-wing-inner-low eq 1
@@ -231,8 +234,9 @@
-
+
/systems/electrical/bus/dc-ess-shed ge 25
+ /systems/electrical/bus/dc-2 ge 25
@@ -619,21 +623,35 @@
+
+ /systems/fuel/valves/outer-inner-transfer-valve-1 eq 1
+ /accelerations/pilot-gdamped ge 0.5
+ /consumables/fuel/tank[0]/level-gal_us gt /consumables/fuel/tank[0]/unusable-gal_us
+ /consumables/fuel/tank[1]/level-norm lt 0.9999
+ /systems/fuel/refuel/refuelling eq 1
+
/systems/fuel/valves/outer-inner-transfer-valve-1 eq 1
/accelerations/pilot-gdamped ge 0.5
/consumables/fuel/tank[0]/level-gal_us gt /consumables/fuel/tank[0]/unusable-gal_us
- /consumables/fuel/tank[1]/level-norm lt 0.999
+ /consumables/fuel/tank[1]/level-norm lt 0.9999
+
+ /systems/fuel/valves/outer-inner-transfer-valve-2 eq 1
+ /accelerations/pilot-gdamped ge 0.5
+ /consumables/fuel/tank[4]/level-gal_us gt /consumables/fuel/tank[0]/unusable-gal_us
+ /consumables/fuel/tank[3]/level-norm lt 0.9999
+ /systems/fuel/refuel/refuelling eq 1
+
/systems/fuel/valves/outer-inner-transfer-valve-2 eq 1
/accelerations/pilot-gdamped ge 0.5
/consumables/fuel/tank[4]/level-gal_us gt /consumables/fuel/tank[4]/unusable-gal_us
- /consumables/fuel/tank[3]/level-norm lt 0.999
+ /consumables/fuel/tank[3]/level-norm lt 0.9999
diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml
new file mode 100644
index 00000000..6c340e20
--- /dev/null
+++ b/Systems/ecam-proprules.xml
@@ -0,0 +1,232 @@
+
+
+
+
+
+
+
+ RS
+
+ /systems/electrical/some-electric-thingie/emer-elec-config-generator-1-bustie
+
+
+
+ /systems/electrical/some-electric-thingie/emer-elec-config
+
+
+
+
+
+
+ RS
+
+ /systems/electrical/some-electric-thingie/emer-elec-config-generator-2-bustie
+
+
+
+ /systems/electrical/some-electric-thingie/emer-elec-config
+
+
+
+
+
+
+ RS
+
+ /systems/electrical/some-electric-thingie/emer-elec-config-generator-1
+
+
+
+ /systems/electrical/some-electric-thingie/emer-elec-config
+
+
+
+
+
+
+ RS
+
+ /systems/electrical/some-electric-thingie/emer-elec-config-generator-2
+
+
+
+ /systems/electrical/some-electric-thingie/emer-elec-config
+
+
+
+
+
+
+ RS
+
+ /ECAM/to-config-set
+
+
+ /ECAM/to-config-reset
+
+
+
+
+
+ RS
+
+ /ECAM/to-memo-set
+
+
+ /ECAM/to-memo-reset
+
+
+
+
+
+ SR
+
+ /ECAM/ldg-memo-set
+
+
+ /ECAM/ldg-memo-reset
+
+
+
+
+
+ RS
+
+ /ECAM/ldg-memo-2200-set
+
+
+ /ECAM/ldg-memo-2200-reset
+
+
+
+
+
+ SR
+
+ /ECAM/phases/flipflop/gear-set
+
+
+ /ECAM/phases/flipflop/gear-reset
+
+
+
+
+
+ SR
+
+ /ECAM/phases/flipflop/phase-2-set
+
+
+ /ECAM/phases/flipflop/phase-2-reset
+
+
+
+
+
+ RS
+
+ /ECAM/phases/flipflop/phase-10-set
+
+
+ /ECAM/phases/flipflop/phase-10-reset
+
+
+
+
+
+ RS
+
+ /ECAM/flipflop/recall-set
+
+
+ /ECAM/flipflop/recall-reset
+
+
+
+
+
+ monostable
+
+
+
+ /ECAM/phases/speed-gt-80
+
+
+
+
+
+
+ monostable
+
+
+ /ECAM/phases/monostable/phase-1-300
+
+
+
+
+
+ monostable
+
+
+ /ECAM/phases/monostable/phase-5
+
+
+
+
+
+ monostable
+
+
+ /ECAM/phases/monostable/phase-7
+
+
+
+
+
+ monostable
+
+
+ /ECAM/buttons/recall-status-normal
+
+
+ /ECAM/buttons/clear-btn
+
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/phases/monostable/phase-9
+
+
+
+
+
+ monostable
+ true
+
+
+ /ECAM/phases/to-power-set
+
+
+
+
+
diff --git a/Systems/fmgc-thrust.xml b/Systems/fmgc-thrust.xml
index 36d7db36..11744f74 100644
--- a/Systems/fmgc-thrust.xml
+++ b/Systems/fmgc-thrust.xml
@@ -216,7 +216,7 @@
- /instrumentation/airspeed-indicator/indicated-speed-kt
+ /it-autoflight/internal/current-speed-input
/it-autoflight/internal/kts
@@ -340,7 +340,7 @@
- /instrumentation/airspeed-indicator/indicated-mach
+ /it-autoflight/internal/current-mach-input
1000.0
diff --git a/Systems/instrumentation.xml b/Systems/instrumentation.xml
index 4ec00124..3439f4cb 100644
--- a/Systems/instrumentation.xml
+++ b/Systems/instrumentation.xml
@@ -9,30 +9,91 @@
adf
0
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
adf
1
+ /systems/electrical/bus/ac-2
+ 109.9
- airspeed-indicator
+ airspeed-indicator
0
- /systems/pitot/total-pressure-inhg
- /systems/static/pressure-inhg
+ /systems/pitot[2]/measured-total-pressure-inhg
+ /systems/static[2]/pressure-inhg
altimeter
0
- /systems/static/pressure-inhg
- 0
- 0
+ /systems/static[0]/pressure-inhg
+ 1
+ 0.1
1
1
+
+ altimeter
+ 1
+ /systems/static[1]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 2
+ /systems/static[2]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 3
+ /systems/static[0]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 4
+ /systems/static[1]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 5
+ /systems/static[2]/pressure-inhg
+ 1
+ 0.1
+ 1
+ 1
+
+
+
+ altimeter
+ 6
+ /systems/static[2]/pressure-inhg
+ 0.1
+
+
attitude-indicator
0
@@ -65,21 +126,29 @@
dme
0
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
dme
1
+ /systems/electrical/bus/ac-2
+ 109.9
-
+
dme
2
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
dme
3
+ /systems/electrical/bus/ac-2
+ 109.9
@@ -111,24 +180,39 @@
0
-
+
+ marker-beacon
+ 0
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
+
+
+
nav
0
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
nav
1
+ /systems/electrical/bus/ac-2
+ 109.9
-
+
nav
2
+ /systems/electrical/bus/ac-ess-shed
+ 109.9
nav
3
+ /systems/electrical/bus/ac-2
+ 109.9
@@ -140,6 +224,8 @@
transponder
0
2
+ /instrumentation/transponder/altimeter-input
+ /instrumentation/transponder/airspeed-input
/instrumentation/encoder/mode-c-alt-ft
/instrumentation/encoder/mode-s-alt-ft
@@ -175,6 +261,22 @@
0
+
+ radar-altimeter
+ 0
+ 0.0666
+ /systems/electrical/bus/ac-1
+ 109.9
+
+
+
+ radar-altimeter
+ 1
+ 0.0666
+ /systems/electrical/bus/ac-2
+ 109.9
+
+
tacan
0
diff --git a/Systems/libraries.xml b/Systems/libraries.xml
index 0093a7e6..06bb51a4 100644
--- a/Systems/libraries.xml
+++ b/Systems/libraries.xml
@@ -121,13 +121,121 @@
-
/instrumentation/altimeter/indicated-altitude-ft
+
/instrumentation/altimeter[0]/indicated-altitude-ft
100
-
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[1]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[2]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[3]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[4]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[5]/indicated-altitude-ft
+
100
+
+
+
+
+
+
+
+
+ Altitude PFD
+ gain
+ 1.0
+ 0.05
+
+
+
+
+
/instrumentation/altimeter[6]/indicated-altitude-ft
+
100
+
+
+
+
+
diff --git a/Systems/pfd.xml b/Systems/pfd.xml
index 46ac7798..05ccae2c 100644
--- a/Systems/pfd.xml
+++ b/Systems/pfd.xml
@@ -174,12 +174,46 @@
- /instrumentation/airspeed-indicator/indicated-speed-kt
+ /systems/navigation/adr/output/cas-1
30
-
+
+ 0
+ 390
+
+
+
+ Speed Predictor Input
+ gain
+ 1.0
+
+
+
+ /systems/navigation/adr/output/cas-2
+ 30
+
+
+
+
+ 0
+ 390
+
+
+
+ Speed Predictor Input
+ gain
+ 1.0
+
+
+
+ /systems/navigation/adr/output/cas-3
+ 30
+
+
+
+
0
390
@@ -193,12 +227,57 @@
0.01
+
+ Speed Predictor (Smoothed)
+ false
+ /instrumentation/pfd/speed-minus-30-1
+
+ 10.0
+ 0.01
+
+
+
+ Speed Predictor (Smoothed)
+ false
+ /instrumentation/pfd/speed-minus-30-2
+
+ 10.0
+ 0.01
+
+
+
+ Speed Predictor (Smoothed)
+ false
+ /instrumentation/pfd/speed-minus-30-3
+
+ 10.0
+ 0.01
+
+
Speed Predictor Exponential
false
exponential
- /instrumentation/pfd/speed-lookahead-cmd
-
+ /instrumentation/pfd/speed-lookahead-cmd-1
+
+ 0.32
+
+
+
+ Speed Predictor Exponential
+ false
+ exponential
+ /instrumentation/pfd/speed-lookahead-cmd-2
+
+ 0.32
+
+
+
+ Speed Predictor Exponential
+ false
+ exponential
+ /instrumentation/pfd/speed-lookahead-cmd-3
+
0.32
diff --git a/Systems/pitot-static.xml b/Systems/pitot-static.xml
new file mode 100644
index 00000000..8ef146ee
--- /dev/null
+++ b/Systems/pitot-static.xml
@@ -0,0 +1,57 @@
+
+
+
+
+ pitot
+ 0
+
+
+
+ pitot
+ 1
+
+
+
+ pitot
+ 2
+
+
+
+ static
+ 0
+ 0.7
+ 1
+ 0.43
+
+
+
+ static
+ 1
+ 0.7
+ 1
+ 0.42
+
+
+
+ static
+ 2
+ 0.7
+ 1
+ 0.45
+
+
+
+ vacuum
+ 0
+ /engines/engine[0]/rpm
+ 1.0
+
+
+
+ vacuum
+ 1
+ /engines/engine[1]/rpm
+ 1.0
+
+
+
diff --git a/Systems/upper-ecam.xml b/Systems/upper-ecam.xml
index b29cccb4..d3d8c91e 100644
--- a/Systems/upper-ecam.xml
+++ b/Systems/upper-ecam.xml
@@ -399,230 +399,5 @@
0
-
-
-
- RS
-
- /systems/electrical/some-electric-thingie/emer-elec-config-generator-1-bustie
-
-
-
- /systems/electrical/some-electric-thingie/emer-elec-config
-
-
-
-
-
- RS
-
- /systems/electrical/some-electric-thingie/emer-elec-config-generator-2-bustie
-
-
-
- /systems/electrical/some-electric-thingie/emer-elec-config
-
-
-
-
-
-
- RS
-
- /systems/electrical/some-electric-thingie/emer-elec-config-generator-1
-
-
-
- /systems/electrical/some-electric-thingie/emer-elec-config
-
-
-
-
-
-
- RS
-
- /systems/electrical/some-electric-thingie/emer-elec-config-generator-2
-
-
-
- /systems/electrical/some-electric-thingie/emer-elec-config
-
-
-
-
-
-
- RS
-
- /ECAM/to-config-set
-
-
- /ECAM/to-config-reset
-
-
-
-
-
- RS
-
- /ECAM/to-memo-set
-
-
- /ECAM/to-memo-reset
-
-
-
-
-
- SR
-
- /ECAM/ldg-memo-set
-
-
- /ECAM/ldg-memo-reset
-
-
-
-
-
- RS
-
- /ECAM/ldg-memo-2200-set
-
-
- /ECAM/ldg-memo-2200-reset
-
-
-
-
-
- SR
-
- /ECAM/phases/flipflop/gear-set
-
-
- /ECAM/phases/flipflop/gear-reset
-
-
-
-
-
- SR
-
- /ECAM/phases/flipflop/phase-2-set
-
-
- /ECAM/phases/flipflop/phase-2-reset
-
-
-
-
-
- RS
-
- /ECAM/phases/flipflop/phase-10-set
-
-
- /ECAM/phases/flipflop/phase-10-reset
-
-
-
-
-
- RS
-
- /ECAM/flipflop/recall-set
-
-
- /ECAM/flipflop/recall-reset
-
-
-
-
-
- monostable
-
-
-
- /ECAM/phases/speed-gt-80
-
-
-
-
-
-
- monostable
-
-
- /ECAM/phases/monostable/phase-1-300
-
-
-
-
-
- monostable
-
-
- /ECAM/phases/monostable/phase-5
-
-
-
-
-
- monostable
-
-
- /ECAM/phases/monostable/phase-7
-
-
-
-
-
- monostable
-
-
- /ECAM/buttons/recall-status-normal
-
-
- /ECAM/buttons/clear-btn
-
-
-
-
-
-
- monostable
- true
-
-
- /ECAM/phases/monostable/phase-9
-
-
-
-
-
- monostable
- true
-
-
- /ECAM/phases/to-power-set
-
-
-
diff --git a/Systems/wingflexer-params.xml b/Systems/wingflexer-params.xml
new file mode 100644
index 00000000..d684e0c7
--- /dev/null
+++ b/Systems/wingflexer-params.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+ 12000
+ 259
+ 12
+ 0.375
+
+
+
+ 0
+ 0
+
+
+
\ No newline at end of file
diff --git a/gui/dialogs/refuel.nas b/gui/dialogs/refuel.nas
new file mode 100644
index 00000000..e1b9c3c2
--- /dev/null
+++ b/gui/dialogs/refuel.nas
@@ -0,0 +1,594 @@
+# A320 Refeul panel
+# merspieler
+
+# Copyright (c) 2019 merspieler
+
+# Distribute under the terms of GPLv2.
+
+if (pts.Sim.aero.getValue() == "A320-200-CFM") {
+ max_fuel = 42.8;
+} elsif (pts.Sim.aero.getValue() == "A320-200-IAE" or pts.Sim.aero.getValue() == "A320-100-CFM") {
+ max_fuel = 42.2;
+} elsif (pts.Sim.aero.getValue() == "A320neo-CFM" or pts.Sim.aero.getValue() == "A320neo-PW") {
+ max_fuel = 42.0;
+}
+
+# Get nodes
+var valve_l_guard = props.globals.getNode("/controls/fuel/refuel/valve-l-guard", 1);
+var valve_c_guard = props.globals.getNode("/controls/fuel/refuel/valve-c-guard", 1);
+var valve_r_guard = props.globals.getNode("/controls/fuel/refuel/valve-r-guard", 1);
+var mode_guard = props.globals.getNode("/controls/fuel/refuel/mode-guard", 1);
+var valve_l = props.globals.getNode("/controls/fuel/refuel/valve-l", 1);
+var valve_c = props.globals.getNode("/controls/fuel/refuel/valve-c", 1);
+var valve_r = props.globals.getNode("/controls/fuel/refuel/valve-r", 1);
+var power = props.globals.getNode("/controls/fuel/refuel/power", 1);
+var test = props.globals.getNode("/controls/fuel/refuel/test", 1);
+var amount = props.globals.getNode("/controls/fuel/refuel/amount", 1);
+
+var refuelClass = {
+ _fuelLeftAmount: nil,
+ _fuelCenterAmount: nil,
+ _fuelRightAmount: nil,
+ _fuelTotalAmount: nil,
+ _fuelPreselectAmount: nil,
+ new: func() {
+ var m = {parents:[refuelClass]};
+ m._title = "Refuel Panel";
+ m._gfd = nil;
+ m._canvas = nil;
+ m._timer = maketimer(0.1, m, refuelClass._timerf);
+ m._timerUp = maketimer(0.1, m, refuelClass._fuelAdjustUp);
+ m._timerDn = maketimer(0.1, m, refuelClass._fuelAdjustDn);
+ return m;
+ },
+ close: func() {
+ me._timer.stop();
+ me._timerUp.stop();
+ me._timerDn.stop();
+
+ me._gfd.del();
+ me._gfd = nil;
+ },
+ openDialog: func() {
+ me._gfd = canvas.Window.new([320,375], "dialog");
+ me._gfd._onClose = func() {refuelDialog._onClose();}
+
+ me._gfd.set("title", me._title);
+ me._canvas = me._gfd.createCanvas();
+ me._root = me._canvas.createGroup();
+
+ me._svg = me._root.createChild("group");
+ canvas.parsesvg(me._svg, "Aircraft/A320-family/gui/dialogs/refuel.svg");
+
+ amount.setValue(math.round((pts.Consumables.Fuel.totalFuelLbs.getValue() + systems.fuelSvc.Nodes.requestLbs.getValue()) / 1000, 0.1));
+
+ me._HI_LVL_L = me._svg.getElementById("HI-LVL-L");
+ me._HI_LVL_C = me._svg.getElementById("HI-LVL-C");
+ me._HI_LVL_R = me._svg.getElementById("HI-LVL-R");
+ me._Valve_defuel = me._svg.getElementById("Valve-defuel");
+
+ me._Valve_L_guard_open = me._svg.getElementById("Valve-L-guard-open");
+ me._Valve_L_guard_closed = me._svg.getElementById("Valve-L-guard-closed");
+
+ me._Valve_C_guard_open = me._svg.getElementById("Valve-C-guard-open");
+ me._Valve_C_guard_closed = me._svg.getElementById("Valve-C-guard-closed");
+
+ me._Valve_R_guard_open = me._svg.getElementById("Valve-R-guard-open");
+ me._Valve_R_guard_closed = me._svg.getElementById("Valve-R-guard-closed");
+
+ me._Mode_guard_open = me._svg.getElementById("Mode-guard-open");
+ me._Mode_guard_closed = me._svg.getElementById("Mode-guard-closed");
+
+ me._Power_on = me._svg.getElementById("Power-on");
+ me._Power_norm = me._svg.getElementById("Power-norm");
+
+ me._Power_on_hb = me._svg.getElementById("Power-on-hb");
+ me._Power_norm_hb = me._svg.getElementById("Power-norm-hb");
+
+ me._Pre_inc_hb = me._svg.getElementById("Pre-inc-hb");
+ me._Pre_dec_hb = me._svg.getElementById("Pre-dec-hb");
+
+ me._Test_hi_lvl = me._svg.getElementById("Test-hi-lvl");
+ me._Test_lts = me._svg.getElementById("Test-lts");
+ me._Test_off = me._svg.getElementById("Test-off");
+
+ me._Test_hi_lvl_hb = me._svg.getElementById("Test-hi-lvl-hb");
+ me._Test_lts_hb = me._svg.getElementById("Test-lts-hb");
+
+ me._Valve_L_open = me._svg.getElementById("Valve-L-open");
+ me._Valve_L_norm = me._svg.getElementById("Valve-L-norm");
+ me._Valve_L_shut = me._svg.getElementById("Valve-L-shut");
+
+ me._Valve_L_open_hb = me._svg.getElementById("Valve-L-open-hb");
+ me._Valve_L_norm_hb = me._svg.getElementById("Valve-L-norm-hb");
+ me._Valve_L_shut_hb = me._svg.getElementById("Valve-L-shut-hb");
+
+ me._Valve_C_open = me._svg.getElementById("Valve-C-open");
+ me._Valve_C_norm = me._svg.getElementById("Valve-C-norm");
+ me._Valve_C_shut = me._svg.getElementById("Valve-C-shut");
+
+ me._Valve_C_open_hb = me._svg.getElementById("Valve-C-open-hb");
+ me._Valve_C_norm_hb = me._svg.getElementById("Valve-C-norm-hb");
+ me._Valve_C_shut_hb = me._svg.getElementById("Valve-C-shut-hb");
+
+ me._Valve_R_open = me._svg.getElementById("Valve-R-open");
+ me._Valve_R_norm = me._svg.getElementById("Valve-R-norm");
+ me._Valve_R_shut = me._svg.getElementById("Valve-R-shut");
+
+ me._Valve_R_open_hb = me._svg.getElementById("Valve-R-open-hb");
+ me._Valve_R_norm_hb = me._svg.getElementById("Valve-R-norm-hb");
+ me._Valve_R_shut_hb = me._svg.getElementById("Valve-R-shut-hb");
+
+ me._Mode_refuel = me._svg.getElementById("Mode-refuel");
+ me._Mode_off = me._svg.getElementById("Mode-off");
+ me._Mode_defuel = me._svg.getElementById("Mode-defuel");
+
+ me._Mode_refuel_hb = me._svg.getElementById("Mode-refuel-hb");
+ me._Mode_off_hb = me._svg.getElementById("Mode-off-hb");
+ me._Mode_defuel_hb = me._svg.getElementById("Mode-defuel-hb");
+
+ me._FQI_actual = me._svg.getElementById("FQI-actual");
+ me._FQI_pre = me._svg.getElementById("FQI-pre");
+ me._FQI_L = me._svg.getElementById("FQI-L");
+ me._FQI_C = me._svg.getElementById("FQI-C");
+ me._FQI_R = me._svg.getElementById("FQI-R");
+
+ me._END_ind = me._svg.getElementById("END-ind");
+
+ # Load current panel state
+ # Guards
+ if (valve_l_guard.getValue() == 1) {
+ me._Valve_L_guard_open.show();
+ me._Valve_L_guard_closed.hide();
+ } else {
+ me._Valve_L_guard_open.hide();
+ me._Valve_L_guard_closed.show();
+ }
+
+ if (valve_l_guard.getValue() == 1) {
+ me._Valve_C_guard_open.show();
+ me._Valve_C_guard_closed.hide();
+ } else {
+ me._Valve_C_guard_open.hide();
+ me._Valve_C_guard_closed.show();
+ }
+
+ if (valve_l_guard.getValue() == 1) {
+ me._Valve_R_guard_open.show();
+ me._Valve_R_guard_closed.hide();
+ } else {
+ me._Valve_R_guard_open.hide();
+ me._Valve_R_guard_closed.show();
+ }
+
+ if (systems.FUEL.refuelling.getValue() == 1) {
+ me._Mode_guard_open.show();
+ me._Mode_guard_closed.hide();
+ } else {
+ me._Mode_guard_open.hide();
+ me._Mode_guard_closed.show();
+ }
+
+ # Switches
+ if (power.getValue() == 1) {
+ me._Power_on.show();
+ me._Power_norm.hide();
+ } else {
+ me._Power_on.hide();
+ me._Power_norm.show();
+ }
+
+ if (test.getValue() == 1) {
+ me._Test_hi_lvl.show();
+ me._Test_off.hide();
+ me._Test_lts.hide();
+ } else if (test.getValue() == 0.5) {
+ me._Test_hi_lvl.hide();
+ me._Test_off.show();
+ me._Test_lts.hide();
+ } else {
+ me._Test_hi_lvl.hide();
+ me._Test_off.hide();
+ me._Test_lts.show();
+ }
+
+ if (valve_l.getValue() == 1) {
+ me._Valve_L_open.show();
+ me._Valve_L_norm.hide();
+ me._Valve_L_shut.hide();
+ } else if (valve_l.getValue() == 0.5) {
+ me._Valve_L_open.hide();
+ me._Valve_L_norm.show();
+ me._Valve_L_shut.hide();
+ } else {
+ me._Valve_L_open.hide();
+ me._Valve_L_norm.hide();
+ me._Valve_L_shut.show();
+ }
+
+ if (valve_c.getValue() == 1) {
+ me._Valve_C_open.show();
+ me._Valve_C_norm.hide();
+ me._Valve_C_shut.hide();
+ } else if (valve_c.getValue() == 0.5) {
+ me._Valve_C_open.hide();
+ me._Valve_C_norm.show();
+ me._Valve_C_shut.hide();
+ } else {
+ me._Valve_C_open.hide();
+ me._Valve_C_norm.hide();
+ me._Valve_C_shut.show();
+ }
+
+ if (valve_r.getValue() == 1) {
+ me._Valve_R_open.show();
+ me._Valve_R_norm.hide();
+ me._Valve_R_shut.hide();
+ } else if (valve_r.getValue() == 0.5) {
+ me._Valve_R_open.hide();
+ me._Valve_R_norm.show();
+ me._Valve_R_shut.hide();
+ } else {
+ me._Valve_R_open.hide();
+ me._Valve_R_norm.hide();
+ me._Valve_R_shut.show();
+ }
+
+ if (systems.FUEL.refuelling.getValue()) {
+ me._Mode_refuel.show();
+ me._Mode_off.hide();
+ me._Mode_defuel.hide();
+ } else {
+ me._Mode_refuel.hide();
+ me._Mode_off.show();
+ me._Mode_defuel.hide();
+ }
+
+ me._Mode_defuel.hide();
+
+ # Listeners
+ # Guards
+ me._Valve_L_guard_open.addEventListener("click", func() {
+ me._Valve_L_guard_open.hide();
+ me._Valve_L_guard_closed.show();
+ valve_l_guard.setBoolValue(0);
+ me._Valve_L_open.hide();
+ me._Valve_L_norm.show();
+ me._Valve_L_shut.hide();
+ valve_l.setValue(0.5);
+ });
+
+ me._Valve_L_guard_closed.addEventListener("click", func() {
+ me._Valve_L_guard_closed.hide();
+ me._Valve_L_guard_open.show();
+ valve_l_guard.setBoolValue(1);
+ });
+
+ me._Valve_C_guard_open.addEventListener("click", func() {
+ me._Valve_C_guard_open.hide();
+ me._Valve_C_guard_closed.show();
+ valve_c_guard.setBoolValue(0);
+ me._Valve_C_open.hide();
+ me._Valve_C_norm.show();
+ me._Valve_C_shut.hide();
+ valve_c.setValue(0.5);
+ });
+
+ me._Valve_C_guard_closed.addEventListener("click", func() {
+ me._Valve_C_guard_closed.hide();
+ me._Valve_C_guard_open.show();
+ valve_c_guard.setBoolValue(1);
+ });
+
+ me._Valve_R_guard_open.addEventListener("click", func() {
+ me._Valve_R_guard_open.hide();
+ me._Valve_R_guard_closed.show();
+ valve_r_guard.setBoolValue(0);
+ me._Valve_R_open.hide();
+ me._Valve_R_norm.show();
+ me._Valve_R_shut.hide();
+ valve_r.setValue(0.5);
+ });
+
+ me._Valve_R_guard_closed.addEventListener("click", func() {
+ me._Valve_R_guard_closed.hide();
+ me._Valve_R_guard_open.show();
+ valve_r_guard.setBoolValue(1);
+ });
+
+ me._Mode_guard_open.addEventListener("click", func() {
+ me._Mode_guard_open.hide();
+ me._Mode_guard_closed.show();
+ mode_guard.setBoolValue(0);
+ me._Mode_refuel.hide();
+ me._Mode_off.show();
+ me._Mode_defuel.hide();
+ });
+
+ me._Mode_guard_closed.addEventListener("click", func() {
+ me._Mode_guard_closed.hide();
+ me._Mode_guard_open.show();
+ mode_guard.setBoolValue(1);
+ });
+
+ # Switches
+ me._Valve_L_open_hb.addEventListener("click", func() {
+ if (valve_l_guard.getValue() == 1) {
+ me._Valve_L_open.show();
+ me._Valve_L_norm.hide();
+ me._Valve_L_shut.hide();
+ valve_l.setValue(1);
+ }
+ });
+
+ me._Valve_L_norm_hb.addEventListener("click", func() {
+ if (valve_l_guard.getValue() == 1) {
+ me._Valve_L_open.hide();
+ me._Valve_L_norm.show();
+ me._Valve_L_shut.hide();
+ valve_l.setValue(0.5);
+ }
+ });
+
+ me._Valve_L_shut_hb.addEventListener("click", func() {
+ if (valve_l_guard.getValue() == 1) {
+ me._Valve_L_open.hide();
+ me._Valve_L_norm.hide();
+ me._Valve_L_shut.show();
+ valve_l.setValue(0);
+ }
+ });
+
+ me._Valve_C_open_hb.addEventListener("click", func() {
+ if (valve_c_guard.getValue() == 1) {
+ me._Valve_C_open.show();
+ me._Valve_C_norm.hide();
+ me._Valve_C_shut.hide();
+ valve_c.setValue(1);
+ }
+ });
+
+ me._Valve_C_norm_hb.addEventListener("click", func() {
+ if (valve_c_guard.getValue() == 1) {
+ me._Valve_C_open.hide();
+ me._Valve_C_norm.show();
+ me._Valve_C_shut.hide();
+ valve_c.setValue(0.5);
+ }
+ });
+
+ me._Valve_C_shut_hb.addEventListener("click", func() {
+ if (valve_c_guard.getValue() == 1) {
+ me._Valve_C_open.hide();
+ me._Valve_C_norm.hide();
+ me._Valve_C_shut.show();
+ valve_c.setValue(0);
+ }
+ });
+
+ me._Valve_R_open_hb.addEventListener("click", func() {
+ if (valve_r_guard.getValue() == 1) {
+ me._Valve_R_open.show();
+ me._Valve_R_norm.hide();
+ me._Valve_R_shut.hide();
+ valve_r.setValue(1);
+ }
+ });
+
+ me._Valve_R_norm_hb.addEventListener("click", func() {
+ if (valve_r_guard.getValue() == 1) {
+ me._Valve_R_open.hide();
+ me._Valve_R_norm.show();
+ me._Valve_R_shut.hide();
+ valve_r.setValue(0.5);
+ }
+ });
+
+ me._Valve_R_shut_hb.addEventListener("click", func() {
+ if (valve_r_guard.getValue() == 1) {
+ me._Valve_R_open.hide();
+ me._Valve_R_norm.hide();
+ me._Valve_R_shut.show();
+ valve_r.setValue(0);
+ }
+ });
+
+ me._Mode_refuel_hb.addEventListener("click", func() {
+ if (mode_guard.getValue() == 1) {
+ me._Mode_refuel.show();
+ me._Mode_off.hide();
+ me._Mode_defuel.hide();
+ systems.fuelSvc.refuel();
+
+ }
+ });
+
+ me._Mode_off_hb.addEventListener("click", func() {
+ if (mode_guard.getValue() == 1) {
+ me._Mode_refuel.hide();
+ me._Mode_off.show();
+ me._Mode_defuel.hide();
+ systems.fuelSvc.stop();
+ }
+ });
+
+ me._Mode_defuel_hb.addEventListener("click", func() {
+ #if (mode_guard.getValue() == 1) {
+ # me._Mode_refuel.hide();
+ # me._Mode_off.hide();
+ # me._Mode_defuel.show();
+ # mode.setValue(0);
+ #}
+ });
+
+ me._Test_hi_lvl_hb.addEventListener("mousedown", func() {
+ me._Test_hi_lvl.show();
+ me._Test_off.hide();
+ me._Test_lts.hide();
+ test.setValue(1);
+ });
+
+ me._Test_hi_lvl_hb.addEventListener("mouseup", func() {
+ me._Test_hi_lvl.hide();
+ me._Test_off.show();
+ me._Test_lts.hide();
+ test.setValue(0.5);
+ });
+
+ me._Test_lts_hb.addEventListener("mousedown", func() {
+ me._Test_hi_lvl.hide();
+ me._Test_off.hide();
+ me._Test_lts.show();
+ test.setValue(0);
+ });
+
+ me._Test_lts_hb.addEventListener("mouseup", func() {
+ me._Test_hi_lvl.hide();
+ me._Test_off.show();
+ me._Test_lts.hide();
+ test.setValue(0.5);
+ });
+
+ me._Power_on_hb.addEventListener("click", func() {
+ me._Power_on.show();
+ me._Power_norm.hide();
+ power.setBoolValue(1);
+ });
+
+ me._Power_norm_hb.addEventListener("click", func() {
+ me._Power_on.hide();
+ me._Power_norm.show();
+ power.setBoolValue(0);
+ });
+
+ me._Pre_dec_hb.addEventListener("mousedown", func() {
+ me._timerDn.start();
+ });
+
+ me._Pre_inc_hb.addEventListener("mousedown", func() {
+ me._timerUp.start();
+ });
+
+ me._Pre_dec_hb.addEventListener("mouseup", func() {
+ me._timerDn.stop();
+ });
+
+ me._Pre_inc_hb.addEventListener("mouseup", func() {
+ me._timerUp.stop();
+ });
+
+ me._timerf();
+ me._timer.start();
+ },
+ _timerf: func() {
+ # Check power
+ # TODO cut off power when turned on with BATT POWER switch:
+ # The electrical supply is automatically cut off:
+ # After 10 min, if no refuel operation is selected, or
+ # At the end of refueling.
+ if ((systems.ELEC.Bus.dcHot1.getValue() >= 25 and power.getValue() == 1) or systems.ELEC.Bus.dc2.getValue() >= 25) {
+ me._FQI_actual.show();
+ me._FQI_pre.show();
+ me._FQI_L.show();
+ me._FQI_C.show();
+ me._FQI_R.show();
+
+ me._fuelPreselectAmount = amount.getValue();
+ me._fuelLeftAmount = (systems.FUEL.Quantity.leftOuter.getValue() + systems.FUEL.Quantity.leftInner.getValue()) / 1000;
+ me._fuelCenterAmount = systems.FUEL.Quantity.center.getValue() / 1000;
+ me._fuelRightAmount = (systems.FUEL.Quantity.rightOuter.getValue() + systems.FUEL.Quantity.rightInner.getValue()) / 1000;
+ me._fuelTotalAmount = pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000;
+
+ if (me._fuelPreselectAmount >= 10.0) {
+ me._FQI_pre.setText(sprintf("%2.1f", me._fuelPreselectAmount));
+ } else {
+ me._FQI_pre.setText(sprintf("%2.2f", me._fuelPreselectAmount));
+ }
+
+ if (me._fuelLeftAmount >= 10.0) {
+ me._FQI_L.setText(sprintf("%2.1f", me._fuelLeftAmount));
+ } else {
+ me._FQI_L.setText(sprintf("%2.2f", me._fuelLeftAmount));
+ }
+
+ if (me._fuelCenterAmount >= 10.0) {
+ me._FQI_C.setText(sprintf("%2.1f", me._fuelCenterAmount));
+ } else {
+ me._FQI_C.setText(sprintf("%2.2f", me._fuelCenterAmount));
+ }
+
+ if (me._fuelRightAmount >= 10.0) {
+ me._FQI_R.setText(sprintf("%2.1f", me._fuelRightAmount));
+ } else {
+ me._FQI_R.setText(sprintf("%2.2f", me._fuelRightAmount));
+ }
+
+ if (me._fuelTotalAmount >= 10.0) {
+ me._FQI_actual.setText(sprintf("%2.1f", pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000));
+ } else {
+ me._FQI_actual.setText(sprintf("%2.2f", pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000));
+ }
+
+ # HI LVL indicator color: #0184f6
+
+ if (systems.FUEL.Quantity.leftInnerPct.getValue() >= 0.999) {
+ me._HI_LVL_L.setColorFill(0.0039, 0.5176, 0.9647);
+ } else {
+ me._HI_LVL_L.setColorFill(0.2353, 0.2117, 0.2117);
+ }
+
+ if (systems.FUEL.Quantity.centerPct.getValue() >= 0.999) {
+ me._HI_LVL_C.setColorFill(0.0039, 0.5176, 0.9647);
+ } else {
+ me._HI_LVL_C.setColorFill(0.2353, 0.2117, 0.2117);
+ }
+
+ if (systems.FUEL.Quantity.rightInnerPct.getValue() >= 0.999) {
+ me._HI_LVL_R.setColorFill(0.0039, 0.5176, 0.9647);
+ } else {
+ me._HI_LVL_R.setColorFill(0.2353, 0.2117, 0.2117);
+ }
+
+ # DEFUEL indicator color: #ffe23f
+ } else {
+ me._FQI_actual.hide();
+ me._FQI_pre.hide();
+ me._FQI_L.hide();
+ me._FQI_C.hide();
+ me._FQI_R.hide();
+ me._Valve_defuel.setColor(0.2353, 0.2117, 0.2117);
+ me._HI_LVL_L.setColor(0.2353, 0.2117, 0.2117);
+ me._HI_LVL_C.setColor(0.2353, 0.2117, 0.2117);
+ me._HI_LVL_R.setColor(0.2353, 0.2117, 0.2117);
+ }
+ },
+ _fuelAdjustDn: func() {
+ target = amount.getValue();
+ if (target > 0) {
+ amount.setValue(target - 0.1);
+ if (target - 0.1 >= 10.0) {
+ me._FQI_pre.setText(sprintf("%2.1f", target - 0.1));
+ } else {
+ me._FQI_pre.setText(sprintf("%2.2f", target - 0.1));
+ }
+ systems.fuelSvc.Nodes.requestLbs.setValue(((target - 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
+ }
+ },
+ _fuelAdjustUp: func() {
+ target = amount.getValue();
+ if (target < max_fuel) {
+ amount.setValue(target + 0.1);
+ if (target + 0.1 >= 10.0) {
+ me._FQI_pre.setText(sprintf("%2.1f", target + 0.1));
+ } else {
+ me._FQI_pre.setText(sprintf("%2.2f", target + 0.1));
+ }
+ systems.fuelSvc.Nodes.requestLbs.setValue(((target + 0.1) - math.round(pts.Consumables.Fuel.totalFuelLbs.getValue() / 1000, 0.1)) * 1000);
+ }
+ },
+ _onClose: func() {
+ me.close();
+ },
+};
+
+var refuelDialog = refuelClass.new();
diff --git a/gui/dialogs/refuel.svg b/gui/dialogs/refuel.svg
new file mode 100644
index 00000000..ba9dd941
--- /dev/null
+++ b/gui/dialogs/refuel.svg
@@ -0,0 +1,1228 @@
+
+
diff --git a/revision.txt b/revision.txt
index 9a037142..19c7bdba 100644
--- a/revision.txt
+++ b/revision.txt
@@ -1 +1 @@
-10
\ No newline at end of file
+16
\ No newline at end of file