diff --git a/A320-100-CFM-set.xml b/A320-100-CFM-set.xml deleted file mode 100644 index 3615764b..00000000 --- a/A320-100-CFM-set.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - Airbus A320-111 (CFM56-5A1) - jsb - A320-100-CFM - A320-200-IAE - - Aircraft/A320-family/Models/A320-100-CFM.xml - - Airbus - - Aircraft/A320-family/Models/Liveries/A320/CFM-100 - - - - Aircraft/A320-family/Sounds/cfm56-sound.xml - - - -60.0 - - Captain View - true - - -0.45 - 0.545 - -16.193 - 63 - 0 - -14.6 - 0 - - - - First Officer View - lookfrom - true - - true - 0.45 - 0.545 - -16.193 - 63 - 0 - -14.6 - 0 - - - - Overhead Panel View - lookfrom - true - - true - 0 - 0.545 - -16.163 - 115 - 0 - 65.5 - 0 - - - - Forward Pedestal View - lookfrom - true - - true - 0.0 - 0.545 - -16.593 - 63 - 0 - -76 - 0 - - - - Aft Pedestal View - lookfrom - true - - true - 0.0 - 0.545 - -16.243 - 63 - 0 - -82 - 0 - - - - FCU Panel View - lookfrom - true - - true - 0.0 - 0.545 - -16.193 - 52 - 0 - -14.6 - 0 - - - - Left Front View - lookfrom - false - - true - -2.18 - 0.488 - -6.79 - 85 - 117.488 - 0 - 0 - - - - Right Front View - lookfrom - false - - true - 2.18 - 0.488 - -6.79 - 85 - 242.512 - 0 - 0 - - - - Left Mid View - lookfrom - false - - true - -2.20 - 0.448 - -1.69 - 85 - 111 - 0 - 0 - - - - Right Mid View - lookfrom - false - - true - 2.20 - 0.448 - -1.69 - 85 - 249 - 0 - 0 - - - - Left Aft View - lookfrom - false - - true - -2.13 - 0.450 - 3.2 - 85 - 70 - 0 - 0 - - - - - Right Aft View - lookfrom - false - - true - 2.13 - 0.450 - 3.2 - 85 - 290 - 0 - 0 - - - - - - Aircraft/A320-family/Systems/fadec-cfm.xml - - - Aircraft/A320-family/Systems/cfm56-sound.xml - - - - - - - - 150000 - 138900 - 131840 - - - - - CFM - 52.3 - 35 - - - diff --git a/A320-100-CFM.xml b/A320-100-CFM.xml deleted file mode 100644 index 4397da2d..00000000 --- a/A320-100-CFM.xml +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - - Joshua Davidson (Octal450) - Pre V1.0 - A32X FDE - - - - - - 611903 - 1735389 - 1401293 - 0 - 0 - 0 - 95087.5 - - - -2.4335 - 0 - -0.75 - - - - 320 - - -15.44 - 0 - 0.3 - - - - - 3722 - - -11.8 - 0 - 0.3 - - - - - 11361 - - -3.3 - 0 - 0.3 - - - - - 8422 - - 4.3 - 0 - 0.3 - - - - - 3000 - - -7.8 - 0 - -1 - - - - - 3000 - - -2.1 - 0 - -1 - - - - - 0 - - 7.1 - 0 - -1 - - - - - - - - - - -5.34904 - -5.755 - -1.04768 - - - 0.0 - 2.2 - 1 - - 5 - - - -5.34904 - -5.755 - -1.04768 - - - 0.0 - 2.2 - 1 - - - - - - - -5.34904 - 5.755 - -1.04768 - - - 0.0 - 2.2 - -1 - - 6 - - - -5.34904 - 5.755 - -1.04768 - - - 0.0 - 2.2 - -1 - - - - - - - 38.9 - 0 - 0.95 - - - 0.0 - 0.0 - 0.0 - - 7 - - - 38.9 - 0 - 0.95 - - - 0.0 - 0.0 - 0.0 - - - - - - - -2.4335 - -7.0291 - -0.75 - - 1523 - 1523 - 4 - 1 - 6.71 - 50 - - - - -2.4335 - -4.1029 - -0.75 - - 12272.9 - 6000 - 28 - 1 - 6.71 - 50 - - - - -2.4335 - 0 - -0.75 - - 14623 - 42 - 23.2 - 1 - 6.71 - 50 - - - - -2.4335 - 4.1029 - -0.75 - - 12272.9 - 6000 - 28 - 1 - 6.71 - 50 - - - - -2.4335 - 7.0291 - -0.75 - - 1523 - 1523 - 4 - 1 - 6.71 - 50 - - - - -2.4335 - 0 - -0.75 - - 10 - 0 - 1 - 6.71 - - - - -2.4335 - 0 - -0.75 - - 10 - 0 - 1 - 6.71 - - - - -2.4335 - 0 - -0.75 - - 10 - 0 - 1 - 6.71 - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/A320-200-CFM-set.xml b/A320-200-CFM-set.xml index 79c4660d..b6ad2d20 100644 --- a/A320-200-CFM-set.xml +++ b/A320-200-CFM-set.xml @@ -206,9 +206,9 @@ Aircraft/A320-family/Systems/fadec-cfm.xml - - Aircraft/A320-family/Systems/cfm56-sound.xml - + + Aircraft/A320-family/Systems/cfm56-sound.xml + diff --git a/A320-200-CFM.xml b/A320-200-CFM.xml index 9504ef7c..dfdd8f9d 100644 --- a/A320-200-CFM.xml +++ b/A320-200-CFM.xml @@ -94,7 +94,7 @@ - + -5.34904 -5.755 @@ -120,7 +120,7 @@ - + -5.34904 5.755 @@ -276,6 +276,7 @@ + diff --git a/A320-200-IAE-set.xml b/A320-200-IAE-set.xml index 3222c40c..426bca38 100644 --- a/A320-200-IAE-set.xml +++ b/A320-200-IAE-set.xml @@ -206,9 +206,9 @@ Aircraft/A320-family/Systems/fadec-iae.xml - + Aircraft/A320-family/Systems/v2500-sound.xml - + diff --git a/A320-200-IAE.xml b/A320-200-IAE.xml index 039302cc..b163338b 100644 --- a/A320-200-IAE.xml +++ b/A320-200-IAE.xml @@ -94,7 +94,7 @@ - + -5.34904 -5.755 @@ -120,7 +120,7 @@ - + -5.34904 5.755 diff --git a/A320-main.xml b/A320-main.xml index 48e88f30..a8c60bb8 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -253,15 +253,15 @@ Aircraft/A320-family/Systems/pfd.xml - + Aircraft/A320-family/Systems/sound-common.xml - - + + Aircraft/A320-family/Systems/a320-lights-proprules.xml - - + + Aircraft/A320-family/Systems/ecam-proprules.xml - + Aircraft/A320-family/Systems/pitot-static.xml @@ -674,6 +674,14 @@ 0 + + + 0 + 0 + 0 + 0 + + @@ -786,8 +794,9 @@ 0 - + 0 + 45 0 @@ -801,6 +810,8 @@ 0 0 + 0 + 0 0 @@ -945,7 +956,7 @@ 0 - 0 + 1 0 0 1 @@ -1379,11 +1390,14 @@ 0 0 - 0 - 0 - 0 - 0 - 0 + + 0 + 0 + 0 + 0 + 0 + 0 + @@ -1416,6 +1430,9 @@ 0 + + 0 + 0 @@ -1863,8 +1880,9 @@ 30 10 30 - 1219 + 1525 true + 0 @@ -1877,8 +1895,9 @@ 30 10 30 - 1219 + 1525 true + 0 @@ -4713,10 +4732,7 @@ Aircraft/A320-family/Nasal/MCDU/ROUTESELECTION.nas Aircraft/A320-family/Nasal/MCDU/INITB.nas Aircraft/A320-family/Nasal/MCDU/FUELPRED.nas - Aircraft/A320-family/Nasal/MCDU/PROGTO.nas - Aircraft/A320-family/Nasal/MCDU/PROGCLB.nas - Aircraft/A320-family/Nasal/MCDU/PROGCRZ.nas - Aircraft/A320-family/Nasal/MCDU/PROGDES.nas + Aircraft/A320-family/Nasal/MCDU/PROG.nas Aircraft/A320-family/Nasal/MCDU/PERFAPPR.nas Aircraft/A320-family/Nasal/MCDU/PERFCLB.nas Aircraft/A320-family/Nasal/MCDU/PERFCRZ.nas @@ -4728,6 +4744,11 @@ Aircraft/A320-family/Nasal/MCDU/DATA2.nas Aircraft/A320-family/Nasal/MCDU/STATUS.nas + + + Aircraft/A320-family/Nasal/Displays/projection.nas + Aircraft/A320-family/Nasal/Displays/traffic.nas + Aircraft/A320-family/Models/Instruments/PFD/PFD.nas diff --git a/A320neo-CFM-set.xml b/A320neo-CFM-set.xml index 707a12e4..5fadb2bd 100644 --- a/A320neo-CFM-set.xml +++ b/A320neo-CFM-set.xml @@ -206,9 +206,9 @@ Aircraft/A320-family/Systems/fadec-cfm.xml - + Aircraft/A320-family/Systems/leapx-sound.xml - + diff --git a/A320neo-PW-set.xml b/A320neo-PW-set.xml index 6a073e80..56c58f74 100644 --- a/A320neo-PW-set.xml +++ b/A320neo-PW-set.xml @@ -206,9 +206,9 @@ Aircraft/A320-family/Systems/fadec-cfm.xml - + Aircraft/A320-family/Systems/leapx-sound.xml - + diff --git a/AircraftConfig/acconfig.nas b/AircraftConfig/acconfig.nas index f20d49d6..e78551f4 100644 --- a/AircraftConfig/acconfig.nas +++ b/AircraftConfig/acconfig.nas @@ -56,10 +56,12 @@ var failResetOld = func { setprop("/systems/failures/pump-green", 0); setprop("/systems/failures/pump-yellow-eng", 0); setprop("/systems/failures/pump-yellow-elec", 0); - setprop("/systems/failures/cargo-aft-fire", 0); - setprop("/systems/failures/cargo-fwd-fire", 0); - setprop("/systems/failures/engine-left-fire", 0); - setprop("/systems/failures/engine-right-fire", 0); + setprop("/systems/failures/fire/cargo-aft-fire", 0); + setprop("/systems/failures/fire/cargo-fwd-fire", 0); + setprop("/systems/failures/fire/engine-left-fire", 0); + setprop("/systems/failures/fire/apu-fire", 0); + setprop("/systems/failures/fire/engine-right-fire", 0); + setprop("/systems/failures/fire/lavatory-fire", 0); } failResetOld(); @@ -80,6 +82,7 @@ setprop("/systems/acconfig/options/wxr-server", "noaa"); setprop("/systems/acconfig/options/welcome-skip", 0); setprop("/systems/acconfig/options/no-rendering-warn", 0); setprop("/systems/acconfig/options/save-state", 0); +setprop("/systems/acconfig/options/hide-canvas-outside", 0); setprop("/systems/acconfig/options/seperate-tiller-axis", 0); setprop("/systems/acconfig/options/pfd-rate", 1); setprop("/systems/acconfig/options/nd-rate", 1); @@ -235,6 +238,7 @@ var readSettings = func { setprop("/FMGC/simbrief-username", getprop("/systems/acconfig/options/simbrief-username")); setprop("/systems/atsu/atis-server", getprop("/systems/acconfig/options/atis-server")); setprop("/systems/atsu/wxr-server", getprop("/systems/acconfig/options/wxr-server")); + setprop("/options/hide-canvas-outside", getprop("/systems/acconfig/options/hide-canvas-outside")); } var writeSettings = func { @@ -249,6 +253,7 @@ var writeSettings = func { setprop("/systems/acconfig/options/simbrief-username", getprop("/FMGC/simbrief-username")); setprop("/systems/acconfig/options/atis-server", getprop("/systems/atsu/atis-server")); setprop("/systems/acconfig/options/wxr-server", getprop("/systems/atsu/wxr-server")); + setprop("/systems/acconfig/options/hide-canvas-outside", getprop("/options/hide-canvas-outside")); io.write_properties(getprop("/sim/fg-home") ~ "/Export/A320-family-config.xml", "/systems/acconfig/options"); } @@ -297,6 +302,7 @@ var colddark = func { setprop("/controls/lighting/overhead-panel-knb", 0); atc.transponderPanel.modeSwitch(1); libraries.systemsInit(); + libraries.variousReset(); failResetOld(); if (getprop("/engines/engine[1]/n2-actual") < 2) { colddark_b(); @@ -342,6 +348,7 @@ var beforestart = func { setprop("/controls/gear/gear-down", 1); setprop("/controls/flight/elevator-trim", 0); libraries.systemsInit(); + libraries.variousReset(); failResetOld(); # Now the Startup! @@ -399,6 +406,9 @@ var beforestart_b = func { setprop("/controls/adirs/mcducbtn", 1); setprop("/controls/switches/beacon", 1); setprop("/controls/lighting/nav-lights-switch", 1); + setprop("/controls/switches/no-smoking-sign", 0.5); + setprop("/controls/switches/seatbelt-sign", 1); + setprop("/controls/switches/emer-lights", 0.5); setprop("/controls/radio/rmp[0]/on", 1); setprop("/controls/radio/rmp[1]/on", 1); setprop("/controls/radio/rmp[2]/on", 1); @@ -433,6 +443,7 @@ var taxi = func { setprop("/controls/gear/gear-down", 1); setprop("/controls/flight/elevator-trim", 0); libraries.systemsInit(); + libraries.variousReset(); failResetOld(); # Now the Startup! @@ -491,6 +502,9 @@ var taxi_b = func { setprop("/controls/switches/beacon", 1); setprop("/controls/switches/wing-lights", 1); setprop("/controls/lighting/nav-lights-switch", 1); + setprop("/controls/switches/no-smoking-sign", 0.5); + setprop("/controls/switches/seatbelt-sign", 1); + setprop("/controls/switches/emer-lights", 0.5); setprop("/controls/radio/rmp[0]/on", 1); setprop("/controls/radio/rmp[1]/on", 1); setprop("/controls/radio/rmp[2]/on", 1); diff --git a/AircraftConfig/fail.xml b/AircraftConfig/fail.xml index cfbe5caa..2f821e17 100644 --- a/AircraftConfig/fail.xml +++ b/AircraftConfig/fail.xml @@ -560,7 +560,7 @@ true - + true @@ -568,9 +568,9 @@ - + left - /systems/failures/cargo-aft-fire + /systems/failures/fire/cargo-aft-fire dialog-apply @@ -578,15 +578,26 @@ - + left - /systems/failures/cargo-fwd-fire + /systems/failures/fire/cargo-fwd-fire dialog-apply true - + + + + left + /systems/failures/fire/lavatory-fire + + dialog-apply + + true + + + hbox @@ -603,7 +614,7 @@ left - /systems/failures/engine-left-fire + /systems/failures/fire/engine-left-fire dialog-apply @@ -613,7 +624,7 @@ left - /systems/failures/apu-fire + /systems/failures/fire/apu-fire dialog-apply @@ -623,7 +634,7 @@ left - /systems/failures/engine-right-fire + /systems/failures/fire/engine-right-fire dialog-apply diff --git a/AircraftConfig/main.xml b/AircraftConfig/main.xml index c97e3d27..618a2c61 100644 --- a/AircraftConfig/main.xml +++ b/AircraftConfig/main.xml @@ -343,6 +343,26 @@ true + + + left + /systems/acconfig/options/hide-canvas-outside + + property-toggle + options/hide-canvas-outside + + + dialog-apply + + + nasal + + + true + + diff --git a/Engines/cfm56-5b4_1.xml b/Engines/cfm56-5b4_1.xml new file mode 100644 index 00000000..549a7598 --- /dev/null +++ b/Engines/cfm56-5b4_1.xml @@ -0,0 +1,128 @@ + + + + + + + 27000 + 0.445 + 0.03 + 0.6 + 22.2 + 0.05 + 1.85 + 0.573 + 1.127 + 18.9 + 59.4 + 104.0 + 105.0 + 0 + 0 + + + + /engines/engine[0]/n1 + + 24 1.1 + 28 2.9 + 46 9.7 + 68 15.4 + 80 19.6 + 94 21.4 + 103 23.6 + +
+
+ + + + /engines/engine[0]/n1 + + 24 1.1 + 28 2.9 + 46 9.7 + 68 15.4 + 80 19.6 + 94 21.4 + 103 23.6 + +
+
+ + + + /engines/engine[0]/n1 + + 24 0.6 + 28 1.6 + 46 5.2 + 68 8.3 + 80 10.5 + 94 11.5 + 103 12.6 + +
+
+ + + + /engines/engine[0]/n1 + + 24 0.6 + 28 1.6 + 46 5.2 + 68 8.3 + 80 10.5 + 94 11.5 + 103 12.6 + +
+
+ + + + velocities/mach + atmosphere/density-altitude + + -10000 0 10000 20000 30000 40000 50000 + 0.0 0.0430 0.0458 0.0378 0.0684 0.0819 0.0793 0.0000 + 0.2 0.0500 0.0291 0.0205 0.0514 0.0727 0.0729 0.0000 + 0.4 0.0040 0.0047 0.0012 0.0412 0.0585 0.0671 0.0000 + 0.6 0.0000 0.0000 0.0000 0.0000 0.0416 0.0518 0.0000 + 0.8 0.0000 0.0000 0.0000 0.0000 0.0354 0.0468 0.0000 + 1.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0352 0.0000 + +
+
+ + + + + velocities/mach + atmosphere/density-altitude + + -10000 0 10000 20000 30000 40000 50000 + 0.0 1.2600 1.0000 0.7400 0.5640 0.3920 0.2710 0.0000 + 0.2 1.1710 0.9740 0.6970 0.5360 0.3850 0.2610 0.0000 + 0.4 1.1500 0.9570 0.6920 0.5460 0.3870 0.2530 0.0000 + 0.6 1.1810 0.9410 0.7210 0.5660 0.3580 0.2180 0.0000 + 0.8 1.2290 1.0200 0.7820 0.5570 0.3040 0.1930 0.0000 + 0.9 1.2580 1.0200 0.7820 0.5220 0.2710 0.1140 0.0000 + 1.0 1.1810 0.9510 0.7210 0.4410 0.1740 0.0450 0.0000 + 1.2 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 1.4 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + +
+ fadec/limit/rated-thrust-factor + + /engines/engine[0]/reverser-pos-norm + + 0.01 1.00 + 1.00 0.65 + +
+
+
+ +
diff --git a/Engines/cfm56-5b4_2.xml b/Engines/cfm56-5b4_2.xml new file mode 100644 index 00000000..79c65063 --- /dev/null +++ b/Engines/cfm56-5b4_2.xml @@ -0,0 +1,128 @@ + + + + + + + 27000 + 0.445 + 0.03 + 0.6 + 22.2 + 0.05 + 1.85 + 0.573 + 1.127 + 18.9 + 59.4 + 104.0 + 105.0 + 0 + 0 + + + + /engines/engine[1]/n1 + + 24 1.1 + 28 2.9 + 46 9.7 + 68 15.4 + 80 19.6 + 94 21.4 + 103 23.6 + +
+
+ + + + /engines/engine[1]/n1 + + 24 1.1 + 28 2.9 + 46 9.7 + 68 15.4 + 80 19.6 + 94 21.4 + 103 23.6 + +
+
+ + + + /engines/engine[1]/n1 + + 24 0.6 + 28 1.6 + 46 5.2 + 68 8.3 + 80 10.5 + 94 11.5 + 103 12.6 + +
+
+ + + + /engines/engine[1]/n1 + + 24 0.6 + 28 1.6 + 46 5.2 + 68 8.3 + 80 10.5 + 94 11.5 + 103 12.6 + +
+
+ + + + velocities/mach + atmosphere/density-altitude + + -10000 0 10000 20000 30000 40000 50000 + 0.0 0.0430 0.0458 0.0378 0.0684 0.0819 0.0793 0.0000 + 0.2 0.0500 0.0291 0.0205 0.0514 0.0727 0.0729 0.0000 + 0.4 0.0040 0.0047 0.0012 0.0412 0.0585 0.0671 0.0000 + 0.6 0.0000 0.0000 0.0000 0.0000 0.0416 0.0518 0.0000 + 0.8 0.0000 0.0000 0.0000 0.0000 0.0354 0.0468 0.0000 + 1.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0352 0.0000 + +
+
+ + + + + velocities/mach + atmosphere/density-altitude + + -10000 0 10000 20000 30000 40000 50000 + 0.0 1.2600 1.0000 0.7400 0.5640 0.3920 0.2710 0.0000 + 0.2 1.1710 0.9740 0.6970 0.5360 0.3850 0.2610 0.0000 + 0.4 1.1500 0.9570 0.6920 0.5460 0.3870 0.2530 0.0000 + 0.6 1.1810 0.9410 0.7210 0.5660 0.3580 0.2180 0.0000 + 0.8 1.2290 1.0200 0.7820 0.5570 0.3040 0.1930 0.0000 + 0.9 1.2580 1.0200 0.7820 0.5220 0.2710 0.1140 0.0000 + 1.0 1.1810 0.9510 0.7210 0.4410 0.1740 0.0450 0.0000 + 1.2 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 1.4 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + +
+ fadec/limit/rated-thrust-factor + + /engines/engine[1]/reverser-pos-norm + + 0.01 1.00 + 1.00 0.65 + +
+
+
+ +
diff --git a/Engines/cfm56_5a1_1.xml b/Engines/cfm56_5a1_1.xml deleted file mode 100644 index e3a67287..00000000 --- a/Engines/cfm56_5a1_1.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - 25000 - 0.445 - 0.03 - 0.6 - 22.2 - 18.9 - 59.4 - 0.05 - 1.85 - 0.573 - 1.127 - 103.8 - 101.4 - 0 - 0 - - - - /engines/engine[0]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[0]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[0]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[0]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - velocities/mach - atmosphere/density-altitude - - -10000 0 10000 20000 30000 40000 50000 - 0.0 0.0430 0.0458 0.0378 0.0684 0.0619 0.0693 0.0000 - 0.2 0.0500 0.0291 0.0205 0.0514 0.0627 0.0629 0.0000 - 0.4 0.0040 0.0047 0.0012 0.0412 0.0485 0.0571 0.0000 - 0.6 0.0000 0.0000 0.0000 0.0000 0.0316 0.0418 0.0000 - 0.8 0.0000 0.0000 0.0000 0.0000 0.0254 0.0368 0.0000 - 1.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0252 0.0000 - -
-
- - - - velocities/mach - atmosphere/density-altitude - - -10000 0 10000 20000 30000 40000 50000 - 0.0 1.2600 1.0000 0.7400 0.5640 0.3920 0.2710 0.0000 - 0.2 1.1710 0.9740 0.6970 0.5360 0.3850 0.2610 0.0000 - 0.4 1.1500 0.9570 0.6920 0.5460 0.3870 0.2530 0.0000 - 0.6 1.1810 0.9410 0.7210 0.5660 0.3580 0.2180 0.0000 - 0.8 1.2290 1.0200 0.7820 0.5570 0.3040 0.1930 0.0000 - 0.9 1.2580 1.0200 0.7820 0.5220 0.2710 0.1140 0.0000 - 1.0 1.1810 0.9510 0.7210 0.4410 0.1740 0.0450 0.0000 - 1.2 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - 1.4 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - -
-
- -
diff --git a/Engines/cfm56_5a1_2.xml b/Engines/cfm56_5a1_2.xml deleted file mode 100644 index 92053333..00000000 --- a/Engines/cfm56_5a1_2.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - 25000 - 0.445 - 0.03 - 0.6 - 22.2 - 18.9 - 59.4 - 0.05 - 1.85 - 0.573 - 1.127 - 103.8 - 101.4 - 0 - 0 - - - - /engines/engine[1]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[1]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[1]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[1]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - velocities/mach - atmosphere/density-altitude - - -10000 0 10000 20000 30000 40000 50000 - 0.0 0.0430 0.0458 0.0378 0.0684 0.0619 0.0693 0.0000 - 0.2 0.0500 0.0291 0.0205 0.0514 0.0627 0.0629 0.0000 - 0.4 0.0040 0.0047 0.0012 0.0412 0.0485 0.0571 0.0000 - 0.6 0.0000 0.0000 0.0000 0.0000 0.0316 0.0418 0.0000 - 0.8 0.0000 0.0000 0.0000 0.0000 0.0254 0.0368 0.0000 - 1.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0252 0.0000 - -
-
- - - - velocities/mach - atmosphere/density-altitude - - -10000 0 10000 20000 30000 40000 50000 - 0.0 1.2600 1.0000 0.7400 0.5640 0.3920 0.2710 0.0000 - 0.2 1.1710 0.9740 0.6970 0.5360 0.3850 0.2610 0.0000 - 0.4 1.1500 0.9570 0.6920 0.5460 0.3870 0.2530 0.0000 - 0.6 1.1810 0.9410 0.7210 0.5660 0.3580 0.2180 0.0000 - 0.8 1.2290 1.0200 0.7820 0.5570 0.3040 0.1930 0.0000 - 0.9 1.2580 1.0200 0.7820 0.5220 0.2710 0.1140 0.0000 - 1.0 1.1810 0.9510 0.7210 0.4410 0.1740 0.0450 0.0000 - 1.2 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - 1.4 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - -
-
- -
diff --git a/Engines/cfm56_5b4_1.xml b/Engines/cfm56_5b4_1.xml deleted file mode 100644 index d8199883..00000000 --- a/Engines/cfm56_5b4_1.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - 27000 - 0.445 - 0.03 - 0.6 - 22.2 - 18.9 - 59.4 - 0.05 - 1.85 - 0.573 - 1.127 - 103.8 - 101.4 - 0 - 0 - - - - /engines/engine[0]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[0]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[0]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[0]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - velocities/mach - atmosphere/density-altitude - - -10000 0 10000 20000 30000 40000 50000 - 0.0 0.0430 0.0458 0.0378 0.0684 0.0619 0.0693 0.0000 - 0.2 0.0500 0.0291 0.0205 0.0514 0.0627 0.0629 0.0000 - 0.4 0.0040 0.0047 0.0012 0.0412 0.0485 0.0571 0.0000 - 0.6 0.0000 0.0000 0.0000 0.0000 0.0316 0.0418 0.0000 - 0.8 0.0000 0.0000 0.0000 0.0000 0.0254 0.0368 0.0000 - 1.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0252 0.0000 - -
-
- - - - velocities/mach - atmosphere/density-altitude - - -10000 0 10000 20000 30000 40000 50000 - 0.0 1.2600 1.0000 0.7400 0.5640 0.3920 0.2710 0.0000 - 0.2 1.1710 0.9740 0.6970 0.5360 0.3850 0.2610 0.0000 - 0.4 1.1500 0.9570 0.6920 0.5460 0.3870 0.2530 0.0000 - 0.6 1.1810 0.9410 0.7210 0.5660 0.3580 0.2180 0.0000 - 0.8 1.2290 1.0200 0.7820 0.5570 0.3040 0.1930 0.0000 - 0.9 1.2580 1.0200 0.7820 0.5220 0.2710 0.1140 0.0000 - 1.0 1.1810 0.9510 0.7210 0.4410 0.1740 0.0450 0.0000 - 1.2 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - 1.4 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - -
-
- -
diff --git a/Engines/cfm56_5b4_2.xml b/Engines/cfm56_5b4_2.xml deleted file mode 100644 index 183f8243..00000000 --- a/Engines/cfm56_5b4_2.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - 27000 - 0.445 - 0.03 - 0.6 - 22.2 - 18.9 - 59.4 - 0.05 - 1.85 - 0.573 - 1.127 - 103.8 - 101.4 - 0 - 0 - - - - /engines/engine[1]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[1]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[1]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - /engines/engine[1]/n1 - - 24 1.1 - 28 2.9 - 46 9.7 - 68 15.4 - 80 19.6 - 94 21.4 - 103 23.6 - -
-
- - - - velocities/mach - atmosphere/density-altitude - - -10000 0 10000 20000 30000 40000 50000 - 0.0 0.0430 0.0458 0.0378 0.0684 0.0619 0.0693 0.0000 - 0.2 0.0500 0.0291 0.0205 0.0514 0.0627 0.0629 0.0000 - 0.4 0.0040 0.0047 0.0012 0.0412 0.0485 0.0571 0.0000 - 0.6 0.0000 0.0000 0.0000 0.0000 0.0316 0.0418 0.0000 - 0.8 0.0000 0.0000 0.0000 0.0000 0.0254 0.0368 0.0000 - 1.0 0.0000 0.0000 0.0000 0.0000 0.0000 0.0252 0.0000 - -
-
- - - - velocities/mach - atmosphere/density-altitude - - -10000 0 10000 20000 30000 40000 50000 - 0.0 1.2600 1.0000 0.7400 0.5640 0.3920 0.2710 0.0000 - 0.2 1.1710 0.9740 0.6970 0.5360 0.3850 0.2610 0.0000 - 0.4 1.1500 0.9570 0.6920 0.5460 0.3870 0.2530 0.0000 - 0.6 1.1810 0.9410 0.7210 0.5660 0.3580 0.2180 0.0000 - 0.8 1.2290 1.0200 0.7820 0.5570 0.3040 0.1930 0.0000 - 0.9 1.2580 1.0200 0.7820 0.5220 0.2710 0.1140 0.0000 - 1.0 1.1810 0.9510 0.7210 0.4410 0.1740 0.0450 0.0000 - 1.2 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - 1.4 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 - -
-
- -
diff --git a/Engines/v2527_a5_1.xml b/Engines/v2527-a5_1.xml similarity index 99% rename from Engines/v2527_a5_1.xml rename to Engines/v2527-a5_1.xml index d0a1814a..63235edf 100644 --- a/Engines/v2527_a5_1.xml +++ b/Engines/v2527-a5_1.xml @@ -2,7 +2,7 @@ - + 24800 diff --git a/Engines/v2527_a5_2.xml b/Engines/v2527-a5_2.xml similarity index 99% rename from Engines/v2527_a5_2.xml rename to Engines/v2527-a5_2.xml index 47af1c05..330ee4fa 100644 --- a/Engines/v2527_a5_2.xml +++ b/Engines/v2527-a5_2.xml @@ -2,7 +2,7 @@ - + 24800 diff --git a/Models/A320-100-CFM.xml b/Models/A320-100-CFM.xml deleted file mode 100644 index 8326282d..00000000 --- a/Models/A320-100-CFM.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - A320-100-CFM - empty.ac - - - A320 - Aircraft/A320-family/Models/A320-common.xml - - - - EnginesCFM - Aircraft/A320-family/Models/Engines/XMLs/a320.cfm.xml - - - - select - Sharklet - - sim/multiplay/generic/int[12] - - - - - select - WingtipFence - - sim/multiplay/generic/int[12] - - - - - - - var livery_update = aircraft.livery_update.new("Aircraft/A320-family/Models/Liveries/A320/CFM-100"); - - - livery_update.stop(); - - - diff --git a/Models/Effects/reflection.eff b/Models/Effects/reflection.eff index 7f92469a..39a79c91 100644 --- a/Models/Effects/reflection.eff +++ b/Models/Effects/reflection.eff @@ -3,14 +3,93 @@ reflection Effects/model-combined-deferred - 0 - 0 + 1 + 1 0 /sim/model/reflection/reflection-correction 2 /sim/model/reflection/ambient-correction - 0 + 1 0 - 0 + 1 + + Aircraft/A320-family/Models/Effects/res/Fuse-Main-Normal.png + linear-mipmap-linear + clamp + clamp + + sim/model/lights/logo-lights + 1.0 1.0 1.0 + + Aircraft/A320-family/Models/Effects/res/fin-lightmap.png + linear-mipmap-linear + clamp + clamp + normalized + + + cubemap + + Aircraft/Generic/Effects/CubeMaps/fgfs-sky/1.png + Aircraft/Generic/Effects/CubeMaps/fgfs-sky/4.png + Aircraft/Generic/Effects/CubeMaps/fgfs-sky/2.png + Aircraft/Generic/Effects/CubeMaps/fgfs-sky/3.png + Aircraft/Generic/Effects/CubeMaps/fgfs-sky/6.png + Aircraft/Generic/Effects/CubeMaps/fgfs-sky/5.png + + + + + + 6 + 7 + + + + + + tangent + 6 + + + binormal + 7 + + + + + + + + + tangent + 6 + + + binormal + 7 + + + + + + + + + tangent + 6 + + + binormal + 7 + + + + + diff --git a/Models/Engines/NEO/LeapXLeft.xml b/Models/Engines/NEO/LeapXLeft.xml index 2b21519a..75b92db5 100644 --- a/Models/Engines/NEO/LeapXLeft.xml +++ b/Models/Engines/NEO/LeapXLeft.xml @@ -8,7 +8,7 @@ engines/engine[3]/n1 - systems/failures/engine-left-fire + systems/failures/fire/engine-left-fire engines/engine[0]/contrail sim/multiplay/generic/float[2] diff --git a/Models/Engines/NEO/LeapXRight.xml b/Models/Engines/NEO/LeapXRight.xml index cb6a369a..c3cc291e 100644 --- a/Models/Engines/NEO/LeapXRight.xml +++ b/Models/Engines/NEO/LeapXRight.xml @@ -8,7 +8,7 @@ engines/engine[4]/n1 - systems/failures/engine-right-fire + systems/failures/fire/engine-right-fire engines/engine[1]/contrail sim/multiplay/generic/float[3] diff --git a/Models/Engines/NEO/PW1100GLeft.xml b/Models/Engines/NEO/PW1100GLeft.xml index 7022ed79..48535219 100644 --- a/Models/Engines/NEO/PW1100GLeft.xml +++ b/Models/Engines/NEO/PW1100GLeft.xml @@ -13,7 +13,7 @@ engines/engine[3]/n1 - systems/failures/engine-left-fire + systems/failures/fire/engine-left-fire engines/engine[0]/contrail sim/multiplay/generic/float[2] diff --git a/Models/Engines/NEO/PW1100GRight.xml b/Models/Engines/NEO/PW1100GRight.xml index 49688197..6386eec8 100644 --- a/Models/Engines/NEO/PW1100GRight.xml +++ b/Models/Engines/NEO/PW1100GRight.xml @@ -13,7 +13,7 @@ engines/engine[4]/n1 - systems/failures/engine-right-fire + systems/failures/fire/engine-right-fire engines/engine[1]/contrail sim/multiplay/generic/float[3] diff --git a/Models/Engines/XMLs/a320.cfm.xml b/Models/Engines/XMLs/a320.cfm.xml index 2092b6e9..35f6f0f0 100644 --- a/Models/Engines/XMLs/a320.cfm.xml +++ b/Models/Engines/XMLs/a320.cfm.xml @@ -246,7 +246,7 @@ -2.22295 - systems/failures/engine-left-fire + systems/failures/fire/engine-left-fire @@ -259,7 +259,7 @@ -2.22295 - systems/failures/engine-right-fire + systems/failures/fire/engine-right-fire diff --git a/Models/Engines/XMLs/a320.v2500.xml b/Models/Engines/XMLs/a320.v2500.xml index afb1923b..54c7cb17 100644 --- a/Models/Engines/XMLs/a320.v2500.xml +++ b/Models/Engines/XMLs/a320.v2500.xml @@ -246,7 +246,7 @@ -2.22295 - systems/failures/engine-left-fire + systems/failures/fire/engine-left-fire @@ -259,7 +259,7 @@ -2.22295 - systems/failures/engine-right-fire + systems/failures/fire/engine-right-fire @@ -406,7 +406,7 @@ - Aircraft/A320-family/Models/Effects/reflection-engine-IAE EngineIAEV2500L @@ -425,5 +425,5 @@ Aircraft/A320-family/Models/Effects/reflection-chrome-engine-IAE IntakeIAEV2500L IntakeIAEV2500R - --> + diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index 41f089d6..40caf252 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -441,10 +441,12 @@ + MCDU1 Aircraft/A320-family/Models/Instruments/MCDU/MCDU1.xml + MCDU2 Aircraft/A320-family/Models/Instruments/MCDU/MCDU2.xml @@ -875,7 +877,81 @@ + + + rotate + atc_abv + 35 + 0 + + atc_abv.axis + + controls/atc/abv-blw + + + pick + atc_abv + + + + + property-cycle + controls/atc/abv-blw + -1 + 0 + 1 + + + + + + + property-cycle + controls/atc/abv-blw + 1 + 0 + -1 + + + + + + rotate + atc_thrt + -30 + 0 + + atc_thrt.axis + + controls/atc/thrt-all + + + + pick + atc_thrt + + + + + property-cycle + controls/atc/thrt-all + 0 + 1 + + + + + + + property-cycle + controls/atc/thrt-all + 0 + 1 + + + + PFD1 @@ -964,7 +1040,28 @@ IESI Aircraft/A320-family/Models/Instruments/IESI/IESI.xml - + + + select + PFD1 + PFD2 + ND1 + ND2 + UECAM + LECAM + IESI + MCDU1 + MCDU2 + dcduScreenL + dcduScreenR + + + options/hide-canvas-outside + sim/current-view/internal + + + + select @@ -8675,6 +8772,74 @@ + + + + pick + chrono_cpt + + + false + + property-cycle + /instrumentation/efis/inputs/CHRONO + 0 + 1 + 2 + + + + + + + pick + chrono_fo + + + false + + property-cycle + /instrumentation/efis[1]/inputs/CHRONO + 0 + 1 + 2 + + + + + + + pick + chrono_cpt + + + false + + property-cycle + /instrumentation/efis/inputs/CHRONO + 0 + 1 + 2 + + + + + + + pick + chrono_fo + + + false + + property-cycle + /instrumentation/efis[1]/inputs/CHRONO + 0 + 1 + 2 + + + @@ -9116,3 +9281,4 @@ + diff --git a/Models/Fuselages/A320/fuselage.xml b/Models/Fuselages/A320/fuselage.xml index bda76920..fe922d30 100644 --- a/Models/Fuselages/A320/fuselage.xml +++ b/Models/Fuselages/A320/fuselage.xml @@ -34,7 +34,7 @@ OutflowValveDoor2 GPUServiceDoor - + diff --git a/Models/Instruments/IESI/IESI.nas b/Models/Instruments/IESI/IESI.nas index 4ad0a965..63415808 100644 --- a/Models/Instruments/IESI/IESI.nas +++ b/Models/Instruments/IESI/IESI.nas @@ -261,8 +261,6 @@ var input = { "altitude_ind": "/instrumentation/altimeter/indicated-altitude-ft-pfd", "altimeter_mode": "/instrumentation/altimeter[0]/std", "attReset": "/instrumentation/iesi/att-reset", - "dcEss": "/systems/electrical/bus/dc-ess", - "dcHot1": "/systems/electrical/bus/dc-hot-1", "iesiBrt": "/controls/lighting/DU/iesi", "iesiInit": "/instrumentation/iesi/iesi-init", "mach": "/instrumentation/airspeed-indicator/indicated-mach", diff --git a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas index cbfddbc6..feaae20f 100644 --- a/Models/Instruments/Lower-ECAM/Lower-ECAM.nas +++ b/Models/Instruments/Lower-ECAM/Lower-ECAM.nas @@ -3010,7 +3010,7 @@ var canvas_lowerECAM_wheel = { rightdoor = gear_door_R.getValue(); nosedoor = gear_door_N.getValue(); gearlvr = gear_down.getValue(); - askidsw = systems.HYD.Brakes.askidSw.getBoolValue(); + askidsw = systems.HYD.Switch.nwsSwitch.getBoolValue(); brakemode = systems.HYD.Brakes.mode.getBoolValue(); accum = systems.HYD.Brakes.accumPressPsi.getBoolValue(); diff --git a/Models/Instruments/MCDU/MCDU.nas b/Models/Instruments/MCDU/MCDU.nas index 8193260d..447c4b05 100644 --- a/Models/Instruments/MCDU/MCDU.nas +++ b/Models/Instruments/MCDU/MCDU.nas @@ -153,7 +153,6 @@ var baro = props.globals.getNode("/FMGC/internal/baro", 1); # GA PERF # AOC - SENSORS -var parking_brake = props.globals.getNode("/controls/gear/brake-parking", 1); var gear0_wow = props.globals.getNode("/gear/gear[0]/wow", 1); var doorL1_pos = props.globals.getNode("/sim/model/door-positions/doorl1/position-norm", 1); #FWD door var doorR1_pos = props.globals.getNode("/sim/model/door-positions/doorr1/position-norm", 1); #FWD door @@ -167,6 +166,7 @@ var activeAtsu = [props.globals.getNode("/MCDU[0]/atsu-active", 1), props.global props.globals.initNode("/MCDU[0]/active-system", "", "STRING"); props.globals.initNode("/MCDU[1]/active-system", "", "STRING"); + # Conversion factor pounds to kilogram var LBS2KGS = 0.4535924; @@ -174,6 +174,17 @@ var LBS2KGS = 0.4535924; # Create Nodes: var pageSwitch = [props.globals.initNode("/MCDU[0]/internal/switch", 0, "BOOL"), props.globals.initNode("/MCDU[1]/internal/switch", 0, "BOOL")]; +# Page freeze on POSMON +var pageFreezed = [nil,nil]; +var togglePageFreeze = func(i) { + if (pageFreezed[i] == nil) { + pageFreezed[i] = sprintf("%02d%02d", getprop("/sim/time/utc/hour"), getprop("/sim/time/utc/minute")); + } else { + pageFreezed[i] = nil; + } +} + + var canvas_MCDU_base = { init: func(canvas_group, file) { var font_mapper = func(family, weight) { @@ -229,11 +240,13 @@ var canvas_MCDU_base = { me["PERFGA_OE"].setColor(BLUE); me.page = canvas_group; + + me.updateretard = 0; # skip a few page update to save CPU return me; }, getKeys: func() { - return ["Simple","Simple_Center","Scratchpad","Simple_Title","Simple_PageNum","ArrowLeft","ArrowRight","Simple_L1","Simple_L2","Simple_L3","Simple_L4", + return ["Simple","Simple_Center","Scratchpad","Simple_Title","Simple_Title2","Simple_PageNum","ArrowLeft","ArrowRight","Simple_L1","Simple_L2","Simple_L3","Simple_L4", "Simple_L5","Simple_L6","Simple_L0S","Simple_L1S","Simple_L2S","Simple_L3S","Simple_L4S","Simple_L5S","Simple_L6S","Simple_L1_Arrow", "Simple_L2_Arrow","Simple_L3_Arrow","Simple_L4_Arrow","Simple_L5_Arrow","Simple_L6_Arrow","Simple_R1","Simple_R2","Simple_R3","Simple_R4","Simple_R5", "Simple_R6","Simple_R1S","Simple_R2S","Simple_R3S","Simple_R4S","Simple_R5S","Simple_R6S","Simple_R1_Arrow","Simple_R2_Arrow","Simple_R3_Arrow", @@ -264,6 +277,7 @@ var canvas_MCDU_base = { defaultHide: func() { me["Simple"].show(); me["Simple_Center"].hide(); + me["Simple_Title2"].hide(); me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); @@ -281,6 +295,7 @@ var canvas_MCDU_base = { defaultHideWithCenter: func() { me["Simple"].show(); me["Simple_Center"].show(); + me["Simple_Title2"].hide(); me["FPLN"].hide(); me["DIRTO_TMPY_group"].hide(); me["INITA"].hide(); @@ -345,7 +360,13 @@ var canvas_MCDU_base = { me.fontRight(default, default, default, default, default, default); me.fontRightS(default, default, default, default, default, default); me.fontSizeLeft(normal, normal, normal, normal, normal, normal); + me.fontSizeLeftS(small, small, small, small, small, small); me.fontSizeRight(normal, normal, normal, normal, normal, normal); + me.fontSizeRightS(small, small, small, small, small, small); + me.fontCenter(default, default, default, default, default, default); + me.fontCenterS(default, default, default, default, default, default); + me.fontSizeCenter(normal, normal, normal, normal, normal, normal); + me.fontSizeCenterS(small, small, small, small, small, small); }, standardFontColour: func() { me.colorLeft("wht", "wht", "wht", "wht", "wht", "wht"); @@ -355,6 +376,43 @@ var canvas_MCDU_base = { me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht"); me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); }, + getLatLogFormatted: func(rootpropname) { + var dms = getprop(rootpropname ~ "latitude-deg"); + var degrees = int(dms); + var minutes = sprintf("%.1f",abs((dms - degrees) * 60)); + var sign = degrees >= 0 ? "N" : "S"; + var dms2 = getprop(rootpropname ~ "longitude-deg"); + var degrees2 = int(dms2); + var minutes2 = sprintf("%.1f",abs((dms2 - degrees2) * 60)); + var sign2 = degrees2 >= 0 ? "E" : "W"; + return sprintf("%d%.1f%s/%07s%s",abs(degrees),minutes,sign,abs(degrees2) ~ minutes2,sign2); + }, + getLatLogFormatted2: func(rootpropname) { + var dms = getprop(rootpropname ~ "latitude-deg"); + var degrees = int(dms); + var minutes = sprintf("%.1f",abs((dms - degrees) * 60)); + var sign = degrees >= 0 ? "N" : "S"; + var dms2 = getprop(rootpropname ~ "longitude-deg"); + var degrees2 = int(dms2); + var minutes2 = sprintf("%.1f",abs((dms2 - degrees2) * 60)); + var sign2 = degrees2 >= 0 ? "E" : "W"; + return sprintf("%d %.1f%s/%03s %.1f%s",abs(degrees),minutes,sign,abs(degrees2),minutes2,sign2); + }, + getIRSStatus: func(a,b = 0) { + var irsstatus = "INVAL"; + if (systems.ADIRS.ADIRunits[a].operative) { + if (systems.ADIRS.Operating.aligned[a].getValue()) { + irsstatus = (systems.ADIRS.ADIRunits[a].mode == 2) ? "ATT" : "NAV"; + } else { + if (b) { + irsstatus = "ALIGN TTN" ~ sprintf("%2d",math.round(systems.ADIRS.ADIRunits[a]._alignTime) / 60); + } else { + irsstatus = "ALIGN"; + } + } + } + return irsstatus; + }, updateCommon: func(i) { page = pageProp[i].getValue(); if (page != "NOTIFICATION") { @@ -389,6 +447,9 @@ var canvas_MCDU_base = { me["PRINTPAGE"].setColor(WHITE); } } + + if (!pageSwitch[i].getBoolValue()) me.defaultHide(); + if (page != "ATIS") { me["ATISSend1"].hide(); me["ATISSend2"].hide(); @@ -622,7 +683,7 @@ var canvas_MCDU_base = { } } else if (page == "FLTLOG") { if (!pageSwitch[i].getBoolValue()) { - me.defaultHideWithCenter(); + me.defaultHideWithCenter(); me["Simple_L0S"].hide(); me["ArrowLeft"].hide(); @@ -720,7 +781,7 @@ var canvas_MCDU_base = { var logpage = mcdu.FlightLogDatabase.getPage(logid); - me["Simple_L1"].setText(sprintf("%8s - ",logpage.fltnum) ~ logpage.date); + me["Simple_L1"].setText(sprintf("%8s- ",logpage.fltnum) ~ logpage.date); me["Simple_R1"].setText(logpage.tofrom ~ " "); me["Simple_L5S"].setText( " " ~ logpage.flttime ); @@ -737,6 +798,7 @@ var canvas_MCDU_base = { } else if (page == "SENSORS") { if (!pageSwitch[i].getBoolValue()) { me.defaultHide(); + me.standardFontSize(); me["Simple_Title"].setText("SENSORS "); me.defaultPageNumbers(); me["Simple_L0S"].hide(); @@ -783,8 +845,8 @@ var canvas_MCDU_base = { pageSwitch[i].setBoolValue(1); } - me["Simple_R1S"].setText(sprintf("%-10s",(parking_brake.getValue() == 1) ? "SET" : "RELEASED")); - me["Simple_R1"].setText(sprintf("%-10s",(gear0_wow.getValue() == 1) ? "GROUND" : "FLIGHT")); + me["Simple_R1S"].setText(sprintf("%-10s",(pts.Controls.Gear.parkingBrake.getValue() == 1) ? "SET" : "RELEASED")); + me["Simple_R1"].setText(sprintf("%-10s",(pts.Gear.wow[0].getValue() == 1) ? "GROUND" : "FLIGHT")); me["Simple_R2S"].setText(sprintf("%-10s",(doorL1_pos.getValue() > 0.1) ? "OPEN" : "CLOSED")); me["Simple_R2"].setText(sprintf("%-10s",(doorR1_pos.getValue() > 0.1) ? "OPEN" : "CLOSED")); me["Simple_R3S"].setText(sprintf("%-10s",(doorL4_pos.getValue() > 0.1) ? "OPEN" : "CLOSED")); @@ -2258,12 +2320,12 @@ var canvas_MCDU_base = { me["PERFAPPR"].hide(); me["PERFGA"].hide(); me["Simple_Title"].show(); - me["Simple_Title"].setText("POSITION MONITOR"); + me["Simple_Title2"].setColor(GREEN); me.defaultPageNumbers(); me.showLeft(1, 1, 1, 1, 1, 1); me["Simple_L0S"].hide(); - me.showLeftS(-1, -1, -1, -1, 1, -1); + me.showLeftS(-1, 1, 1, -1, 1, -1); me.showLeftArrow(-1, -1, -1, -1, -1, 1); me.showCenter(-1, -1, -1, -1, 1, -1); me["Simple_C3B"].hide(); @@ -2281,26 +2343,228 @@ var canvas_MCDU_base = { me.colorRight("grn", "grn", "grn", "grn", "grn", "wht"); me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht"); me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); + me["Simple_C5"].setColor(GREEN); + me["Simple_L5"].setFontSize(small); + me["Simple_C5"].setFontSize(small); + me["Simple_R5"].setFontSize(small); + + pageFreezed[i] = nil; + + me.updateretard = 0; pageSwitch[i].setBoolValue(1); } + + if (me.updateretard <= 0) { + if (pageFreezed[i] == nil) { + + me["Simple_Title"].setText("POSITION MONITOR"); + me["Simple_Title2"].hide(); + me["Simple_L6"].setText(" FREEZE"); + + me["Simple_L1"].setText("FMGC1"); + me["Simple_L2"].setText("FMGC2"); + me["Simple_L3"].setText("GPIRS"); + me["Simple_L4"].setText("MIX IRS"); + me["Simple_L5S"].setText(" IRS1"); + me["Simple_R5S"].setText("IRS3 "); + me["Simple_R6S"].setText("SEL "); + me["Simple_R6"].setText("NAVAIDS "); + me["Simple_C5S"].setText("IRS2"); + + var latlog = me.getLatLogFormatted("/position/"); # current sim lat/log (formatted) cached for fast excecution + #TODO - IRS emulation + + if (systems.ADIRS.Operating.aligned[0].getValue()) { # TODO real FMGC1 GPS data + me["Simple_R1"].setText(latlog); + me["Simple_R1"].setColor(GREEN); + me["Simple_L2S"].setText(sprintf("%16s","3IRS/GPS")); + } else { + me["Simple_R1"].setText("----.--/-----.--"); + me["Simple_R1"].setColor(WHITE); + me["Simple_L2S"].setText(""); + } + + if (systems.ADIRS.Operating.aligned[1].getValue()) { # TODO real FMGC2 GPS data + me["Simple_R2"].setText(latlog); + me["Simple_R2"].setColor(GREEN); + me["Simple_L3S"].setText(sprintf("%16s","3IRS/GPS")); + } else { + me["Simple_R2"].setText("----.--/-----.--"); + me["Simple_R2"].setColor(WHITE); + me["Simple_L3S"].setText(""); + } + + if (systems.ADIRS.Operating.aligned[0].getValue() or systems.ADIRS.Operating.aligned[1].getValue() or systems.ADIRS.Operating.aligned[2].getValue()) { + me["Simple_R3"].setText(latlog); # GPIRS + me["Simple_R3"].setColor(GREEN); + me["Simple_R4"].setText(latlog); # MIXIRS + me["Simple_R4"].setColor(GREEN); + } else { + me["Simple_R3"].setText("----.--/-----.--"); # GPIRS not available + me["Simple_R3"].setColor(WHITE); + me["Simple_R4"].setText("----.--/-----.--"); # MIXIRS not available + me["Simple_R4"].setColor(WHITE); + } + + var Simple_row5 = ["Simple_L5","Simple_C5","Simple_R5"]; + + for ( var a=0; a<3; a+=1 ) { + if (systems.ADIRS.Operating.aligned[a].getValue()) { + me[Simple_row5[a]].setText(sprintf("%-8s",(systems.ADIRS.ADIRunits[a].mode == 2) ? "ATT" : "NAV 0.0")); + } else { + me[Simple_row5[a]].setText(sprintf("%-8s",me.getIRSStatus(a))); + } + } + + } else { + + me["Simple_Title"].setText("POSITION FROZEN AT "); + me["Simple_Title2"].setText(sprintf("%23s ",pageFreezed[i])); + me["Simple_Title2"].show(); + me["Simple_L6"].setText(" UNFREEZE"); + + } + + } + + if (me.updateretard < 0) me.updateretard = 2; + else me.updateretard -= 1; + + } else if (page == "IRSMON") { + if (!pageSwitch[i].getBoolValue()) { + + me.defaultHideWithCenter(); + me.standardFontSize(); + + me.defaultPageNumbers(); + + me.showLeft(1, 1, 1, -1, -1, -1); + me.showLeftS(-1, 1, 1, 1, -1, -1); + me.showLeftArrow(1, 1, 1, -1, -1, -1); + me.showCenter(-1, -1, -1, -1, -1, -1); + me.showCenterS(-1, -1, -1, -1, -1, -1); + me.showRight(-1, -1, -1, -1, -1, -1); + me.showRightS(1, 1, 1, 1, -1, -1); + me.showRightArrow(-1, -1, -1, -1, -1, -1); + + me["arrowsDepArr"].hide(); + me["PERFAPPR"].hide(); + me["PERFGA"].hide(); + me["Simple_L0S"].hide(); + me["Simple_Title"].show(); + + me.colorLeft("wht", "wht", "wht", "ack", "ack", "ack"); + me.colorLeftS("ack", "grn", "grn", "grn", "ack", "ack"); + me.colorCenter("wht", "grn", "grn", "grn", "ack", "ack"); + me.colorRightS("amb", "grn", "grn", "grn", "ack", "ack"); + me.colorLeftArrow("wht", "wht", "wht", "ack", "ack", "ack"); + + me["Simple_Title"].setText("IRS MONITOR"); + + me["Simple_L1"].setText(" IRS1"); + me["Simple_L2"].setText(" IRS2"); + me["Simple_L3"].setText(" IRS3"); + me["Simple_C1"].setText("EXCESS MOTION"); + me["Simple_C2"].setText("EXCESS MOTION"); + me["Simple_C3"].setText("EXCESS MOTION"); + me["Simple_C1"].setFontSize(small); + me["Simple_C2"].setFontSize(small); + me["Simple_C3"].setFontSize(small); + me["Simple_R1S"].setText(""); + + #TODO - Missing SET HDG on degraded operations + + pageSwitch[i].setBoolValue(1); + } - me["Simple_L1"].setText("FMGC1"); - me["Simple_L2"].setText("FMGC2"); - me["Simple_L3"].setText("GPIRS"); - me["Simple_L4"].setText("MIX IRS"); - me["Simple_L5"].setText("NAV -.-"); - me["Simple_L6"].setText(" FREEZE"); - me["Simple_L5S"].setText(" IRS1"); - me["Simple_R1"].setText("----.-X/-----.-X"); - me["Simple_R2"].setText("----.-X/-----.-X"); - me["Simple_R3"].setText("----.-X/-----.-X"); - me["Simple_R4"].setText("----.-X/-----.-X"); - me["Simple_R5"].setText("NAV -.-"); - me["Simple_R5S"].setText("IRS3 "); - me["Simple_R6S"].setText("SEL "); - me["Simple_C5"].setText("NAV -.-"); - me["Simple_C5S"].setText("IRS2"); + var rows = ["Simple_L2S","Simple_L3S","Simple_L4S"]; + var center = ["Simple_C1","Simple_C2","Simple_C3"]; + for (var a = 0; a<3; a+=1) { + me[rows[a]].setText(" " ~ me.getIRSStatus(a,1)); + if (systems.ADIRS.ADIRunits[a]._excessMotion) { + me[center[a]].show(); + } else { + me[center[a]].hide(); + } + } + + if (fmgc.FMGCInternal.phase == 7) { # DONE phase + if (fmgc.FMGCInternal.arrApt != nil and fmgc.flightPlanController.flightplans[2].departure_runway != nil) { + me["Simple_R1S"].setText(sprintf("DRIFT AT %7s ",fmgc.FMGCInternal.arrApt ~ fmgc.flightPlanController.flightplans[2].departure_runway.id)); + } + me["Simple_R2S"].setText(sprintf("DRIFT %2.1fNM/H ",0)); + me["Simple_R3S"].setText(sprintf("DRIFT %2.1fNM/H ",0)); + me["Simple_R4S"].setText(sprintf("DRIFT %2.1fNM/H ",0)); + } else { + me["Simple_R1S"].setText(""); + me["Simple_R2S"].setText(""); + me["Simple_R3S"].setText(""); + me["Simple_R4S"].setText(""); + } + } else if (page == "GPSMON") { + if (!pageSwitch[i].getBoolValue()) { + + me.defaultHideWithCenter(); + me.standardFontSize(); + + me.defaultPageNumbers(); + + me.showLeft(1, 1, 1, 1, 1, 1); + me.showLeftS(1, 1, 1, 1, 1, 1); + me.showLeftArrow(-1, -1, -1, -1, -1, -1); + me.showCenter(-1, 1, 1, -1, 1, 1); + me.showCenterS(-1, 1, 1, -1, 1, 1); + me.showRight(-1, 1, 1, -1, 1, 1); + me.showRightS(-1, 1, 1, -1, 1, 1); + me.showRightArrow(-1, -1, -1, -1, -1, -1); + + me["arrowsDepArr"].hide(); + me["PERFAPPR"].hide(); + me["PERFGA"].hide(); + me["Simple_L0S"].hide(); + me["Simple_Title"].show(); + + me.colorLeft("grn", "grn", "grn", "grn", "grn", "grn"); + me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); + me.colorCenter("grn", "grn", "grn", "grn", "grn", "grn"); + me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht"); + me.colorRight("grn", "grn", "grn", "grn", "grn", "grn"); + me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht"); + + me["Simple_Title"].setText("GPS MONITOR"); + + me["Simple_L1S"].setText("GPS1 POSITION"); + me["Simple_L2S"].setText("TTRK"); + me["Simple_L3S"].setText("MERIT"); + me["Simple_L3"].setText(sprintf("%3d",((rand() * 50) - 25) + 50) ~ "M"); + me["Simple_L4S"].setText("GPS2 POSITION"); + me["Simple_L5S"].setText("TTRK"); + me["Simple_L6S"].setText("MERIT"); + me["Simple_L6"].setText(sprintf("%3d",((rand() * 50) - 25) + 50) ~ "M"); + me["Simple_C2S"].setText("UTC"); + me["Simple_C3S"].setText("GPS ALT"); + me["Simple_C5S"].setText("UTC"); + me["Simple_C6S"].setText("GPS ALT"); + me["Simple_R2S"].setText("GS"); + me["Simple_R3S"].setText("MODE/SAT"); + me["Simple_R3"].setText("NAV/" ~ sprintf("%s",int((rand() * 2) - 1) + 6) ~ " "); + me["Simple_R5S"].setText("GS"); + me["Simple_R6S"].setText("MODE/SAT"); + me["Simple_R6"].setText("NAV/" ~ sprintf("%s",int((rand() * 2) - 1) + 6) ~ " "); + pageSwitch[i].setBoolValue(1); + } + me["Simple_L1"].setText(me.getLatLogFormatted2("/position/")); + me["Simple_L2"].setText(sprintf("%-5.1f",pts.Instrumentation.GPS.trackMag.getValue() + magvar())); + me["Simple_L4"].setText(me.getLatLogFormatted2("/position/")); + me["Simple_L5"].setText(sprintf("%-5.1f",pts.Instrumentation.GPS.trackMag.getValue() + magvar())); + var gmt = string.replace(pts.Sim.Time.gmtString.getValue(),":","."); + me["Simple_C2"].setText(gmt); + me["Simple_C5"].setText(gmt); + me["Simple_C3"].setText(sprintf("%5.0f",pts.Instrumentation.GPS.altitude.getValue())); + me["Simple_C6"].setText(sprintf("%5.0f",pts.Instrumentation.GPS.altitude.getValue())); + me["Simple_R2"].setText(sprintf("%3.0f",pts.Instrumentation.GPS.gs.getValue())); + me["Simple_R5"].setText(sprintf("%3.0f",pts.Instrumentation.GPS.gs.getValue())); } else if (page == "RADNAV") { if (!pageSwitch[i].getBoolValue()) { me.defaultHide(); @@ -2782,48 +3046,65 @@ var canvas_MCDU_base = { } else if (page == "ROUTESELECTION") { if (!pageSwitch[i].getBoolValue()) { - me.defaultHideWithCenter(); + me.defaultHide(); + me.standardFontSize(); me["arrowsDepArr"].hide(); me["PERFAPPR"].hide(); me["PERFGA"].hide(); me["Simple_Title"].show(); me["Simple_Title"].setText("ROUTE SELECTION"); - me.defaultPageNumbers(); + me.showPageNumbers(1,1); - me.showLeft(1, -1, -1, -1, -1, 1); + me.showLeft(1, 1, 1, 1, 1, 1); me["Simple_L0S"].hide(); - me.showLeftS(-1, -1, -1, -1, -1, -1); + me.showLeftS(-1, 1, 1, 1, 1, -1); me.showLeftArrow(-1, -1, -1, -1, -1, 1); - me.showRight(-1, -1, -1, -1, -1, -1); - me.showRightS(-1, -1, -1, -1, -1, -1); + me.showRight(-1, 1, 1, 1, 1, 1); + me.showRightS(-1, 1, 1, 1, 1, -1); me.showRightArrow(-1, -1, -1, -1, -1, -1); - me.showCenter(-1, -1, -1, -1, -1, -1); - me["Simple_C3B"].hide(); - me["Simple_C4B"].hide(); - me.showCenterS(-1, -1, -1, -1, -1, -1); + me.fontSizeLeftS(normal, normal, normal, normal, normal, normal); + me.fontSizeRight(0, small, small, small, small, normal); + me.fontSizeRightS(0, small, small, small, small, normal); - me.fontLeft(default, 0, 0, 0, 0, default); - - me.fontSizeLeft(normal, 0, 0, 0, 0, normal); - - me.colorLeft("grn", "ack", "ack", "ack", "ack", "wht"); - - pageSwitch[i].setBoolValue(1); + me.colorLeft("grn", "grn", "grn", "grn", "grn", "wht"); + me.colorLeftS("grn", "grn", "grn", "grn", "grn", "wht"); + me.colorRight("ack", "wht", "wht", "wht", "wht", "amb"); + me.colorRightS("ack", "wht", "wht", "wht", "wht", "wht"); + + me["Simple_L1"].setText("NONE"); + me["Simple_L6"].setText(" RETURN"); + me["Simple_R6"].setText("INSERT "); + me["PRINTPAGE"].show(); + me["PRINTPAGE"].setColor(AMBER); + + var rows = ["2S","2","3S","3","4S","4","5S","5"]; + + me["Simple_L1"].setText("DUBLHR1"); + + var r = 0; + #for ( ; r < 8; r += 1) { # Example how formats rows with 4 cols + # me["Simple_L" ~ rows[r]].setText(sprintf("%11s %11s","SELKA","NUGRA")); + # me["Simple_R" ~ rows[r]].setText(sprintf("%-13s %-13s","UL975","UL975")); + #} + while (r<8) { + me["Simple_L" ~ rows[r]].setText(""); + me["Simple_R" ~ rows[r]].setText(""); + r+=1; + } + + if (fmgc.FMGCInternal.toFromSet and !fmgc.FMGCInternal.altSelected) { + me["Simple_Title"].setText(sprintf("%s", fmgc.FMGCInternal.depApt ~ "/" ~ fmgc.FMGCInternal.arrApt)); + } else if (!fmgc.FMGCInternal.toFromSet and fmgc.FMGCInternal.altAirport != "" and fmgc.FMGCInternal.altSelected) { + me["Simple_Title"].setText(sprintf("%s", fmgc.FMGCInternal.altAirport)); + } else if (fmgc.FMGCInternal.toFromSet and fmgc.FMGCInternal.altAirport != "" and fmgc.FMGCInternal.altSelected) { + me["Simple_Title"].setText(sprintf("%s", fmgc.FMGCInternal.arrApt ~ "/" ~ fmgc.FMGCInternal.altAirport)); + } else { + me["Simple_Title"].setText("ROUTE SELECTION"); + } + + pageSwitch[i].setBoolValue(1); # update on request only (left/right arrows) } - me["Simple_L1"].setText("NONE"); - me["Simple_L6"].setText(" RETURN"); - - if (fmgc.FMGCInternal.toFromSet and !fmgc.FMGCInternal.altSelected) { - me["Simple_Title"].setText(sprintf("%s", fmgc.FMGCInternal.depApt ~ "/" ~ fmgc.FMGCInternal.arrApt)); - } else if (!fmgc.FMGCInternal.toFromSet and fmgc.FMGCInternal.altAirport != "" and fmgc.FMGCInternal.altSelected) { - me["Simple_Title"].setText(sprintf("%s", fmgc.FMGCInternal.altAirport)); - } else if (fmgc.FMGCInternal.toFromSet and fmgc.FMGCInternal.altAirport != "" and fmgc.FMGCInternal.altSelected) { - me["Simple_Title"].setText(sprintf("%s", fmgc.FMGCInternal.arrApt ~ "/" ~ fmgc.FMGCInternal.altAirport)); - } else { - me["Simple_Title"].setText("ROUTE SELECTION"); - } - } else if (page == "INITB") { if (!pageSwitch[i].getBoolValue()) { me["Simple"].show(); @@ -3564,8 +3845,12 @@ var canvas_MCDU_base = { me["Simple_L6"].setFontSize(small); } - } else if (page == "PROGTO" or page == "PROGCLB" or page == "PROGCRZ" or page == "PROGDES") { - if (fmgc.FMGCInternal.phase == 0 or fmgc.FMGCInternal.phase == 1) { + } else if (page == "PROGPREF" or page == "PROGTO" or page == "PROGCLB" or page == "PROGCRZ" or page == "PROGDES" or page == "PROGAPPR" or page == "PROGDONE") { + + if (fmgc.FMGCInternal.phase == 0) { + setprop("/MCDU[" ~ i ~ "]/page", "PROGPREF"); + page = "PROGPREF"; + } else if (fmgc.FMGCInternal.phase == 1) { setprop("/MCDU[" ~ i ~ "]/page", "PROGTO"); page = "PROGTO"; } else if (fmgc.FMGCInternal.phase == 2) { @@ -3574,10 +3859,16 @@ var canvas_MCDU_base = { } else if (fmgc.FMGCInternal.phase == 3) { setprop("/MCDU[" ~ i ~ "]/page", "PROGCRZ"); page = "PROGCRZ"; - } else if (fmgc.FMGCInternal.phase == 4 or fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { + } else if (fmgc.FMGCInternal.phase == 4) { setprop("/MCDU[" ~ i ~ "]/page", "PROGDES"); page = "PROGDES"; - } + } else if (fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { + setprop("/MCDU[" ~ i ~ "]/page", "PROGAPPR"); + page = "PROGAPPR"; + } else if (fmgc.FMGCInternal.phase == 7) { + setprop("/MCDU[" ~ i ~ "]/page", "PROGDONE"); + page = "PROGDONE"; + } if (!pageSwitch[i].getBoolValue()) { me["Simple"].show(); @@ -3595,31 +3886,34 @@ var canvas_MCDU_base = { me["PERFAPPR"].hide(); me["PERFGA"].hide(); - if (fmgc.FMGCInternal.flightNumSet) { - if (page == "PROGTO") { - me["Simple_Title"].setText(sprintf("TAKE OFF %s", fmgc.FMGCInternal.flightNum)); - } else if (page == "PROGCLB") { - me["Simple_Title"].setText(sprintf("CLIMB %s", fmgc.FMGCInternal.flightNum)); - } else if (page == "PROGCRZ") { - me["Simple_Title"].setText(sprintf("CRUISE %s", fmgc.FMGCInternal.flightNum)); - } else if (page == "PROGDES") { - me["Simple_Title"].setText(sprintf("DESCENT %s", fmgc.FMGCInternal.flightNum)); - } - } else { - if (page == "PROGTO") { - me["Simple_Title"].setText("TAKE OFF"); - } else if (page == "PROGCLB") { - me["Simple_Title"].setText("CLIMB"); - } else if (page == "PROGCRZ") { - me["Simple_Title"].setText("CRUISE"); - } else if (page == "PROGDES") { - me["Simple_Title"].setText("DESCENT"); - } + var colortext = ["",""]; + + if (page == "PROGPREF") { + colortext[0] = "PREFLIGHT"; + } else if (page == "PROGTO") { + colortext[0] = "TAKE OFF"; + } else if (page == "PROGCLB") { + colortext[0] = "CLIMB"; + } else if (page == "PROGCRZ") { + colortext[0] = "CRUISE"; + } else if (page == "PROGDES") { + colortext[0] = "DESCENT"; + } else if (page == "PROGAPPR") { + colortext[0] = "APPROACH"; + } else if (page == "PROGDONE") { + colortext[0] = "DONE"; } + + colortext[1] = (fmgc.FMGCInternal.flightNumSet and page != "PROGDONE") ? fmgc.FMGCInternal.flightNum : ""; #CHECKME - condition useful? + + me["Simple_Title"].setText(sprintf(" %-21s",colortext[0])); + me["Simple_Title2"].setText(sprintf("%12s %-11s","",colortext[1])); me["Simple_Title"].show(); - me["Simple_Title"].setColor(GREEN); - me["Simple_PageNum"].setText("X/X"); + me["Simple_Title"].setColor((page != "PROGDONE") ? GREEN : WHITE); + me["Simple_Title2"].show(); + me["Simple_Title2"].setColor(WHITE); + #me["Simple_PageNum"].setText("X/X"); me["Simple_PageNum"].hide(); me["ArrowLeft"].hide(); me["ArrowRight"].hide(); @@ -3640,31 +3934,48 @@ var canvas_MCDU_base = { me.fontLeftS(default, default, default, default, default, default); me.fontRight(default, symbol, symbol, symbol, default, default); me.fontRightS(default, default, default, default, default, default); + + me.fontSizeLeft(normal, normal, small, small, normal, small); + me.fontSizeLeftS(small, small, small, small, small, small); + me.fontSizeRight(normal, small, small, small, normal, small); + me.fontSizeRightS(small, small, small, small, small, small); + me.fontSizeCenter(small, normal, small, small, small, normal); + me.fontSizeCenterS(normal, small, small, small, small, small); + me["Simple_C1S"].setFontSize(small); + + me.colorLeft("blu", "wht", "blu", "wht", "wht", "blu"); + me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); + me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht"); + me.colorRight("mag", "wht", "blu", "blu", "grn", "grn"); + me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht"); + me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); + me.colorCenter("grn", "grn", "wht", "wht", "wht", "grn"); + me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht"); + if (page == "PROGCRZ") { me.showLeftS(0, 0, -1, 0, 0, 0); me.showCenterS(0, 0, 1, 0, 0, 0); #me.showRight(0, 0, 1, 0, 0, 0); #Add when implement cruise phase me.fontLeft(0, 0, default, 0, 0, 0); - } else if (page == "PROGDES") { - me.showRight(0, 1, 0, 0, 0, 0); - } - - me.fontSizeLeft(normal, normal, small, small, normal, small); - me.fontSizeLeftS(small, small, small, small, small, small); - me.fontSizeRight(normal, small, small, small, normal, small); - me.fontSizeRightS(small, small, small, small, small, small); - me.fontSizeCenter(small, small, small, small, small, normal); - me.fontSizeCenterS(normal, small, small, small, small, small); - - me.colorLeft("blu", "wht", "blu", "wht", "wht", "blu"); - me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); - me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht"); - me.colorRight("mag", "blu", "blu", "blu", "grn", "grn"); - me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht"); - me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); - me.colorCenter("grn", "wht", "wht", "wht", "wht", "grn"); - me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht"); + } else if (page == "PROGDES" or page == "PROGAPPR") { + me.showCenter(0, 1, 0, 0, 0, 0); + me.showRight(0, 1, 0, 0, 0, 0); + #me["Simple_C2"].setFontSize(normal); + #me["Simple_R2"].setFontSize(normal); + } + #else if (page == "PROGAPPR") { # A/C without GPS + # me["Simple_L5S"].setFontSize(small); + # me["Simple_L5S"].setColor(GREEN); + # me["Simple_L5"].setFontSize(small); + # me["Simple_L5"].setColor(GREEN); + # me["Simple_R5S"].setFontSize(small); + # me["Simple_R5S"].setColor(WHITE); + # me["Simple_R5S"].show(); + # me["Simple_R5"].setFontSize(small); + # me["Simple_R5"].setColor(WHITE); + # me.showLeftArrow(-1, 1, -1, -1, -1, -1); + #} pageSwitch[i].setBoolValue(1); } @@ -3676,7 +3987,7 @@ var canvas_MCDU_base = { me["Simple_L1"].setText(sprintf("%s", "FL" ~ fmgc.FMGCInternal.crzProg)); } } else { - me["Simple_L1"].setText("----"); + me["Simple_L1"].setText("-----"); } me["Simple_L2"].setText(" REPORT"); if (page == "PROGCRZ") { @@ -3687,7 +3998,6 @@ var canvas_MCDU_base = { me["PROG_UPDATE"].show(); me["Simple_L3"].setText(" [ ]"); } - me["Simple_L4"].setText(" ---g /----.-"); me["Simple_L5"].setText(" GPS"); me["Simple_L6"].setText("----"); me["Simple_L1S"].setText(" CRZ"); @@ -3695,19 +4005,61 @@ var canvas_MCDU_base = { me["Simple_L4S"].setText(" BRG /DIST"); me["Simple_L5S"].setText(" PREDICTIVE"); me["Simple_L6S"].setText("REQUIRED"); - me["Simple_R1"].setText("FL398"); - me["Simple_R2"].setText("VDEV = + 750 FT"); - me["Simple_R4"].setText("[ ]"); + + if (page != "PROGDONE") { + me["Simple_R1"].setText("FL398 "); + } else { + me["Simple_L1"].setText("_____"); + me["Simple_R1"].setText("----- "); + me["Simple_L1"].setColor(AMBER); + me["Simple_C1"].setColor(WHITE); + me["Simple_R1"].setColor(WHITE); + me["Simple_R5"].hide(); + } + + if (page == "PROGDES" or page == "PROGAPPR") { + var vdev = 750; #CHECKME i dunno the meaning, but I found this value in the source + var vdev_sign = (vdev>=0) ? "+" : "-"; + me["Simple_C2"].setText(sprintf("%17s%4d ",vdev_sign,abs(vdev))); + me["Simple_R2"].setText(sprintf("%30s","VDEV= FT ")); + } + + if (mcdu.bearingDistances[i].displayID != nil) { + me["Simple_R4"].setFont(default); + me["Simple_R4"].setFontSize(normal); + me["Simple_R4"].setText(mcdu.bearingDistances[i].displayID); + } else { + me["Simple_R4"].setFont(symbol); + me["Simple_R4"].setFontSize(small); + me["Simple_R4"].setText("[ ]"); + } + + if (mcdu.bearingDistances[i].selectedPoint != nil) { + me["Simple_L4"].setColor(GREEN); + me["Simple_L4"].setText(sprintf("%3.0fg /%4.1f",mcdu.bearingDistances[i].bearing,mcdu.bearingDistances[i].distance)); + } else { + me["Simple_L4"].setColor(WHITE); + me["Simple_L4"].setText(" ---g /----.-"); + } + me["Simple_R5"].setText("GPS PRIMARY"); me["Simple_R6"].setText("----"); me["Simple_R1S"].setText("REC MAX "); me["Simple_R6S"].setText("ESTIMATED"); - me["Simple_C1"].setText("----"); + me["Simple_C1"].setText("-----"); me["Simple_C1S"].setText("OPT"); me["Simple_C3S"].setText("CONFIRM UPDATE AT"); - me["Simple_C4"].setText(" TO"); + me["Simple_C4"].setText(" TO"); me["Simple_C6S"].setText("ACCUR"); - me["Simple_C6"].setText("HIGH"); + if (systems.ADIRS.Operating.aligned[0].getValue() or systems.ADIRS.Operating.aligned[1].getValue()) me["Simple_C6"].setText("HIGH"); + else me["Simple_C6"].setText("LOW"); + + #if (page == "PROGAPPR") { # A/C without GPS + # me["Simple_L5"].setText(sprintf(" DIR DIST TO DEST=%6d",0)); + # me["Simple_L5S"].setText(sprintf("REQD DIST TO LAND=%6d",0)); + # me["Simple_R5"].setText("MN"); + # me["Simple_R5S"].setText("MN"); + #} } else if (page == "PERFTO") { if (!pageSwitch[i].getBoolValue()) { @@ -3737,7 +4089,7 @@ var canvas_MCDU_base = { me.showLeftS(1, 1, 1, 1, 1, 1); me.showLeftArrow(-1, -1, -1, -1, -1, 1); me.showRight(-1, 1, 1, 1, 1, 1); - me.showRightS(-1, 1, 1, 1, 1, 1); + me.showRightS(1, 1, 1, 1, 1, 1); me.showRightArrow(-1, -1, -1, -1, -1, 1); me.showCenter(1, 1, 1, -1, -1, -1); me["Simple_C3B"].hide(); @@ -3756,11 +4108,13 @@ var canvas_MCDU_base = { me.colorLeft("blu", "blu", "blu", "blu", "blu", "wht"); me.colorLeftS("wht", "wht", "wht", "wht", "wht", "wht"); me.colorLeftArrow("wht", "wht", "wht", "wht", "wht", "wht"); - me.colorRight("wht", "blu", "blu", "blu", "blu", "wht"); + me.colorRight("grn", "blu", "blu", "blu", "blu", "wht"); me.colorRightS("wht", "wht", "wht", "wht", "wht", "wht"); me.colorRightArrow("wht", "wht", "wht", "wht", "wht", "wht"); me.colorCenter("grn", "grn", "grn", "wht", "wht", "wht"); me.colorCenterS("wht", "wht", "wht", "wht", "wht", "wht"); + + me["Simple_Title"].setText("TAKE OFF"); pageSwitch[i].setBoolValue(1); } @@ -3799,18 +4153,25 @@ var canvas_MCDU_base = { me["Simple_L6"].hide(); me["Simple_L6S"].hide(); } - - if (fmgc.FMGCInternal.phase == 1) { + + if (fmgc.FMGCInternal.phase == 1) { # GREEN title and not modifiable on TO phase me["Simple_Title"].setColor(GREEN); - } else { + me.colorLeft("grn", "grn", "grn", "blu", "grn", "wht"); + me.colorRight("grn", "blu", "grn", "grn", "grn", "wht"); + } else { me["Simple_Title"].setColor(WHITE); + me.colorLeft("blu", "blu", "blu", "blu", "blu", "wht"); + me.colorRight("grn", "blu", "blu", "blu", "blu", "wht"); } if (fmgc.flightPlanController.flightplans[2].departure_runway != nil) { - me["Simple_Title"].setText(sprintf("TAKE OFF RWY %s", fmgc.flightPlanController.flightplans[2].departure_runway.id)); + me["Simple_R1"].setText(fmgc.flightPlanController.flightplans[2].departure_runway.id ~ " "); + me["Simple_R1"].show(); } else { - me["Simple_Title"].setText("TAKE OFF"); + me["Simple_R1"].hide(); } + + if (fmgc.FMGCInternal.v1set) { me["PERFTO_V1"].hide(); @@ -3886,6 +4247,7 @@ var canvas_MCDU_base = { me["Simple_C1S"].setText("FLP RETR"); me["Simple_C2S"].setText("SLT RETR"); me["Simple_C3S"].setText("CLEAN "); + } else if (page == "PERFCLB") { if (!pageSwitch[i].getBoolValue()) { me.defaultHideWithCenter(); @@ -4040,6 +4402,7 @@ var canvas_MCDU_base = { me["Simple_R6S"].setText("NEXT "); me["Simple_R6"].setText("PHASE "); + } else if (page == "PERFCRZ") { if (!pageSwitch[i].getBoolValue()) { me.defaultHideWithCenter(); @@ -4335,6 +4698,7 @@ var canvas_MCDU_base = { me["Simple_R6S"].setText("NEXT "); me["Simple_R6"].setText("PHASE "); + } else if (page == "PERFAPPR") { if (!pageSwitch[i].getBoolValue()) { me.defaultHideWithCenter(); @@ -4518,6 +4882,7 @@ var canvas_MCDU_base = { me["Simple_C2S"].setText("SLT RETR"); me["Simple_C3S"].setText("CLEAN "); me["Simple_C5S"].setText("VLS "); + } else if (page == "PERFGA") { if (!pageSwitch[i].getBoolValue()) { me.defaultHideWithCenter(); @@ -4835,6 +5200,8 @@ var canvas_MCDU_base = { me.dynamicPageArrowFunc(myVertRev[i]); me.colorLeftArrow(myVertRev[i].arrowsColour[0][0],myVertRev[i].arrowsColour[0][1],myVertRev[i].arrowsColour[0][2],myVertRev[i].arrowsColour[0][3],myVertRev[i].arrowsColour[0][4],myVertRev[i].arrowsColour[0][5]); + me.colorRightArrow(myVertRev[i].arrowsColour[1][0],myVertRev[i].arrowsColour[1][1],myVertRev[i].arrowsColour[1][2],myVertRev[i].arrowsColour[1][3],myVertRev[i].arrowsColour[1][4],myVertRev[i].arrowsColour[1][5]); + me.dynamicPageFontFunc(myVertRev[i]); @@ -5896,6 +6263,46 @@ var canvas_MCDU_base = { me["Simple_L6S"].setFont(f); } }, + fontCenter: func (a, b, c, d, e, f) { + if (a != 0) { + me["Simple_C1"].setFont(a); + } + if (b != 0) { + me["Simple_C2"].setFont(b); + } + if (c != 0) { + me["Simple_C3"].setFont(c); + } + if (d != 0) { + me["Simple_C4"].setFont(d); + } + if (e != 0) { + me["Simple_C5"].setFont(e); + } + if (f != 0) { + me["Simple_C6"].setFont(f); + } + }, + fontCenterS: func (a, b, c, d, e, f) { + if (a != 0) { + me["Simple_C1S"].setFont(a); + } + if (b != 0) { + me["Simple_C2S"].setFont(b); + } + if (c != 0) { + me["Simple_C3S"].setFont(c); + } + if (d != 0) { + me["Simple_C4S"].setFont(d); + } + if (e != 0) { + me["Simple_C5S"].setFont(e); + } + if (f != 0) { + me["Simple_C6S"].setFont(f); + } + }, fontRight: func (a, b, c, d, e, f) { if (a != 0) { me["Simple_R1"].setFont(a); diff --git a/Models/Instruments/MCDU/res/mcdu.svg b/Models/Instruments/MCDU/res/mcdu.svg index 9eb38288..ecda2737 100644 --- a/Models/Instruments/MCDU/res/mcdu.svg +++ b/Models/Instruments/MCDU/res/mcdu.svg @@ -12,7 +12,7 @@ viewBox="0 0 1024 864" version="1.1" id="svg2" - inkscape:version="0.92.4 (5da689c313, 2019-01-14)" + inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)" sodipodi:docname="mcdu.svg"> @@ -37,17 +37,17 @@ guidetolerance="20" inkscape:pageopacity="1" inkscape:pageshadow="2" - inkscape:window-width="1366" - inkscape:window-height="705" + inkscape:window-width="1920" + inkscape:window-height="1017" id="namedview371" showgrid="true" - inkscape:zoom="3.1578866" - inkscape:cx="1122.1906" - inkscape:cy="986.92422" + inkscape:zoom="0.55824076" + inkscape:cx="608.20261" + inkscape:cy="690.7315" inkscape:window-x="-8" inkscape:window-y="-8" inkscape:window-maximized="1" - inkscape:current-layer="svg2" + inkscape:current-layer="Simple" showguides="false" inkscape:snap-global="false" units="px" @@ -306,6 +306,19 @@ y="539.16522" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:70px;line-height:1.25;font-family:BoeingCDULarge;-inkscape-font-specification:BoeingCDULarge;text-align:center;text-anchor:middle;fill:#ffffff;fill-opacity:1;stroke-width:1px">TEXT + TITLE + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1103,7 +1116,7 @@ x="177.72771" style="font-style:normal;font-weight:normal;line-height:0%;font-family:sans-serif;text-align:center;letter-spacing:0px;word-spacing:0px;text-anchor:middle;fill:#ffff00;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" xml:space="preserve"> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -1235,7 +1248,7 @@ inkscape:label="arrow5L" id="arrow5L"> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#bb6100;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> @@ -2617,7 +2630,7 @@ id="tspan1088" x="478.87796" y="171.04486" - style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.99240112px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">= + style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">= = + style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:63.9924px;line-height:1.25;font-family:'Helvetica Medium';-inkscape-font-specification:'Helvetica Medium, Medium';text-align:start;text-anchor:start;fill:#ffffff;fill-opacity:1">= @@ -3019,9 +3032,9 @@ inkscape:connector-curvature="0" id="path1273" d="M 998.71909,284.70793 H 970.18944" - style="fill:none;stroke:#179ab7;stroke-width:4.07999992;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> + style="fill:none;stroke:#179ab7;stroke-width:4.08;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /> = 2 ? 1 : 0); + } + if (getprop("/instrumentation/efis[1]/nd/canvas-display-mode") != "PLAN") { + canvas_nd.ND_2.NDFo.trafficGroup.setVisible(pts.Instrumentation.TCAS.Inputs.mode.getValue() >= 2 ? 1 : 0); + } + }, 1, 0); + + setlistener("/instrumentation/efis[0]/nd/canvas-display-mode", func() { + canvas_nd.ND_1.NDCpt.trafficGroup.setVisible(getprop("/instrumentation/efis[0]/nd/canvas-display-mode") == "PLAN" ? 0 : 1); + }, 1, 0); + + setlistener("/instrumentation/efis[1]/nd/canvas-display-mode", func() { + canvas_nd.ND_2.NDFo.trafficGroup.setVisible(getprop("/instrumentation/efis[1]/nd/canvas-display-mode") == "PLAN" ? 0 : 1); + }, 1, 0); + nd_update.start(); if (getprop("systems/acconfig/options/nd-rate") > 1) { rateApply(); diff --git a/Models/Instruments/ND/canvas/framework/navdisplay.nas b/Models/Instruments/ND/canvas/framework/navdisplay.nas index 81d82153..7778f57c 100644 --- a/Models/Instruments/ND/canvas/framework/navdisplay.nas +++ b/Models/Instruments/ND/canvas/framework/navdisplay.nas @@ -32,8 +32,7 @@ canvas.NavDisplay.get_nav_path = func (type, idx) { return sprintf(path, name, idx); }; -canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update_time=0.05) -{ +canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update_time=0.05) { if (me.inited) die("MFD already was added to scene"); me.range_dependant_layers = []; me.always_update_layers = {}; @@ -87,6 +86,8 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update .set("screen-range", 700) .set("z-index",-1); + me.compassHdgTrk = 0; # last compass rotation deg + me.update_sub(); # init some map properties based on switches var vor1_path = "/instrumentation/nav[2]"; @@ -233,6 +234,17 @@ canvas.NavDisplay.newMFD = func(canvas_group, parent=nil, nd_options=nil, update event_handler(); } # foreach layer + me.mapCamera = traffic.Camera.new({ + range: 20, + screenRange: 436.8545, + screenCX: 512, + screenCY: 512, + }); + me.trafficGroup = me.nd.createChild("group"); + me.trafficLayer = traffic.TrafficLayer.new(me.mapCamera, me.trafficGroup); + me.trafficLayer.start(); + me.trafficGroup.set("z-index", -1); + #print("navdisplay.mfd:ND layer setup completed"); # TODO: move this to RTE.lcontroller ? @@ -277,20 +289,38 @@ canvas.NavDisplay.update_sub = func(){ me.userTrk=userHdg; } + var reqHdg = 0; + if((me.in_mode("toggle_display_mode", ["MAP"]) and me.get_switch("toggle_display_type") == "CRT") - or (me.get_switch("toggle_track_heading") and me.get_switch("toggle_display_type") == "LCD")) - { + or (me.get_switch("toggle_track_heading") and me.get_switch("toggle_display_type") == "LCD")) { userHdgTrk = userTrk; me.userHdgTrk = userTrk; + me.compassHdgTrk = userTrk; userHdgTrkTru = userTrkTru; me.symbols.hdgTrk.setText("TRK"); } else { - userHdgTrk = userHdg; - me.userHdgTrk = userHdg; + if (userHdg != me.compassHdgTrk) { + var dist = userHdg - me.compassHdgTrk; + if (dist>180) dist = dist - 360; + elsif (dist<-180) dist = 360 + dist; + if (dist>0) { + dist = dist * 0.3; + if (dist>10) dist = 10; + me.compassHdgTrk = (dist<0.1) ? userHdg : math.mod(me.compassHdgTrk+dist,360); + } + elsif (dist<0) { + dist = dist * 0.3; + if (dist<-10) dist = -10; + me.compassHdgTrk = (dist>-0.1) ? userHdg : math.mod(me.compassHdgTrk+dist,360); + } + } + userHdgTrk = me.compassHdgTrk; + me.userHdgTrk = me.compassHdgTrk; userHdgTrkTru = userHdgTru; me.symbols.hdgTrk.setText("HDG"); } + # First, update the display position of the map var oldRange = me.map.getRange(); var pos = { @@ -372,6 +402,13 @@ canvas.NavDisplay.update = func() # FIXME: This stuff is still too aircraft spec else me.map.setTranslation(512,824); } + me.mapCamera.repositon(geo.aircraft_position(), me.aircraft_source.get_hdg_tru()); + me.pos = props.globals.getNode("position"); + me.trafficLayer.setRefAlt(me.pos.getValue("altitude-ft")); + if (me.trafficGroup.getVisible()) { + me.trafficLayer.update(); + me.trafficLayer.redraw(); + } var vor1_path = "/instrumentation/nav[2]"; var vor2_path = "/instrumentation/nav[3]"; var dme1_path = "/instrumentation/dme[2]"; diff --git a/Models/Instruments/ND/canvas/res/airbusND.svg b/Models/Instruments/ND/canvas/res/airbusND.svg index fc7e5289..88a9ab49 100644 --- a/Models/Instruments/ND/canvas/res/airbusND.svg +++ b/Models/Instruments/ND/canvas/res/airbusND.svg @@ -7,8 +7,8 @@ xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - sodipodi:docname="airbusND_orig.svg" - inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)" + sodipodi:docname="airbusND.svg" + inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)" xml:space="preserve" id="svg5180" height="1024" @@ -23,16 +23,16 @@ inkscape:pageopacity="1" inkscape:pageshadow="2" inkscape:window-width="1920" - inkscape:window-height="1056" + inkscape:window-height="1017" id="namedview102" showgrid="false" - inkscape:zoom="0.9002897" - inkscape:cx="467.92702" - inkscape:cy="538.03817" - inkscape:window-x="1920" - inkscape:window-y="0" + inkscape:zoom="1.2732019" + inkscape:cx="406.21664" + inkscape:cy="201.87587" + inkscape:window-x="-8" + inkscape:window-y="-8" inkscape:window-maximized="1" - inkscape:current-layer="layer8" + inkscape:current-layer="layer3" inkscape:object-nodes="true" inkscape:snap-smooth-nodes="true" inkscape:snap-object-midpoints="true" @@ -40,7 +40,8 @@ inkscape:snap-to-guides="false" showguides="true" inkscape:guide-bbox="true" - inkscape:document-rotation="0">image/svg+xmlGijs de RooyGijs de RooyABCD 999.9 999°/ 99 999 999 GS + x="13.895038" + y="33.26786">GS TAS + style="font-size:27.9658px;line-height:1.25;stroke-width:0.776826">TAS 08 34.4z @@ -1173,36 +1200,36 @@ sodipodi:nodetypes="ccccccccc" />NM + x="967.04547" + y="67.431412">NM ILS + x="807.289" + y="33.929054">ILS 999.99 @@ -1224,14 +1251,14 @@ inkscape:transform-center-y="-715.12894" />360 OFST -999999CRS @@ -1656,23 +1709,23 @@ xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#ededed;fill-opacity:1;stroke:none" x="854.72168" - y="124.87983" + y="104.87983" id="dmeLbl" inkscape:label="#text7243">  + y="104.87983">  999 @@ -1680,13 +1733,13 @@ xml:space="preserve" style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;line-height:0%;font-family:'Liberation Sans';-inkscape-font-specification:'Liberation Sans';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;display:inline;fill:#ededed;fill-opacity:1;stroke:none" x="913.95801" - y="126.12444" + y="106.12444" id="dme" inkscape:label="#text7243">99.9 =nd.userHdgTrk) ? (bugRot-nd.userHdgTrk) : (360+bugRot-nd.userHdgTrk); + if (diffRot<180 and diffRot>48) { + nd.symbols.hdgBug2ValR.setText(sprintf("%03d", bugRot+0.5)); #CHECKME - not sure about adding +.5 as "hdg" process + nd.symbols.hdgBug2ValR.show(); + } else { + nd.symbols.hdgBug2ValR.hide(); + } + }, + is_false: func(nd) nd.symbols.hdgBug2ValR.hide(), + }, + }, + { + id:"hdgBug2ValL", + impl: { + init: func(nd,symbol), + predicate: func(nd) nd.in_mode("toggle_display_mode", ["MAP"]) and !nd.get_switch("toggle_centered"), + is_true: func(nd) { + var bugRot = vhdg_bug.getValue(); + var diffRot = (bugRot>nd.userHdgTrk) ? (360+nd.userHdgTrk-bugRot) : (nd.userHdgTrk-bugRot); + if (diffRot<180 and diffRot>48) { + nd.symbols.hdgBug2ValL.setText(sprintf("%03d", bugRot-0.5)); #CHECKME - not sure about adding +.5 as "hdg" process + nd.symbols.hdgBug2ValL.show(); + } else { + nd.symbols.hdgBug2ValL.hide(); + } + }, + is_false: func(nd) nd.symbols.hdgBug2ValL.hide(), + }, + }, { id:"hdgGroup", impl: { diff --git a/Models/Instruments/PFD/PFD.nas b/Models/Instruments/PFD/PFD.nas index 61df122a..fca480d4 100644 --- a/Models/Instruments/PFD/PFD.nas +++ b/Models/Instruments/PFD/PFD.nas @@ -10,8 +10,6 @@ var PFD_1_mismatch = nil; var PFD_2_mismatch = nil; var PFD1_display = nil; var PFD2_display = nil; -var updateL = 0; -var updateR = 0; var et = 0; var altTens = 0; var track_diff = 0; @@ -136,7 +134,6 @@ var adr_3_fault = props.globals.getNode("/controls/navigation/adirscp/lights/adr var air_data_switch = props.globals.getNode("/controls/navigation/switching/air-data", 1); # Create Nodes: -var alt_diff = props.globals.initNode("/instrumentation/pfd/alt-diff", 0.0, "DOUBLE"); var heading = props.globals.initNode("/instrumentation/pfd/heading-deg", 0.0, "DOUBLE"); var horizon_pitch = props.globals.initNode("/instrumentation/pfd/horizon-pitch", 0.0, "DOUBLE"); var horizon_ground = props.globals.initNode("/instrumentation/pfd/horizon-ground", 0.0, "DOUBLE"); @@ -282,56 +279,40 @@ var canvas_PFD_base = { if (systems.ELEC.Bus.acEss.getValue() >= 110 and du1_lgt.getValue() > 0.01) { if (du1_test_time.getValue() + du1_test_amount.getValue() >= elapsedtime_act and cpt_du_xfr.getValue() != 1) { PFD_1_test.update(); - updateL = 0; PFD_1.page.hide(); PFD_1_test.page.show(); } else if (du2_test_time.getValue() + du2_test_amount.getValue() >= elapsedtime_act and cpt_du_xfr.getValue() == 1) { PFD_1_test.update(); - updateL = 0; PFD_1.page.hide(); PFD_1_test.page.show(); } else { - PFD_1.updateFast(); - if (!updateL) { # Update slow here once so that no flicker if timers don't perfectly align - updateL = 1; - PFD_1.update(); - } + PFD_1.update(); PFD_1_test.page.hide(); PFD_1.page.show(); } } else { - updateL = 0; PFD_1_test.page.hide(); PFD_1.page.hide(); } if (systems.ELEC.Bus.ac2.getValue() >= 110 and du6_lgt.getValue() > 0.01) { if (du6_test_time.getValue() + du6_test_amount.getValue() >= elapsedtime_act and fo_du_xfr.getValue() != 1) { PFD_2_test.update(); - updateR = 0; PFD_2.page.hide(); PFD_2_test.page.show(); } else if (du5_test_time.getValue() + du5_test_amount.getValue() >= elapsedtime_act and fo_du_xfr.getValue() == 1) { PFD_2_test.update(); - updateR = 0; PFD_2.page.hide(); PFD_2_test.page.show(); } else { - PFD_2.updateFast(); - if (!updateR) { # Update slow here once so that no flicker if timers don't perfectly align - updateR = 1; - PFD_2.update(); - } + PFD_2.update(); PFD_2_test.page.hide(); PFD_2.page.show(); } } else { - updateR = 0; PFD_2_test.page.hide(); PFD_2.page.hide(); } } else { - updateL = 0; - updateR = 0; PFD_1_test.page.hide(); PFD_1.page.hide(); PFD_2_test.page.hide(); @@ -342,14 +323,6 @@ var canvas_PFD_base = { PFD_2_mismatch.page.show(); } }, - updateSlow: func() { - if (updateL) { - PFD_1.update(); - } - if (updateR) { - PFD_2.update(); - } - }, updateCommon: func () { # FMA MAN TOGA MCT FLX THR # Set properties used a lot to a variable to avoid calling getValue() multiple times @@ -360,6 +333,310 @@ var canvas_PFD_base = { toga_lk_act = toga_lk.getValue(); thr1_act = thr1.getValue(); thr2_act = thr2.getValue(); + + # Attitude Indicator + pitch_cur = pitch.getValue(); + roll_cur = roll.getValue(); + + me.AI_horizon_trans.setTranslation(0, pitch_cur * 11.825); + me.AI_horizon_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter()); + me.AI_horizon_ground_trans.setTranslation(0, horizon_ground.getValue() * 11.825); + me.AI_horizon_ground_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter()); + me.AI_horizon_sky_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter()); + + me["AI_slipskid"].setTranslation(math.clamp(slip_skid.getValue(), -15, 15) * 7, 0); + me["AI_bank"].setRotation(-roll_cur * D2R); + + if (fbw_law.getValue() == 0) { + me["AI_bank_lim"].show(); + me["AI_pitch_lim"].show(); + me["AI_bank_lim_X"].hide(); + me["AI_pitch_lim_X"].hide(); + } else { + me["AI_bank_lim"].hide(); + me["AI_pitch_lim"].hide(); + me["AI_bank_lim_X"].show(); + me["AI_pitch_lim_X"].show(); + } + + fd_roll_cur = fd_roll.getValue(); + fd_pitch_cur = fd_pitch.getValue(); + if (fd_roll_cur != nil) { + me["FD_roll"].setTranslation((fd_roll_cur) * 2.2, 0); + } + if (fd_pitch_cur != nil) { + me["FD_pitch"].setTranslation(0, -(fd_pitch_cur) * 3.8); + } + + gear_agl_cur = gear_agl.getValue(); + + me["AI_agl"].setText(sprintf("%s", math.round(math.clamp(gear_agl_cur, 0, 2500)))); + + if (fmgc.FMGCInternal.phase < 3 or fmgc.flightPlanController.arrivalDist >= 250) { + me["FMA_dh_box"].hide(); + me["FMA_dh"].hide(); + me["FMA_dhn"].hide(); + me["FMA_nodh"].hide(); + #me["dhReached"].hide(); + if (gear_agl_cur <= 2500) { + me["AI_agl"].show(); + if (gear_agl_cur <= decision.getValue()) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } else { + me["AI_agl"].hide(); + } + } else { + if (gear_agl_cur <= 2500) { + me["AI_agl"].show(); + me["FMA_dh_box"].hide(); #not implemented + if (int(getprop("/FMGC/internal/radio")) != 99999) { + me["FMA_dh"].setText("RADIO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio"))); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + hundredAbove.setValue(getprop("/FMGC/internal/radio") + 100); + minimum.setValue(getprop("/FMGC/internal/radio")); + if (gear_agl_cur <= getprop("/FMGC/internal/radio") + 100) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } else if (int(getprop("/FMGC/internal/baro")) != 99999) { + me["FMA_dh"].setText("BARO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro"))); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + hundredAbove.setValue(getprop("/FMGC/internal/baro") + 100); + minimum.setValue(getprop("/FMGC/internal/baro")); + if (gear_agl_cur <= getprop("/FMGC/internal/baro") + 100) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } else if (fmgc.FMGCInternal.radioNo) { + me["FMA_dh"].setText("BARO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText("100"); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + hundredAbove.setValue(100); + minimum.setValue(0); + if (gear_agl_cur <= 100) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } else { + me["FMA_dh"].hide(); + me["FMA_dhn"].hide(); + me["FMA_nodh"].show(); + hundredAbove.setValue(400); + minimum.setValue(300); + if (gear_agl_cur <= 400) { + me["AI_agl"].setColor(0.7333,0.3803,0); + } else { + me["AI_agl"].setColor(0.0509,0.7529,0.2941); + } + } + } else { + me["AI_agl"].hide(); + me["FMA_nodh"].hide(); + me["FMA_dh_box"].hide(); #not implemented + if (int(getprop("/FMGC/internal/radio")) != 99999) { + me["FMA_dh"].setText("RADIO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio"))); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + } else if (int(getprop("/FMGC/internal/baro")) != 99999) { + me["FMA_dh"].setText("BARO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro"))); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + } else if (fmgc.FMGCInternal.radioNo) { + me["FMA_dh"].setText("BARO"); + me["FMA_dh"].show(); + me["FMA_dhn"].setText("100"); + me["FMA_dhn"].show(); + me["FMA_nodh"].hide(); + } else { + me["FMA_dh"].hide(); + me["FMA_dhn"].hide(); + me["FMA_nodh"].show(); + } + } + } + + me["AI_agl_g"].setRotation(-roll_cur * D2R); + + FMGCphase_act = fmgc.FMGCInternal.phase; + if ((wow1.getValue() == 1 or wow2.getValue() == 1) and FMGCphase_act != 0 and FMGCphase_act != 1) { + me["AI_stick"].show(); + me["AI_stick_pos"].show(); + + } else if ((wow1.getValue() == 1 or wow2.getValue() == 1) and (FMGCphase_act == 0 or FMGCphase_act == 1) and (eng0_state.getValue() == 3 or eng1_state.getValue() == 3)) { + me["AI_stick"].show(); + me["AI_stick_pos"].show(); + } else { + me["AI_stick"].hide(); + me["AI_stick_pos"].hide(); + } + + me["AI_stick_pos"].setTranslation(aileron_input.getValue() * 196.8, elevator_input.getValue() * 151.5); + + # Vertical Speed + me["VS_pointer"].setRotation(vs_needle.getValue() * D2R); + + me["VS_box"].setTranslation(0, vs_digit.getValue()); + + var vs_pfd_cur = ap_vs_pfd.getValue(); + if (vs_pfd_cur < 2) { + me["VS_box"].hide(); + } else { + me["VS_box"].show(); + } + + if (vs_pfd_cur < 10) { + me["VS_digit"].setText(sprintf("%02d", "0" ~ vs_pfd_cur)); + } else { + me["VS_digit"].setText(sprintf("%02d", vs_pfd_cur)); + } + + var vs_itaf = fmgc.Internal.vs.getValue(); + var gearAgl = gear_agl.getValue(); + + if (abs(vs_itaf) >= 6000 or (vs_itaf <= -2000 and gearAgl <= 2500) or (vs_itaf <= -1200 and gearAgl <= 1000)) { + me["VS_digit"].setColor(0.7333,0.3803,0); + me["VS_pointer"].setColor(0.7333,0.3803,0); + me["VS_pointer"].setColorFill(0.7333,0.3803,0); + } else { + me["VS_digit"].setColor(0.0509,0.7529,0.2941); + me["VS_pointer"].setColor(0.0509,0.7529,0.2941); + me["VS_pointer"].setColorFill(0.0509,0.7529,0.2941); + } + + # ILS + me["LOC_pointer"].setTranslation(loc.getValue() * 197, 0); + me["GS_pointer"].setTranslation(0, gs.getValue() * -197); + + # Heading + me.heading = hdg_scale.getValue(); + me.headOffset = me.heading / 10 - int(me.heading / 10); + me.middleText = roundabout(me.heading / 10); + me.middleOffset = nil; + if(me.middleText == 36) { + me.middleText = 0; + } + me.leftText1 = me.middleText == 0?35:me.middleText - 1; + me.rightText1 = me.middleText == 35?0:me.middleText + 1; + me.leftText2 = me.leftText1 == 0?35:me.leftText1 - 1; + me.rightText2 = me.rightText1 == 35?0:me.rightText1 + 1; + me.leftText3 = me.leftText2 == 0?35:me.leftText2 - 1; + me.rightText3 = me.rightText2 == 35?0:me.rightText2 + 1; + if (me.headOffset > 0.5) { + me.middleOffset = -(me.headOffset - 1) * 98.5416; + } else { + me.middleOffset = -me.headOffset * 98.5416; + } + me["HDG_scale"].setTranslation(me.middleOffset, 0); + me["HDG_scale"].update(); + me["HDG_four"].setText(sprintf("%d", me.middleText)); + me["HDG_five"].setText(sprintf("%d", me.rightText1)); + me["HDG_three"].setText(sprintf("%d", me.leftText1)); + me["HDG_six"].setText(sprintf("%d", me.rightText2)); + me["HDG_two"].setText(sprintf("%d", me.leftText2)); + me["HDG_seven"].setText(sprintf("%d", me.rightText3)); + me["HDG_one"].setText(sprintf("%d", me.leftText3)); + + me["HDG_four"].setFontSize(fontSizeHDG(me.middleText), 1); + me["HDG_five"].setFontSize(fontSizeHDG(me.rightText1), 1); + me["HDG_three"].setFontSize(fontSizeHDG(me.leftText1), 1); + me["HDG_six"].setFontSize(fontSizeHDG(me.rightText2), 1); + me["HDG_two"].setFontSize(fontSizeHDG(me.leftText2), 1); + me["HDG_seven"].setFontSize(fontSizeHDG(me.rightText3), 1); + me["HDG_one"].setFontSize(fontSizeHDG(me.leftText3), 1); + + show_hdg_act = show_hdg.getValue(); + hdg_diff_act = hdg_diff.getValue(); + if (show_hdg_act == 1 and hdg_diff_act >= -23.62 and hdg_diff_act <= 23.62) { + me["HDG_target"].setTranslation((hdg_diff_act / 10) * 98.5416, 0); + me["HDG_digit_L"].hide(); + me["HDG_digit_R"].hide(); + me["HDG_target"].show(); + } else if (show_hdg_act == 1 and hdg_diff_act < -23.62 and hdg_diff_act >= -180) { + me["HDG_digit_L"].setText(sprintf("%3.0f", ap_hdg.getValue())); + me["HDG_digit_L"].show(); + me["HDG_digit_R"].hide(); + me["HDG_target"].hide(); + } else if (show_hdg_act == 1 and hdg_diff_act > 23.62 and hdg_diff_act <= 180) { + me["HDG_digit_R"].setText(sprintf("%3.0f", ap_hdg.getValue())); + me["HDG_digit_R"].show(); + me["HDG_digit_L"].hide(); + me["HDG_target"].hide(); + } else { + me["HDG_digit_L"].hide(); + me["HDG_digit_R"].hide(); + me["HDG_target"].hide(); + } + + + var heading_deg = heading.getValue(); + track_diff = geo.normdeg180(track.getValue() - heading_deg); + me["TRK_pointer"].setTranslation(me.getTrackDiffPixels(track_diff),0); + split_ils = split("/", ils_data1.getValue()); + + if (ap_ils_mode.getValue() == 1 and size(split_ils) == 2) { + magnetic_hdg = ils_crs.getValue(); + magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading_deg); + if (magnetic_hdg_dif >= -23.62 and magnetic_hdg_dif <= 23.62) { + me["CRS_pointer"].setTranslation((magnetic_hdg_dif / 10) * 98.5416, 0); + me["ILS_HDG_R"].hide(); + me["ILS_HDG_L"].hide(); + me["CRS_pointer"].show(); + } else if (magnetic_hdg_dif < -23.62 and magnetic_hdg_dif >= -180) { + if (int(magnetic_hdg) < 10) { + me["ILS_left"].setText(sprintf("00%1.0f", int(magnetic_hdg))); + } else if (int(magnetic_hdg) < 100) { + me["ILS_left"].setText(sprintf("0%2.0f", int(magnetic_hdg))); + } else { + me["ILS_left"].setText(sprintf("%3.0f", int(magnetic_hdg))); + } + me["ILS_HDG_L"].show(); + me["ILS_HDG_R"].hide(); + me["CRS_pointer"].hide(); + } else if (magnetic_hdg_dif > 23.62 and magnetic_hdg_dif <= 180) { + if (int(magnetic_hdg) < 10) { + me["ILS_right"].setText(sprintf("00%1.0f", int(magnetic_hdg))); + } else if (int(magnetic_hdg) < 100) { + me["ILS_right"].setText(sprintf("0%2.0f", int(magnetic_hdg))); + } else { + me["ILS_right"].setText(sprintf("%3.0f", int(magnetic_hdg))); + } + me["ILS_HDG_R"].show(); + me["ILS_HDG_L"].hide(); + me["CRS_pointer"].hide(); + } else { + me["ILS_HDG_R"].hide(); + me["ILS_HDG_L"].hide(); + me["CRS_pointer"].hide(); + } + } else { + me["ILS_HDG_R"].hide(); + me["ILS_HDG_L"].hide(); + me["CRS_pointer"].hide(); + } + + # AI HDG + me.AI_horizon_hdg_trans.setTranslation(me.middleOffset, horizon_pitch.getValue() * 11.825); + me.AI_horizon_hdg_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter()); + me["AI_heading"].update(); + if (athr.getValue() == 1 and (state1_act == "TOGA" or state1_act == "MCT" or state1_act == "MAN THR" or state2_act == "TOGA" or state2_act == "MCT" or state2_act == "MAN THR") and eng_out.getValue() != 1 and alpha_floor_act != 1 and toga_lk_act != 1) { me["FMA_man"].show(); @@ -724,310 +1001,6 @@ var canvas_PFD_base = { } }, - updateCommonFast: func() { - # Attitude Indicator - pitch_cur = pitch.getValue(); - roll_cur = roll.getValue(); - - me.AI_horizon_trans.setTranslation(0, pitch_cur * 11.825); - me.AI_horizon_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter()); - me.AI_horizon_ground_trans.setTranslation(0, horizon_ground.getValue() * 11.825); - me.AI_horizon_ground_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter()); - me.AI_horizon_sky_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter()); - - me["AI_slipskid"].setTranslation(math.clamp(slip_skid.getValue(), -15, 15) * 7, 0); - me["AI_bank"].setRotation(-roll_cur * D2R); - - if (fbw_law.getValue() == 0) { - me["AI_bank_lim"].show(); - me["AI_pitch_lim"].show(); - me["AI_bank_lim_X"].hide(); - me["AI_pitch_lim_X"].hide(); - } else { - me["AI_bank_lim"].hide(); - me["AI_pitch_lim"].hide(); - me["AI_bank_lim_X"].show(); - me["AI_pitch_lim_X"].show(); - } - - fd_roll_cur = fd_roll.getValue(); - fd_pitch_cur = fd_pitch.getValue(); - if (fd_roll_cur != nil) { - me["FD_roll"].setTranslation((fd_roll_cur) * 2.2, 0); - } - if (fd_pitch_cur != nil) { - me["FD_pitch"].setTranslation(0, -(fd_pitch_cur) * 3.8); - } - - gear_agl_cur = gear_agl.getValue(); - - me["AI_agl"].setText(sprintf("%s", math.round(math.clamp(gear_agl_cur, 0, 2500)))); - - if (fmgc.FMGCInternal.phase < 3 or fmgc.flightPlanController.arrivalDist >= 250) { - me["FMA_dh_box"].hide(); - me["FMA_dh"].hide(); - me["FMA_dhn"].hide(); - me["FMA_nodh"].hide(); - #me["dhReached"].hide(); - if (gear_agl_cur <= 2500) { - me["AI_agl"].show(); - if (gear_agl_cur <= decision.getValue()) { - me["AI_agl"].setColor(0.7333,0.3803,0); - } else { - me["AI_agl"].setColor(0.0509,0.7529,0.2941); - } - } else { - me["AI_agl"].hide(); - } - } else { - if (gear_agl_cur <= 2500) { - me["AI_agl"].show(); - me["FMA_dh_box"].hide(); #not implemented - if (int(getprop("/FMGC/internal/radio")) != 99999) { - me["FMA_dh"].setText("RADIO"); - me["FMA_dh"].show(); - me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio"))); - me["FMA_dhn"].show(); - me["FMA_nodh"].hide(); - hundredAbove.setValue(getprop("/FMGC/internal/radio") + 100); - minimum.setValue(getprop("/FMGC/internal/radio")); - if (gear_agl_cur <= getprop("/FMGC/internal/radio") + 100) { - me["AI_agl"].setColor(0.7333,0.3803,0); - } else { - me["AI_agl"].setColor(0.0509,0.7529,0.2941); - } - } else if (int(getprop("/FMGC/internal/baro")) != 99999) { - me["FMA_dh"].setText("BARO"); - me["FMA_dh"].show(); - me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro"))); - me["FMA_dhn"].show(); - me["FMA_nodh"].hide(); - hundredAbove.setValue(getprop("/FMGC/internal/baro") + 100); - minimum.setValue(getprop("/FMGC/internal/baro")); - if (gear_agl_cur <= getprop("/FMGC/internal/baro") + 100) { - me["AI_agl"].setColor(0.7333,0.3803,0); - } else { - me["AI_agl"].setColor(0.0509,0.7529,0.2941); - } - } else if (fmgc.FMGCInternal.radioNo) { - me["FMA_dh"].setText("BARO"); - me["FMA_dh"].show(); - me["FMA_dhn"].setText("100"); - me["FMA_dhn"].show(); - me["FMA_nodh"].hide(); - hundredAbove.setValue(100); - minimum.setValue(0); - if (gear_agl_cur <= 100) { - me["AI_agl"].setColor(0.7333,0.3803,0); - } else { - me["AI_agl"].setColor(0.0509,0.7529,0.2941); - } - } else { - me["FMA_dh"].hide(); - me["FMA_dhn"].hide(); - me["FMA_nodh"].show(); - hundredAbove.setValue(400); - minimum.setValue(300); - if (gear_agl_cur <= 400) { - me["AI_agl"].setColor(0.7333,0.3803,0); - } else { - me["AI_agl"].setColor(0.0509,0.7529,0.2941); - } - } - } else { - me["AI_agl"].hide(); - me["FMA_nodh"].hide(); - me["FMA_dh_box"].hide(); #not implemented - if (int(getprop("/FMGC/internal/radio")) != 99999) { - me["FMA_dh"].setText("RADIO"); - me["FMA_dh"].show(); - me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/radio"))); - me["FMA_dhn"].show(); - me["FMA_nodh"].hide(); - } else if (int(getprop("/FMGC/internal/baro")) != 99999) { - me["FMA_dh"].setText("BARO"); - me["FMA_dh"].show(); - me["FMA_dhn"].setText(sprintf("%.0f", getprop("/FMGC/internal/baro"))); - me["FMA_dhn"].show(); - me["FMA_nodh"].hide(); - } else if (fmgc.FMGCInternal.radioNo) { - me["FMA_dh"].setText("BARO"); - me["FMA_dh"].show(); - me["FMA_dhn"].setText("100"); - me["FMA_dhn"].show(); - me["FMA_nodh"].hide(); - } else { - me["FMA_dh"].hide(); - me["FMA_dhn"].hide(); - me["FMA_nodh"].show(); - } - } - } - - me["AI_agl_g"].setRotation(-roll_cur * D2R); - - FMGCphase_act = fmgc.FMGCInternal.phase; - if ((wow1.getValue() == 1 or wow2.getValue() == 1) and FMGCphase_act != 0 and FMGCphase_act != 1) { - me["AI_stick"].show(); - me["AI_stick_pos"].show(); - - } else if ((wow1.getValue() == 1 or wow2.getValue() == 1) and (FMGCphase_act == 0 or FMGCphase_act == 1) and (eng0_state.getValue() == 3 or eng1_state.getValue() == 3)) { - me["AI_stick"].show(); - me["AI_stick_pos"].show(); - } else { - me["AI_stick"].hide(); - me["AI_stick_pos"].hide(); - } - - me["AI_stick_pos"].setTranslation(aileron_input.getValue() * 196.8, elevator_input.getValue() * 151.5); - - # Vertical Speed - me["VS_pointer"].setRotation(vs_needle.getValue() * D2R); - - me["VS_box"].setTranslation(0, vs_digit.getValue()); - - var vs_pfd_cur = ap_vs_pfd.getValue(); - if (vs_pfd_cur < 2) { - me["VS_box"].hide(); - } else { - me["VS_box"].show(); - } - - if (vs_pfd_cur < 10) { - me["VS_digit"].setText(sprintf("%02d", "0" ~ vs_pfd_cur)); - } else { - me["VS_digit"].setText(sprintf("%02d", vs_pfd_cur)); - } - - var vs_itaf = fmgc.Internal.vs.getValue(); - var gearAgl = gear_agl.getValue(); - - if (abs(vs_itaf) >= 6000 or (vs_itaf <= -2000 and gearAgl <= 2500) or (vs_itaf <= -1200 and gearAgl <= 1000)) { - me["VS_digit"].setColor(0.7333,0.3803,0); - me["VS_pointer"].setColor(0.7333,0.3803,0); - me["VS_pointer"].setColorFill(0.7333,0.3803,0); - } else { - me["VS_digit"].setColor(0.0509,0.7529,0.2941); - me["VS_pointer"].setColor(0.0509,0.7529,0.2941); - me["VS_pointer"].setColorFill(0.0509,0.7529,0.2941); - } - - # ILS - me["LOC_pointer"].setTranslation(loc.getValue() * 197, 0); - me["GS_pointer"].setTranslation(0, gs.getValue() * -197); - - # Heading - me.heading = hdg_scale.getValue(); - me.headOffset = me.heading / 10 - int(me.heading / 10); - me.middleText = roundabout(me.heading / 10); - me.middleOffset = nil; - if(me.middleText == 36) { - me.middleText = 0; - } - me.leftText1 = me.middleText == 0?35:me.middleText - 1; - me.rightText1 = me.middleText == 35?0:me.middleText + 1; - me.leftText2 = me.leftText1 == 0?35:me.leftText1 - 1; - me.rightText2 = me.rightText1 == 35?0:me.rightText1 + 1; - me.leftText3 = me.leftText2 == 0?35:me.leftText2 - 1; - me.rightText3 = me.rightText2 == 35?0:me.rightText2 + 1; - if (me.headOffset > 0.5) { - me.middleOffset = -(me.headOffset - 1) * 98.5416; - } else { - me.middleOffset = -me.headOffset * 98.5416; - } - me["HDG_scale"].setTranslation(me.middleOffset, 0); - me["HDG_scale"].update(); - me["HDG_four"].setText(sprintf("%d", me.middleText)); - me["HDG_five"].setText(sprintf("%d", me.rightText1)); - me["HDG_three"].setText(sprintf("%d", me.leftText1)); - me["HDG_six"].setText(sprintf("%d", me.rightText2)); - me["HDG_two"].setText(sprintf("%d", me.leftText2)); - me["HDG_seven"].setText(sprintf("%d", me.rightText3)); - me["HDG_one"].setText(sprintf("%d", me.leftText3)); - - me["HDG_four"].setFontSize(fontSizeHDG(me.middleText), 1); - me["HDG_five"].setFontSize(fontSizeHDG(me.rightText1), 1); - me["HDG_three"].setFontSize(fontSizeHDG(me.leftText1), 1); - me["HDG_six"].setFontSize(fontSizeHDG(me.rightText2), 1); - me["HDG_two"].setFontSize(fontSizeHDG(me.leftText2), 1); - me["HDG_seven"].setFontSize(fontSizeHDG(me.rightText3), 1); - me["HDG_one"].setFontSize(fontSizeHDG(me.leftText3), 1); - - show_hdg_act = show_hdg.getValue(); - hdg_diff_act = hdg_diff.getValue(); - if (show_hdg_act == 1 and hdg_diff_act >= -23.62 and hdg_diff_act <= 23.62) { - me["HDG_target"].setTranslation((hdg_diff_act / 10) * 98.5416, 0); - me["HDG_digit_L"].hide(); - me["HDG_digit_R"].hide(); - me["HDG_target"].show(); - } else if (show_hdg_act == 1 and hdg_diff_act < -23.62 and hdg_diff_act >= -180) { - me["HDG_digit_L"].setText(sprintf("%3.0f", ap_hdg.getValue())); - me["HDG_digit_L"].show(); - me["HDG_digit_R"].hide(); - me["HDG_target"].hide(); - } else if (show_hdg_act == 1 and hdg_diff_act > 23.62 and hdg_diff_act <= 180) { - me["HDG_digit_R"].setText(sprintf("%3.0f", ap_hdg.getValue())); - me["HDG_digit_R"].show(); - me["HDG_digit_L"].hide(); - me["HDG_target"].hide(); - } else { - me["HDG_digit_L"].hide(); - me["HDG_digit_R"].hide(); - me["HDG_target"].hide(); - } - - - var heading_deg = heading.getValue(); - track_diff = geo.normdeg180(track.getValue() - heading_deg); - me["TRK_pointer"].setTranslation(me.getTrackDiffPixels(track_diff),0); - split_ils = split("/", ils_data1.getValue()); - - if (ap_ils_mode.getValue() == 1 and size(split_ils) == 2) { - magnetic_hdg = ils_crs.getValue(); - magnetic_hdg_dif = geo.normdeg180(magnetic_hdg - heading_deg); - if (magnetic_hdg_dif >= -23.62 and magnetic_hdg_dif <= 23.62) { - me["CRS_pointer"].setTranslation((magnetic_hdg_dif / 10) * 98.5416, 0); - me["ILS_HDG_R"].hide(); - me["ILS_HDG_L"].hide(); - me["CRS_pointer"].show(); - } else if (magnetic_hdg_dif < -23.62 and magnetic_hdg_dif >= -180) { - if (int(magnetic_hdg) < 10) { - me["ILS_left"].setText(sprintf("00%1.0f", int(magnetic_hdg))); - } else if (int(magnetic_hdg) < 100) { - me["ILS_left"].setText(sprintf("0%2.0f", int(magnetic_hdg))); - } else { - me["ILS_left"].setText(sprintf("%3.0f", int(magnetic_hdg))); - } - me["ILS_HDG_L"].show(); - me["ILS_HDG_R"].hide(); - me["CRS_pointer"].hide(); - } else if (magnetic_hdg_dif > 23.62 and magnetic_hdg_dif <= 180) { - if (int(magnetic_hdg) < 10) { - me["ILS_right"].setText(sprintf("00%1.0f", int(magnetic_hdg))); - } else if (int(magnetic_hdg) < 100) { - me["ILS_right"].setText(sprintf("0%2.0f", int(magnetic_hdg))); - } else { - me["ILS_right"].setText(sprintf("%3.0f", int(magnetic_hdg))); - } - me["ILS_HDG_R"].show(); - me["ILS_HDG_L"].hide(); - me["CRS_pointer"].hide(); - } else { - me["ILS_HDG_R"].hide(); - me["ILS_HDG_L"].hide(); - me["CRS_pointer"].hide(); - } - } else { - me["ILS_HDG_R"].hide(); - me["ILS_HDG_L"].hide(); - me["CRS_pointer"].hide(); - } - - # AI HDG - me.AI_horizon_hdg_trans.setTranslation(me.middleOffset, horizon_pitch.getValue() * 11.825); - me.AI_horizon_hdg_rot.setRotation(-roll_cur * D2R, me["AI_center"].getCenter()); - me["AI_heading"].update(); - }, # Get Angle of Attack from ADR1 or, depending on Switching panel, ADR3 getAOAForPFD1: func() { @@ -1235,9 +1208,6 @@ var canvas_PFD_1 = { me["ilsError"].hide(); } - 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 @@ -1719,7 +1689,7 @@ var canvas_PFD_1 = { me["ALT_tens"].setTranslation(0, altTens * 1.392); ap_alt_cur = ap_alt.getValue(); - alt_diff_cur = alt_diff.getValue(); + alt_diff_cur = dmc.DMController.DMCs[0].outputs[7].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))); @@ -1830,7 +1800,7 @@ var canvas_PFD_1 = { me["ALT_box"].hide(); } - me.updateCommonFast(); + me.updateCommon(); }, }; @@ -2010,9 +1980,6 @@ var canvas_PFD_2 = { me["ilsError"].hide(); } - 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 @@ -2493,7 +2460,7 @@ var canvas_PFD_2 = { me["ALT_tens"].setTranslation(0, altTens * 1.392); ap_alt_cur = ap_alt.getValue(); - alt_diff_cur = alt_diff.getValue(); + alt_diff_cur = dmc.DMController.DMCs[1].outputs[7].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))); @@ -2604,7 +2571,7 @@ var canvas_PFD_2 = { me["ALT_box"].hide(); } - me.updateCommonFast(); + me.updateCommon(); }, }; @@ -2782,7 +2749,6 @@ setlistener("sim/signals/fdm-initialized", func { PFD_2_mismatch = canvas_PFD_2_mismatch.new(group_pfd2_mismatch, "Aircraft/A320-family/Models/Instruments/Common/res/mismatch.svg"); PFD_update.start(); - PFD_update_fast.start(); if (pfdrate.getValue() == 1) { rateApply(); @@ -2790,15 +2756,10 @@ setlistener("sim/signals/fdm-initialized", func { }); var rateApply = func { - PFD_update.restart(0.15 * pfdrate.getValue()); - PFD_update_fast.restart(0.05 * pfdrate.getValue()); + PFD_update.restart(0.05 * pfdrate.getValue()); } -var PFD_update = maketimer(0.15, func { - canvas_PFD_base.updateSlow(); -}); - -var PFD_update_fast = maketimer(0.05, func { +var PFD_update = maketimer(0.05, func { canvas_PFD_base.update(); }); diff --git a/Models/Liveries/A320/CFM-100/example.xml b/Models/Liveries/A320/CFM-100/example.xml deleted file mode 100644 index 6e12cadc..00000000 --- a/Models/Liveries/A320/CFM-100/example.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - ICAO Airline Name (Extra Info) - Liveries/A320/CFM/texture.png - Liveries/A320/CFM/texture.png - - - - - - CFM56-5B4 - A320-214 - 1 - - +0.0 - +1.0 - - - AB-CDE - ABC - DE - 0 - 0 - 0 - - - diff --git a/Nasal/Displays/DMC.nas b/Nasal/Displays/DMC.nas index 6b555bf9..efe94e5b 100644 --- a/Nasal/Displays/DMC.nas +++ b/Nasal/Displays/DMC.nas @@ -13,11 +13,12 @@ var DMC = { d.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)]; d.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)]; d.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)]; - d.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)]; + d.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)]; d.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)]; d.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)]; - d.trends = [props.globals.getNode("instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("instrumentation/pfd/speed-lookahead-3", 1)]; - d.outputs = [nil, nil, nil, nil, nil, nil, nil]; # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend + d.trends = [props.globals.getNode("/instrumentation/pfd/speed-lookahead-1", 1), props.globals.getNode("/instrumentation/pfd/speed-lookahead-2", 1), props.globals.getNode("/instrumentation/pfd/speed-lookahead-3", 1)]; + d.altitudeDiffs = [props.globals.getNode("//instrumentation/pfd/alt-diff[0]", 1), props.globals.getNode("//instrumentation/pfd/alt-diff[1]", 1), props.globals.getNode("//instrumentation/pfd/alt-diff[2]", 1)]; + d.outputs = [nil, nil, nil, nil, nil, nil, nil, nil]; # airspeed, altitude, mach, pfd altitude, sat, tat, speed trend, altitudeDiffs return d; }, changeActiveADIRS: func(newADIRS) { @@ -32,6 +33,7 @@ var DMC = { me.outputs[4] = me.sats[ADIRS]; me.outputs[5] = me.tats[ADIRS]; me.outputs[6] = me.trends[ADIRS]; + me.outputs[7] = me.altitudeDiffs[ADIRS]; }, setOutputsNil: func() { me.outputs[0] = nil; @@ -41,6 +43,7 @@ var DMC = { me.outputs[4] = nil; me.outputs[5] = nil; me.outputs[6] = nil; + me.outputs[7] = nil; }, update: func() { if (systems.ADIRS.ADIRunits[me.activeADIRS].operative and systems.ADIRS.ADIRunits[me.activeADIRS].outputOn) { @@ -71,8 +74,8 @@ var DMController = { # 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.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.DMCs[1].altitudeDiffs = [props.globals.getNode("//instrumentation/pfd/alt-diff[3]", 1), props.globals.getNode("//instrumentation/pfd/alt-diff[4]", 1), props.globals.getNode("//instrumentation/pfd/alt-diff[5]", 1)]; me._init = 1; } }, diff --git a/Nasal/Displays/projection.nas b/Nasal/Displays/projection.nas new file mode 100644 index 00000000..722e2771 --- /dev/null +++ b/Nasal/Displays/projection.nas @@ -0,0 +1,41 @@ +# Projection-related helper functions for the MFD maps + +var Camera = { + new: func(options) { + var m = { + parents: [Camera], + + camGeo: options['camGeo'] or geo.aircraft_position(), + camHdg: options['camHdg'] or 0, + range: options['range'] or 10.0, + screenRange: options['screenRange'] or 256.0, + screenCX: options['screenCX'] or options['screenRange'] or 256.0, + screenCY: options['screenCY'] or options['screenRange'] or 256.0, + }; + return m; + }, + + setRange: func(range) { + me.range = range; + }, + + repositon: func(geo, hdg) { + me.camGeo = geo; + me.camHdg = hdg; + }, + + project: func(targetGeo) { + var dist = me.camGeo.distance_to(targetGeo) * M2NM; + var bearing = me.camGeo.course_to(targetGeo) - me.camHdg; + return me.projectDistBearing(dist, bearing); + }, + + projectDistBearing: func(dist, bearing) { + var bearingRad = bearing * D2R; + var tx = math.sin(bearingRad) * dist; + var ty = -math.cos(bearingRad) * dist; + var x = tx * me.screenRange / me.range + me.screenCX; + var y = ty * me.screenRange / me.range + me.screenCY; + return [x, y]; + }, +}; diff --git a/Nasal/Displays/traffic.nas b/Nasal/Displays/traffic.nas new file mode 100644 index 00000000..ae1bdeba --- /dev/null +++ b/Nasal/Displays/traffic.nas @@ -0,0 +1,359 @@ +# Traffic layer + +var ATCSwitchAbvBlw = props.globals.getNode("/controls/atc/abv-blw"); +var ATCSwitchThrtAll = props.globals.getNode("/controls/atc/thrt-all"); + +var colorByLevel = { + # 0: other + 0: [0.8,0.8,0.8], + # 1: proximity + 1: [0.8,0.8,0.8], + # 2: traffic advisory (TA) + 2: [1,0.75,0], + # 3: resolution advisory (RA) + 3: [1,0,0], +}; + +var doFill = { + 0: 0, + 1: 1, + 2: 1, + 3: 1, +}; + +var colorDefault = [0.8,0.8,0.8]; + +var drawBlip = func(elem, threatLvl) { + if (threatLvl == 3) { + # resolution advisory + elem.reset() + .setStrokeLineWidth(0) + .moveTo(-17,-17) + .horiz(34) + .vert(34) + .horiz(-34) + .close(); + } + elsif (threatLvl == 2) { + # traffic advisory + elem.reset() + .moveTo(-17,0) + .setStrokeLineWidth(0) + .arcSmallCW(17,17,0,34,0) + .arcSmallCW(17,17,0,-34,0); + } + elsif (threatLvl == 1) { + # proximate traffic + elem.reset() + .setStrokeLineWidth(0) + .moveTo(-14,0) + .lineTo(0,-17) + .lineTo(14,0) + .lineTo(0,17) + .close(); + } + else { + # other traffic + elem.reset() + .setStrokeLineWidth(4) + .moveTo(-10,0) + .lineTo(0,-14) + .lineTo(10,0) + .lineTo(0,14) + .close(); + } +}; + + +var TrafficLayer = { + new: func(camera, group) { + var m = { + parents: [TrafficLayer], + camera: camera, + refAlt: 0, + group: group, + items: {}, + sorted: {}, # TODO - only the most 8 relevant advisories + values: {}, + updateKeys: [], + addListener: nil, + delListener: nil, + }; + return m; + }, + + makeElems: func () { + if (me.group == nil) return nil; + var elems = {}; + elems['master'] = me.group.createChild('group'); + elems['blip'] = elems.master.createChild('path') + .setStrokeLineWidth(0); + elems['text'] = elems.master.createChild('text') + .setDrawMode(canvas.Text.TEXT) + .setText(sprintf("0")) + .setFont("LiberationFonts/LiberationSans-Regular.ttf") + .setColor(1,1,1) + .setFontSize(32) + .setAlignment("center-center"); + elems['master'].hide(); + elems['arrowUp'] = elems.master.createChild("text") + .setDrawMode(canvas.Text.TEXT) + .setText(sprintf("↑")) + .setFont("LiberationFonts/LiberationSans-Regular.ttf") + .setColor(1,1,1) + .setFontSize(50) + .setTranslation(16, 2) + .setAlignment("left-center"); + elems['arrowDown'] = elems.master.createChild("text") + .setDrawMode(canvas.Text.TEXT) + .setText(sprintf("↓")) + .setFont("LiberationFonts/LiberationSans-Regular.ttf") + .setColor(1,1,1) + .setFontSize(50) + .setTranslation(16, 2) + .setAlignment("left-center"); + return elems; + }, + + start: func() { + me.stop(); + var self = me; + me.addListener = setlistener('/ai/models/model-added', func(changed, listen, mode, is_child) { + var path = changed.getValue(); + if (path == nil) return; + #printf("ADD: %s", path); + me.values[path] = nil; + var masterProp = props.globals.getNode(path); + var prop = { + 'master': masterProp, + }; + if (me.items[path] == nil) { + me.items[path] = { + prop: prop, + elems: me.makeElems(), + data: {'threatLevel': -2}, + }; + } + else { + me.items[path].prop = prop; + me.items[path].data = {'threatLevel': -2}; + } + }, 1, 1); + me.delListener = setlistener('/ai/models/model-removed', func(changed, listen, mode, is_child) { + var path = changed.getValue(); + if (path == nil) return; + #printf("DEL: %s", path); + me.values[path] = nil; + if (me.items[path] == nil) return; + if (me.items[path] != nil) { + me.items[path].prop = nil; + me.items[path].elems.master.hide(); + me.items[path].data = {}; + } + }, 1, 1); + }, + + stop: func() { + if (me.addListener != nil) { + removelistener(me.addListener); + me.addListener = nil; + } + if (me.delListener != nil) { + removelistener(me.delListener); + me.delListener = nil; + } + me.items = {}; + if (me.group != nil) { + me.group.removeAllChildren(); + } + }, + + nxtupdatetime: 0, + + update: func() { + var _tm = systime(); + if (me.nxtupdatetime != 0) { + if (_tm top or altDiff100 < bottom) { # check TCAS vertical range + me.values[path] = {visible: 0}; + return; + } + + var _val = {visible:1, lat:_lat, lon:_lon, dirty:item.data['threatLevelDirty']}; + + var spd = vspeed * 60; + _val.arrowup = (spd > 500); + _val.arrowdown = (spd < -500); + + if (math.abs(altDiff100) > 0.5) { + _val.text = sprintf("%+03.0f ", altDiff100); + } else { + _val.text = ""; + } + + _val.textpy = (altDiff100 < 0) ? 34 : -30; + + me.values[path] = _val; + + } + + }, + + redrawItem: func (item,val) { + #debug.dump("REDRAW ", item.data); + + if (val != nil and val.visible == 1) { + + var lat = val.lat; + var lon = val.lon; + + var coords = geo.Coord.new(); + coords.set_latlon(lat, lon); + var (x, y) = me.camera.project(coords); + item.elems.master.setTranslation(x, y); + #printf("%f %f", x, y); + if (val.dirty) { + #printf('%s THREAT LVL: %i', item.data['callsign'] or '???', item.data['threatLevel']); + var threatLevel = item.data['threatLevel']; + #debug.dump(item.data, threatLevel); + drawBlip(item.elems.blip, threatLevel); + var rgb = colorByLevel[threatLevel]; + if (rgb == nil) rgb = colorDefault; + var color = canvas._getColor(rgb); + var (r, g, b) = rgb; + if (threatLevel > 0) { + item.elems.blip.setColorFill(r, g, b); + } else { + item.elems.blip.setColorFill(0,0,0); + item.elems.blip.setColor(r, g, b); + } + item.elems.text.setColor(r, g, b); + item.elems.arrowUp.setColor(r, g, b); + item.elems.arrowDown.setColor(r, g, b); + item.elems.master.set('z-index', threatLevel + 2); + item.data['threatLevelDirty'] = 0; + val.dirty = 0; + } + + item.elems.arrowUp.setVisible(val.arrowup); + item.elems.arrowDown.setVisible(val.arrowdown); + + item.elems.text.setText(val.text); + item.elems.text.setTranslation(0, val.textpy); + item.elems.master.show(); + + } else { + + item.elems.master.hide(); + + } + }, + +}; diff --git a/Nasal/ECAM/ECAM-controller.nas b/Nasal/ECAM/ECAM-controller.nas index 6461b5e7..aedd52cf 100644 --- a/Nasal/ECAM/ECAM-controller.nas +++ b/Nasal/ECAM/ECAM-controller.nas @@ -12,7 +12,6 @@ var leftOverflow = props.globals.initNode("/ECAM/warnings/overflow-left", 0, "B var rightOverflow = props.globals.initNode("/ECAM/warnings/overflow-right", 0, "BOOL"); 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"), props.globals.initNode("/sim/sound/warnings/cricket", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/retard", 0, "BOOL"), props.globals.initNode("/sim/sound/warnings/cchord", 0, "BOOL")]; @@ -76,6 +75,33 @@ var warningNodes = { greenYellowFuel: props.globals.initNode("/ECAM/warnings/hyd/green-yellow-fuel-consumpt"), leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault"), rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault"), + flapNotZero: props.globals.initNode("/ECAM/warnings/fctl/flaps-not-zero"), + slatsConfig: props.globals.initNode("/ECAM/warnings/fctl/slats-config-output"), + flapsConfig: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-output"), + spdBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-output"), + pitchTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-output"), + rudTrimConfig: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-output"), + parkBrkConfig: props.globals.initNode("/ECAM/warnings/fctl/park-brk-config-output"), + slatsConfig2: props.globals.initNode("/ECAM/warnings/fctl/slats-config-range"), + flapsConfig2: props.globals.initNode("/ECAM/warnings/fctl/flaps-config-range"), + spdBrkConfig2: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-config-range"), + pitchTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/pitch-trim-config-range"), + rudTrimConfig2: props.globals.initNode("/ECAM/warnings/fctl/rudder-trim-config-range"), + dcEssFuelConsumptionIncreased: props.globals.initNode("/ECAM/warnings/logic/dc-ess-fuel-consumption-increased"), + dcEssFMSPredictions: props.globals.initNode("/ECAM/warnings/logic/dc-ess-fms-predictions-unreliable"), + dc2FuelConsumptionIncreased: props.globals.initNode("/ECAM/warnings/logic/dc-2-fuel-consumption-increased"), + dc2FMSPredictions: props.globals.initNode("/ECAM/warnings/logic/dc-2-fms-predictions-unreliable"), + thrLeversNotSet: props.globals.initNode("/ECAM/warnings/logic/eng/thr-lever-not-set"), + revSet: props.globals.initNode("/ECAM/warnings/logic/eng/reverse-set"), + eng1Fail: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-fail"), + eng2Fail: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-fail"), + phase5Trans: props.globals.initNode("/ECAM/warnings/logic/eng/phase-5-output"), + eng1Shutdown: props.globals.initNode("/ECAM/warnings/logic/eng/eng-1-shutdown"), + eng2Shutdown: props.globals.initNode("/ECAM/warnings/logic/eng/eng-2-shutdown"), + acEssBusAltn: props.globals.initNode("/ECAM/warnings/logic/ac-ess-bus-altn-feed"), + gen1Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-1-off"), + gen2Off: props.globals.initNode("/ECAM/warnings/logic/elec/gen-2-off"), + spdBrkOut: props.globals.initNode("/ECAM/warnings/fctl/spd-brk-still-out"), }, Timers: { apuFaultOutput: props.globals.initNode("/ECAM/warnings/timer/apu-fault-output"), @@ -110,6 +136,20 @@ var warningNodes = { navTerrFault: props.globals.initNode("/ECAM/warnings/timer/nav-gpws-terr-fault"), leftElevFail: props.globals.initNode("/ECAM/warnings/fctl/leftElevFault-output"), rightElevFail: props.globals.initNode("/ECAM/warnings/fctl/rightElevFault-output"), + staticInverter: props.globals.initNode("/systems/electrical/some-electric-thingie/static-inverter-timer"), + dcEmerConfig: props.globals.initNode("/ECAM/warnings/logic/dc-emer-config-output"), + dc12Fault: props.globals.initNode("/ECAM/warnings/logic/dc-1-2-output"), + dcEssFault: props.globals.initNode("/ECAM/warnings/logic/dc-ess-output"), + dc1Fault: props.globals.initNode("/ECAM/warnings/logic/dc-1-output"), + dc2Fault: props.globals.initNode("/ECAM/warnings/logic/dc-2-output"), + dcBatFault: props.globals.initNode("/ECAM/warnings/logic/dc-bat-output"), + ac1Fault: props.globals.initNode("/ECAM/warnings/logic/ac-1-output"), + ac2Fault: props.globals.initNode("/ECAM/warnings/logic/ac-2-output"), + acEssFault: props.globals.initNode("/ECAM/warnings/logic/ac-ess-output"), + dcEssShed: props.globals.initNode("/ECAM/warnings/logic/dc-ess-shed-output"), + acEssShed: props.globals.initNode("/ECAM/warnings/logic/ac-ess-shed-output"), + centerPumpsOff: props.globals.initNode("/ECAM/warnings/fuel/center-pumps-off-output"), + lowLevelBoth: props.globals.initNode("/ECAM/warnings/fuel/lo-level-l-r-output"), }, Flipflops: { apuGenFault: props.globals.initNode("/ECAM/warnings/flipflop/apu-gen-fault"), @@ -389,6 +429,7 @@ var ECAM_controller = { m.active = 0; } } + me._ready = 1; }, clear: func() { hasCleared = 0; @@ -479,7 +520,7 @@ var ECAM_controller = { }; setlistener("/systems/electrical/bus/dc-ess", func { - if (dc_ess.getValue() < 25) { + if (systems.ELEC.Bus.dcEss.getValue() < 25) { ECAM_controller.reset(); } }, 0, 0); diff --git a/Nasal/ECAM/ECAM-logic.nas b/Nasal/ECAM/ECAM-logic.nas index db8d123b..c2b687ad 100644 --- a/Nasal/ECAM/ECAM-logic.nas +++ b/Nasal/ECAM/ECAM-logic.nas @@ -10,6 +10,7 @@ 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 acconfig_weight_kgs = props.globals.getNode("/systems/acconfig/options/weight-kgs", 1); var state1Node = props.globals.getNode("/engines/engine[0]/state", 1); var state2Node = props.globals.getNode("/engines/engine[1]/state", 1); var wing_pb = props.globals.getNode("/controls/ice-protection/wing", 1); @@ -40,6 +41,10 @@ var bigThree = nil; var altAlertSteady = 0; var altAlertFlash = 0; +var _SATval = nil; + + +var ecamConfigTest = props.globals.initNode("/ECAM/to-config-test", 0, "BOOL"); var messages_priority_3 = func { phaseVar3 = phaseNode.getValue(); @@ -55,13 +60,13 @@ var messages_priority_3 = func { } # FCTL FLAPS NOT ZERO - if (flap_not_zero.clearFlag == 0 and phaseVar3 == 6 and pts.Controls.Flight.flapsInput.getValue() != 0 and pts.Instrumentation.Altimeter.indicatedFt.getValue() > 22000) { + if (flap_not_zero.clearFlag == 0 and warningNodes.Logic.flapNotZero.getBoolValue()) { flap_not_zero.active = 1; } else { ECAM_controller.warningReset(flap_not_zero); } - if ((phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 7)) and getprop("/systems/navigation/adr/output/overspeed")) { + if (overspeed.clearFlag == 0 and (phaseVar3 == 1 or (phaseVar3 >= 5 and phaseVar3 <= 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; @@ -95,7 +100,7 @@ var messages_priority_3 = func { if (allEngFail.clearFlag == 0 and dualFailNode.getBoolValue()) { allEngFail.active = 1; - if (allEngFailElec.clearFlag == 0 and getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0) { + if (allEngFailElec.clearFlag == 0 and systems.ELEC.Source.EmerGen.relayPos.getValue() == 0) { allEngFailElec.active = 1; } else { ECAM_controller.warningReset(allEngFailElec); @@ -136,7 +141,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(allEngFailAPU); } - if (allEngFailLevers.clearFlag == 0 and (pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01 or pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01)) { + if (allEngFailLevers.clearFlag == 0 and (pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01 or pts.Controls.Engines.Engine.throttleLever[1].getValue() > 0.01)) { allEngFailLevers.active = 1; } else { ECAM_controller.warningReset(allEngFailLevers); @@ -181,7 +186,7 @@ var messages_priority_3 = func { } # ENG ABV IDLE - if (eng1ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 1 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng1ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT + if (eng1ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 2 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng1ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT eng1ThrLvrAbvIdle.active = 1; if (eng1ThrLvrAbvIdle2.clearFlag == 0) { eng1ThrLvrAbvIdle2.active = 1; @@ -193,7 +198,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng1ThrLvrAbvIdle2); } - if (eng2ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 1 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng2ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT + if (eng2ThrLvrAbvIdle.clearFlag == 0 and ((phaseVar3 >= 2 and phaseVar3 <= 4) or (phaseVar3 >= 6 and phaseVar3 <= 9)) and warningNodes.Flipflops.eng2ThrLvrAbvIdle.getValue()) { # AND NOT RUNWAY TOO SHORT eng2ThrLvrAbvIdle.active = 1; if (eng2ThrLvrAbvIdle2.clearFlag == 0) { eng2ThrLvrAbvIdle2.active = 1; @@ -206,19 +211,19 @@ var messages_priority_3 = func { } # ENG FIRE - if ((eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnEvac.clearFlag == 0 and getprop("/systems/fire/engine1/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) { + if ((eng1FireFlAgent2.clearFlag == 0 and systems.eng1FireWarn.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng1FireGnEvac.clearFlag == 0 and systems.eng1FireWarn.getValue() == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) { eng1Fire.active = 1; } else { ECAM_controller.warningReset(eng1Fire); } - if ((eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng2FireGnEvac.clearFlag == 0 and getprop("/systems/fire/engine2/warning-active") == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) { + if ((eng2FireFlAgent2.clearFlag == 0 and systems.eng2FireWarn.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) or (eng2FireGnEvac.clearFlag == 0 and systems.eng2FireWarn.getValue() == 1 and (phaseVar3 < 5 or phaseVar3 > 7))) { eng2Fire.active = 1; } else { ECAM_controller.warningReset(eng2Fire); } - if (apuFireMaster.clearFlag == 0 and getprop("/systems/fire/apu/warning-active")) { + if (apuFireMaster.clearFlag == 0 and systems.apuFireWarn.getValue() == 1) { apuFire.active = 1; } else { ECAM_controller.warningReset(apuFire); @@ -238,23 +243,23 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng1FireFlmaster); } - if (eng1FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) { + if (eng1FireFlPB.clearFlag == 0 and systems.fireButtons[0].getValue() == 0) { eng1FireFlPB.active = 1; } else { ECAM_controller.warningReset(eng1FireFlPB); } - if (getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) { - eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine1/agent1-timer") ~ " S...DISCH"; + if (systems.eng1AgentTimer.getValue() != 0 and systems.eng1AgentTimer.getValue() != 99) { + eng1FireFlAgent1Timer.msg = " -AGENT AFT " ~ systems.eng1AgentTimer.getValue() ~ " S...DISCH"; } - if (eng1FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 1 and !getprop("/systems/fire/engine1/disch1") and getprop("/systems/fire/engine1/agent1-timer") != 0 and getprop("/systems/fire/engine1/agent1-timer") != 99) { + if (eng1FireFlAgent1.clearFlag == 0 and systems.fireButtons[0].getValue() == 1 and !systems.extinguisherBottles.vector[0].lightProp.getValue() and systems.eng1AgentTimer.getValue() != 0 and systems.eng1AgentTimer.getValue() != 99) { eng1FireFlAgent1Timer.active = 1; } else { ECAM_controller.warningReset(eng1FireFlAgent1Timer); } - if (eng1FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1") and (getprop("/systems/fire/engine1/agent1-timer") == 0 or getprop("/systems/fire/engine1/agent1-timer") == 99)) { + if (eng1FireFlAgent1.clearFlag == 0 and !systems.extinguisherBottles.vector[0].lightProp.getValue() and (systems.eng1AgentTimer.getValue() == 0 or systems.eng1AgentTimer.getValue() == 99)) { eng1FireFlAgent1.active = 1; } else { ECAM_controller.warningReset(eng1FireFlAgent1); @@ -266,17 +271,17 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng1FireFlATC); } - if (getprop("/systems/fire/engine1/agent2-timer") != 0 and getprop("/systems/fire/engine1/agent2-timer") != 99) { - eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine1/agent2-timer") ~ " S:"; + if (systems.eng1Agent2Timer.getValue() != 0 and systems.eng1Agent2Timer.getValue() != 99) { + eng1FireFl30Sec.msg = "•IF FIRE AFTER " ~ systems.eng1Agent2Timer.getValue() ~ " S:"; } - if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2") and getprop("/systems/fire/engine1/agent2-timer") > 0) { + if (eng1FireFlAgent2.clearFlag == 0 and systems.extinguisherBottles.vector[0].lightProp.getValue() and !systems.extinguisherBottles.vector[1].lightProp.getValue() and systems.eng1Agent2Timer.getValue() > 0) { eng1FireFl30Sec.active = 1; } else { ECAM_controller.warningReset(eng1FireFl30Sec); } - if (eng1FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine1/disch1") and !getprop("/systems/fire/engine1/disch2")) { + if (eng1FireFlAgent2.clearFlag == 0 and systems.extinguisherBottles.vector[0].lightProp.getValue() and !systems.extinguisherBottles.vector[1].lightProp.getValue()) { eng1FireFlAgent2.active = 1; } else { ECAM_controller.warningReset(eng1FireFlAgent2); @@ -324,19 +329,19 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng1FireGnmaster); } - if (eng1FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[0]/fire-btn") == 0) { + if (eng1FireGnPB.clearFlag == 0 and systems.fireButtons[0].getValue() == 0) { eng1FireGnPB.active = 1; } else { ECAM_controller.warningReset(eng1FireGnPB); } - if (eng1FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine1/disch1")) { + if (eng1FireGnAgent1.clearFlag == 0 and !systems.extinguisherBottles.vector[0].lightProp.getValue()) { eng1FireGnAgent1.active = 1; } else { ECAM_controller.warningReset(eng1FireGnAgent1); } - if (eng1FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine1/disch2")) { + if (eng1FireGnAgent2.clearFlag == 0 and !systems.extinguisherBottles.vector[1].lightProp.getValue()) { eng1FireGnAgent2.active = 1; } else { ECAM_controller.warningReset(eng1FireGnAgent2); @@ -393,23 +398,23 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng2FireFlmaster); } - if (eng2FireFlPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) { + if (eng2FireFlPB.clearFlag == 0 and systems.fireButtons[1].getValue() == 0) { eng2FireFlPB.active = 1; } else { ECAM_controller.warningReset(eng2FireFlPB); } - if (getprop("/systems/fire/engine2/agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) { - eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ getprop("/systems/fire/engine2/agent1-timer") ~ " S...DISCH"; + if (systems.eng2AgentTimer.getValue() != 0 and systems.eng2AgentTimer.getValue() != 99) { + eng2FireFlAgent1Timer.msg = " -AGENT AFT " ~ systems.eng2AgentTimer.getValue() ~ " S...DISCH"; } - if (eng2FireFlAgent1.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 1 and !getprop("/systems/fire/engine2/disch1") and getprop("/systems/fire/engine2agent1-timer") != 0 and getprop("/systems/fire/engine2/agent1-timer") != 99) { + if (eng2FireFlAgent1.clearFlag == 0 and systems.fireButtons[1].getValue() == 1 and !systems.extinguisherBottles.vector[2].lightProp.getValue() and getprop("/systems/fire/engine2agent1-timer") != 0 and systems.eng2AgentTimer.getValue() != 99) { eng2FireFlAgent1Timer.active = 1; } else { ECAM_controller.warningReset(eng2FireFlAgent1Timer); } - if (eng2FireFlAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1") and (getprop("/systems/fire/engine2/agent1-timer") == 0 or getprop("/systems/fire/engine2/agent1-timer") == 99)) { + if (eng2FireFlAgent1.clearFlag == 0 and !systems.extinguisherBottles.vector[2].lightProp.getValue() and (systems.eng2AgentTimer.getValue() == 0 or systems.eng2AgentTimer.getValue() == 99)) { eng2FireFlAgent1.active = 1; } else { ECAM_controller.warningReset(eng2FireFlAgent1); @@ -421,17 +426,17 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng2FireFlATC); } - if (getprop("/systems/fire/engine2/agent2-timer") != 0 and getprop("/systems/fire/engine2/agent2-timer") != 99) { - eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ getprop("/systems/fire/engine2/agent2-timer") ~ " S:"; + if (systems.eng2Agent2Timer.getValue() != 0 and systems.eng2Agent2Timer.getValue() != 99) { + eng2FireFl30Sec.msg = "•IF FIRE AFTER " ~ systems.eng2Agent2Timer.getValue() ~ " S:"; } - if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2") and getprop("/systems/fire/engine2/agent2-timer") > 0) { + if (eng2FireFlAgent2.clearFlag == 0 and systems.extinguisherBottles.vector[2].lightProp.getValue() and !systems.extinguisherBottles.vector[4].lightProp.getValue() and systems.eng2Agent2Timer.getValue() > 0) { eng2FireFl30Sec.active = 1; } else { ECAM_controller.warningReset(eng2FireFl30Sec); } - if (eng2FireFlAgent2.clearFlag == 0 and getprop("/systems/fire/engine2/disch1") and !getprop("/systems/fire/engine2/disch2")) { + if (eng2FireFlAgent2.clearFlag == 0 and systems.extinguisherBottles.vector[2].lightProp.getValue() and !systems.extinguisherBottles.vector[4].lightProp.getValue()) { eng2FireFlAgent2.active = 1; } else { ECAM_controller.warningReset(eng2FireFlAgent2); @@ -479,19 +484,19 @@ var messages_priority_3 = func { ECAM_controller.warningReset(eng2FireGnmaster); } - if (eng2FireGnPB.clearFlag == 0 and getprop("/controls/engines/engine[1]/fire-btn") == 0) { + if (eng2FireGnPB.clearFlag == 0 and systems.fireButtons[1].getValue() == 0) { eng2FireGnPB.active = 1; } else { ECAM_controller.warningReset(eng2FireGnPB); } - if (eng2FireGnAgent1.clearFlag == 0 and !getprop("/systems/fire/engine2/disch1")) { + if (eng2FireGnAgent1.clearFlag == 0 and !systems.extinguisherBottles.vector[2].lightProp.getValue()) { eng2FireGnAgent1.active = 1; } else { ECAM_controller.warningReset(eng2FireGnAgent1); } - if (eng2FireGnAgent2.clearFlag == 0 and !getprop("/systems/fire/engine2/disch2")) { + if (eng2FireGnAgent2.clearFlag == 0 and !systems.extinguisherBottles.vector[4].lightProp.getValue()) { eng2FireGnAgent2.active = 1; } else { ECAM_controller.warningReset(eng2FireGnAgent2); @@ -542,17 +547,17 @@ var messages_priority_3 = func { ECAM_controller.warningReset(apuFirePB); } - if (getprop("/systems/fire/apu/agent-timer") != 0 and getprop("/systems/fire/apu/agent-timer") != 99) { - apuFireAgentTimer.msg = " -AGENT AFT " ~ getprop("/systems/fire/apu/agent-timer") ~ " S...DISCH"; + if (systems.apuAgentTimer.getValue() != 0 and systems.apuAgentTimer.getValue() != 99) { + apuFireAgentTimer.msg = " -AGENT AFT " ~ systems.apuAgentTimer.getValue() ~ " S...DISCH"; } - if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") != 0) { + if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !systems.extinguisherBottles.vector[5].lightProp.getValue() and systems.apuAgentTimer.getValue() != 0) { apuFireAgentTimer.active = 1; } else { ECAM_controller.warningReset(apuFireAgentTimer); } - if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !getprop("/systems/fire/apu/disch") and getprop("/systems/fire/apu/agent-timer") == 0) { + if (apuFireAgent.clearFlag == 0 and systems.APUNodes.Controls.fire.getValue() and !systems.extinguisherBottles.vector[5].lightProp.getValue() and systems.apuAgentTimer.getValue() == 0) { apuFireAgent.active = 1; } else { ECAM_controller.warningReset(apuFireAgent); @@ -570,35 +575,29 @@ var messages_priority_3 = func { ECAM_controller.warningReset(apuFireMaster); } - if ((getprop("/ECAM/to-config-test") and (phaseVar3 == 1 or phaseVar3 == 2 or phaseVar3 == 9)) or phaseVar3 == 3 or phaseVar3 == 4) { + if ((ecamConfigTest.getValue() and (phaseVar3 == 1 or phaseVar3 == 2 or phaseVar3 == 9)) or phaseVar3 == 3 or phaseVar3 == 4) { takeoffConfig = 1; } else { takeoffConfig = 0; } - if ((pts.Controls.Flight.flapsInput.getValue() == 0 or pts.Controls.Flight.flapsInput.getValue() == 4) and takeoffConfig) { - if (slats_config.clearFlag == 0) { - slats_config.active = 1; - slats_config_1.active = 1; - } else { - ECAM_controller.warningReset(slats_config); - ECAM_controller.warningReset(slats_config_1); - } - if (flaps_config.clearFlag == 0) { - flaps_config.active = 1; - flaps_config_1.active = 1; - } else { - ECAM_controller.warningReset(flaps_config); - ECAM_controller.warningReset(flaps_config_1); - } + if (slats_config.clearFlag == 0 and (warningNodes.Logic.slatsConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.slatsConfig2.getBoolValue()))) { + slats_config.active = 1; + slats_config_1.active = 1; } else { ECAM_controller.warningReset(slats_config); ECAM_controller.warningReset(slats_config_1); + } + + if (flaps_config.clearFlag == 0 and (warningNodes.Logic.flapsConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.flapsConfig2.getBoolValue()))) { + flaps_config.active = 1; + flaps_config_1.active = 1; + } else { ECAM_controller.warningReset(flaps_config); ECAM_controller.warningReset(flaps_config_1); } - if ((spd_brk_config.clearFlag == 0) and pts.Controls.Flight.speedbrake.getValue() != 0 and takeoffConfig) { + if (spd_brk_config.clearFlag == 0 and (warningNodes.Logic.spdBrkConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.spdBrkConfig2.getBoolValue()))) { spd_brk_config.active = 1; spd_brk_config_1.active = 1; } else { @@ -606,7 +605,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(spd_brk_config_1); } - if ((pitch_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/stabilizer/final-deg") > 2.6 or getprop("/fdm/jsbsim/hydraulics/stabilizer/final-deg") < -2.6) and takeoffConfig) { + if (pitch_trim_config.clearFlag == 0 and (warningNodes.Logic.pitchTrimConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.pitchTrimConfig2.getBoolValue()))) { pitch_trim_config.active = 1; pitch_trim_config_1.active = 1; } else { @@ -614,7 +613,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(pitch_trim_config_1); } - if ((rud_trim_config.clearFlag == 0) and (getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") < -3.6 or getprop("/fdm/jsbsim/hydraulics/rudder/trim-cmd-deg") > 3.6) and takeoffConfig) { + if (rud_trim_config.clearFlag == 0 and (warningNodes.Logic.rudTrimConfig.getBoolValue() or (takeoffConfig and warningNodes.Logic.rudTrimConfig2.getBoolValue()))) { rud_trim_config.active = 1; rud_trim_config_1.active = 1; } else { @@ -622,7 +621,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(rud_trim_config_1); } - if ((park_brk_config.clearFlag == 0) and warningNodes.Flipflops.parkBrk.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) { + if (park_brk_config.clearFlag == 0 and warningNodes.Logic.parkBrkConfig.getValue() and phaseVar3 >= 2 and phaseVar3 <= 3) { park_brk_config.active = 1; } else { ECAM_controller.warningReset(park_brk_config); @@ -667,7 +666,7 @@ var messages_priority_3 = func { if (gearNotDownLocked.clearFlag == 0 and warningNodes.Logic.gearNotDownLocked.getBoolValue() and phaseVar3 != 3 and phaseVar3 != 4 and phaseVar3 != 5 and phaseVar3 != 8) { gearNotDownLocked.active = 1; - if (gearNotDownLockedRec.clearFlag == 0 and warningNodes.Logic.gearNotDownLockedFlipflop.getBoolValue()) { + if (gearNotDownLockedRec.clearFlag == 0 and warningNodes.Logic.gearNotDownLockedFlipflop.getValue() == 0) { gearNotDownLockedRec.active = 1; gearNotDownLockedWork.active = 1; } else { @@ -725,85 +724,145 @@ var messages_priority_3 = func { altAlertFlash = 0; } - if (!systems.cargoTestBtn.getBoolValue()) { - if (cargoSmokeFwd.clearFlag == 0 and systems.fwdCargoFireWarn.getBoolValue() and (phaseVar3 <= 3 or phaseVar3 >= 9 or phaseVar3 == 6)) { - cargoSmokeFwd.active = 1; - } elsif (cargoSmokeFwd.clearFlag == 1 or systems.cargoTestBtnOff.getBoolValue()) { - ECAM_controller.warningReset(cargoSmokeFwd); - cargoSmokeFwd.isMainMsg = 1; + if (cargoSmokeFwd.clearFlag == 0 and systems.fwdCargoFireWarn.getBoolValue() and (phaseVar3 <= 3 or phaseVar3 >= 9 or phaseVar3 == 6)) { + cargoSmokeFwd.active = 1; + + if (cargoSmokeFwdFans.clearFlag == 0 and systems.PNEU.Switch.cabinFans.getValue()) { + cargoSmokeFwdFans.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeFwdFans); } - if (cargoSmokeFwdAgent.clearFlag == 0 and cargoSmokeFwd.active == 1 and !getprop("/systems/fire/cargo/disch")) { + if (cargoSmokeFwdGrdClsd.clearFlag == 0 and (phaseVar3 == 1 or phaseVar3 == 10)) { + cargoSmokeFwdGrdClsd.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeFwdGrdClsd); + } + + if (cargoSmokeFwdAgent.clearFlag == 0 and !systems.cargoExtinguisherBottles.vector[0].lightProp.getValue()) { cargoSmokeFwdAgent.active = 1; } else { ECAM_controller.warningReset(cargoSmokeFwdAgent); - cargoSmokeFwd.isMainMsg = 0; - } - - if (cargoSmokeAft.clearFlag == 0 and systems.aftCargoFireWarn.getBoolValue() and (phaseVar3 <= 3 or phaseVar3 >= 9 or phaseVar3 == 6)) { - cargoSmokeAft.active = 1; - } elsif (cargoSmokeAft.clearFlag == 1 or systems.cargoTestBtnOff.getBoolValue()) { - ECAM_controller.warningReset(cargoSmokeAft); - cargoSmokeAft.isMainMsg = 1; - systems.cargoTestBtnOff.setBoolValue(0); } - if (cargoSmokeAftAgent.clearFlag == 0 and cargoSmokeAft.active == 1 and !getprop("/systems/fire/cargo/disch")) { - cargoSmokeAftAgent.active = 1; + if (FWC.Timer.gnd.getValue() == 0) { + cargoSmokeFwdGrd.active = 1; } else { - ECAM_controller.warningReset(cargoSmokeAftAgent); - cargoSmokeAft.isMainMsg = 0; + ECAM_controller.warningReset(cargoSmokeFwdGrd); + } + + if (cargoSmokeFwdDoors.clearFlag == 0) { + cargoSmokeFwdDoors.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeFwdDoors); + } + + if (cargoSmokeFwdDisemb.clearFlag == 0) { + cargoSmokeFwdDisemb.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeFwdDisemb); } } else { - if (systems.aftCargoFireWarn.getBoolValue()) { - cargoSmokeFwd.active = 1; - cargoSmokeFwdAgent.active = 1; - cargoSmokeAft.active = 1; + ECAM_controller.warningReset(cargoSmokeFwd); + ECAM_controller.warningReset(cargoSmokeFwdFans); + ECAM_controller.warningReset(cargoSmokeFwdGrdClsd); + ECAM_controller.warningReset(cargoSmokeFwdAgent); + ECAM_controller.warningReset(cargoSmokeFwdGrd); + ECAM_controller.warningReset(cargoSmokeFwdDoors); + ECAM_controller.warningReset(cargoSmokeFwdDisemb); + systems.cargoTestBtnOff.setBoolValue(0); + } + + if (cargoSmokeAft.clearFlag == 0 and systems.aftCargoFireWarn.getBoolValue() and (phaseVar3 <= 3 or phaseVar3 >= 9 or phaseVar3 == 6)) { + cargoSmokeAft.active = 1; + + if (cargoSmokeAftFans.clearFlag == 0 and systems.PNEU.Switch.cabinFans.getValue()) { + cargoSmokeAftFans.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeAftFans); + } + + if (cargoSmokeAftGrdClsd.clearFlag == 0 and (phaseVar3 == 1 or phaseVar3 == 10)) { + cargoSmokeAftGrdClsd.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeAftGrdClsd); + } + + if (cargoSmokeAftAgent.clearFlag == 0 and !systems.cargoExtinguisherBottles.vector[1].lightProp.getValue()) { cargoSmokeAftAgent.active = 1; } else { - ECAM_controller.warningReset(cargoSmokeFwd); - ECAM_controller.warningReset(cargoSmokeFwdAgent); - ECAM_controller.warningReset(cargoSmokeAft); ECAM_controller.warningReset(cargoSmokeAftAgent); } + + if (FWC.Timer.gnd.getValue() == 0) { + cargoSmokeAftGrd.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeAftGrd); + } + + if (cargoSmokeAftDoors.clearFlag == 0) { + cargoSmokeAftDoors.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeAftDoors); + } + + if (cargoSmokeAftDisemb.clearFlag == 0) { + cargoSmokeAftDisemb.active = 1; + } else { + ECAM_controller.warningReset(cargoSmokeAftDisemb); + } + } else { + ECAM_controller.warningReset(cargoSmokeAft); + ECAM_controller.warningReset(cargoSmokeAftFans); + ECAM_controller.warningReset(cargoSmokeAftGrdClsd); + ECAM_controller.warningReset(cargoSmokeAftAgent); + ECAM_controller.warningReset(cargoSmokeAftGrd); + ECAM_controller.warningReset(cargoSmokeAftDoors); + ECAM_controller.warningReset(cargoSmokeAftDisemb); + systems.cargoTestBtnOff.setBoolValue(0); + } + + if (lavatorySmoke.clearFlag == 0 and systems.lavatoryFireWarn.getValue() and phaseVar3 != 4 and phaseVar3 != 5 and phaseVar3 != 7 and phaseVar3 != 8) { + lavatorySmoke.active = 1; + lavatorySmokeComm.active = 1; + } else { + ECAM_controller.warningReset(lavatorySmoke); + ECAM_controller.warningReset(lavatorySmokeComm); } # ESS on BAT - if ((!gear.getValue() or !pts.Controls.Gear.gearDown.getValue()) and getprop("/systems/electrical/some-electric-thingie/static-inverter-timer") == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) { + # NEW EMER ELEC CONFIG + if (essBusOnBat.clearFlag == 0 and warningNodes.Timers.staticInverter.getValue() == 1 and phaseVar3 >= 5 and phaseVar3 <= 7) { essBusOnBat.active = 1; - essBusOnBatLGUplock.active = 1; - essBusOnBatManOn.active = 1; - essBusOnBatRetract.active = 1; - essBusOnBatMinSpeed.active = 1; - essBusOnBatLGCB.active = 1; + if (essBusOnBatMinSpeed.clearFlag == 0 and systems.HYD.Rat.position.getValue() != 0) { + essBusOnBatMinSpeed.active = 1; + } else { + ECAM_controller.warningReset(essBusOnBatMinSpeed); + } } else { ECAM_controller.warningReset(essBusOnBat); - ECAM_controller.warningReset(essBusOnBatLGUplock); - ECAM_controller.warningReset(essBusOnBatManOn); - ECAM_controller.warningReset(essBusOnBatRetract); ECAM_controller.warningReset(essBusOnBatMinSpeed); - ECAM_controller.warningReset(essBusOnBatLGCB); } # EMER CONFIG - if (systems.ELEC.EmerElec.getValue() and !dualFailNode.getBoolValue() and phaseVar3 != 4 and phaseVar3 != 8 and emerconfig.clearFlag == 0 and !getprop("/systems/acconfig/autoconfig-running")) { + if (systems.ELEC.EmerElec.getValue() and !dualFailNode.getBoolValue() and phaseVar3 != 4 and phaseVar3 != 8 and emerconfig.clearFlag == 0 and !pts.Acconfig.running.getBoolValue()) { emerconfig.active = 1; - if (getprop("/systems/hydraulic/sources/rat/position") != 0 and emerconfigMinRat.clearFlag == 0) { + if (systems.HYD.Rat.position.getValue() != 0 and emerconfigMinRat.clearFlag == 0 and FWC.Timer.gnd.getValue() == 0) { emerconfigMinRat.active = 1; } else { ECAM_controller.warningReset(emerconfigMinRat); } - if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) { + if ((!getprop("/systems/electrical/some-electric-thingie/generator-1-reset") or !getprop("/systems/electrical/some-electric-thingie/generator-2-reset")) and emerconfigGen.clearFlag == 0) { emerconfigGen.active = 1; # EGEN12R TRUE } else { ECAM_controller.warningReset(emerconfigGen); } - if (!(getprop("/systems/electrical/some-electric-thingie/generator-1-reset-bustie") and getprop("/systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) { + if ((!getprop("/systems/electrical/some-electric-thingie/generator-1-reset-bustie") or !getprop("/systems/electrical/some-electric-thingie/generator-2-reset-bustie")) and emerconfigGen2.clearFlag == 0) { emerconfigGen2.active = 1; - if (getprop("/controls/electrical/switches/bus-tie")) { + if (systems.ELEC.Switch.busTie.getBoolValue()) { emerconfigBusTie.active = 1; } else { ECAM_controller.warningReset(emerconfigBusTie); @@ -815,13 +874,13 @@ var messages_priority_3 = func { ECAM_controller.warningReset(emerconfigGen3); } - if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 0 and emerconfigManOn.clearFlag == 0) { + if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 0 and emerconfigManOn.clearFlag == 0) { emerconfigManOn.active = 1; } else { ECAM_controller.warningReset(emerconfigManOn); } - if (getprop("/controls/engines/engine-start-switch") != 2 and emerconfigEngMode.clearFlag == 0) { + if (pts.Controls.Engines.startSw.getValue() != 2 and emerconfigEngMode.clearFlag == 0) { emerconfigEngMode.active = 1; } else { ECAM_controller.warningReset(emerconfigEngMode); @@ -833,48 +892,64 @@ var messages_priority_3 = func { ECAM_controller.warningReset(emerconfigRadio); } - if (emerconfigIcing.clearFlag == 0) { - emerconfigIcing.active = 1; - } else { - ECAM_controller.warningReset(emerconfigIcing); - } - - if (emerconfigFuelG.clearFlag == 0) { - emerconfigFuelG.active = 1; + if (FWC.Timer.gnd.getValue() == 0) { + if (emerconfigFuelG.clearFlag == 0) { + emerconfigFuelG.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFuelG); + } + + if (emerconfigFuelG2.clearFlag == 0) { + emerconfigFuelG2.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFuelG2); + } + + if (fbw.FBW.Computers.fac1.getBoolValue() == 0 and emerconfigFAC.clearFlag == 0) { + emerconfigFAC.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFAC); + } } else { ECAM_controller.warningReset(emerconfigFuelG); - } - - if (emerconfigFuelG2.clearFlag == 0) { - emerconfigFuelG2.active = 1; - } else { ECAM_controller.warningReset(emerconfigFuelG2); - } - - if (fbw.FBW.Computers.fac1.getBoolValue() == 0 and emerconfigFAC.clearFlag == 0) { - emerconfigFAC.active = 1; - } else { ECAM_controller.warningReset(emerconfigFAC); } - if (!getprop("/controls/electrical/switches/bus-tie") and emerconfigBusTie2.clearFlag == 0) { + if (!systems.ELEC.Switch.busTie.getBoolValue() and emerconfigBusTie2.clearFlag == 0) { emerconfigBusTie2.active = 1; } else { ECAM_controller.warningReset(emerconfigBusTie2); } - if (emerconfigAPU.clearFlag == 0) { - emerconfigAPU.active = 1; + if (FWC.Timer.gnd.getValue() == 0) { + if (emerconfigAPU.clearFlag == 0) { + emerconfigAPU.active = 1; + } else { + ECAM_controller.warningReset(emerconfigAPU); + } + + if (emerconfigVent.clearFlag == 0) { + emerconfigVent.active = 1; + } else { + ECAM_controller.warningReset(emerconfigVent); + } } else { ECAM_controller.warningReset(emerconfigAPU); - } - - if (emerconfigVent.clearFlag == 0) { - emerconfigVent.active = 1; - } else { ECAM_controller.warningReset(emerconfigVent); } + if (emerconfigFuelIN.clearFlag == 0 and warningNodes.Logic.dc2FuelConsumptionIncreased.getValue()) { + emerconfigFuelIN.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFuelIN); + } + + if (emerconfigFMSPRD.clearFlag == 0 and warningNodes.Logic.dc2FMSPredictions.getValue()) { + emerconfigFMSPRD.active = 1; + } else { + ECAM_controller.warningReset(emerconfigFMSPRD); + } } else { ECAM_controller.warningReset(emerconfig); ECAM_controller.warningReset(emerconfigMinRat); @@ -885,16 +960,17 @@ var messages_priority_3 = func { ECAM_controller.warningReset(emerconfigManOn); ECAM_controller.warningReset(emerconfigEngMode); ECAM_controller.warningReset(emerconfigRadio); - ECAM_controller.warningReset(emerconfigIcing); ECAM_controller.warningReset(emerconfigFuelG); ECAM_controller.warningReset(emerconfigFuelG2); ECAM_controller.warningReset(emerconfigFAC); ECAM_controller.warningReset(emerconfigBusTie2); ECAM_controller.warningReset(emerconfigAPU); ECAM_controller.warningReset(emerconfigVent); + ECAM_controller.warningReset(emerconfigFuelIN); + ECAM_controller.warningReset(emerconfigFMSPRD); } - if (hydBYloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.blueYellow.getValue()) { + if (hydBYloPr.clearFlag == 0 and warningNodes.Logic.blueYellow.getValue()) { hydBYloPr.active = 1; if (hydBYloPrRat.clearFlag == 0 and systems.HYD.Rat.position.getValue() != 0) { hydBYloPrRat.active = 1; @@ -969,7 +1045,7 @@ var messages_priority_3 = func { ECAM_controller.warningReset(hydBYloPrFmsPredict); } - if (hydGBloPr.clearFlag == 0 and phaseVar3 != 4 and phaseVar3 != 5 and warningNodes.Logic.blueGreen.getValue()) { + if (hydGBloPr.clearFlag == 0 and warningNodes.Logic.blueGreen.getValue()) { hydGBloPr.active = 1; if (hydGBloPrRat.clearFlag == 0 and systems.HYD.Rat.position.getValue() != 0) { hydGBloPrRat.active = 1; @@ -1087,114 +1163,754 @@ var messages_priority_3 = func { var messages_priority_2 = func { phaseVar2 = phaseNode.getValue(); + + if ((phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 9) and warningNodes.Logic.thrLeversNotSet.getValue() and engThrustLvrNotSet.clearFlag == 0) { + engThrustLvrNotSet.active = 1; + + if (fadec.Thrust.limFlex.getValue()) { + engThrustLvrNotSetMCT.active = 1; + ECAM_controller.warningReset(engThrustLvrNotSetMCT); + } else { + engThrustLvrNotSetTO.active = 1; + ECAM_controller.warningReset(engThrustLvrNotSetTO); + } + } else { + ECAM_controller.warningReset(engThrustLvrNotSet); + ECAM_controller.warningReset(engThrustLvrNotSetMCT); + ECAM_controller.warningReset(engThrustLvrNotSetTO); + } + + if ((phaseVar2 >= 5 and phaseVar2 <= 7) and warningNodes.Logic.revSet.getValue() and engRevSet.clearFlag == 0) { + engRevSet.active = 1; + + if (engRevSetLevers.clearFlag == 0) { + engRevSetLevers.active = 1; + } else { + ECAM_controller.warningReset(engRevSetLevers); + } + } else { + ECAM_controller.warningReset(engRevSet); + ECAM_controller.warningReset(engRevSetLevers); + } + + if (warningNodes.Logic.eng1Fail.getValue() and eng1Fail.clearFlag == 0) { + eng1Fail.active = 1; + + if (0 == 1 and thrustMalfunction1.clearFlag == 0) { # OVER THR PROTECT + thrustMalfunction1.active = 1; + } else { + ECAM_controller.warningReset(thrustMalfunction1); + } + + if (0 == 1 and shaftFailure1.clearFlag == 0) { # PW ONLY + shaftFailure1.active = 1; + } else { + ECAM_controller.warningReset(shaftFailure1); + } + + if (phaseVar2 != 2 and phaseVar2 != 9 and pts.Controls.Engines.startSw.getValue() != 2 and eng1FailModeSel.clearFlag == 0) { # and not stall and not EGT protect + eng1FailModeSel.active = 1; + } else { + ECAM_controller.warningReset(eng1FailModeSel); + } + + if (phaseVar2 != 4 and warningNodes.Logic.phase5Trans.getValue() == 1) { + if (eng1FailThrLvrIdle.clearFlag == 0 and pts.Controls.Engines.Engine.throttleLever[0].getValue() > 0.01) { + eng1FailThrLvrIdle.active = 1; + } else { + ECAM_controller.warningReset(eng1FailThrLvrIdle); + } + + if (eng1FailNoRelight.clearFlag == 0 and phaseVar2 != 2 and phaseVar2 != 9 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) { + eng1FailNoRelight.active = 1; + } else { + ECAM_controller.warningReset(eng1FailNoRelight); + } + + if (eng1FailMasterOff.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[0].getValue() == 0) { + eng1FailMasterOff.active = 1; + } else { + ECAM_controller.warningReset(eng1FailMasterOff); + } + + if (eng1FailDamage.clearFlag == 0 and systems.fireButtons[0].getValue() == 0) { + eng1FailDamage.active = 1; + } else { + ECAM_controller.warningReset(eng1FailDamage); + } + + if (eng1FailFirePB.clearFlag == 0 and systems.fireButtons[0].getValue() == 0) { + eng1FailFirePB.active = 1; + } else { + ECAM_controller.warningReset(eng1FailFirePB); + } + + if (eng1FailAgent1DischT.clearFlag == 0 and !systems.extinguisherBottles.vector[0].lightProp.getValue()) { + eng1FailAgent1DischT.active = 1; + } else { + ECAM_controller.warningReset(eng1FailAgent1DischT); + } + + if (eng1FailAgent1Disch.clearFlag == 0 and !systems.extinguisherBottles.vector[0].lightProp.getValue()) { + eng1FailAgent1Disch.active = 1; + } else { + ECAM_controller.warningReset(eng1FailAgent1Disch); + } + + if (eng1FailNoDamage.clearFlag == 0) { + eng1FailNoDamage.active = 1; + } else { + ECAM_controller.warningReset(eng1FailNoDamage); + } + + if (eng1FailRelight.clearFlag == 0) { + eng1FailRelight.active = 1; + } else { + ECAM_controller.warningReset(eng1FailRelight); + } + } else { + ECAM_controller.warningReset(eng1FailThrLvrIdle); + ECAM_controller.warningReset(eng1FailNoRelight); + ECAM_controller.warningReset(eng1FailMasterOff); + ECAM_controller.warningReset(eng1FailDamage); + ECAM_controller.warningReset(eng1FailFirePB); + ECAM_controller.warningReset(eng1FailAgent1DischT); + ECAM_controller.warningReset(eng1FailAgent1Disch); + ECAM_controller.warningReset(eng1FailNoDamage); + ECAM_controller.warningReset(eng1FailRelight); + } + } else { + ECAM_controller.warningReset(eng1Fail); + ECAM_controller.warningReset(thrustMalfunction1); + ECAM_controller.warningReset(shaftFailure1); + ECAM_controller.warningReset(eng1FailModeSel); + ECAM_controller.warningReset(eng1FailThrLvrIdle); + ECAM_controller.warningReset(eng1FailNoRelight); + ECAM_controller.warningReset(eng1FailMasterOff); + ECAM_controller.warningReset(eng1FailDamage); + ECAM_controller.warningReset(eng1FailFirePB); + ECAM_controller.warningReset(eng1FailAgent1DischT); + ECAM_controller.warningReset(eng1FailAgent1Disch); + ECAM_controller.warningReset(eng1FailNoDamage); + ECAM_controller.warningReset(eng1FailRelight); + } + + if (warningNodes.Logic.eng1Shutdown.getValue() and eng1ShutDown.clearFlag == 0) { + eng1ShutDown.active = 1; + + if (phaseVar2 != 4 and phaseVar2 != 5 and systems.fireButtons[0].getValue() == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) { + if (eng1ShutDownPack.clearFlag == 0 and systems.PNEU.Switch.pack1.getValue() and systems.PNEU.Switch.pack2.getValue()) { + eng1ShutDownPack.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownPack); + } + + if (eng1ShutDownXBleed.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() == 0) { + eng1ShutDownXBleed.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownXBleed); + } + } else { + ECAM_controller.warningReset(eng1ShutDownPack); + ECAM_controller.warningReset(eng1ShutDownXBleed); + } + + if (FWC.Timer.gnd.getValue() == 0 or systems.fireButtons[0].getValue() == 0) { + if (eng1ShutDownModeSel.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 2) { + eng1ShutDownModeSel.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownModeSel); + } + + if (systems.FUEL.Switches.crossfeed.getValue() == 0) { + if (eng1ShutDownFuelLeak.clearFlag == 0) { + eng1ShutDownFuelLeak.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownFuelLeak); + } + + if (eng1ShutDownImbalance.clearFlag == 0) { + eng1ShutDownImbalance.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownImbalance); + } + } else { + ECAM_controller.warningReset(eng1ShutDownFuelLeak); + ECAM_controller.warningReset(eng1ShutDownImbalance); + } + } else { + ECAM_controller.warningReset(eng1ShutDownModeSel); + ECAM_controller.warningReset(eng1ShutDownFuelLeak); + ECAM_controller.warningReset(eng1ShutDownImbalance); + } + + if (eng1ShutDownTCAS.clearFlag == 0 and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 2) { + eng1ShutDownTCAS.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownTCAS); + } + + if (0 == 1 and eng1ShutDownBuffet.clearFlag == 0) { # reverser unlocked + eng1ShutDownBuffet.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownBuffet); + } + + if (0 == 1 and eng1ShutDownSpeed.clearFlag == 0) { + eng1ShutDownSpeed.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownSpeed); + } + + if (systems.fireButtons[0].getValue() == 1) { + if (eng1ShutDownXBleedS.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() != 0) { + eng1ShutDownXBleedS.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownXBleedS); + } + + if (eng1ShutDownWingAI.clearFlag == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) { + eng1ShutDownWingAI.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownWingAI); + } + + if (eng1ShutDownIcing.clearFlag == 0) { + eng1ShutDownIcing.active = 1; + } else { + ECAM_controller.warningReset(eng1ShutDownIcing); + } + } else { + ECAM_controller.warningReset(eng1ShutDownXBleedS); + ECAM_controller.warningReset(eng1ShutDownWingAI); + ECAM_controller.warningReset(eng1ShutDownIcing); + } + } else { + ECAM_controller.warningReset(eng1ShutDown); + ECAM_controller.warningReset(eng1ShutDownPack); + ECAM_controller.warningReset(eng1ShutDownXBleed); + ECAM_controller.warningReset(eng1ShutDownModeSel); + ECAM_controller.warningReset(eng1ShutDownImbalance); + ECAM_controller.warningReset(eng1ShutDownTCAS); + ECAM_controller.warningReset(eng1ShutDownFuelLeak); + ECAM_controller.warningReset(eng1ShutDownBuffet); + ECAM_controller.warningReset(eng1ShutDownSpeed); + ECAM_controller.warningReset(eng1ShutDownXBleedS); + ECAM_controller.warningReset(eng1ShutDownWingAI); + ECAM_controller.warningReset(eng1ShutDownIcing); + } + + if (warningNodes.Logic.eng2Fail.getValue() and eng2Fail.clearFlag == 0) { + eng2Fail.active = 1; + + if (0 == 1 and thrustMalfunction2.clearFlag == 0) { # OVER THR PROTECT + thrustMalfunction2.active = 1; + } else { + ECAM_controller.warningReset(thrustMalfunction2); + } + + if (0 == 1 and shaftFailure2.clearFlag == 0) { # PW ONLY + shaftFailure2.active = 1; + } else { + ECAM_controller.warningReset(shaftFailure2); + } + + if (phaseVar2 != 2 and phaseVar2 != 9 and pts.Controls.Engines.startSw.getValue() != 2 and eng2FailModeSel.clearFlag == 0) { # and not stall and not EGT protect + eng2FailModeSel.active = 1; + } else { + ECAM_controller.warningReset(eng2FailModeSel); + } + + if (phaseVar2 != 4 and warningNodes.Logic.phase5Trans.getValue() == 1) { + if (eng2FailThrLvrIdle.clearFlag == 0 and pts.Controls.Engines.Engine.throttleLever[1].getValue() > 0.01) { + eng2FailThrLvrIdle.active = 1; + } else { + ECAM_controller.warningReset(eng2FailThrLvrIdle); + } + + if (eng2FailNoRelight.clearFlag == 0 and phaseVar2 != 2 and phaseVar2 != 9 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) { + eng2FailNoRelight.active = 1; + } else { + ECAM_controller.warningReset(eng2FailNoRelight); + } + + if (eng2FailMasterOff.clearFlag == 0 and pts.Controls.Engines.Engine.cutoffSw[1].getValue() == 0) { + eng2FailMasterOff.active = 1; + } else { + ECAM_controller.warningReset(eng2FailMasterOff); + } + + if (eng2FailDamage.clearFlag == 0 and systems.fireButtons[1].getValue() == 0) { + eng2FailDamage.active = 1; + } else { + ECAM_controller.warningReset(eng2FailDamage); + } + + if (eng2FailFirePB.clearFlag == 0 and systems.fireButtons[1].getValue() == 0) { + eng2FailFirePB.active = 1; + } else { + ECAM_controller.warningReset(eng2FailFirePB); + } + + if (eng2FailAgent1DischT.clearFlag == 0 and !systems.extinguisherBottles.vector[2].lightProp.getValue()) { + eng2FailAgent1DischT.active = 1; + } else { + ECAM_controller.warningReset(eng2FailAgent1DischT); + } + + if (eng2FailAgent1Disch.clearFlag == 0 and !systems.extinguisherBottles.vector[2].lightProp.getValue()) { + eng2FailAgent1Disch.active = 1; + } else { + ECAM_controller.warningReset(eng2FailAgent1Disch); + } + + if (eng2FailNoDamage.clearFlag == 0) { + eng2FailNoDamage.active = 1; + } else { + ECAM_controller.warningReset(eng2FailNoDamage); + } + + if (eng2FailRelight.clearFlag == 0) { + eng2FailRelight.active = 1; + } else { + ECAM_controller.warningReset(eng2FailRelight); + } + } else { + ECAM_controller.warningReset(eng2FailThrLvrIdle); + ECAM_controller.warningReset(eng2FailNoRelight); + ECAM_controller.warningReset(eng2FailMasterOff); + ECAM_controller.warningReset(eng2FailDamage); + ECAM_controller.warningReset(eng2FailFirePB); + ECAM_controller.warningReset(eng2FailAgent1DischT); + ECAM_controller.warningReset(eng2FailAgent1Disch); + ECAM_controller.warningReset(eng2FailNoDamage); + ECAM_controller.warningReset(eng2FailRelight); + } + } else { + ECAM_controller.warningReset(eng2Fail); + ECAM_controller.warningReset(thrustMalfunction2); + ECAM_controller.warningReset(shaftFailure2); + ECAM_controller.warningReset(eng2FailModeSel); + ECAM_controller.warningReset(eng2FailThrLvrIdle); + ECAM_controller.warningReset(eng2FailNoRelight); + ECAM_controller.warningReset(eng2FailMasterOff); + ECAM_controller.warningReset(eng2FailDamage); + ECAM_controller.warningReset(eng2FailFirePB); + ECAM_controller.warningReset(eng2FailAgent1DischT); + ECAM_controller.warningReset(eng2FailAgent1Disch); + ECAM_controller.warningReset(eng2FailNoDamage); + ECAM_controller.warningReset(eng2FailRelight); + } + + if (warningNodes.Logic.eng2Shutdown.getValue() and eng2ShutDown.clearFlag == 0) { + eng2ShutDown.active = 1; + + if (phaseVar2 != 4 and phaseVar2 != 5 and systems.fireButtons[1].getValue() == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) { + if (eng2ShutDownPack1.clearFlag == 0 and systems.ELEC.EmerElec.getValue() and systems.PNEU.Switch.pack1.getValue() and systems.PNEU.Switch.pack2.getValue()) { + eng2ShutDownPack1.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownPack1); + } + + if (eng2ShutDownPack.clearFlag == 0 and !systems.ELEC.EmerElec.getValue() and systems.PNEU.Switch.pack1.getValue() and systems.PNEU.Switch.pack2.getValue()) { + eng2ShutDownPack.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownPack); + } + + if (eng2ShutDownXBleed.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() == 0) { + eng2ShutDownXBleed.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownXBleed); + } + } else { + ECAM_controller.warningReset(eng2ShutDownPack); + ECAM_controller.warningReset(eng2ShutDownXBleed); + } + + if (FWC.Timer.gnd.getValue() == 0 or systems.fireButtons[1].getValue() == 0) { + if (eng2ShutDownModeSel.clearFlag == 0 and pts.Controls.Engines.startSw.getValue() != 2) { + eng2ShutDownModeSel.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownModeSel); + } + + if (systems.FUEL.Switches.crossfeed.getValue() == 0) { + if (eng2ShutDownFuelLeak.clearFlag == 0) { + eng2ShutDownFuelLeak.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownFuelLeak); + } + + if (eng2ShutDownImbalance.clearFlag == 0) { + eng2ShutDownImbalance.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownImbalance); + } + } else { + ECAM_controller.warningReset(eng2ShutDownFuelLeak); + ECAM_controller.warningReset(eng2ShutDownImbalance); + } + } else { + ECAM_controller.warningReset(eng2ShutDownModeSel); + ECAM_controller.warningReset(eng2ShutDownFuelLeak); + ECAM_controller.warningReset(eng2ShutDownImbalance); + } + + if (eng2ShutDownTCAS.clearFlag == 0 and pts.Instrumentation.TCAS.Inputs.mode.getValue() != 2) { + eng2ShutDownTCAS.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownTCAS); + } + + if (0 == 1 and eng2ShutDownBuffet.clearFlag == 0) { # reverser unlocked + eng2ShutDownBuffet.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownBuffet); + } + + if (0 == 1 and eng2ShutDownSpeed.clearFlag == 0) { + eng2ShutDownSpeed.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownSpeed); + } + + if (systems.fireButtons[1].getValue() == 1) { + if (eng2ShutDownXBleedS.clearFlag == 0 and systems.PNEU.Valves.crossbleed.getValue() != 0) { + eng2ShutDownXBleedS.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownXBleedS); + } + + if (eng2ShutDownWingAI.clearFlag == 0 and (systems.PNEU.Valves.wingLeft.getValue() or systems.PNEU.Valves.wingRight.getValue())) { + eng2ShutDownWingAI.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownWingAI); + } + + if (eng2ShutDownIcing.clearFlag == 0) { + eng2ShutDownIcing.active = 1; + } else { + ECAM_controller.warningReset(eng2ShutDownIcing); + } + } else { + ECAM_controller.warningReset(eng2ShutDownXBleedS); + ECAM_controller.warningReset(eng2ShutDownWingAI); + ECAM_controller.warningReset(eng2ShutDownIcing); + } + } else { + ECAM_controller.warningReset(eng2ShutDown); + ECAM_controller.warningReset(eng2ShutDownPack); + ECAM_controller.warningReset(eng2ShutDownXBleed); + ECAM_controller.warningReset(eng2ShutDownModeSel); + ECAM_controller.warningReset(eng2ShutDownImbalance); + ECAM_controller.warningReset(eng2ShutDownTCAS); + ECAM_controller.warningReset(eng2ShutDownFuelLeak); + ECAM_controller.warningReset(eng2ShutDownBuffet); + ECAM_controller.warningReset(eng2ShutDownSpeed); + ECAM_controller.warningReset(eng2ShutDownXBleedS); + ECAM_controller.warningReset(eng2ShutDownWingAI); + ECAM_controller.warningReset(eng2ShutDownIcing); + } + + # SAT ABOVE FLEX TEMP + if (dmc.DMController.DMCs[1] != nil and dmc.DMController.DMCs[1].outputs[4] != nil) { + _SATval = dmc.DMController.DMCs[1].outputs[4].getValue() or nil; + } else { + _SATval = nil; + } + if (satAbvFlexTemp.clearFlag == 0 and phaseVar2 == 2 and fadec.Thrust.limFlex.getValue() and _SATval != nil and _SATval > fmgc.FMGCNodes.flexTemp.getValue() and !warningNodes.Logic.thrLeversNotSet.getValue()) { + satAbvFlexTemp.active = 1; + + if (satAbvFlexTempCheck.clearFlag == 0) { + satAbvFlexTempCheck.active = 1; + } else { + ECAM_controller.warningReset(satAbvFlexTempCheck); + } + } else { + ECAM_controller.warningReset(satAbvFlexTemp); + ECAM_controller.warningReset(satAbvFlexTempCheck); + } + # DC EMER CONFIG - if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.dcEss.getValue() < 25 and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcEmerconfig.clearFlag == 0) { + if (warningNodes.Timers.dcEmerConfig.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and dcEmerconfig.clearFlag == 0) { dcEmerconfig.active = 1; - dcEmerconfigManOn.active = 1; + if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 0 and dcEmerconfigManOn.clearFlag == 0) { + dcEmerconfigManOn.active = 1; + } else { + ECAM_controller.warningReset(dcEmerconfigManOn); + } + + if ((warningNodes.Logic.dcEssFuelConsumptionIncreased.getValue() or warningNodes.Logic.dc2FuelConsumptionIncreased.getValue()) and dcEmerconfigFuel.clearFlag == 0) { + dcEmerconfigFuel.active = 1; + } else { + ECAM_controller.warningReset(dcEmerconfigFuel); + } } else { ECAM_controller.warningReset(dcEmerconfig); ECAM_controller.warningReset(dcEmerconfigManOn); + ECAM_controller.warningReset(dcEmerconfigFuel); } - if (!systems.ELEC.EmerElec.getValue() and !dcEmerconfig.active and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus12Fault.clearFlag == 0) { + if (warningNodes.Timers.dc12Fault.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus12Fault.clearFlag == 0) { dcBus12Fault.active = 1; - dcBus12FaultBlower.active = 1; - dcBus12FaultExtract.active = 1; - dcBus12FaultBaroRef.active = 1; - dcBus12FaultIcing.active = 1; - dcBus12FaultBrking.active = 1; + + if (dcBus12FaultBlower.clearFlag == 0) { + dcBus12FaultBlower.active = 1; + } else { + ECAM_controller.warningReset(dcBus12FaultBlower); + } + + if (dcBus12FaultExtract.clearFlag == 0) { + dcBus12FaultExtract.active = 1; + } else { + ECAM_controller.warningReset(dcBus12FaultExtract); + } + + if (dcBus12FaultBaroRef.clearFlag == 0) { + dcBus12FaultBaroRef.active = 1; + } else { + ECAM_controller.warningReset(dcBus12FaultBaroRef); + } + + if (dcBus12FaultFuel.clearFlag == 0 and warningNodes.Logic.dc2FuelConsumptionIncreased.getValue()) { + dcBus12FaultFuel.active = 1; + } else { + ECAM_controller.warningReset(dcBus12FaultFuel); + } + + if (dcBus12FaultPredict.clearFlag == 0 and warningNodes.Logic.dc2FMSPredictions.getValue()) { + dcBus12FaultPredict.active = 1; + } else { + ECAM_controller.warningReset(dcBus12FaultPredict); + } + + if (dcBus12FaultIcing.clearFlag == 0) { + dcBus12FaultIcing.active = 1; + } else { + ECAM_controller.warningReset(dcBus12FaultIcing); + } + + if (dcBus12FaultBrking.clearFlag == 0) { + dcBus12FaultBrking.active = 1; + } else { + ECAM_controller.warningReset(dcBus12FaultBrking); + } } else { ECAM_controller.warningReset(dcBus12Fault); ECAM_controller.warningReset(dcBus12FaultBlower); ECAM_controller.warningReset(dcBus12FaultExtract); ECAM_controller.warningReset(dcBus12FaultBaroRef); + ECAM_controller.warningReset(dcBus12FaultFuel); + ECAM_controller.warningReset(dcBus12FaultPredict); ECAM_controller.warningReset(dcBus12FaultIcing); ECAM_controller.warningReset(dcBus12FaultBrking); } - if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.acEss.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBusEssFault.clearFlag == 0) { + if (warningNodes.Timers.acEssFault.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and AcBusEssFault.clearFlag == 0) { AcBusEssFault.active = 1; - if (!systems.ELEC.Switch.acEssFeed.getBoolValue()) { + if (!systems.ELEC.Switch.acEssFeed.getBoolValue() and AcBusEssFaultFeed.clearFlag == 0) { AcBusEssFaultFeed.active = 1; } else { ECAM_controller.warningReset(AcBusEssFaultFeed); } - AcBusEssFaultAtc.active = 1; + + if (atc.transponderPanel.atcSel != 2 and AcBusEssFaultAtc.clearFlag == 0) { + AcBusEssFaultAtc.active = 1; + } else { + ECAM_controller.warningReset(AcBusEssFaultAtc); + } } else { ECAM_controller.warningReset(AcBusEssFault); ECAM_controller.warningReset(AcBusEssFaultFeed); ECAM_controller.warningReset(AcBusEssFaultAtc); } - if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.ac1.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus1Fault.clearFlag == 0) { + if (warningNodes.Timers.ac1Fault.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus1Fault.clearFlag == 0) { AcBus1Fault.active = 1; - AcBus1FaultBlower.active = 1; + + if (AcBus1FaultBlower.clearFlag == 0) { + AcBus1FaultBlower.active = 1; + } else { + ECAM_controller.warningReset(AcBus1FaultBlower); + } } else { ECAM_controller.warningReset(AcBus1Fault); ECAM_controller.warningReset(AcBus1FaultBlower); } - if (!dcEmerconfig.active and systems.ELEC.Bus.dcEss.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 8 and DcEssBusFault.clearFlag == 0) { + if (warningNodes.Timers.dcEssFault.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and DcEssBusFault.clearFlag == 0) { DcEssBusFault.active = 1; - DcEssBusFaultRadio.active = 1; - DcEssBusFaultRadio2.active = 1; - DcEssBusFaultBaro.active = 1; - DcEssBusFaultGPWS.active = 1; + if (DcEssBusFaultRadio.clearFlag == 0) { + DcEssBusFaultRadio.active = 1; + } else { + ECAM_controller.warningReset(DcEssBusFaultRadio); + } + if (DcEssBusFaultRadio2.clearFlag == 0) { + DcEssBusFaultRadio2.active = 1; + } else { + ECAM_controller.warningReset(DcEssBusFaultRadio2); + } + + if (DcEssBusFaultBaro.clearFlag == 0) { + DcEssBusFaultBaro.active = 1; + } else { + ECAM_controller.warningReset(DcEssBusFaultBaro); + } + + if (0 == 1 and systems.ELEC.Bus.dc2.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() < 25 and DcEssBusFaultGear.clearFlag == 0) { # LGCIU12 FAULT + DcEssBusFaultGear.active = 1; + } else { + ECAM_controller.warningReset(DcEssBusFaultGear); + } + + if (DcEssBusFaultGPWS.clearFlag == 0) { + DcEssBusFaultGPWS.active = 1; + } else { + ECAM_controller.warningReset(DcEssBusFaultGPWS); + } + + if (DcEssBusFaultFuel.clearFlag == 0 and warningNodes.Logic.dcEssFuelConsumptionIncreased.getValue()) { + DcEssBusFaultFuel.active = 1; + } else { + ECAM_controller.warningReset(DcEssBusFaultFuel); + } + + if (DcEssBusFaultPredict.clearFlag == 0 and warningNodes.Logic.dcEssFMSPredictions.getValue()) { + DcEssBusFaultPredict.active = 1; + } else { + ECAM_controller.warningReset(DcEssBusFaultPredict); + } + + if (DcEssBusFaultIcing.clearFlag == 0) { + DcEssBusFaultIcing.active = 1; + } else { + ECAM_controller.warningReset(DcEssBusFaultIcing); + } } else { ECAM_controller.warningReset(DcEssBusFault); ECAM_controller.warningReset(DcEssBusFaultRadio); ECAM_controller.warningReset(DcEssBusFaultRadio2); ECAM_controller.warningReset(DcEssBusFaultBaro); + ECAM_controller.warningReset(DcEssBusFaultGear); ECAM_controller.warningReset(DcEssBusFaultGPWS); + ECAM_controller.warningReset(DcEssBusFaultFuel); + ECAM_controller.warningReset(DcEssBusFaultPredict); + ECAM_controller.warningReset(DcEssBusFaultIcing); } - if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.ac2.getValue() < 110 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus2Fault.clearFlag == 0) { + if (warningNodes.Timers.ac2Fault.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and AcBus2Fault.clearFlag == 0) { AcBus2Fault.active = 1; - AcBus2FaultExtract.active = 1; + if (AcBus2FaultExtract.clearFlag == 0) { + AcBus2FaultExtract.active = 1; + } else { + ECAM_controller.warningReset(AcBus2FaultExtract); + } + + if (atc.transponderPanel.atcSel != 1 and AcBus2FaultAtc.clearFlag == 0) { + AcBus2FaultAtc.active = 1; + } else { + ECAM_controller.warningReset(AcBus2FaultAtc); + } } else { ECAM_controller.warningReset(AcBus2Fault); ECAM_controller.warningReset(AcBus2FaultExtract); + ECAM_controller.warningReset(AcBus2FaultAtc); } - if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.dc1.getValue() < 25 and systems.ELEC.Bus.dc2.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus1Fault.clearFlag == 0) { + if (warningNodes.Timers.dc1Fault.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus1Fault.clearFlag == 0) { dcBus1Fault.active = 1; - dcBus1FaultBlower.active = 1; - dcBus1FaultExtract.active = 1; + + if (dcBus1FaultBlower.clearFlag == 0) { + dcBus1FaultBlower.active = 1; + } else { + ECAM_controller.warningReset(dcBus1FaultBlower); + } + if (dcBus1FaultExtract.clearFlag == 0) { + dcBus1FaultExtract.active = 1; + } else { + ECAM_controller.warningReset(dcBus1FaultExtract); + } + if (dcBus1FaultIcing.clearFlag == 0) { + dcBus1FaultIcing.active = 1; + } else { + ECAM_controller.warningReset(dcBus1FaultIcing); + } } else { ECAM_controller.warningReset(dcBus1Fault); ECAM_controller.warningReset(dcBus1FaultBlower); ECAM_controller.warningReset(dcBus1FaultExtract); + ECAM_controller.warningReset(dcBus1FaultIcing); } - if (!systems.ELEC.EmerElec.getValue() and systems.ELEC.Bus.dc1.getValue() >= 25 and systems.ELEC.Bus.dc2.getValue() <= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus2Fault.clearFlag == 0) { + if (warningNodes.Timers.dc2Fault.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and dcBus2Fault.clearFlag == 0) { dcBus2Fault.active = 1; - dcBus2FaultAirData.active = 1; - dcBus2FaultBaro.active = 1; + + if (dcBus2FaultAirData.clearFlag == 0 and systems.SwitchingPanel.Switches.airData.getValue() != 1) { + dcBus2FaultAirData.active = 1; + } else { + ECAM_controller.warningReset(dcBus2FaultAirData); + } + + if (dcBus2FaultBaro.clearFlag == 0) { + dcBus2FaultBaro.active = 1; + } else { + ECAM_controller.warningReset(dcBus2FaultBaro); + } + + if (0 == 1 and systems.ELEC.Bus.dc2.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() < 25 and dcBus2FaultGear.clearFlag == 0) { # LGCIU12 FAULT + dcBus2FaultGear.active = 1; + } else { + ECAM_controller.warningReset(dcBus2FaultGear); + } + + if (dcBus2FaultFuel.clearFlag == 0 and warningNodes.Logic.dc2FuelConsumptionIncreased.getValue()) { + dcBus2FaultFuel.active = 1; + } else { + ECAM_controller.warningReset(dcBus2FaultFuel); + } + + if (dcBus2FaultPredict.clearFlag == 0 and warningNodes.Logic.dc2FMSPredictions.getValue()) { + dcBus2FaultPredict.active = 1; + } else { + ECAM_controller.warningReset(dcBus2FaultPredict); + } } else { ECAM_controller.warningReset(dcBus2Fault); ECAM_controller.warningReset(dcBus2FaultAirData); ECAM_controller.warningReset(dcBus2FaultBaro); + ECAM_controller.warningReset(dcBus2FaultGear); + ECAM_controller.warningReset(dcBus2FaultFuel); + ECAM_controller.warningReset(dcBus2FaultPredict); } - if (!systems.ELEC.EmerElec.getValue() and !dcEmerconfig.active and systems.ELEC.Bus.dcBat.getValue() < 25 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and dcBusBatFault.clearFlag == 0) { + if (warningNodes.Timers.dcBatFault.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8 and dcBusBatFault.clearFlag == 0) { dcBusBatFault.active = 1; } else { ECAM_controller.warningReset(dcBusBatFault); } - if (!(systems.ELEC.EmerElec.getValue() and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.dcEssShed.getValue() < 25 and systems.ELEC.Bus.dcEss.getValue() >= 25 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) { + if (warningNodes.Timers.dcEssShed.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and dcBusEssShed.clearFlag == 0) { dcBusEssShed.active = 1; - dcBusEssShedExtract.active = 1; - dcBusEssShedIcing.active = 1; + if (dcBusEssShedExtract.clearFlag == 0) { + dcBusEssShedExtract.active = 1; + } else { + ECAM_controller.warningReset(dcBusEssShedExtract); + } + if (dcBusEssShedIcing.clearFlag == 0) { + dcBusEssShedIcing.active = 1; + } else { + ECAM_controller.warningReset(dcBusEssShedIcing); + } } else { ECAM_controller.warningReset(dcBusEssShed); ECAM_controller.warningReset(dcBusEssShedExtract); ECAM_controller.warningReset(dcBusEssShedIcing); } - if (!(systems.ELEC.EmerElec.getValue() and !getprop("/systems/electrical/relay/emer-glc/contact-pos")) and systems.ELEC.Bus.acEssShed.getValue() < 110 and systems.ELEC.Bus.acEss.getValue() >= 110 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) { + if (warningNodes.Timers.acEssShed.getValue() == 1 and phaseVar2 != 4 and phaseVar2 != 8 and acBusEssShed.clearFlag == 0) { acBusEssShed.active = 1; - if (!systems.ELEC.EmerElec.getValue()) { + if (!systems.ELEC.EmerElec.getValue() and atc.transponderPanel.atcSel != 2 and acBusEssShedAtc.clearFlag == 0) { acBusEssShedAtc.active = 1; } else { ECAM_controller.warningReset(acBusEssShed); @@ -1204,6 +1920,7 @@ var messages_priority_2 = func { ECAM_controller.warningReset(acBusEssShedAtc); } + # GEN 1 FAULT if (gen1fault.clearFlag == 0 and warningNodes.Flipflops.gen1Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { gen1fault.active = 1; if (!warningNodes.Flipflops.gen1FaultOnOff.getValue()) { @@ -1226,6 +1943,14 @@ var messages_priority_2 = func { ECAM_controller.warningReset(gen1faultGen3); } + # ESS TR FAULT + if (essTRFault.clearFlag == 0 and systems.ELEC.Fail.essTrFault.getValue() and (phaseVar2 == 6 or phaseVar2 >= 9 or phaseVar2 <= 2)) { + essTRFault.active = 1; + } else { + ECAM_controller.warningReset(essTRFault); + } + + # GEN 2 FAULT if (gen2fault.clearFlag == 0 and warningNodes.Flipflops.gen2Fault.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { gen2fault.active = 1; if (!warningNodes.Flipflops.gen2FaultOnOff.getValue()) { @@ -1270,6 +1995,27 @@ var messages_priority_2 = func { ECAM_controller.warningReset(apuGenfaultGen3); } + # GEN OFF + if (gen1Off.clearFlag == 0 and warningNodes.Logic.gen1Off.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { + gen1Off.active = 1; + } else { + ECAM_controller.warningReset(gen1Off); + } + + if (gen2Off.clearFlag == 0 and warningNodes.Logic.gen2Off.getValue() and (phaseVar2 == 2 or phaseVar2 == 3 or phaseVar2 == 6 or phaseVar2 == 9)) { + gen2Off.active = 1; + } else { + ECAM_controller.warningReset(gen2Off); + } + + # ELEC AC ESS BUS ALTN + if (acEssBusAltn.clearFlag == 0 and warningNodes.Logic.acEssBusAltn.getValue() and (phaseVar2 >= 9 or phaseVar2 <= 2)) { + acEssBusAltn.active = 1; + } else { + ECAM_controller.warningReset(acEssBusAltn); + } + + # L ELEV FAULT if (lElevFault.clearFlag == 0 and warningNodes.Timers.leftElevFail.getValue() and phaseVar2 != 4 and phaseVar2 != 5) { lElevFault.active = 1; if (lElevFaultCare.clearFlag == 0) { @@ -1306,6 +2052,12 @@ var messages_priority_2 = func { ECAM_controller.warningReset(rElevFaultPitch); } + if (fctlSpdBrkStillOut.clearFlag == 0 and warningNodes.Logic.spdBrkOut.getValue() and (phaseVar2 == 6 or phaseVar2 == 7)) { + fctlSpdBrkStillOut.active = 1; + } else { + ECAM_controller.warningReset(fctlSpdBrkStillOut); + } + if (directLaw.clearFlag == 0 and warningNodes.Timers.directLaw.getValue() and phaseVar2 != 4 and phaseVar2 != 5 and phaseVar2 != 7 and phaseVar2 != 8) { directLaw.active = 1; directLawProt.active = 1; @@ -1534,6 +2286,119 @@ var messages_priority_2 = func { ECAM_controller.warningReset(fcuFault2Baro); } + # FUEL + if (wingLoLvl.clearFlag == 0 and warningNodes.Timers.lowLevelBoth.getValue() == 1 and (phaseVar2 <= 2 or phaseVar2 == 6 or phaseVar2 >= 9)) { + wingLoLvl.active = 1; + + if (wingLoLvlManMode.clearFlag == 0 and systems.FUEL.Switches.centerTkMode.getValue() == 0 and systems.FUEL.Quantity.center.getValue() >= 550) { + wingLoLvlManMode.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlManMode); + } + + if (wingLoLvlPumpL1.clearFlag == 0 and !systems.FUEL.Switches.pumpLeft1.getValue()) { + wingLoLvlPumpL1.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlPumpL1); + } + + if (wingLoLvlPumpL2.clearFlag == 0 and !systems.FUEL.Switches.pumpLeft2.getValue()) { + wingLoLvlPumpL2.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlPumpL2); + } + + if (wingLoLvlPumpC1.clearFlag == 0 and !systems.FUEL.Switches.pumpCenter1.getValue()) { + wingLoLvlPumpC1.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlPumpC1); + } + + if (wingLoLvlPumpR1.clearFlag == 0 and !systems.FUEL.Switches.pumpRight1.getValue()) { + wingLoLvlPumpR1.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlPumpR1); + } + + if (wingLoLvlPumpR2.clearFlag == 0 and !systems.FUEL.Switches.pumpRight2.getValue()) { + wingLoLvlPumpR2.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlPumpR2); + } + + if (wingLoLvlPumpC2.clearFlag == 0 and !systems.FUEL.Switches.pumpCenter2.getValue()) { + wingLoLvlPumpC2.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlPumpC2); + } + + if (systems.FUEL.Switches.crossfeed.getValue() == 0) { + if (wingLoLvlLeak.clearFlag == 0) { + wingLoLvlLeak.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlLeak); + } + + if (wingLoLvlXFeed.clearFlag == 0) { + wingLoLvlXFeed.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlXFeed); + } + } else { + ECAM_controller.warningReset(wingLoLvlLeak); + ECAM_controller.warningReset(wingLoLvlXFeed); + } + + if (systems.FUEL.Switches.crossfeed.getValue() == 1) { + if (wingLoLvlGrav.clearFlag == 0) { + wingLoLvlGrav.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlGrav); + } + + if (wingLoLvlXFeedOff.clearFlag == 0) { + wingLoLvlXFeedOff.active = 1; + } else { + ECAM_controller.warningReset(wingLoLvlXFeedOff); + } + } else { + ECAM_controller.warningReset(wingLoLvlGrav); + ECAM_controller.warningReset(wingLoLvlXFeedOff); + } + } else { + ECAM_controller.warningReset(wingLoLvl); + ECAM_controller.warningReset(wingLoLvlManMode); + ECAM_controller.warningReset(wingLoLvlPumpL1); + ECAM_controller.warningReset(wingLoLvlPumpL2); + ECAM_controller.warningReset(wingLoLvlPumpC1); + ECAM_controller.warningReset(wingLoLvlPumpR1); + ECAM_controller.warningReset(wingLoLvlPumpR2); + ECAM_controller.warningReset(wingLoLvlPumpC2); + ECAM_controller.warningReset(wingLoLvlLeak); + ECAM_controller.warningReset(wingLoLvlXFeed); + ECAM_controller.warningReset(wingLoLvlGrav); + ECAM_controller.warningReset(wingLoLvlXFeedOff); + } + + if (ctrPumpsOff.clearFlag == 0 and warningNodes.Timers.centerPumpsOff.getValue() == 1 and (phaseVar2 == 2 or phaseVar2 == 6)) { + ctrPumpsOff.active = 1; + + if (ctrPumpsOffPump1.clearFlag == 0 and !systems.FUEL.Switches.pumpCenter1.getValue()) { + ctrPumpsOffPump1.active = 1; + } else { + ECAM_controller.warningReset(ctrPumpsOffPump1); + } + if (ctrPumpsOffPump2.clearFlag == 0 and !systems.FUEL.Switches.pumpCenter2.getValue()) { + ctrPumpsOffPump2.active = 1; + } else { + ECAM_controller.warningReset(ctrPumpsOffPump2); + } + } else { + ECAM_controller.warningReset(ctrPumpsOff); + ECAM_controller.warningReset(ctrPumpsOffPump1); + ECAM_controller.warningReset(ctrPumpsOffPump2); + } + # APU EMER SHUT DOWN if (apuEmerShutdown.clearFlag == 0 and systems.APUController.APU.signals.autoshutdown and systems.APUController.APU.signals.emer and !getprop("/systems/fire/apu/warning-active") and (phaseVar2 == 6 or phaseVar2 >= 9 or phaseVar2 <= 2)) { apuEmerShutdown.active = 1; @@ -1568,7 +2433,7 @@ var messages_priority_2 = func { warningNodes.Timers.bleed1Fault.setValue(0); } - if (bleed1Fault.clearFlag == 0 and (phaseVar2 == 2 or phaseVar2 == 6 or phaseVar2 == 9) and warningNodes.Timers.bleed1FaultOutput.getValue() == 1 and (!systems.PNEU.Switch.pack1.getBoolValue() or !systems.PNEU.Switch.pack2.getBoolValue() or !(getprop("/ECAM/phases/wing-anti-ice-pulse") and getprop("/controls/ice-protection/wing")))) { # inverse pulse + if (bleed1Fault.clearFlag == 0 and (phaseVar2 == 2 or phaseVar2 == 6 or phaseVar2 == 9) and warningNodes.Timers.bleed1FaultOutput.getValue() == 1 and (!systems.PNEU.Switch.pack1.getBoolValue() or !systems.PNEU.Switch.pack2.getBoolValue() or !(getprop("/ECAM/phases/wing-anti-ice-pulse") and wing_pb.getValue()))) { # inverse pulse bleed1Fault.active = 1; } else { ECAM_controller.warningReset(bleed1Fault); @@ -1605,7 +2470,7 @@ var messages_priority_2 = func { warningNodes.Timers.bleed2Fault.setValue(0); } - if (bleed2Fault.clearFlag == 0 and (phaseVar2 == 2 or phaseVar2 == 6 or phaseVar2 == 9) and warningNodes.Timers.bleed2FaultOutput.getValue() == 1 and (!systems.PNEU.Switch.pack1.getBoolValue() or !systems.PNEU.Switch.pack2.getBoolValue() or !(getprop("/ECAM/phases/wing-anti-ice-pulse") and getprop("/controls/ice-protection/wing")))) { # inverse pulse + if (bleed2Fault.clearFlag == 0 and (phaseVar2 == 2 or phaseVar2 == 6 or phaseVar2 == 9) and warningNodes.Timers.bleed2FaultOutput.getValue() == 1 and (!systems.PNEU.Switch.pack1.getBoolValue() or !systems.PNEU.Switch.pack2.getBoolValue() or !(getprop("/ECAM/phases/wing-anti-ice-pulse") and wing_pb.getValue()))) { # inverse pulse bleed2Fault.active = 1; } else { ECAM_controller.warningReset(bleed2Fault); @@ -1657,32 +2522,29 @@ var messages_priority_2 = func { # Crossbleed if (xBleedFault.clearFlag == 0 and (phaseVar2 <= 2 or phaseVar2 >= 9 or phaseVar2 == 6) and warningNodes.Logic.crossbleedFault.getValue()) { xBleedFault.active = 1; - } else { - ECAM_controller.warningReset(xBleedFault); - } - - if (xBleedFault.active) { - if (systems.PNEU.Switch.xbleed.getValue() == 1) { + + if (xBleedFaultMan.clearFlag == 0 and systems.PNEU.Switch.xbleed.getValue() == 1) { xBleedFaultMan.active = 1; } else { ECAM_controller.warningReset(xBleedFaultMan); } - if (warningNodes.Logic.crossbleedWai.getValue()) { - if (getprop("/controls/ice-protection/wing")) { - xBleedOff.active = 1; - } else { - ECAM_controller.warningReset(xBleedOff); - } - xBleedIcing.active = 1; + if (xBleedFaultWAI.clearFlag == 0 and wing_pb.getValue() and warningNodes.Logic.crossbleedWai.getValue()) { + xBleedFaultWAI.active = 1; } else { - ECAM_controller.warningReset(xBleedOff); - ECAM_controller.warningReset(xBleedIcing); + ECAM_controller.warningReset(xBleedFaultWAI); + } + + if (xBleedFaultICE.clearFlag == 0 and warningNodes.Logic.crossbleedWai.getValue()) { + xBleedFaultICE.active = 1; + } else { + ECAM_controller.warningReset(xBleedFaultICE); } } else { + ECAM_controller.warningReset(xBleedFault); ECAM_controller.warningReset(xBleedFaultMan); - ECAM_controller.warningReset(xBleedOff); - ECAM_controller.warningReset(xBleedIcing); + ECAM_controller.warningReset(xBleedFaultWAI); + ECAM_controller.warningReset(xBleedFaultICE); } if (bleed1Off.clearFlag == 0 and (warningNodes.Timers.bleed1Off60Output.getValue() == 1 or warningNodes.Timers.bleed1Off5Output.getValue() == 1) and FWC.Timer.eng1idleOutput.getBoolValue() and (phaseVar2 == 2 or phaseVar2 == 6)) { @@ -2126,7 +2988,7 @@ var messages_priority_2 = func { } else { ECAM_controller.warningReset(wingIceSysFaultXbld); } - if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and getprop("/controls/ice-protection/wing")) { + if ((warningNodes.Logic.waiLclosed.getValue() or warningNodes.Logic.waiRclosed.getValue()) and wing_pb.getValue()) { wingIceSysFaultOff.active = 1; } else { ECAM_controller.warningReset(wingIceSysFaultOff); @@ -2147,7 +3009,7 @@ var messages_priority_2 = func { if (wingIceOpenGnd.clearFlag == 0 and warningNodes.Logic.waiGndFlight.getValue() and (phaseVar2 <= 2 or phaseVar2 >= 9)) { wingIceOpenGnd.active = 1; - if (pts.Gear.wow[1].getValue() and getprop("/controls/ice-protection/wing")) { + if (pts.Gear.wow[1].getValue() and wing_pb.getValue()) { wingIceOpenGndShut.active = 1; } else { ECAM_controller.warningReset(wingIceOpenGndShut); @@ -2276,7 +3138,7 @@ var messages_config_memo = func { setprop("/ECAM/to-config-normal", 1); } - if (getprop("/ECAM/to-config-test") and (phaseVarMemo == 1 or phaseVarMemo == 2 or phaseVarMemo == 9)) { + if (ecamConfigTest.getValue() and (phaseVarMemo == 1 or phaseVarMemo == 2 or phaseVarMemo == 9)) { setprop("/ECAM/to-config-set", 1); } else { setprop("/ECAM/to-config-set", 0); @@ -2328,7 +3190,7 @@ var messages_config_memo = func { toMemoLine5.colour = "c"; } - if (getprop("/ECAM/to-config-test") and (phaseVarMemo == 2 or phaseVarMemo == 9)) { + if (ecamConfigTest.getValue() and (phaseVarMemo == 2 or phaseVarMemo == 9)) { setprop("/ECAM/to-memo-set", 1); } else { setprop("/ECAM/to-memo-set", 0); @@ -2511,10 +3373,17 @@ var messages_memo = func { outr_tk_fuel_xfrd.active = 0; } - if (pts.Consumables.Fuel.totalFuelLbs.getValue() < 6000 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb - fob_3T.active = 1; + if (pts.Consumables.Fuel.totalFuelLbs.getValue() < 6613 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { # assuming US short ton 2000lb + if (acconfig_weight_kgs.getValue()) { + fob_3T.active = 1; + fob_66L.active = 0; + } else { + fob_3T.active = 0; + fob_66L.active = 1; + } } else { fob_3T.active = 0; + fob_66L.active = 0; } if (getprop("instrumentation/mk-viii/inputs/discretes/momentary-flap-all-override") == 1 and toMemoLine1.active != 1 and ldgMemoLine1.active != 1) { @@ -2544,7 +3413,7 @@ var messages_right_memo = func { ldg_inhibit.active = 0; } - if ((!pts.Gear.wow[1].getValue()) and (systems.ELEC.EmerElec.getValue() or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/cargo-aft-fire") == 1 or getprop("/systems/failures/cargo-fwd-fire") == 1) or (((systems.HYD.Psi.green.getValue() < 1500 and pts.Engines.Engine.state[0].getValue() == 3) and (systems.HYD.Psi.yellow.getValue() < 1500 and pts.Engines.Engine.state[1].getValue() == 3)) or ((systems.HYD.Psi.green.getValue() < 1500 or systems.HYD.Psi.yellow.getValue() < 1500) and pts.Engines.Engine.state[0].getValue() == 3 and pts.Engines.Engine.state[1].getValue() == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) { + if ((!pts.Gear.wow[1].getValue()) and (systems.ELEC.EmerElec.getValue() or getprop("/systems/fire/engine1/warning-active") == 1 or getprop("/systems/fire/engine2/warning-active") == 1 or getprop("/systems/fire/apu/warning-active") == 1 or getprop("/systems/failures/fire/cargo-aft-fire") == 1 or getprop("/systems/failures/fire/cargo-fwd-fire") == 1) or (((systems.HYD.Psi.green.getValue() < 1500 and pts.Engines.Engine.state[0].getValue() == 3) and (systems.HYD.Psi.yellow.getValue() < 1500 and pts.Engines.Engine.state[1].getValue() == 3)) or ((systems.HYD.Psi.green.getValue() < 1500 or systems.HYD.Psi.yellow.getValue() < 1500) and pts.Engines.Engine.state[0].getValue() == 3 and pts.Engines.Engine.state[1].getValue() == 3) and phaseVarMemo3 >= 3 and phaseVarMemo3 <= 8)) { # todo: emer elec land_asap_r.active = 1; } else { @@ -2605,7 +3474,7 @@ var messages_right_memo = func { ptu.active = 0; } - if (getprop("/systems/hydraulic/sources/rat/position") != 0) { + if (systems.HYD.Rat.position.getValue() != 0) { rat.active = 1; } else { rat.active = 0; @@ -2617,7 +3486,7 @@ var messages_right_memo = func { rat.colour = "g"; } - if (getprop("/systems/electrical/relay/emer-glc/contact-pos") == 1 and getprop("/systems/hydraulic/sources/rat/position") != 0 and !pts.Gear.wow[1].getValue()) { + if (systems.ELEC.Source.EmerGen.relayPos.getValue() == 1 and systems.HYD.Rat.position.getValue() != 0 and !pts.Gear.wow[1].getValue()) { emer_gen.active = 1; } else { emer_gen.active = 0; @@ -2694,7 +3563,7 @@ var messages_right_memo = func { eng_aice.active = 0; } - if (getprop("/controls/ice-protection/wing") == 1) { + if (wing_pb.getValue() == 1) { wing_aice.active = 1; } else { wing_aice.active = 0; diff --git a/Nasal/ECAM/ECAM-messages.nas b/Nasal/ECAM/ECAM-messages.nas index 5354529c..a0d2c854 100644 --- a/Nasal/ECAM/ECAM-messages.nas +++ b/Nasal/ECAM/ECAM-messages.nas @@ -10,6 +10,7 @@ # Left E/WD var warnings = std.Vector.new([ + # LEVEL 3 WARN 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, isMainMsg: 1), @@ -47,12 +48,12 @@ var warnings = std.Vector.new([ var eng1FireFlAgent1Timer = warning.new(msg: " -AGENT 1 AFT 10 S.DISCH", colour: "w"), var eng1FireFlAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"), var eng1FireFlATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"), - var eng1FireFl30Sec = warning.new(msg: " •IF FIRE AFTER 30 S:", colour: "w", isMainMsg: 1), + var eng1FireFl30Sec = warning.new(msg: " •IF FIRE AFTER 30 S:", colour: "w"), var eng1FireFlAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"), # ENG 1 FIRE (ground) var eng1FireGnlever = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"), - var eng1FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w", isMainMsg: 1), + var eng1FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w"), var eng1FireGnparkbrk = warning.new(msg: " -PARKING BRK.........ON", colour: "c"), var eng1FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"), var eng1FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"), @@ -70,12 +71,12 @@ var warnings = std.Vector.new([ var eng2FireFlAgent1Timer = warning.new(msg: " -AGENT 1 AFT 10 S.DISCH", colour: "w"), var eng2FireFlAgent1 = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"), var eng2FireFlATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"), - var eng2FireFl30Sec = warning.new(msg: " •IF FIRE AFTER 30 S:", colour: "w", isMainMsg: 1), + var eng2FireFl30Sec = warning.new(msg: " •IF FIRE AFTER 30 S:", colour: "w"), var eng2FireFlAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"), # ENG 2 FIRE (ground) var eng2FireGnlever = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"), - var eng2FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w", isMainMsg: 1), + var eng2FireGnstopped = warning.new(msg: " •WHEN A/C IS STOPPED:", colour: "w"), var eng2FireGnparkbrk = warning.new(msg: " -PARKING BRK.........ON", colour: "c"), var eng2FireGnATC = warning.new(msg: " -ATC.............NOTIFY", colour: "c"), var eng2FireGncrew = warning.new(msg: " -CABIN CREW.......ALERT", colour: "c"), @@ -85,6 +86,20 @@ var warnings = std.Vector.new([ var eng2FireGnAgent2 = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"), var eng2FireGnEvac = warning.new(msg: " -EMER EVAC PROC...APPLY", colour: "c"), + # ADR 1 + 2 + 3 FAULT + var ADR123Fault = warning.new(msg: "NAV ADR1+2+3 FAULT ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var ADR123FaultAP = warning.new(msg: " -AP+FD..............OFF", colour: "c"), + var ADR123FaultATHR = warning.new(msg: " -ATHR...............OFF", colour: "c"), + var ADR123FaultPRBW = warning.new(msg: " -PROBE/WINDOW HEAT...ON", colour: "c"), + var ADR123FaultBUSSC = warning.new(msg: " -CAPT BKUP SPD/ALT...ON", colour: "c"), + var ADR123FaultBUSSF = warning.new(msg: " -FO BKUP SPD/ALT.....ON", colour: "c"), + var ADR123FaultADRPB = warning.new(msg: " -ADR 1+2+3 P/B......OFF", colour: "c"), + var ADR123FaultSPD = warning.new(msg: " -SPD......FLY THE GREEN", colour: "c"), + var ADR123FaultAOADISAG = warning.new(msg: " •IF AOA DISAGREE: ", colour: "w"), + var ADR123FaultBUSSINOP = warning.new(msg: " BKUP SPD/ALT.DO NOT USE", colour: "c"), + var ADR123FaultSTBY = warning.new(msg: " -STBY INST.MAY BE UNREL", colour: "c"), + var ADR123FaultPROC = warning.new(msg: " -ALL ADR OFF PROC.APPLY", colour: "c"), + # APU FIRE var apuFire = warning.new(msg: "APU FIRE ", colour: "r", aural: 0, light: 0, isMainMsg: 1, sdPage: "apu"), var apuFirePB = warning.new(msg: " -APU FIRE P/B......PUSH", colour: "c"), @@ -105,6 +120,37 @@ var warnings = std.Vector.new([ var rud_trim_config_1 = warning.new(msg: " NOT IN T.O. RANGE", colour: "r", aural: 0, light: 0), var park_brk_config = warning.new(msg: "CONFIG PARK BRK ON", colour: "r", aural: 0, light: 0), + # EXCESS CAB ALT + var excessCabAlt = warning.new(msg: "CAB PR EXCESS CAB ALT", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var excessCabAltMask = warning.new(msg: " -CREW OXY MASKS.....USE", colour: "c"), + var excessCabAltSigns = warning.new(msg: " -SIGNS...............ON", colour: "c"), + var excessCabAltEmerD = warning.new(msg: " •EMER DESCENT:", colour: "w"), + var excessCabAltDES = warning.new(msg: " -DESCENT.......INITIATE", colour: "c"), + var excessCabAltTHRLVR = warning.new(msg: " -THR LEVERS........IDLE", colour: "c"), + var excessCabAltSPDBRK = warning.new(msg: " -SPD BRK...........FULL", colour: "c"), + var excessCabAltSPD = warning.new(msg: " SPD.....MAX/APPROPRIATE", colour: "c"), + var excessCabAltENG = warning.new(msg: " -ENG MODE...........IGN", colour: "c"), + var excessCabAltCAB = warning.new(msg: " -CABIN CREW......ADVISE", colour: "c"), + var excessCabAltPA = warning.new(msg: " -EMER DES (PA).ANNOUNCE", colour: "c"), + var excessCabAltXPDR = warning.new(msg: " -XPDR 7700.....CONSIDER", colour: "c"), + var excessCabAltMEA = warning.new(msg: " MAX FL.....100/MEA-MORA", colour: "c"), + var excessCabAltCabAlt = warning.new(msg: " •IF CAB ALT>14000 FT:", colour: "w"), + var excessCabAltMasks = warning.new(msg: " -PAX OXY MASKS...MAN ON", colour: "c"), + + # ENG 1 OIL LO PR + var eng1OilLoPr = warning.new(msg: "ENG 1 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var eng1OilLoPrIf = warning.new(msg: " •IF OIL PR < 13 PSI :", colour: "w"), + var eng1OilLoPrIf2 = warning.new(msg: " •IF OIL PR < 60 PSI :", colour: "w"), + var eng1OilLoPrThrot = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"), + var eng1OilLoPrMaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"), + + # ENG 2 OIL LO PR + var eng2OilLoPr = warning.new(msg: "ENG 2 OIL LO PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var eng2OilLoPrIf = warning.new(msg: " •IF OIL PR < 13 PSI :", colour: "w"), + var eng2OilLoPrIf2 = warning.new(msg: " •IF OIL PR < 60 PSI :", colour: "w"), + var eng2OilLoPrThrot = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"), + var eng2OilLoPrMaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"), + # FCTL L+R ELEV FAULT var lrElevFault = warning.new(msg: "F/CTL L+R ELEV FAULT", colour: "r", aural: 0, light: 0, isMainMsg: 1), var lrElevFaultSpeed = warning.new(msg: " MAX SPEED.......320/.77", colour: "c"), @@ -116,8 +162,8 @@ var warnings = std.Vector.new([ var gearNotDownLocked = warning.new(msg: "L/G GEAR NOT DOWNLOCKED", colour: "r", aural: 0, light: 0, isMainMsg: 1), var gearNotDownLockedRec = warning.new(msg: " -L/G LEVER......RECYCLE", colour: "c"), - var gearNotDownLockedWork = warning.new(msg: " •IF UNSUCCESSFUL:", colour: "c"), - var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "c"), + var gearNotDownLockedWork = warning.new(msg: " •IF UNSUCCESSFUL:", colour: "w"), + var gearNotDownLocked120 = warning.new(msg: " AFTER 120S:", colour: "w"), var gearNotDownLockedGrav = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"), # Autopilot off involuntary @@ -125,18 +171,34 @@ var warnings = std.Vector.new([ # Cargo smoke var cargoSmokeFwd = warning.new(msg: "SMOKE FWD CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var cargoSmokeFwdFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"), + var cargoSmokeFwdGrdClsd = warning.new(msg: " •IF FWD CRG CLSD:", colour: "w"), var cargoSmokeFwdAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), + var cargoSmokeFwdGrd = warning.new(msg: " •WHEN ON GROUND", colour: "w"), + var cargoSmokeFwdDoors = warning.new(msg: " BEFORE OPEN CRG DOORS:", colour: "w"), + var cargoSmokeFwdDisemb = warning.new(msg: "-PAX..........DISEMBARK", colour: "c"), var cargoSmokeAft = warning.new(msg: "SMOKE AFT CARGO SMOKE", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var cargoSmokeAftFans = warning.new(msg: " -CAB FANS...........OFF", colour: "c"), + var cargoSmokeAftGrdClsd = warning.new(msg: " •IF AFT CRG CLSD:", colour: "w"), var cargoSmokeAftAgent = warning.new(msg: " -AGENT............DISCH", colour: "c"), + var cargoSmokeAftGrd = warning.new(msg: " •WHEN ON GROUND", colour: "w"), + var cargoSmokeAftDoors = warning.new(msg: " BEFORE OPEN CRG DOORS:", colour: "w"), + var cargoSmokeAftDisemb = warning.new(msg: "-PAX..........DISEMBARK", colour: "c"), + + # Lavatory SMOKE + var lavatorySmoke = warning.new(msg: "SMOKE LAVATORY SMOKE ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var lavatorySmokeComm = warning.new(msg: "-CKPT/CAB COM.ESTABLISH ", colour: "c"), + + # EXCES RESID PR + var excessResidPress = warning.new(msg: "CAB PR EXCES RESIDUAL PR ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var excessResidPressPack1 = warning.new(msg: "-PACK 1.............OFF", colour: "c"), + var excessResidPressPack2 = warning.new(msg: "-PACK 2.............OFF", colour: "c"), + var excessResidPressCabCr = warning.new(msg: "-CABIN CREW.......ALERT", colour: "c"), # ESS Bus on Bat + # NEW EMER CONFIG var essBusOnBat = warning.new(msg: "ELEC ESS BUSES ON BAT", colour: "r", aural: 0, light: 0, isMainMsg: 1), - var essBusOnBatLGUplock = warning.new(msg: " •WHEN L/G UPLOCKED :", colour: "w"), - var essBusOnBatManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"), - var essBusOnBatRetract = warning.new(msg: " •IF L/G RETRACT FAULT:", colour: "w"), - var essBusOnBatMinSpeed = warning.new(msg: " MIN RAT SPD......180 KT", colour: "c"), - var essBusOnBatLGCB = warning.new(msg: " -LGCIU1 C/B (C09)..PULL", colour: "c"), - var essBusOnBatManOn2 = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"), + var essBusOnBatMinSpeed = warning.new(msg: " MIN RAT SPD......140 KT", colour: "c"), # Emer Config var emerconfig = warning.new(msg: "ELEC EMER CONFIG", colour: "r", aural: 0, light: 0, isMainMsg: 1), @@ -148,13 +210,14 @@ var warnings = std.Vector.new([ var emerconfigManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"), var emerconfigEngMode = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"), var emerconfigRadio = warning.new(msg: " -VHF1/ATC1..........USE", colour: "c"), - var emerconfigIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), var emerconfigFuelG = warning.new(msg: " FUEL GRVTY FEED", colour: "c"), var emerconfigFuelG2 = warning.new(msg: " PROC:GRVTY FUEL FEEDING", colour: "c"), var emerconfigFAC = warning.new(msg: " -FAC 1......OFF THEN ON", colour: "c"), var emerconfigBusTie2 = warning.new(msg: " -BUS TIE...........AUTO", colour: "c"), var emerconfigAPU = warning.new(msg: " -APU (IF AVAIL)...START", colour: "c"), var emerconfigVent = warning.new(msg: " -BLOWER + EXTRACT..OVRD", colour: "c"), + var emerconfigFuelIN = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"), + var emerconfigFMSPRD = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), # B + Y LO PR var hydBYloPr = warning.new(msg: "HYD B+Y SYS LO PR", colour: "r", aural: 0, light: 0, isMainMsg: 1), @@ -190,15 +253,140 @@ var warnings = std.Vector.new([ var hydGYloPrFuelCnsmpt = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"), var hydGYloPrFmsPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), + # AIR BLEED LEAK + var airBleedLeak = warning.new(msg: "AIR BLEED LEAK ", colour: "r", aural: 0, light: 0, isMainMsg: 1), + var airBleedLeakShut = warning.new(msg: " -X BLEED..........SHUT", colour: "c"), + + # LEVEL 2 WARN + # THR LEVERS NOT SET + var engThrustLvrNotSet = warning.new(msg: "ENG THR LEVERS NOT SET ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var engThrustLvrNotSetMCT = warning.new(msg: " -THR LEVERS ....MCT/FLX", colour: "c"), + var engThrustLvrNotSetTO = warning.new(msg: " -THR LEVERS.......TO/GA", colour: "c"), + + # REV SET + var engRevSet = warning.new(msg: "ENG REV SET ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var engRevSetLevers = warning.new(msg: " -THR LEVER......FWD THR", colour: "c"), + + # ENG 1 FAIL + var eng1Fail = warning.new(msg: "ENG 1 FAIL ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var thrustMalfunction1 = warning.new(msg: " THRUST MALFUNCTION ", colour: "a"), + var shaftFailure1 = warning.new(msg: " SHAFT FAILURE ", colour: "a"), + var eng1FailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"), + var eng1FailThrLvrIdle = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"), + var eng1FailNoRelight = warning.new(msg: "•IF NO RELIGHT AFTER 30S", colour: "w"), + var eng1FailMasterOff = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"), + var eng1FailDamage = warning.new(msg: " IF DAMAGE : ", colour: "w"), + var eng1FailFirePB = warning.new(msg: " -ENG 1 FIRE P/B....PUSH", colour: "c"), + var eng1FailAgent1DischT = warning.new(msg: " -AGENT1 AFTER 10S.DISCH", colour: "c"), + var eng1FailAgent1Disch = warning.new(msg: " -AGENT 1..........DISCH", colour: "c"), + var eng1FailNoDamage = warning.new(msg: " IF NO DAMAGE : ", colour: "w"), + var eng1FailRelight = warning.new(msg: " -ENG 1 RELIGHT.CONSIDER", colour: "c"), + + # ENG 1 OIL HI TEMP + var eng1OilHiTemp = warning.new(msg: "ENG 1 OIL HI TEMP ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var eng1OilHiTempIdle = warning.new(msg: " -THR LEVER 1.......IDLE", colour: "c"), + var eng1OilHiTempSuccess = warning.new(msg: " •IF UNSUCCESSFUL: ", colour: "w"), + var eng1OilHiTempMaster = warning.new(msg: " -ENG MASTER 1.......OFF", colour: "c"), + + # ENG 1 SHUT DOWN + var eng1ShutDown = warning.new(msg: "ENG 1 SHUT DOWN ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var eng1ShutDownPack = warning.new(msg: " -PACK 1.............OFF", colour: "c"), + var eng1ShutDownXBleed = warning.new(msg: " -X BLEED...........OPEN", colour: "c"), + var eng1ShutDownModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"), + var eng1ShutDownFuelLeak = warning.new(msg: " •IF NO FUEL LEAK :", colour: "w"), + var eng1ShutDownImbalance = warning.new(msg: " -IMBALANCE......MONITOR", colour: "c"), + var eng1ShutDownTCAS = warning.new(msg: " -TCAS MODE SEL.......TA", colour: "c"), + var eng1ShutDownBuffet = warning.new(msg: " •IF BUFFET : ", colour: "w"), + var eng1ShutDownSpeed = warning.new(msg: " MAX SPEED...........240", colour: "c"), + var eng1ShutDownXBleedS = warning.new(msg: " -X BLEED...........SHUT", colour: "c"), + var eng1ShutDownWingAI = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"), + var eng1ShutDownIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), + + # ENG 2 FAIL + var eng2Fail = warning.new(msg: "ENG 2 FAIL ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var thrustMalfunction2 = warning.new(msg: " THRUST MALFUNCTION ", colour: "a"), + var shaftFailure2 = warning.new(msg: " SHAFT FAILURE ", colour: "a"), + var eng2FailModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"), + var eng2FailThrLvrIdle = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"), + var eng2FailNoRelight = warning.new(msg: "•IF NO RELIGHT AFTER 30S", colour: "w"), + var eng2FailMasterOff = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"), + var eng2FailDamage = warning.new(msg: " IF DAMAGE : ", colour: "w"), + var eng2FailFirePB = warning.new(msg: " -ENG 2 FIRE P/B....PUSH", colour: "c"), + var eng2FailAgent1DischT = warning.new(msg: " -AGENT2 AFTER 10S.DISCH", colour: "c"), + var eng2FailAgent1Disch = warning.new(msg: " -AGENT 2..........DISCH", colour: "c"), + var eng2FailNoDamage = warning.new(msg: " IF NO DAMAGE : ", colour: "w"), + var eng2FailRelight = warning.new(msg: " -ENG 2 RELIGHT.CONSIDER", colour: "c"), + + # ENG 2 OIL HI TEMP + var eng2OilHiTemp = warning.new(msg: "ENG 2 OIL HI TEMP ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var eng2OilHiTempIdle = warning.new(msg: " -THR LEVER 2.......IDLE", colour: "c"), + var eng2OilHiTempSuccess = warning.new(msg: " •IF UNSUCCESSFUL: ", colour: "w"), + var eng2OilHiTempMaster = warning.new(msg: " -ENG MASTER 2.......OFF", colour: "c"), + + # ENG 2 SHUT DOWN + var eng2ShutDown = warning.new(msg: "ENG 2 SHUT DOWN ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var eng2ShutDownPack1 = warning.new(msg: " -PACK 1.............OFF", colour: "c"), + var eng2ShutDownPack = warning.new(msg: " -PACK 2.............OFF", colour: "c"), + var eng2ShutDownXBleed = warning.new(msg: " -X BLEED...........OPEN", colour: "c"), + var eng2ShutDownModeSel = warning.new(msg: " -ENG MODE SEL.......IGN", colour: "c"), + var eng2ShutDownFuelLeak = warning.new(msg: " •IF NO FUEL LEAK :", colour: "w"), + var eng2ShutDownImbalance = warning.new(msg: " -IMBALANCE......MONITOR", colour: "c"), + var eng2ShutDownTCAS = warning.new(msg: " -TCAS MODE SEL.......TA", colour: "c"), + var eng2ShutDownBuffet = warning.new(msg: " •IF BUFFET : ", colour: "w"), + var eng2ShutDownSpeed = warning.new(msg: " MAX SPEED...........240", colour: "c"), + var eng2ShutDownXBleedS = warning.new(msg: " -X BLEED...........SHUT", colour: "c"), + var eng2ShutDownWingAI = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"), + var eng2ShutDownIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), + + # SAT ABOVE FLEX TEMP + var satAbvFlexTemp = warning.new(msg: "ENG SAT ABOVE FLEX TEMP", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var satAbvFlexTempCheck = warning.new(msg: " -T.O DATA.........CHECK", colour: "c"), + + # B RSVR LO LVL + var hydBSysLoLvl = warning.new(msg: "HYD B RSVR LO LVL ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var hydBSysLoLvlPump = warning.new(msg: " -BLUE ELEC PUMP.....OFF ", colour: "c"), + + # G RSVR LO LVL + var hydGSysLoLvl = warning.new(msg: "HYD G RSVR LO LVL ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var hydGSysLoLvlPtu = warning.new(msg: " -PTU................OFF ", colour: "c"), + var hydGSysLoLvlPump = warning.new(msg: " -GREEN ENG 1 PUMP...OFF ", colour: "c"), + + # Y RSVR LO LVL + var hydYSysLoLvl = warning.new(msg: "HYD Y RSVR LO LVL ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var hydYSysLoLvlPtu = warning.new(msg: " -PTU................OFF ", colour: "c"), + var hydYSysLoLvlPump = warning.new(msg: " -YELLOW ENG 2 PUMP..OFF ", colour: "c"), + var hydYSysLoLvlElec = warning.new(msg: " -YELLOW ELEC PUMP...OFF ", colour: "c"), + + # B SYS LO PR + var hydBSysLoPr = warning.new(msg: "HYD B SYS LO PR ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var hydBSysLoPrFuel = warning.new(msg: " FUEL CONSUMPT INCRSD ", colour: "c"), + var hydBSysLoPrFmsPred = warning.new(msg: " FMS PRED UNRELIABLE ", colour: "c"), + + # G SYS LO PR + var hydGSysLoPr = warning.new(msg: "HYD G SYS LO PR ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var hydGSysLoPrFuel = warning.new(msg: " FUEL CONSUMPT INCRSD ", colour: "c"), + var hydGSysLoPrFmsPred = warning.new(msg: " FMS PRED UNRELIABLE ", colour: "c"), + var hydGSysLoPrEngPump = warning.new(msg: " G ENG 1 PUMP LO PR ", colour: "a"), + + # Y SYS LO PR + var hydYSysLoPr = warning.new(msg: "HYD Y SYS LO PR ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var hydYSysLoPrAccu = warning.new(msg: " BRK Y ACCU PR MONITOR ", colour: "c"), + var hydYSysLoPrFuel = warning.new(msg: " FUEL CONSUMPT INCRSD ", colour: "c"), + var hydYSysLoPrFmsPred = warning.new(msg: " FMS PRED UNRELIABLE ", colour: "c"), + var hydYSysLoPrEngPump = warning.new(msg: " Y ENG 2 PUMP LO PR ", colour: "a"), + # DC EMER CONFIG var dcEmerconfig = warning.new(msg: "ELEC DC EMER CONFIG", colour: "a", aural: 1, light: 1, isMainMsg: 1), var dcEmerconfigManOn = warning.new(msg: " -EMER ELEC PWR...MAN ON", colour: "c"), + var dcEmerconfigFuel = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"), # DC BUS 1 OR 2 FAULT var dcBus12Fault = warning.new(msg: "ELEC DC BUS 1+2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var dcBus12FaultBlower = warning.new(msg: " -BLOWER............OVRD", colour: "c"), var dcBus12FaultExtract = warning.new(msg: " -EXTRACT...........OVRD", colour: "c"), var dcBus12FaultBaroRef = warning.new(msg: " -BARO REF.........CHECK", colour: "c"), + var dcBus12FaultFuel = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"), + var dcBus12FaultPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), var dcBus12FaultIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), var dcBus12FaultBrking = warning.new(msg: " MAX BRK........1000 PSI", colour: "c"), @@ -216,21 +404,30 @@ var warnings = std.Vector.new([ var DcEssBusFaultRadio = warning.new(msg: " -VHF 2 OR 3.........USE", colour: "c"), var DcEssBusFaultRadio2 = warning.new(msg: " -AUDIO SWTG......SELECT", colour: "c"), var DcEssBusFaultBaro = warning.new(msg: " -BARO REF.........CHECK", colour: "c"), - var DcEssBusFaultGPWS = warning.new(msg: " -GPWS...............OFF", colour: "c"), + var DcEssBusFaultGear = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"), + var DcEssBusFaultGPWS = warning.new(msg: " -GPWS SYS...........OFF", colour: "c"), + var DcEssBusFaultFuel = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"), + var DcEssBusFaultPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), + var DcEssBusFaultIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), # AC BUS 2 FAULT var AcBus2Fault = warning.new(msg: "ELEC AC BUS 2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var AcBus2FaultExtract = warning.new(msg: " -EXTRACT...........OVRD", colour: "c"), + var AcBus2FaultAtc = warning.new(msg: " -ATC..............SYS 1", colour: "c"), # DC BUS 1 FAULT var dcBus1Fault = warning.new(msg: "ELEC DC BUS 1 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var dcBus1FaultBlower = warning.new(msg: " -BLOWER............OVRD", colour: "c"), var dcBus1FaultExtract = warning.new(msg: " -EXTRACT...........OVRD", colour: "c"), + var dcBus1FaultIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), # DC BUS 2 FAULT var dcBus2Fault = warning.new(msg: "ELEC DC BUS 2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var dcBus2FaultAirData = warning.new(msg: " -AIR DATA SWTG......F/O", colour: "c"), var dcBus2FaultBaro = warning.new(msg: " -BARO REF.........CHECK", colour: "c"), + var dcBus2FaultGear = warning.new(msg: " -L/G.........GRVTY EXTN", colour: "c"), + var dcBus2FaultFuel = warning.new(msg: " FUEL CONSUMPT INCRSD", colour: "c"), + var dcBus2FaultPredict = warning.new(msg: " FMS PRED UNRELIABLE", colour: "c"), # DC BAT BUS FAULT var dcBusBatFault = warning.new(msg: "ELEC DC BAT BUS FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), @@ -244,23 +441,39 @@ var warnings = std.Vector.new([ var acBusEssShed = warning.new(msg: "ELEC AC ESS BUS SHED", colour: "a", aural: 1, light: 1, isMainMsg: 1), var acBusEssShedAtc = warning.new(msg: " -ATC..............SYS 2", colour: "c"), + # IDG 1 DISCONNECTED + var idg1Disc = warning.new(msg: "ELEC IDG 1 DISCONNECTED", colour: "a", aural: 1, light: 1, isMainMsg: 1), + + # IDG 2 DISCONNECTED + var idg2Disc = warning.new(msg: "ELEC IDG 2 DISCONNECTED", colour: "a", aural: 1, light: 1, isMainMsg: 1), + # GEN 1 FAULT var gen1fault = warning.new(msg: "ELEC GEN 1 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), - var gen1faultGen = warning.new(msg: "-GEN 1......OFF THEN ON", colour: "c"), + var gen1faultGen = warning.new(msg: " -GEN 1......OFF THEN ON", colour: "c"), var gen1faultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"), - var gen1faultGen3 = warning.new(msg: "-GEN 1..............OFF", colour: "c"), + var gen1faultGen3 = warning.new(msg: " -GEN 1..............OFF", colour: "c"), + + # ESS TR FAULT + var essTRFault = warning.new(msg: "ELEC ESS TR FAULT ", colour: "a", aural: 1, light: 1, isMainMsg: 1), # GEN 2 FAULT var gen2fault = warning.new(msg: "ELEC GEN 2 FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), - var gen2faultGen = warning.new(msg: "-GEN 2......OFF THEN ON", colour: "c"), + var gen2faultGen = warning.new(msg: " -GEN 2......OFF THEN ON", colour: "c"), var gen2faultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"), - var gen2faultGen3 = warning.new(msg: "-GEN 2..............OFF", colour: "c"), + var gen2faultGen3 = warning.new(msg: " -GEN 2..............OFF", colour: "c"), # APU GEN FAULT var apuGenfault = warning.new(msg: "ELEC APU GEN FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), - var apuGenfaultGen = warning.new(msg: "-APU GEN....OFF THEN ON", colour: "c"), + var apuGenfaultGen = warning.new(msg: " -APU GEN....OFF THEN ON", colour: "c"), var apuGenfaultGen2 = warning.new(msg: " •IF UNSUCCESSFUL :", colour: "w"), - var apuGenfaultGen3 = warning.new(msg: "-APU GEN............OFF", colour: "c"), + var apuGenfaultGen3 = warning.new(msg: " -APU GEN............OFF", colour: "c"), + + # GEN OFF + var gen1Off = warning.new(msg: "ELEC GEN 1 OFF ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var gen2Off = warning.new(msg: "ELEC GEN 2 OFF ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + + # APU GEN FAULT + var acEssBusAltn = warning.new(msg: "ELEC AC ESS BUS ALTN", colour: "a", aural: 1, light: 1, isMainMsg: 1), # L ELEV FAULT var lElevFault = warning.new(msg: "F/CTL L ELEV FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), @@ -272,6 +485,9 @@ var warnings = std.Vector.new([ var rElevFaultCare = warning.new(msg: " MANEUVER WITH CARE", colour: "c"), var rElevFaultPitch = warning.new(msg: " FOR GA:MAX PITCH 15 DEG", colour: "c"), + # F/CTL SPD BRK STILL OUT + var fctlSpdBrkStillOut = warning.new(msg: "F/CTL SPD BRK STILL OUT ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + # DIRECT LAW var directLaw = warning.new(msg: "F/CTL DIRECT LAW", colour: "a", aural: 1, light: 1, isMainMsg: 1), var directLawProt = warning.new(msg: " (PROT LOST)", colour: "a"), @@ -342,6 +558,24 @@ var warnings = std.Vector.new([ var fcuFault2 = warning.new(msg: "AUTO FLT FCU 2 FAULT", colour: "a", isMainMsg: 1), var fcuFault2Baro = warning.new(msg: " -BARO REF.......X CHECK", colour: "c"), + # FUEL + var wingLoLvl = warning.new(msg: "FUEL L+R WING TK LO LVL", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var wingLoLvlManMode = warning.new(msg: " -FUEL MODE SEL......MAN", colour: "c"), + var wingLoLvlPumpL1 = warning.new(msg: " -L TK PUMP 1.........ON", colour: "c"), + var wingLoLvlPumpL2 = warning.new(msg: " -L TK PUMP 2.........ON", colour: "c"), + var wingLoLvlPumpC1 = warning.new(msg: " -CTR TK PUMP 1.......ON", colour: "c"), + var wingLoLvlPumpR1 = warning.new(msg: " -R TK PUMP 1.........ON", colour: "c"), + var wingLoLvlPumpR2 = warning.new(msg: " -R TK PUMP 2.........ON", colour: "c"), + var wingLoLvlPumpC2 = warning.new(msg: " -CTR TK PUMP 2.......ON", colour: "c"), + var wingLoLvlLeak = warning.new(msg: " •IF NO FUEL LEAK: ", colour: "w"), + var wingLoLvlXFeed = warning.new(msg: " -FUEL X FEED.........ON", colour: "c"), + var wingLoLvlGrav = warning.new(msg: " •IF GRVTY FEED: ", colour: "w"), + var wingLoLvlXFeedOff = warning.new(msg: " -FUEL X FEED........OFF", colour: "c"), + + var ctrPumpsOff = warning.new(msg: "FUEL CTR TK PUMPS OFF ", colour: "a", aural: 1, light: 1, isMainMsg: 1), + var ctrPumpsOffPump1 = warning.new(msg: " -CTR TK PUMP 1.......ON", colour: "c"), + var ctrPumpsOffPump2 = warning.new(msg: " -CTR TK PUMP 2.......ON", colour: "c"), + # APU shutdown var apuEmerShutdown = warning.new(msg: "APU EMER SHUT DOWN", colour: "a", aural: 1, light: 1, isMainMsg: 1), var apuEmerShutdownMast = warning.new(msg: " -MASTER SW..........OFF", colour: "c"), @@ -362,8 +596,8 @@ var warnings = std.Vector.new([ var hpValve2Fault = warning.new(msg: "AIR ENG 2 HP VALVE FAULT", colour: "a"), var xBleedFault = warning.new(msg: "AIR X BLEED FAULT", colour: "a", aural: 1, light: 1, isMainMsg: 1), var xBleedFaultMan = warning.new(msg: " -X BLEED........MAN CTL", colour: "c"), - var xBleedOff = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"), - var xBleedIcing = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), + var xBleedFaultWAI = warning.new(msg: " -WING ANTI ICE......OFF", colour: "c"), + var xBleedFaultICE = warning.new(msg: " AVOID ICING CONDITIONS", colour: "c"), var bleed1Off = warning.new(msg: "AIR BLEED 1 OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1), var bleed2Off = warning.new(msg: "AIR BLEED 2 OFF", colour: "a", aural: 1, light: 1, isMainMsg: 1), var engBleedLowTemp = warning.new(msg: "AIR ENG 1+2 BLEED LO TEMP", colour: "a", aural: 1, light: 1, isMainMsg: 1), @@ -525,9 +759,11 @@ var leftmemos = std.Vector.new([ var strobe_lt_off = warning.new(msg: "STROBE LT OFF" ), var outr_tk_fuel_xfrd = warning.new(msg: "OUTR TK FUEL XFRD" ), var fob_3T = warning.new(msg: "FOB BELOW 3T" ), + var fob_66L = warning.new(msg: "FOB BELOW 6600LBS" ), var gpws_flap_mode_off = warning.new(msg: "GPWS FLAP MODE OFF" ), var atc_datalink_stby = warning.new(msg: "ATC DATALINK STBY" ), # Not yet implemented var company_datalink_stby = warning.new(msg: "COMPANY DATALINK STBY"), # Not yet implemented + var acars_stby = warning.new(msg: "ACARS STBY" ), # Not yet implemented ]); # Right E/WD diff --git a/Nasal/FMGC/FCU.nas b/Nasal/FMGC/FCU.nas index 8a2a6a78..2ca20a91 100644 --- a/Nasal/FMGC/FCU.nas +++ b/Nasal/FMGC/FCU.nas @@ -66,7 +66,7 @@ var FCUController = { me.FCU2 = FCU.new(systems.ELEC.Bus.dc2); me._init = 1; }, - loop: func() { + loop: func(notification) { if (me._init == 0) { return; } # Update FCU Power @@ -82,11 +82,11 @@ var FCUController = { } foreach (var update_item; me.update_items) { - update_item.update(nil); + 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) + props.UpdateManager.FromPropertyHashList(["/it-autoflight/output/fd1","/it-autoflight/output/fd2", "/it-autoflight/output/ap1", "/it-autoflight/output/ap2"], nil, func(notification) { updateActiveFMGC(); } diff --git a/Nasal/FMGC/FMGC.nas b/Nasal/FMGC/FMGC.nas index 8b36cd6b..75dba334 100644 --- a/Nasal/FMGC/FMGC.nas +++ b/Nasal/FMGC/FMGC.nas @@ -248,7 +248,7 @@ var postInit = func() { var FMGCNodes = { costIndex: props.globals.initNode("/FMGC/internal/cost-index", 0, "DOUBLE"), flexSet: props.globals.initNode("/FMGC/internal/flex-set", 0, "BOOL"), - flexTemp: props.globals.initNode("/FMGC/internal/flex", 0, "INT"), + flexTemp: props.globals.initNode("/FMGC/internal/flex", 45, "INT"), mngSpdAlt: props.globals.getNode("/FMGC/internal/mng-alt-spd"), mngMachAlt: props.globals.getNode("/FMGC/internal/mng-alt-mach"), toFromSet: props.globals.initNode("/FMGC/internal/tofrom-set", 0, "BOOL"), @@ -646,9 +646,15 @@ var masterFMGC = maketimer(0.2, func { } } - if (FMGCInternal.phase == 4 and getprop("/FMGC/internal/decel")) { - FMGCInternal.phase = 5; - } + if (FMGCInternal.phase == 4) { + if (getprop("/FMGC/internal/decel")) { + FMGCInternal.phase = 5; + } + else if (altSel == (FMGCInternal.crzFl * 100)) { # back to CRZ state + FMGCInternal.phase = 3; + systems.PNEU.pressMode.setValue("CR"); + } + } if (flightPlanController.num[2].getValue() > 0 and getprop("/FMGC/flightplan[2]/active") == 1 and flightPlanController.arrivalDist <= 15 and (modelat == "NAV" or modelat == "LOC" or modelat == "LOC*") and pts.Position.gearAglFt.getValue() < 9500) { #todo decel pseudo waypoint setprop("/FMGC/internal/decel", 1); @@ -971,7 +977,7 @@ var reset_FMGC = func { mcdu.MCDU_reset(0); mcdu.MCDU_reset(1); mcdu.ReceivedMessagesDatabase.clearDatabase(); - mcdu.FlightLogDatabase.clearDatabase(); + mcdu.FlightLogDatabase.reset(); # track reset events without loosing recorded data Input.fd1.setValue(fd1); Input.fd2.setValue(fd2); diff --git a/Nasal/FMGC/SimbriefParser.nas b/Nasal/FMGC/SimbriefParser.nas index 1dc01602..9c4b7d21 100644 --- a/Nasal/FMGC/SimbriefParser.nas +++ b/Nasal/FMGC/SimbriefParser.nas @@ -1,6 +1,6 @@ # A3XX Simbrief Parser # Copyright (c) 2020 Jonathan Redpath (legoboyvdlp) -# enhanceded 12/2020 - parse TOD & TOC psedo waypoints, set computer speeds on fix wps, fake coRoute name +# enhanced 12/2020 - parse TOD & TOC psedo waypoints, set computer speeds on fix wps, fake coRoute name var LBS2KGS = 0.4535924; @@ -14,7 +14,7 @@ var SimbriefParser = { me.inhibit = 1; var stamp = systime(); http.save("https://www.simbrief.com/api/xml.fetcher.php?username=" ~ username, getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml") - .fail(func me.failure(i)) + .fail(func { me.failure(i) }) .done(func { var errs = []; call(me.read, [(getprop('/sim/fg-home') ~ "/Export/A320-family-simbrief.xml"),i], SimbriefParser, {}, errs); @@ -49,6 +49,33 @@ var SimbriefParser = { me.failure(i); } }, + validateFile: func(xml) { + var data = io.readxml(xml); + if (data != nil) { + return (data.getChild("OFP") != nil); + } + return false; + }, + readLegs: func(xml) { # lite OFP parser only for legs = wapoinst + airways + var legs = []; + var data = io.readxml(xml); + if (data != nil) { + var ofp = data.getChild("OFP"); + if (ofp != nil) { + var ofpNavlog = ofp.getNode("navlog"); + var ofpFixes = ofpNavlog.getChildren("fix"); + var ident = ""; + foreach (var ofpFix; ofpFixes) { + if (ofpFix.getNode("is_sid_star").getBoolValue()) continue; + ident = ofpFix.getNode("ident").getValue(); + if (ident == "TOC" or ident == "TOD") continue; + append(legs, [ ofpFix.getNode("ident").getValue() , ofpFix.getNode("via_airway").getValue() ] ); + } + return legs; + } + } + return nil; + }, tryFindByCoord: func(coords, id, type) { var result = nil; if (type == "nav") { @@ -107,12 +134,14 @@ var SimbriefParser = { fmgc.flightPlanController.flightplans[3].destination_runway = runwayStore; } - var alternateID = me.OFP.getNode("alternate/icao_code").getValue(); - var alternates = findAirportsByICAO(alternateID); - if (alternates != nil and size(alternates) != 0) { - fmgc.FMGCInternal.altAirport = alternateID; - atsu.ATISInstances[2].newStation(alternateID); - fmgc.FMGCInternal.altAirportSet = 1; + var alternateID = me.OFP.getNode("alternate/icao_code") == nil ? nil : me.OFP.getNode("alternate/icao_code").getValue(); + if (alternateID != nil) { + var alternates = findAirportsByICAO(alternateID); + if (size(alternates) != 0) { + fmgc.FMGCInternal.altAirport = alternateID; + atsu.ATISInstances[2].newStation(alternateID); + fmgc.FMGCInternal.altAirportSet = 1; + } } var wps = []; @@ -161,6 +190,7 @@ var SimbriefParser = { #setprop("/autopilot/route-manager/vnav/tc/latitude-deg",ofpFix.getNode("pos_lat").getValue()); #setprop("/autopilot/route-manager/vnav/tc/longitude-deg",ofpFix.getNode("pos_long").getValue()); #ident = "(T/C)"; + continue; # restore skip TOC/TOD } if (ident == "TOD") { @@ -168,6 +198,7 @@ var SimbriefParser = { #setprop("/autopilot/route-manager/vnav/td/latitude-deg",ofpFix.getNode("pos_lat").getValue()); #setprop("/autopilot/route-manager/vnav/td/longitude-deg",ofpFix.getNode("pos_long").getValue()); #ident = "(T/D)"; + continue; # restore skip TOC/TOD } coords = geo.Coord.new(); diff --git a/Nasal/FMGC/flightplan.nas b/Nasal/FMGC/flightplan.nas index b98e0dbb..cb71f578 100644 --- a/Nasal/FMGC/flightplan.nas +++ b/Nasal/FMGC/flightplan.nas @@ -428,13 +428,14 @@ var flightPlanController = { # flag: is it a navaids DUPLICATENAMES page or not? # plan: plan # flagPBD: do we return back to PBD handler or to default waypoint handler? + # flagPROG: do we return back to PROG handler or to default waypoint handler (only if flagPBD false) - createDuplicateNames: func(ghostContainer, index, flag, plan, flagPBD = 0, bearing = -999, distance = -99) { + createDuplicateNames: func(ghostContainer, index, flag, plan, flagPBD = 0, bearing = -999, distance = -99, flagPROG = 0) { if (canvas_mcdu.myDuplicate[plan] != nil) { canvas_mcdu.myDuplicate[plan].del(); } canvas_mcdu.myDuplicate[plan] = nil; - canvas_mcdu.myDuplicate[plan] = mcdu.duplicateNamesPage.new(ghostContainer, index, flag, plan, flagPBD, bearing, distance); + canvas_mcdu.myDuplicate[plan] = mcdu.duplicateNamesPage.new(ghostContainer, index, flag, plan, flagPBD, bearing, distance, flagPROG); setprop("MCDU[" ~ plan ~ "]/page", "DUPLICATENAMES"); }, @@ -639,9 +640,9 @@ var flightPlanController = { } } else { if (type == "navaid") { - me.createDuplicateNames(wpGhostContainer, index, 1, plan, 1, num(textSplit[1]), num(textSplit[2])); + me.createDuplicateNames(wpGhostContainer, index, 1, plan, 1, num(textSplit[1]), num(textSplit[2]), 0); } else { - me.createDuplicateNames(wpGhostContainer, index, 0, plan, 1, num(textSplit[1]), num(textSplit[2])); + me.createDuplicateNames(wpGhostContainer, index, 0, plan, 1, num(textSplit[1]), num(textSplit[2]), 0); } return 2; } diff --git a/Nasal/FMGC/mcdu-messages.nas b/Nasal/FMGC/mcdu-messages.nas index 3c036d2c..b3274ff5 100644 --- a/Nasal/FMGC/mcdu-messages.nas +++ b/Nasal/FMGC/mcdu-messages.nas @@ -180,7 +180,7 @@ var MessageController = { TypeIMessage.new("USING COST INDEX N", 1),TypeIMessage.new("WAIT FOR SYSTEM RESPONSE"),TypeIMessage.new("RWY/LS MISMATCH"), TypeIMessage.new("VHF3 VOICE MSG NOT GEN"),TypeIMessage.new("NO COMM MSG NOT GEN"),TypeIMessage.new("WX UPLINK"), TypeIMessage.new("SIMBRIEF DOWNLOAD FAILED"),TypeIMessage.new("MISSING USERNAME"),TypeIMessage.new("AOC ACT F-PLN UPLINK"), - TypeIMessage.new("NO ANSWER TO REQUEST"),TypeIMessage.new("NO D-ATIS AVAILABLE"),TypeIMessage.new("BAD SERVER RESPONSE"), + TypeIMessage.new("NO ANSWER TO REQUEST"),TypeIMessage.new("NO D-ATIS AVAILABLE"),TypeIMessage.new("NO METAR AVAILABLE"),TypeIMessage.new("BAD SERVER RESPONSE"), TypeIMessage.new("WIND DATA UPLINK"),TypeIMessage.new("CHECK ALT WIND"),TypeIMessage.new("INVALID WIND UPLINK"),TypeIMessage.new("WIND UPLINK EXISTS"), #p.533 TypeIMessage.new("FM DATALINK UNAVAIL"),TypeIMessage.new("NOT XMITTED TO ACARS"), #p.559 TypeIMessage.new("PRINTER NOT AVAILABLE"), diff --git a/Nasal/Libraries/buttons.nas b/Nasal/Libraries/buttons.nas index 289abfb2..24dbb3a6 100644 --- a/Nasal/Libraries/buttons.nas +++ b/Nasal/Libraries/buttons.nas @@ -32,7 +32,7 @@ var variousReset = func() { setprop("/controls/CVR/gndctl", 0); setprop("/controls/CVR/erase", 0); setprop("/controls/switches/pneumatics/cabin-fans", 1); - setprop("/controls/oxygen/crewOxyPB", 1); # 0 = OFF 1 = AUTO + setprop("/controls/oxygen/crewOxyPB", 0); # 0 = OFF 1 = AUTO setprop("/controls/switches/emerCallLtO", 0); # ON light, flashes white for 10s setprop("/controls/switches/emerCallLtC", 0); # CALL light, flashes amber for 10s setprop("/controls/switches/emerCall", 0); @@ -62,8 +62,9 @@ var variousReset = func() { setprop("/modes/fcu/hdg-time", -45); setprop("/controls/navigation/switching/att-hdg", 0); setprop("/controls/navigation/switching/air-data", 0); - setprop("/controls/switches/no-smoking-sign", 0.5); - setprop("/controls/switches/seatbelt-sign", 1); + setprop("/controls/switches/no-smoking-sign", 0.0); + setprop("/controls/switches/seatbelt-sign", 0); + setprop("/controls/switches/emer-lights", 0); } var BUTTONS = { diff --git a/Nasal/Libraries/libraries.nas b/Nasal/Libraries/libraries.nas index ac09a897..ca04cc96 100644 --- a/Nasal/Libraries/libraries.nas +++ b/Nasal/Libraries/libraries.nas @@ -170,19 +170,18 @@ var update_items = [ var systemsLoop = func(notification) { if (!systemsInitialized) { return; } - systems.ELEC.loop(); - systems.PNEU.loop(); - systems.HYD.loop(); - systems.ADIRS.loop(); + systems.PNEU.loop(notification); + systems.ADIRS.loop(notification); + systems.BrakeSys.update(notification); + systems.HFLoop(notification); systems.APUController.loop(); - systems.BrakeSys.update(); fadec.FADEC.loop(); rmp.rmpUpdate(); - fcu.FCUController.loop(); + fcu.FCUController.loop(notification); + atc.Transponders.vector[atc.transponderPanel.atcSel - 1].update(notification); dmc.DMController.loop(); atsu.ATSU.loop(); libraries.BUTTONS.update(); - systems.HFLoop(notification); if ((notification.engine1State == 2 or notification.engine1State == 3) and collectorTankL.getValue() < 1) { systems.cutoff_one(); @@ -378,4 +377,51 @@ foreach (var name; keys(input)) { emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 Libraries", name, input[name])); } +var hideCanvas = props.globals.getNode("/options/hide-canvas-outside"); +var internal = props.globals.getNode("/sim/current-view/internal"); +var toggleScreen = func() { + if (!internal.getValue() and hideCanvas.getValue()) { + canvas_pfd.PFD_update.stop(); + canvas_ecam.lowerECAM_update.stop(); + canvas_nd.nd_update.stop(); + canvas_dcdu.DCDU_update.stop(); + canvas_mcdu.MCDU_update.stop(); + } else { + canvas_pfd.rateApply(); + canvas_ecam.l_rateApply(); + canvas_nd.rateApply(); + canvas_dcdu.rateApply(); + canvas_mcdu.MCDU_update.start(); + } +}; + +setlistener("/options/hide-canvas-outside", func() { + toggleScreen(); +}, 0, 0); + +setlistener("/sim/current-view/internal", func() { + toggleScreen(); +}, 0, 0); + +# TODO split EFIS altimeters +var newinhg = nil; +setlistener("/instrumentation/altimeter/setting-inhg", func() { + newinhg = getprop("/instrumentation/altimeter/setting-inhg"); + setprop("/instrumentation/altimeter[1]/setting-inhg", newinhg); + setprop("/instrumentation/altimeter[2]/setting-inhg", newinhg); + setprop("/instrumentation/altimeter[3]/setting-inhg", newinhg); + setprop("/instrumentation/altimeter[4]/setting-inhg", newinhg); + setprop("/instrumentation/altimeter[5]/setting-inhg", newinhg); +}, 0, 0); + +var newhpa = nil; +setlistener("/instrumentation/altimeter/setting-hpa", func() { + newhpa = getprop("/instrumentation/altimeter/setting-hpa"); + setprop("/instrumentation/altimeter[1]/setting-hpa", newhpa); + setprop("/instrumentation/altimeter[2]/setting-hpa", newhpa); + setprop("/instrumentation/altimeter[3]/setting-hpa", newhpa); + setprop("/instrumentation/altimeter[4]/setting-hpa", newhpa); + setprop("/instrumentation/altimeter[5]/setting-hpa", newhpa); +}, 0, 0); + setprop("/systems/acconfig/libraries-loaded", 1); diff --git a/Nasal/Libraries/property-tree-setup.nas b/Nasal/Libraries/property-tree-setup.nas index 0f7ce817..cd626688 100644 --- a/Nasal/Libraries/property-tree-setup.nas +++ b/Nasal/Libraries/property-tree-setup.nas @@ -174,6 +174,13 @@ var Instrumentation = { pnlModeNum: [props.globals.initNode("/instrumentation/efis[0]/mfd/pnl_mode-num", 2, "INT"), props.globals.initNode("/instrumentation/efis[1]/mfd/pnl_mode-num", 2, "INT")], }, }, + GPS: { + altitude: props.globals.getNode("/instrumentation/gps/indicated-altitude-ft"), + latitude: props.globals.getNode("/instrumentation/gps/indicated-latitude-deg"), + longitude: props.globals.getNode("/instrumentation/gps/indicated-longitude-deg"), + trackMag: props.globals.getNode("/instrumentation/gps/indicated-track-magnetic-deg"), + gs: props.globals.getNode("/instrumentation/gps/indicated-ground-speed-kt"), + }, MKVII: { Inputs: { Discretes: { @@ -246,6 +253,7 @@ var Sim = { Time: { deltaRealtimeSec: props.globals.getNode("/sim/time/delta-realtime-sec"), elapsedSec: props.globals.getNode("/sim/time/elapsed-sec"), + gmtString: props.globals.getNode("/sim/time/gmt-string"), UTC: { day: props.globals.getNode("/sim/time/utc/day"), month: props.globals.getNode("/sim/time/utc/month"), diff --git a/Nasal/MCDU/CLOSESTAIRPORT.nas b/Nasal/MCDU/CLOSESTAIRPORT.nas index fa72faba..033ae1e6 100644 --- a/Nasal/MCDU/CLOSESTAIRPORT.nas +++ b/Nasal/MCDU/CLOSESTAIRPORT.nas @@ -74,29 +74,44 @@ var closestAirportPage = { me._range += 250; } } - - me.L1 = [me.airports[0].id, nil, "grn"]; - me.R1 = ["----", "UTC ", "grn"]; - me.L2 = [me.airports[1].id, nil, "grn"]; - me.R2 = ["----", nil, "grn"]; - me.L3 = [me.airports[2].id, nil, "grn"]; - me.R3 = ["----", nil, "grn"]; - me.L4 = [me.airports[3].id, nil, "grn"]; - me.R4 = ["----", nil, "grn"]; + if (size(me.airports) >= 1) { + me.L1 = [me.airports[0].id, nil, "grn"]; + me.R1 = ["----", "UTC ", "grn"]; + } + if (size(me.airports) >= 2) { + me.L2 = [me.airports[1].id, nil, "grn"]; + me.R2 = ["----", nil, "grn"]; + } + if (size(me.airports) >= 3) { + me.L3 = [me.airports[2].id, nil, "grn"]; + me.R3 = ["----", nil, "grn"]; + } + if (size(me.airports) >= 4) { + me.L4 = [me.airports[3].id, nil, "grn"]; + me.R4 = ["----", nil, "grn"]; + } me.listPopulated = 1; canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); }, updateBrgDist: func() { if (!me.listPopulated) { return; } - me.cdVector[0] = courseAndDistance(me.airports[0]); - me.cdVector[1] = courseAndDistance(me.airports[1]); - me.cdVector[2] = courseAndDistance(me.airports[2]); - me.cdVector[3] = courseAndDistance(me.airports[3]); var magvarLocal = magvar(); - me.C1 = [math.round(me.cdVector[0][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[0][1]), " BRG DIST", "grn"]; - me.C2 = [math.round(me.cdVector[1][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[1][1]) , nil, "grn"]; - me.C3 = [math.round(me.cdVector[2][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[2][1]), nil, "grn"]; - me.C4 = [math.round(me.cdVector[3][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[3][1]), nil, "grn"]; + if (size(me.airports) >= 1) { + me.cdVector[0] = courseAndDistance(me.airports[0]); + me.C1 = [math.round(me.cdVector[0][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[0][1]), " BRG DIST", "grn"]; + } + if (size(me.airports) >= 2) { + me.cdVector[1] = courseAndDistance(me.airports[1]); + me.C2 = [math.round(me.cdVector[1][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[1][1]) , nil, "grn"]; + } + if (size(me.airports) >= 3) { + me.cdVector[2] = courseAndDistance(me.airports[2]); + me.C3 = [math.round(me.cdVector[2][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[2][1]), nil, "grn"]; + } + if (size(me.airports) >= 4) { + me.cdVector[3] = courseAndDistance(me.airports[3]); + me.C4 = [math.round(me.cdVector[3][0] - magvarLocal) ~ " " ~ math.round(me.cdVector[3][1]), nil, "grn"]; + } if (me.manAirport != nil) { me.C5 = [math.round(courseAndDistance(me.manAirport)[0] - magvarLocal) ~ " " ~ math.round(courseAndDistance(me.manAirport)[1]), nil, "grn"]; } diff --git a/Nasal/MCDU/DATA.nas b/Nasal/MCDU/DATA.nas index 92de6155..8093bcc3 100644 --- a/Nasal/MCDU/DATA.nas +++ b/Nasal/MCDU/DATA.nas @@ -5,19 +5,18 @@ var dataInput = func(key, i) { if (key == "L1") { setprop("MCDU[" ~ i ~ "]/page", "POSMON"); - } - if (key == "L2") { + } elsif (key == "L2") { setprop("MCDU[" ~ i ~ "]/page", "IRSMON"); - } - if (key == "L5") { + } elsif (key == "L3") { + setprop("MCDU[" ~ i ~ "]/page", "GPSMON"); + } elsif (key == "L5") { if (canvas_mcdu.myClosestAirport[i] != nil) { canvas_mcdu.myClosestAirport[i].del(); } canvas_mcdu.myClosestAirport[i] = nil; canvas_mcdu.myClosestAirport[i] = closestAirportPage.new(i); setprop("MCDU[" ~ i ~ "]/page", "CLOSESTAIRPORT"); - } - if (key == "R5") { + } elsif (key == "R5") { setprop("MCDU[" ~ i ~ "]/page", "PRINTFUNC"); } } @@ -25,23 +24,17 @@ var dataInput = func(key, i) { var printInput = func(key, i) { if (key == "L1") { setprop("FMGC/print/mcdu/page1/L1auto", 1); - } - if (key == "L2") { + } elsif (key == "L2") { setprop("FMGC/print/mcdu/page1/L2auto", 1); - } - if (key == "L3") { + } elsif (key == "L3") { setprop("FMGC/print/mcdu/page1/L3auto", 1); - } - if (key == "L5") { + } elsif (key == "L5") { setprop("MCDU[" ~ i ~ "]/page", "DATA"); - } - if (key == "R1") { + } elsif (key == "R1") { setprop("FMGC/print/mcdu/page1/R1req", 1); - } - if (key == "R2") { + } elsif (key == "R2") { setprop("FMGC/print/mcdu/page1/R2req", 1); - } - if (key == "R3") { + } elsif (key == "R3") { setprop("FMGC/print/mcdu/page1/R3req", 1); } } @@ -49,29 +42,21 @@ var printInput = func(key, i) { var printInput2 = func(key, i) { if (key == "L1") { setprop("FMGC/print/mcdu/page2/L1auto", 1); - } - if (key == "L2") { + } elsif (key == "L2") { setprop("FMGC/print/mcdu/page2/L2auto", 1); - } - if (key == "L3") { + } elsif (key == "L3") { setprop("FMGC/print/mcdu/page2/L3auto", 1); - } - if (key == "L4") { + } elsif (key == "L4") { setprop("FMGC/print/mcdu/page2/L4auto", 1); - } - if (key == "L6") { + } elsif (key == "L6") { setprop("MCDU[" ~ i ~ "]/page", "DATA"); - } - if (key == "R1") { + } elsif (key == "R1") { setprop("FMGC/print/mcdu/page2/R1req", 1); - } - if (key == "R2") { + } elsif (key == "R2") { setprop("FMGC/print/mcdu/page2/R2req", 1); - } - if (key == "R3") { + } elsif (key == "R3") { setprop("FMGC/print/mcdu/page2/R3req", 1); - } - if (key == "R4") { + } elsif (key == "R4") { setprop("FMGC/print/mcdu/page2/R4req", 1); } } diff --git a/Nasal/MCDU/DUPLICATE.nas b/Nasal/MCDU/DUPLICATE.nas index ace8d133..9e6c58ee 100644 --- a/Nasal/MCDU/DUPLICATE.nas +++ b/Nasal/MCDU/DUPLICATE.nas @@ -28,7 +28,7 @@ var duplicateNamesPage = { enableScroll: 0, scroll: 0, distances: nil, - new: func(vector, index, type, computer, flagPBD = 0, pbdBrg = -999, pbdDist = -99) { + new: func(vector, index, type, computer, flagPBD = 0, pbdBrg = -999, pbdDist = -99, flagProg = 0) { var dn = {parents:[duplicateNamesPage]}; dn.vector = vector; dn.index = index; @@ -37,6 +37,7 @@ var duplicateNamesPage = { dn.bearing = pbdBrg; dn.distance = pbdDist; dn.computer = computer; + dn.flagPROG = flagProg; dn._setupPageWithData(); dn.distances = []; return dn; @@ -134,7 +135,7 @@ var duplicateNamesPage = { }, pushButtonLeft: func(indexSelect) { if (!dirToFlag) { - if (!me.flagPBD) { + if (!me.flagPBD and !me.flagPROG) { if (size(me.vector[0].id) == 5) { fmgc.flightPlanController.insertFix(me.vector[0].id, me.index, me.computer, 1, indexSelect - 1); setprop("MCDU[" ~ me.computer ~ "]/page", "F-PLNA"); @@ -145,9 +146,16 @@ var duplicateNamesPage = { fmgc.flightPlanController.insertNavaid(me.vector[0].id, me.index, me.computer, 1, indexSelect - 1); setprop("MCDU[" ~ me.computer ~ "]/page", "F-PLNA"); } - } else { + } elsif (me.flagPBD) { fmgc.flightPlanController.getWPforPBD(me.vector[0].id ~ "/" ~ me.bearing ~ "/" ~ me.distance, me.index, me.computer, 1, indexSelect - 1); setprop("MCDU[" ~ me.computer ~ "]/page", "F-PLNA"); + } else { + if (me.type == 0) { + mcdu.bearingDistances[me.computer].newPointResult(me.vector, 1, indexSelect - 1); + } else { + mcdu.bearingDistances[me.computer].newPointNavaid(me.vector, 1, indexSelect - 1); + } + pagebutton("prog",me.computer); } } else { canvas_mcdu.myDirTo[me.computer].fieldL1(me.vector[0].id, 1, indexSelect - 1); diff --git a/Nasal/MCDU/F-PLN.nas b/Nasal/MCDU/F-PLN.nas index f3cab9a5..65c2348c 100644 --- a/Nasal/MCDU/F-PLN.nas +++ b/Nasal/MCDU/F-PLN.nas @@ -117,15 +117,15 @@ var fplnItem = { }, getAlt: func() { if (me.index == 0 and left(me.wp.wp_name, 4) == fmgc.FMGCInternal.depApt and fmgc.flightPlanController.flightplans[me.plan].departure != nil) { - return [" " ~ sprintf("%5.0f", math.round(fmgc.flightPlanController.flightplans[me.plan].departure.elevation * M2FT)), "grn"]; #fixed - aligned to right + return [" " ~ sprintf("%5.0f", math.round(fmgc.flightPlanController.flightplans[me.plan].departure.elevation * M2FT)), "grn"]; } elsif (me.index == (fmgc.flightPlanController.currentToWptIndex.getValue() - 1) and fmgc.flightPlanController.fromWptAlt != nil) { return [" " ~ fmgc.flightPlanController.fromWptAlt, "mag"]; } elsif (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) { var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) { - return [" " ~ sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)), tcol]; #fixed - aligned to right + return [" " ~ sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)), tcol]; } else { - return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol]; #fixed - aligned to right + return [" " ~ sprintf("%5.0f", me.wp.alt_cstr), tcol]; } } else { return ["------", "wht"]; diff --git a/Nasal/MCDU/FLIGHTLOG.nas b/Nasal/MCDU/FLIGHTLOG.nas index 81af304e..cffe7bd4 100644 --- a/Nasal/MCDU/FLIGHTLOG.nas +++ b/Nasal/MCDU/FLIGHTLOG.nas @@ -2,12 +2,17 @@ # Basic OOOI system implementation var OOOIReport = { - new: func(state,fob="",time="") { + new: func(state,time=0,fob="") { var report = {parents:[OOOIReport]}; report.state = state; report.fob = (fob != "") ? fob : fmgc.FMGCInternal.fob; - report.time = (time != "") ? time : sprintf("%02d.%02d", getprop("/sim/time/utc/hour"), getprop("/sim/time/utc/minute")); - report.elapsed = int(getprop("/sim/time/elapsed-sec")); + if (time != 0) { + report.time = formatSecToHHMM(time); + report.elapsed = time; + } else { + report.time = sprintf("%02d.%02d", getprop("/sim/time/utc/hour"), getprop("/sim/time/utc/minute")); + report.elapsed = int(getprop("/sim/time/elapsed-sec")); + } report.gmt = getprop("/sim/time/gmt-string"); report.date = getprop("/sim/time/utc/day"); report.fltnum = (fmgc.FMGCInternal.flightNumSet == 1) ? fmgc.FMGCInternal.flightNum : "----"; @@ -42,12 +47,15 @@ var formatSecToHHMM = func(sec) { var FlightLogDatabase = { database: std.Vector.new(), pages: std.Vector.new(), + currpageindex: 0, addReport: func(report) { - if (report.state == 0) me.pages.append( OOOIReportPage.new(me.getSize()) ); + if (report.state == 0 or me.getPageSize()==0) me.addPage(); me.database.append(report); var pg = me.pages.vector[me.pages.size()-1]; - pg.fltnum = report.fltnum; - pg.tofrom = report.tofrom; + if (report.state < 3) { # IN states (3/4) don't update page data + if (report.fltnum != "") pg.fltnum = report.fltnum; + if (report.tofrom != "") pg.tofrom = report.tofrom; + } if (report.state == 0) { pg.fltstate = "OUT"; pg.blkstart = report.elapsed; @@ -65,6 +73,10 @@ var FlightLogDatabase = { if (pg.blkstart > 0) pg.blktime = formatSecToHHMM(report.elapsed - pg.blkstart); } }, + reset: func() { + #Actually reset occurs before IN state - I have no solution for this + #if (me.getPageSize()>0 and me.currpageindex < me.getSize()) me.addPage(); + }, getSize: func() { return me.database.size(); }, @@ -82,6 +94,10 @@ var FlightLogDatabase = { } return lst; }, + addPage: func() { + me.currpageindex = me.getSize(); + me.pages.append( OOOIReportPage.new(me.getSize()) ); + }, getPage: func(pg) { return (pg<=me.getPageSize()) ? me.pages.vector[pg-1] : OOOIReportPage.new(0); }, @@ -110,7 +126,12 @@ var doorR1_pos = props.globals.getNode("/sim/model/door-positions/doorr1/positio var doorL4_pos = props.globals.getNode("/sim/model/door-positions/doorl4/position-norm", 1); var doorR4_pos = props.globals.getNode("/sim/model/door-positions/doorr4/position-norm", 1); -#check for A/C state change - advice me for a better method, please :/ +# Detect OFF without IN +var lastgs0 = 0; +#var lastgear0 = 0; +var lastgsrestart = 0; + +# Check for A/C state change - advice me for a better method, please :/ var waitingOOOIChange = maketimer(1, func(){ # 1sec precision var phase = fmgc.FMGCInternal.phase; @@ -121,7 +142,7 @@ var waitingOOOIChange = maketimer(1, func(){ # 1sec precision if (expectedOOOIState == 0) { # OUT if (gear0 and phase == 0) { - if (gs>9) { # imho - it's useful few speed tollerance, 10kts min speed on taxiways - CHECKME - better with pushback detection? + if (gs > 9) { # imho - it's useful few speed tollerance, 10kts min speed on taxiways - CHECKME - better with pushback detection? FlightLogDatabase.addReport(OOOIReport.new(expectedOOOIState)); expectedOOOIState = 1; } @@ -141,14 +162,29 @@ var waitingOOOIChange = maketimer(1, func(){ # 1sec precision if (gear0 and (phase == 7 or phase == 0)) { #done or preflight FlightLogDatabase.addReport(OOOIReport.new(expectedOOOIState)); expectedOOOIState = 3; + lastgs0 = 0; + lastgsrestart = 0; } } else if (expectedOOOIState == 3) { # IN if (gear0 and gs < 1) { + if (lastgs0 == 0) { + lastgs0 = int(getprop("/sim/time/elapsed-sec")); + lastgsrestart = 0; + } if (doorL1_pos.getValue()>0 or doorR1_pos.getValue()>0 or doorL4_pos.getValue()>0 or doorR4_pos.getValue()>0) { FlightLogDatabase.addReport(OOOIReport.new(expectedOOOIState)); expectedOOOIState = 0; } } + else if (!gear0) { # OFF without IN -> TO without stop and opening doors + if (lastgs0>0) FlightLogDatabase.addReport(OOOIReport.new(expectedOOOIState,lastgs0)); # IN (estimated) + FlightLogDatabase.addPage(); + if (lastgsrestart>0) FlightLogDatabase.addReport(OOOIReport.new(0,lastgsrestart)); # OUT (estimated) + expectedOOOIState = 1; # go on to OFF state + } + else if (gs > 9 and lastgsrestart == 0) { # try to detect OFF without IN + lastgsrestart = int(getprop("/sim/time/elapsed-sec")); + } } }); diff --git a/Nasal/MCDU/INITA.nas b/Nasal/MCDU/INITA.nas index 00e02637..9d048ea0 100644 --- a/Nasal/MCDU/INITA.nas +++ b/Nasal/MCDU/INITA.nas @@ -238,11 +238,12 @@ var initInputA = func(key, i) { fmgc.flightPlanController.reset(2); fmgc.flightPlanController.init(); Simbrief.SimbriefParser.inhibit = 0; + fmgc.updateARPT(); mcdu_scratchpad.scratchpads[i].empty(); #} else if (scratchpad == "") { #fmgc.FMGCInternal.altSelected = 0; #setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); - } else { + } else { if (!fmgc.flightPlanController.temporaryFlag[i]) { var tfs = size(scratchpad); if (tfs == 9 and find("/", scratchpad) != -1) { @@ -264,6 +265,7 @@ var initInputA = func(key, i) { mcdu_scratchpad.scratchpads[i].empty(); fmgc.flightPlanController.updateAirports(fromto[0], fromto[1], 2); fmgc.FMGCInternal.altSelected = 0; + fmgc.updateARPT(); fmgc.updateArptLatLon(); #setprop("MCDU[" ~ i ~ "]/page", "ROUTESELECTION"); } else { diff --git a/Nasal/MCDU/MCDU.nas b/Nasal/MCDU/MCDU.nas index 3d2cdc99..87d23bba 100644 --- a/Nasal/MCDU/MCDU.nas +++ b/Nasal/MCDU/MCDU.nas @@ -237,9 +237,11 @@ var lskbutton = func(btn, i) { canvas_mcdu.myCRZWIND[i].pushButtonLeft(1); } else if (page == "WINDDES") { canvas_mcdu.myDESWIND[i].pushButtonLeft(1); + } else if (page == "PROGPREF") { + progTOInput("L1",i); # same fn as TO } else if (page == "PROGTO") { progTOInput("L1",i); - } else if (page == "PROGCLB") { + } else if (page == "PROGCLB" or page == "PROGAPPR") { # APPR restore to CLB progCLBInput("L1",i); } else if (page == "PROGCRZ") { progCRZInput("L1",i); @@ -532,6 +534,8 @@ var lskbutton = func(btn, i) { statusInput("L3",i); } else if (page == "RADNAV") { radnavInput("L3",i); + } else if (page == "DATA") { + dataInput("L3",i); } else if (page == "PRINTFUNC") { printInput("L3",i); } else if (page == "PRINTFUNC2") { @@ -632,6 +636,8 @@ var lskbutton = func(btn, i) { mcdu_scratchpad.scratchpads[i].empty(); } } + } else if (page == "VERTREV") { + canvas_mcdu.myVertRev[i].pushButtonLeft(3); } else if (page == "MCDUTEXT") { atsu.freeTexts[i].selection = 2; atsu.freeTexts[i].changed = 1; @@ -851,7 +857,13 @@ var lskbutton = func(btn, i) { } else if (page == "F-PLNA" or page == "F-PLNB") { canvas_mcdu.myFpln[i].pushButtonLeft(6); } else if (page == "LATREV" or page == "VERTREV" or page == "DUPLICATENAMES") { - pageNode[i].setValue("F-PLNA"); + if (page != "DUPLICATENAMES") { + pageNode[i].setValue("F-PLNA"); + } else { + if (canvas_mcdu.myDuplicate[i] != nil and canvas_mcdu.myDuplicate[i].flagPROG) { + pagebutton("prog",i); + } + } } else if (page == "ARRIVAL") { canvas_mcdu.myArrival[i].arrPushbuttonLeft(6); } else if (page == "DEPARTURE" or page == "HOLD" or page == "AIRWAYS") { @@ -885,6 +897,8 @@ var lskbutton = func(btn, i) { pageNode[i].setValue("ATIS"); } else if (page == "AOCCONFIG") { pageNode[i].setValue("AOCMENU"); + } else if (page == "POSMON") { + canvas_mcdu.togglePageFreeze(i); } else { mcdu_message(i, "NOT ALLOWED"); } @@ -1080,6 +1094,8 @@ var rskbutton = func(btn, i) { atsu.freeTexts[i].changed = 1; } else if (page == "ATCMENU") { pageNode[i].setValue("MCDUTEXT"); + } else if (page == "VERTREV") { + canvas_mcdu.myVertRev[i].pushButtonRight(3); } else { mcdu_message(i, "NOT ALLOWED"); } @@ -1126,6 +1142,8 @@ var rskbutton = func(btn, i) { } } pageNode[i].setValue("WINDCRZ"); + } else if (find("PROG",page) != -1) { + progGENInput("R4",i); } else if (page == "PERFTO") { perfTOInput("R4",i); } else if (page == "PERFAPPR") { @@ -1420,21 +1438,27 @@ var pagebutton = func(btn, i) { # A more flexible system/page tracking for future system expansion if (getprop("/MCDU[" ~ i ~ "]/active-system") == "fmgc") setprop("/MCDU[" ~ i ~ "]/last-fmgc-page", page); - else setprop("/MCDU[" ~ i ~ "]/last-atsu-page", page); + else if (getprop("/MCDU[" ~ i ~ "]/active-system") == "atsu") setprop("/MCDU[" ~ i ~ "]/last-atsu-page", page); if (btn == "atc") setprop("/MCDU[" ~ i ~ "]/active-system","atsu"); else setprop("/MCDU[" ~ i ~ "]/active-system","fmgc"); if (btn == "radnav") { pageNode[i].setValue("RADNAV"); } else if (btn == "prog") { - if (fmgc.FMGCInternal.phase == 0 or fmgc.FMGCInternal.phase == 1) { + if (fmgc.FMGCInternal.phase == 0) { + pageNode[i].setValue("PROGPREF"); + } else if (fmgc.FMGCInternal.phase == 1) { pageNode[i].setValue("PROGTO"); } else if (fmgc.FMGCInternal.phase == 2) { pageNode[i].setValue("PROGCLB"); } else if (fmgc.FMGCInternal.phase == 3) { pageNode[i].setValue("PROGCRZ"); - } else if (fmgc.FMGCInternal.phase == 4 or fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { + } else if (fmgc.FMGCInternal.phase == 4) { pageNode[i].setValue("PROGDES"); + } else if (fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { + pageNode[i].setValue("PROGAPPR"); + } else if (fmgc.FMGCInternal.phase == 7) { + pageNode[i].setValue("PROGDONE"); } } else if (btn == "perf") { if (fmgc.FMGCInternal.phase == 0 or fmgc.FMGCInternal.phase == 1) { diff --git a/Nasal/MCDU/PERFTO.nas b/Nasal/MCDU/PERFTO.nas index d4cdcd29..6f41d0f8 100644 --- a/Nasal/MCDU/PERFTO.nas +++ b/Nasal/MCDU/PERFTO.nas @@ -19,91 +19,81 @@ var perfTOCheckVSpeeds = func(i) { } } -var perfTOInput = func(key, i) { +var perfTOInput = func(key, i) { + var modifiable = (fmgc.FMGCInternal.phase == 1) ? 0 : 1; var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; - if (key == "L1") { - if (fmgc.FMGCInternal.phase != 1) { - if (scratchpad == "CLR") { - fmgc.FMGCInternal.v1 = 0; - fmgc.FMGCInternal.v1set = 0; - fmgc.FMGCNodes.v1.setValue(0); - fmgc.FMGCNodes.v1set.setValue(0); - mcdu_scratchpad.scratchpads[i].empty(); - } else { - var tfs = size(scratchpad); - if (tfs == 3) { - if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { - fmgc.FMGCInternal.v1 = scratchpad; - fmgc.FMGCInternal.v1set = 1; - - # for sounds: - fmgc.FMGCNodes.v1.setValue(scratchpad); - fmgc.FMGCNodes.v1set.setValue(1); - mcdu_scratchpad.scratchpads[i].empty(); - perfTOCheckVSpeeds(i); # do V-speeds validation - } else { - mcdu_message(i, "NOT ALLOWED"); - } + if (key == "L1" and modifiable) { + if (scratchpad == "CLR") { + fmgc.FMGCInternal.v1 = 0; + fmgc.FMGCInternal.v1set = 0; + fmgc.FMGCNodes.v1.setValue(0); + fmgc.FMGCNodes.v1set.setValue(0); + mcdu_scratchpad.scratchpads[i].empty(); + } else { + var tfs = size(scratchpad); + if (tfs == 3) { + if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { + fmgc.FMGCInternal.v1 = scratchpad; + fmgc.FMGCInternal.v1set = 1; + + # for sounds: + fmgc.FMGCNodes.v1.setValue(scratchpad); + fmgc.FMGCNodes.v1set.setValue(1); + mcdu_scratchpad.scratchpads[i].empty(); + + perfTOCheckVSpeeds(i); # do V-speeds validation } else { mcdu_message(i, "NOT ALLOWED"); } + } else { + mcdu_message(i, "NOT ALLOWED"); } - } else { - mcdu_message(i, "NOT ALLOWED"); } - } else if (key == "L2") { - if (fmgc.FMGCInternal.phase != 1) { - if (scratchpad == "CLR") { - fmgc.FMGCInternal.vr = 0; - fmgc.FMGCInternal.vrset = 0; - mcdu_scratchpad.scratchpads[i].empty(); - } else { - var tfs = size(scratchpad); - if (tfs == 3) { - if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { - fmgc.FMGCInternal.vr = scratchpad; - fmgc.FMGCInternal.vrset = 1; - mcdu_scratchpad.scratchpads[i].empty(); + } else if (key == "L2" and modifiable) { + if (scratchpad == "CLR") { + fmgc.FMGCInternal.vr = 0; + fmgc.FMGCInternal.vrset = 0; + mcdu_scratchpad.scratchpads[i].empty(); + } else { + var tfs = size(scratchpad); + if (tfs == 3) { + if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { + fmgc.FMGCInternal.vr = scratchpad; + fmgc.FMGCInternal.vrset = 1; + mcdu_scratchpad.scratchpads[i].empty(); - perfTOCheckVSpeeds(i); # do V-speeds validation - } else { - mcdu_message(i, "NOT ALLOWED"); - } + perfTOCheckVSpeeds(i); # do V-speeds validation } else { mcdu_message(i, "NOT ALLOWED"); } + } else { + mcdu_message(i, "NOT ALLOWED"); } - } else { - mcdu_message(i, "NOT ALLOWED"); } - } else if (key == "L3") { - if (fmgc.FMGCInternal.phase != 1) { - if (scratchpad == "CLR") { - fmgc.FMGCInternal.v2 = 0; - fmgc.FMGCInternal.v2set = 0; - setprop("/it-autoflight/settings/togaspd", 157); - mcdu_scratchpad.scratchpads[i].empty(); - } else { - var tfs = size(scratchpad); - if (tfs == 3) { - if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { - fmgc.FMGCInternal.v2 = scratchpad; - fmgc.FMGCInternal.v2set = 1; - fmgc.updatePitchArm2(); - setprop("/it-autoflight/settings/togaspd", scratchpad); - mcdu_scratchpad.scratchpads[i].empty(); + } else if (key == "L3" and modifiable) { + if (scratchpad == "CLR") { + fmgc.FMGCInternal.v2 = 0; + fmgc.FMGCInternal.v2set = 0; + setprop("/it-autoflight/settings/togaspd", 157); + mcdu_scratchpad.scratchpads[i].empty(); + } else { + var tfs = size(scratchpad); + if (tfs == 3) { + if (int(scratchpad) != nil and scratchpad >= 100 and scratchpad <= 350) { + fmgc.FMGCInternal.v2 = scratchpad; + fmgc.FMGCInternal.v2set = 1; + fmgc.updatePitchArm2(); + setprop("/it-autoflight/settings/togaspd", scratchpad); + mcdu_scratchpad.scratchpads[i].empty(); - perfTOCheckVSpeeds(i); # do V-speeds validation - } else { - mcdu_message(i, "NOT ALLOWED"); - } + perfTOCheckVSpeeds(i); # do V-speeds validation } else { mcdu_message(i, "NOT ALLOWED"); } + } else { + mcdu_message(i, "NOT ALLOWED"); } - } else { - mcdu_message(i, "NOT ALLOWED"); } } else if (key == "L4") { if (scratchpad == "CLR") { @@ -120,7 +110,7 @@ var perfTOInput = func(key, i) { mcdu_message(i, "NOT ALLOWED"); } } - } else if (key == "L5") { + } else if (key == "L5" and modifiable) { if (scratchpad == "CLR") { setprop("/systems/thrust/clbreduc-ft", 1500); setprop("/FMGC/internal/accel-agl-ft", 1500); @@ -160,7 +150,7 @@ var perfTOInput = func(key, i) { mcdu_message(i, "NOT ALLOWED"); } } - } else if (key == "R3") { + } else if (key == "R3" and modifiable) { if (scratchpad == "CLR") { setprop("/FMGC/internal/to-flap", 0); setprop("/FMGC/internal/to-ths", "0.0"); @@ -230,9 +220,9 @@ var perfTOInput = func(key, i) { mcdu_message(i, "NOT ALLOWED"); } } - } else if (key == "R4") { + } else if (key == "R4" and modifiable) { if (scratchpad == "CLR") { - setprop("/FMGC/internal/flex", 0); + setprop("/FMGC/internal/flex", 45); setprop("/FMGC/internal/flex-set", 0); mcdu_scratchpad.scratchpads[i].empty(); } else { @@ -241,8 +231,6 @@ var perfTOInput = func(key, i) { if (int(scratchpad) != nil and scratchpad >= 0 and scratchpad <= 99) { setprop("/FMGC/internal/flex", scratchpad); setprop("/FMGC/internal/flex-set", 1); - var flex_calc = getprop("/FMGC/internal/flex") - getprop("environment/temperature-degc"); - setprop("/FMGC/internal/flex-cmd", flex_calc); mcdu_scratchpad.scratchpads[i].empty(); } else { mcdu_message(i, "NOT ALLOWED"); @@ -251,7 +239,7 @@ var perfTOInput = func(key, i) { mcdu_message(i, "NOT ALLOWED"); } } - } else if (key == "R5") { + } else if (key == "R5" and modifiable) { if (scratchpad == "CLR") { setprop("/FMGC/internal/eng-out-reduc", "1500"); setprop("MCDUC/reducacc-set", 0); @@ -268,5 +256,7 @@ var perfTOInput = func(key, i) { } } else if (key == "R6") { setprop("MCDU[" ~ i ~ "]/page", "PERFCLB"); - } + } else { + mcdu_message(i, "NOT ALLOWED"); + } } diff --git a/Nasal/MCDU/PROG.nas b/Nasal/MCDU/PROG.nas new file mode 100644 index 00000000..116c5c44 --- /dev/null +++ b/Nasal/MCDU/PROG.nas @@ -0,0 +1,284 @@ +# Copyright (c) 2020 Matthew Maring (mattmaring) + +var altSet = props.globals.getNode("it-autoflight/input/alt", 1); +var brgDistResult = nil; + +var progGENInput = func(key, i) { + var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; + if (key == "R4") { + if (scratchpad == "CLR") { + bearingDistances[i].selectedPoint = nil; + bearingDistances[i].displayID = nil; + mcdu_scratchpad.scratchpads[i].empty(); + } else { + brgDistResult = bearingDistances[i].newPoint(mcdu_scratchpad.scratchpads[i].scratchpad); + if (brgDistResult != 1) { + mcdu_message(i, "NOT IN DATA BASE"); + } else { + mcdu_scratchpad.scratchpads[i].empty(); + } + } + } +} + +var progTOInput = func(key, i) { + var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; + if (key == "L1") { + if (scratchpad == "CLR") { + fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; + mcdu_scratchpad.scratchpads[i].empty(); + } else if (int(scratchpad) != nil) { + var crzs = size(scratchpad); + if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and fmgc.FMGCInternal.crzSet <= scratchpad * 100 and fmgc.FMGCInternal.crzSet) { + fmgc.FMGCInternal.crzProg = scratchpad; + mcdu_scratchpad.scratchpads[i].empty(); + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } +} + +var progCLBInput = func(key, i) { + var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; + if (key == "L1") { + if (scratchpad == "CLR") { + fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; + if (fmgc.FMGCInternal.phase == 5) { + fmgc.FMGCInternal.phase = 3; + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/decel", 0); + } + mcdu_scratchpad.scratchpads[i].empty(); + } else if (int(scratchpad) != nil) { + var crzs = size(scratchpad); + if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and fmgc.FMGCInternal.crzSet <= scratchpad * 100) { + fmgc.FMGCInternal.crzProg = scratchpad; + mcdu_scratchpad.scratchpads[i].empty(); + if (fmgc.FMGCInternal.phase == 5) { + fmgc.FMGCInternal.phase = 3; + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/decel", 0); + } + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } +} + +var progCRZInput = func(key, i) { + var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; + if (key == "L1") { + if (scratchpad == "CLR") { + fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; + if (fmgc.FMGCInternal.phase == 5) { + fmgc.FMGCInternal.phase = 3; + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/decel", 0); + } + mcdu_scratchpad.scratchpads[i].empty(); + } else if (int(scratchpad) != nil) { + var crzs = size(scratchpad); + if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and fmgc.FMGCInternal.crzSet <= scratchpad * 100) { + fmgc.FMGCInternal.crzProg = scratchpad; + mcdu_scratchpad.scratchpads[i].empty(); + if (fmgc.FMGCInternal.phase == 5) { + fmgc.FMGCInternal.phase = 3; + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/decel", 0); + } + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } +} + +var progDESInput = func(key, i) { + var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; + if (key == "L1") { + if (scratchpad == "CLR") { + fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; + if (fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { + fmgc.FMGCInternal.phase = 3; + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/decel", 0); + } + mcdu_scratchpad.scratchpads[i].empty(); + } else if (int(scratchpad) != nil) { + var crzs = size(scratchpad); + if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and fmgc.FMGCInternal.crzSet <= scratchpad * 100) { + fmgc.FMGCInternal.crzProg = scratchpad; + mcdu_scratchpad.scratchpads[i].empty(); + if (fmgc.FMGCInternal.phase == 4 or fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { + fmgc.FMGCInternal.phase = 3; + setprop("/FMGC/internal/activate-once", 0); + setprop("/FMGC/internal/activate-twice", 0); + setprop("/FMGC/internal/decel", 0); + } + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } else { + mcdu_message(i, "NOT ALLOWED"); + } + } +} + +var _result = [nil, nil]; +var _courseAndDistance = [nil, nil]; +var bearingDistanceInstance = { + new: func(id) { + var bd = {parents: [bearingDistanceInstance]}; + bd.id = id; + bd.bearing = 360; + bd.distance = 0; + bd.selectedPoint = nil; + bd.displayID = nil; + return bd; + }, + newPointResult: func(result, duplicateNames = 0, duplicateNamesIndex = nil) { + if (duplicateNames != 0) { + me.selectedPoint = result[duplicateNamesIndex]; + me.displayID = result[duplicateNamesIndex].id; + } elsif (size(result) > 1) { + if (canvas_mcdu.myDuplicate[me.id] != nil) { + canvas_mcdu.myDuplicate[me.id].del(); + } + canvas_mcdu.myDuplicate[me.id] = nil; + canvas_mcdu.myDuplicate[me.id] = mcdu.duplicateNamesPage.new(result, 0, 0, me.id, 0, -999, -999, 1); + setprop("MCDU[" ~ me.id ~ "]/page", "DUPLICATENAMES"); + } else { + me.selectedPoint = result[0]; + me.displayID = result[0].id; + } + return 1; + }, + newPointNavaid: func(result, duplicateNames = 0, duplicateNamesIndex = nil) { + if (duplicateNames != 0) { + me.selectedPoint = result[duplicateNamesIndex]; + me.displayID = result[duplicateNamesIndex].id; + } elsif (size(result) > 1) { + if (canvas_mcdu.myDuplicate[me.id] != nil) { + canvas_mcdu.myDuplicate[me.id].del(); + } + canvas_mcdu.myDuplicate[me.id] = nil; + canvas_mcdu.myDuplicate[me.id] = mcdu.duplicateNamesPage.new(result, 0, 1, me.id, 0, -999, -999, 1); + setprop("MCDU[" ~ me.id ~ "]/page", "DUPLICATENAMES"); + } else { + me.selectedPoint = result[0]; + me.displayID = result[0].id; + print("YES"); + } + return 1; + }, + newPointRWY: func(result,ID) { + if (size(result) > 1) { + #spawnPAGE + } else { + var string = split(left(ID,4),ID)[1]; + if (find("C",string) != -1 or find("L",string) != -1 or find("R",string) != -1) { + if (size(string) == 2) { + string = "0" ~ string; + } + } else { + if (size(string) == 1) { + string = "0" ~ string; + } + } + + if (contains(result[0].runways,string)) { + me.selectedPoint = {lat: result[0].runways[string].lat, lon: result[0].runways[string].lon}; + me.displayID = left(ID,4) ~ string; + return 1; + } else { + return 0; + } + } + return 1; + }, + newPointLatLon: func(result) { + return 0; + }, + newPoint: func(id) { + _result[me.id] = fmgc.WaypointDatabase.getWP(id); + if (_result[me.id] != nil) { + me.selectedPoint = _result[me.id]; + me.displayID = _result[me.id].id; + return 1; + } + + if (size(id) >= 2 and size(id) <= 3) { + _result[me.id] = findNavaidsByID(id); + if (size(_result[me.id]) != 0) { + return me.newPointNavaid(_result[me.id]); + } else { + _result[me.id] = findAirportsByICAO(id); # consider 3 letter ICAOs + if (size(_result[me.id]) != 0) { + return me.newPointResult(_result[me.id]); + } + } + return 0; + } elsif (size(id) == 4) { + _result[me.id] = findAirportsByICAO(id); + if (size(_result[me.id]) != 0) { + return me.newPointResult(_result[me.id]); + } else { + _result[me.id] = findFixesByID(id); + if (size(_result[me.id]) != 0) { + return me.newPointResult(_result[me.id]); + } + } + return 0; + } elsif (size(id) >= 5 and size(id) <= 7) { + _result[me.id] = findFixesByID(id); + if (size(_result[me.id]) != 0) { + return me.newPointResult(_result[me.id]); + } else { + _result[me.id] = findAirportsByICAO(left(id,4)); + if (size(_result[me.id]) != 0) { + return me.newPointRWY(_result[me.id],id); + } + } + return 0; + } elsif (size(id) >= 12) { + _result[me.id] = fetchLatLon(id); + if (size(_result[me.id]) != 0) { + return me.newPointLatLon(_result[me.id]); + } + return 0; + } + return 0; + }, + update: func() { + if (me.selectedPoint == nil) { + return; + } + if (find("PROG",canvas_mcdu.pageProp[me.id].getValue()) == -1) { + return; + } + _courseAndDistance[me.id] = courseAndDistance(me.selectedPoint); + me.bearing = _courseAndDistance[me.id][0]; + me.distance = _courseAndDistance[me.id][1]; + }, +}; + +var bearingDistances = [bearingDistanceInstance.new(0),bearingDistanceInstance.new(1)]; + +var BDTimer = maketimer(2, func(){ + bearingDistances[0].update(); + bearingDistances[1].update(); +}); +BDTimer.start(); \ No newline at end of file diff --git a/Nasal/MCDU/PROGCLB.nas b/Nasal/MCDU/PROGCLB.nas deleted file mode 100644 index 66770ddd..00000000 --- a/Nasal/MCDU/PROGCLB.nas +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2020 Matthew Maring (mattmaring) - -var progCLBInput = func(key, i) { - var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; - if (key == "L1") { - if (scratchpad == "CLR") { - fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; - if (fmgc.FMGCInternal.phase == 5) { - fmgc.FMGCInternal.phase = 3; - setprop("/FMGC/internal/activate-once", 0); - setprop("/FMGC/internal/activate-twice", 0); - setprop("/FMGC/internal/decel", 0); - } - mcdu_scratchpad.scratchpads[i].empty(); - } else if (int(scratchpad) != nil) { - var crzs = size(scratchpad); - if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and fmgc.FMGCInternal.crzSet <= scratchpad * 100) { - fmgc.FMGCInternal.crzProg = scratchpad; - mcdu_scratchpad.scratchpads[i].empty(); - if (fmgc.FMGCInternal.phase == 5) { - fmgc.FMGCInternal.phase = 3; - setprop("/FMGC/internal/activate-once", 0); - setprop("/FMGC/internal/activate-twice", 0); - setprop("/FMGC/internal/decel", 0); - } - } else { - mcdu_message(i, "NOT ALLOWED"); - } - } else { - mcdu_message(i, "NOT ALLOWED"); - } - } -} diff --git a/Nasal/MCDU/PROGCRZ.nas b/Nasal/MCDU/PROGCRZ.nas deleted file mode 100644 index 7d188609..00000000 --- a/Nasal/MCDU/PROGCRZ.nas +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2020 Matthew Maring (mattmaring) - -var progCRZInput = func(key, i) { - var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; - if (key == "L1") { - if (scratchpad == "CLR") { - fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; - if (fmgc.FMGCInternal.phase == 5) { - fmgc.FMGCInternal.phase = 3; - setprop("/FMGC/internal/activate-once", 0); - setprop("/FMGC/internal/activate-twice", 0); - setprop("/FMGC/internal/decel", 0); - } - mcdu_scratchpad.scratchpads[i].empty(); - } else if (int(scratchpad) != nil) { - var crzs = size(scratchpad); - if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and fmgc.FMGCInternal.crzSet <= scratchpad * 100) { - fmgc.FMGCInternal.crzProg = scratchpad; - mcdu_scratchpad.scratchpads[i].empty(); - if (fmgc.FMGCInternal.phase == 5) { - fmgc.FMGCInternal.phase = 3; - setprop("/FMGC/internal/activate-once", 0); - setprop("/FMGC/internal/activate-twice", 0); - setprop("/FMGC/internal/decel", 0); - } - } else { - mcdu_message(i, "NOT ALLOWED"); - } - } else { - mcdu_message(i, "NOT ALLOWED"); - } - } -} diff --git a/Nasal/MCDU/PROGDES.nas b/Nasal/MCDU/PROGDES.nas deleted file mode 100644 index c915f35f..00000000 --- a/Nasal/MCDU/PROGDES.nas +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright (c) 2020 Matthew Maring (mattmaring) - -var progDESInput = func(key, i) { - var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; - if (key == "L1") { - if (scratchpad == "CLR") { - fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; - if (fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { - fmgc.FMGCInternal.phase = 3; - setprop("/FMGC/internal/activate-once", 0); - setprop("/FMGC/internal/activate-twice", 0); - setprop("/FMGC/internal/decel", 0); - } - mcdu_scratchpad.scratchpads[i].empty(); - } else if (int(scratchpad) != nil) { - var crzs = size(scratchpad); - if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and fmgc.FMGCInternal.crzSet <= scratchpad * 100) { - fmgc.FMGCInternal.crzProg = scratchpad; - mcdu_scratchpad.scratchpads[i].empty(); - if (fmgc.FMGCInternal.phase == 4 or fmgc.FMGCInternal.phase == 5 or fmgc.FMGCInternal.phase == 6) { - fmgc.FMGCInternal.phase = 3; - setprop("/FMGC/internal/activate-once", 0); - setprop("/FMGC/internal/activate-twice", 0); - setprop("/FMGC/internal/decel", 0); - } - } else { - mcdu_message(i, "NOT ALLOWED"); - } - } else { - mcdu_message(i, "NOT ALLOWED"); - } - } -} diff --git a/Nasal/MCDU/PROGTO.nas b/Nasal/MCDU/PROGTO.nas deleted file mode 100644 index 5e0f96d4..00000000 --- a/Nasal/MCDU/PROGTO.nas +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2020 Matthew Maring (mattmaring) - -var altSet = props.globals.getNode("it-autoflight/input/alt", 1); - -var progTOInput = func(key, i) { - var scratchpad = mcdu_scratchpad.scratchpads[i].scratchpad; - if (key == "L1") { - if (scratchpad == "CLR") { - fmgc.FMGCInternal.crzProg = fmgc.FMGCInternal.crzFl; - mcdu_scratchpad.scratchpads[i].empty(); - } else if (int(scratchpad) != nil) { - var crzs = size(scratchpad); - if (crzs >= 1 and crzs <= 3 and scratchpad > 0 and scratchpad <= 430 and fmgc.FMGCInternal.crzSet <= scratchpad * 100 and fmgc.FMGCInternal.crzSet) { - fmgc.FMGCInternal.crzProg = scratchpad; - mcdu_scratchpad.scratchpads[i].empty(); - } else { - mcdu_message(i, "NOT ALLOWED"); - } - } else { - mcdu_message(i, "NOT ALLOWED"); - } - } -} diff --git a/Nasal/MCDU/VERTREV.nas b/Nasal/MCDU/VERTREV.nas index 05513585..e3ced48d 100644 --- a/Nasal/MCDU/VERTREV.nas +++ b/Nasal/MCDU/VERTREV.nas @@ -1,3 +1,5 @@ +var scratchpadStore = nil; + var vertRev = { title: [nil, nil, nil], subtitle: [nil, nil], @@ -42,6 +44,28 @@ var vertRev = { canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); } }, + getSpd: func() { + if (me.wp.speed_cstr != nil and me.wp.speed_cstr > 0) { + var tcol = (me.wp.speed_cstr_type == "computed" or me.wp.speed_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed + return [" " ~ sprintf("%3.0f", me.wp.speed_cstr), tcol]; + } else { + return [nil,nil]; + } + }, + getAlt: func() { + if (me.wp.alt_cstr != nil and me.wp.alt_cstr > 0) { + var tcol = (me.wp.alt_cstr_type == "computed" or me.wp.alt_cstr_type == "computed_mach") ? "grn" : "mag"; # TODO - check if only computed + if (me.wp.alt_cstr > fmgc.FMGCInternal.transAlt) { + return [sprintf("%5s", "FL" ~ math.round(num(me.wp.alt_cstr) / 100)) ~ " ", tcol]; + } else { + return [sprintf("%5.0f", me.wp.alt_cstr) ~ " ", tcol]; + } + } else { + return [nil,nil]; + } + }, + alt: nil, + speed: nil, _setupPageWithData: func() { if (me.type == 3) { me.title = ["VERT REV", " AT ", "PPOS"]; @@ -57,15 +81,30 @@ var vertRev = { me.fontMatrix = [[0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]; } elsif (me.type == 2) { me.title = ["VERT REV", " AT ", me.id]; + me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0]]; me.L1 = ["", " EFOB ---.-", "wht"]; me.R1 = ["", "EXTRA ---.- ", "wht"]; me.L2 = ["250/10000", " CLB SPD LIM", "mag"]; - me.L3 = [" [ ]", " SPD CSTR", "blu"]; + me.speed = me.getSpd(); + if (me.speed[0] == nil) { + me.L3 = [" [ ]", " SPD CSTR", "blu"]; + me.fontMatrix[0][2] = 1; + } else { + me.L3 = [me.speed[0], " SPD CSTR", me.speed[1]]; + me.fontMatrix[0][2] = 0; + } me.L4 = [" CONSTANT MACH", nil, "wht"]; me.L5 = [" WIND DATA", nil, "wht"]; me.L6 = [" CLB", nil, "amb"]; me.R2 = ["RTA ", nil, "wht"]; - me.R3 = ["[ ] ", "ALT CSTR ", "blu"]; + me.alt = me.getAlt(); + if (me.alt[0] == nil) { + me.R3 = ["[ ] ", "ALT CSTR ", "blu"]; + me.fontMatrix[1][2] = 1; + } else { + me.R3 = [me.alt[0], "ALT CSTR ", me.alt[1]]; + me.fontMatrix[1][2] = 0; + } me.R6 = ["DES ", nil, "amb"]; # When the system does vertical planning, L6 should be RETURN and R6 not used if the MCDU knows the waypoint is during climb or descent. # The CLB or DES prompts should only be shown for a vertical revision in the cruise phase. @@ -74,7 +113,6 @@ var vertRev = { # The 'arrows' for CLB/DES should actually be asterisks. me.arrowsMatrix = [[0, 0, 0, 1, 1, 1], [0, 1, 0, 0, 0, 1]]; me.arrowsColour = [["ack", "ack", "ack", "wht", "wht", "amb"], ["ack", "wht", "ack", "ack", "wht", "amb"]]; - me.fontMatrix = [[0, 0, 1, 0, 0, 0], [0, 0, 1, 0, 0, 0]]; } else { me.title = ["VERT REV", " AT ", me.id]; @@ -135,8 +173,22 @@ var vertRev = { } }, pushButtonLeft: func(index) { - if (index == 5) { - #print("role: ", me.wp.wp_role, ", type: ", me.wp.wp_type); + scratchpadStore = mcdu_scratchpad.scratchpads[me.computer].scratchpad; + if (index == 3 and me.type == 2) { + if (scratchpadStore == "CLR") { + me.wp.setSpeed("delete"); + mcdu_scratchpad.scratchpads[me.computer].empty(); + me._setupPageWithData(); + canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); + } elsif (num(scratchpadStore) != nil and size(scratchpadStore) == 3 and scratchpadStore >= 100 and scratchpadStore <= 350) { + me.wp.setSpeed(scratchpadStore, "at"); + mcdu_scratchpad.scratchpads[me.computer].empty(); + me._setupPageWithData(); + canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); + } else { + mcdu_message(me.computer, "FORMAT ERROR"); + } + } elsif (index == 5) { if (me.wp.wp_role == "sid") { if (canvas_mcdu.myCLBWIND[me.computer] == nil) { canvas_mcdu.myCLBWIND[me.computer] = windCLBPage.new(me.computer); @@ -182,6 +234,24 @@ var vertRev = { mcdu_message(me.computer, "NOT ALLOWED"); } }, + pushButtonRight: func(index) { + scratchpadStore = mcdu_scratchpad.scratchpads[me.computer].scratchpad; + if (index == 3 and me.type == 2) { + if (scratchpadStore == "CLR") { + me.wp.setAltitude("delete"); + mcdu_scratchpad.scratchpads[me.computer].empty(); + me._setupPageWithData(); + canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); + } elsif (num(scratchpadStore) != nil and (size(scratchpadStore) == 4 or size(scratchpadStore) == 5) and scratchpadStore >= 0 and scratchpadStore <= 39000) { + me.wp.setAltitude(math.round(scratchpadStore, 10), "at"); + mcdu_scratchpad.scratchpads[me.computer].empty(); + me._setupPageWithData(); + canvas_mcdu.pageSwitch[me.computer].setBoolValue(0); + } else { + mcdu_message(me.computer, "FORMAT ERROR"); + } + } + }, }; var updateCrzLvlCallback = func () { diff --git a/Nasal/Panels/atc.nas b/Nasal/Panels/atc.nas index 5cf13a00..d5abadfb 100644 --- a/Nasal/Panels/atc.nas +++ b/Nasal/Panels/atc.nas @@ -20,13 +20,12 @@ var Transponder = { activeADIRS: 1, condition: 0, failed: 0, - codeDigitsNodes: [props.globals.getNode("instrumentation/transponder/inputs/digit[0]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[1]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[2]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[3]", 1)], - serviceableNode: props.globals.getNode("instrumentation/transponder/serviceable", 1), - knobNode: props.globals.getNode("instrumentation/transponder/inputs/knob-mode", 1), - identNode: props.globals.getNode("instrumentation/transponder/inputs/ident-btn", 1), - ac1Node: props.globals.getNode("/systems/electrical/bus/ac-1", 1), - tcasNode: props.globals.getNode("instrumentation/tcas/inputs/mode"), - aglNode: props.globals.getNode("position/gear-agl-ft", 1), + codeDigitsNodes: [props.globals.getNode("/instrumentation/transponder/inputs/digit[0]", 1), props.globals.getNode("/instrumentation/transponder/inputs/digit[1]", 1), props.globals.getNode("/instrumentation/transponder/inputs/digit[2]", 1), props.globals.getNode("instrumentation/transponder/inputs/digit[3]", 1)], + serviceableNode: props.globals.getNode("/instrumentation/transponder/serviceable", 1), + knobNode: props.globals.getNode("/instrumentation/transponder/inputs/knob-mode", 1), + identNode: props.globals.getNode("/instrumentation/transponder/inputs/ident-btn", 1), + tcasNode: props.globals.getNode("/instrumentation/tcas/inputs/mode"), + aglNode: props.globals.getNode("/position/gear-agl-ft", 1), electricNode: props.globals.getNode("/systems/electrical/outputs/transponder", 1), # communicate to generic systems new: func(elecSrc, ADIRS) { var t = {parents:[Transponder]}; @@ -40,9 +39,9 @@ var Transponder = { return t; }, - update: func() { + update: func(notification) { # TCAS - on seperate electrical source, so has to be before transponder electrical checking - if (me.ac1Node.getValue() < 110) { + if (notification.elecAC1 < 110) { me.tcasNode.setValue(0); # off } else { if (me.mode >= 1 and me.mode <= 3) { @@ -285,7 +284,6 @@ var transponderPanel = { var init = func() { transponderPanel.atcSwitch(1); transponderPanel.updateAirData(); - transponderTimer.start(); } # Handler for code change from generic dialog @@ -297,9 +295,6 @@ setlistener("/instrumentation/transponder/id-code", func { var Transponders = std.Vector.new([Transponder.new("/systems/electrical/bus/ac-ess-shed", 1), Transponder.new("/systems/electrical/bus/ac-2", 2)]); -var transponderTimer = maketimer(0.1, func() { - Transponders.vector[transponderPanel.atcSel - 1].update(); -}); setlistener("/systems/navigation/adr/operating-1", func() { transponderPanel.updateADR1(systems.ADIRS.Operating.adr[0].getValue()); diff --git a/Nasal/Panels/clock.nas b/Nasal/Panels/clock.nas index 558cac2c..8cfcea5e 100644 --- a/Nasal/Panels/clock.nas +++ b/Nasal/Panels/clock.nas @@ -1,8 +1,10 @@ # -# Chrono - Clock - ET +# Chrono - Clock - ET # var chr = aircraft.timer.new("instrumentation/chrono[0]/elapsetime-sec",1); var clk = aircraft.timer.new("instrumentation/clock/elapsetime-sec",1); +var chrono_cpt = aircraft.timer.new("instrumentation/ndchrono[0]/elapsetime-sec",1); +var chrono_fo = aircraft.timer.new("instrumentation/ndchrono[1]/elapsetime-sec",1); var chr_min = nil; var chr_sec = nil; @@ -36,7 +38,6 @@ var clock = { hhMM: props.globals.initNode("/instrumentation/clock/clock_hh_mm", 0, "STRING"), utcDate: [props.globals.initNode("/instrumentation/clock/utc-date", "", "STRING"), props.globals.initNode("/instrumentation/clock/utc-date1", "", "STRING"), props.globals.initNode("/instrumentation/clock/utc-date2", "", "STRING"),props.globals.initNode("/instrumentation/clock/utc-date3", "", "STRING")], - }; var chrono = { @@ -49,6 +50,22 @@ var chrono = { started: props.globals.getNode("/instrumentation/chrono[0]/started"), }; +#Cpt chrono +var cpt_chrono = { + etHh_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etHh_cpt", 0, "INT"), + etMin_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etMin_cpt", 0, "INT"), + etSec_cpt: props.globals.initNode("/instrumentation/ndchrono[0]/etSec_cpt", 0, "INT"), + text: props.globals.initNode("/instrumentation/ndchrono[0]/text", "0' 00''", "STRING"), +}; + +#Fo chrono +var fo_chrono = { + etHh_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etHh_fo", 0, "INT"), + etMin_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etMin_fo", 0, "INT"), + etSec_fo: props.globals.initNode("/instrumentation/ndchrono[1]/etSec_fo", 0, "INT"), + text: props.globals.initNode("/instrumentation/ndchrono[1]/text", "0' 00''", "STRING"), +}; + var rudderTrim = { rudderTrimDisplay: props.globals.initNode("/controls/flight/rudder-trim-display", 0, "STRING"), rudderTrimDisplayLetter: props.globals.initNode("/controls/flight/rudder-trim-letter-display", "", "STRING"), @@ -59,6 +76,8 @@ setlistener("sim/signals/fdm-initialized", func { chr.reset(); clk.stop(); clk.reset(); + chrono_cpt.reset(); + chrono_fo.reset(); rudderTrim.rudderTrimDisplay.setValue(sprintf("%2.1f", pts.Fdm.JSBsim.Hydraulics.Rudder.trimDeg.getValue())); start_loop.start(); }); @@ -120,6 +139,31 @@ setlistener("/instrumentation/chrono[0]/chrono-reset", func(et){ }; }, 0, 0); +#Chrono +setlistener("instrumentation/efis[0]/inputs/CHRONO", func(et){ + chrono0 = et.getValue(); + if (chrono0 == 1){ + chrono_cpt.start(); + } elsif (chrono0 == 2) { + chrono_cpt.stop(); + } elsif (chrono0 == 0) { + chrono_cpt.reset(); + setprop("instrumentation/ndchrono[0]/elapsetime-sec", 0); + } +}, 0, 0); + +setlistener("instrumentation/efis[1]/inputs/CHRONO", func(et){ + chrono1 = et.getValue(); + if (chrono1 == 1){ + chrono_fo.start(); + } elsif (chrono1 == 2) { + chrono_fo.stop(); + } elsif (chrono1 == 0) { + chrono_fo.reset(); + setprop("instrumentation/ndchrono[1]/elapsetime-sec", 0); + } +}, 0, 0); + setlistener("instrumentation/clock/et-selector", func(et){ tmp1 = et.getValue(); if (tmp1 == 2){ @@ -131,6 +175,31 @@ setlistener("instrumentation/clock/et-selector", func(et){ } }, 0, 0); +#Chrono +setlistener("instrumentation/efis[0]/inputs/CHRONO", func(et){ + chrono0 = et.getValue(); + if (chrono0 == 1){ + chrono_cpt.start(); + } elsif (chrono0 == 2) { + chrono_cpt.stop(); + } elsif (chrono0 == 0) { + chrono_cpt.reset(); + setprop("instrumentation/ndchrono[0]/elapsetime-sec", 0); + } +}, 0, 0); + +setlistener("instrumentation/efis[1]/inputs/CHRONO", func(et){ + chrono1 = et.getValue(); + if (chrono1 == 1){ + chrono_fo.start(); + } elsif (chrono1 == 2) { + chrono_fo.stop(); + } elsif (chrono1 == 0) { + chrono_fo.reset(); + setprop("instrumentation/ndchrono[1]/elapsetime-sec", 0); + } +}, 0, 0); + var start_loop = maketimer(0.1, func { if (systems.ELEC.Bus.dcEss.getValue() < 25) { return; } @@ -225,6 +294,40 @@ var start_loop = maketimer(0.1, func { item.update(nil); } } + + #Cpt Chrono + chr0_tmp = getprop("instrumentation/ndchrono[0]/elapsetime-sec"); + if (chr0_tmp >= 360000) { + setprop("instrumentation/ndchrono[0]/elapsetime-sec", getprop("instrumentation/ndchrono[0]/elapsetime-sec") - 360000); + }; + chr0_hh = int(chr0_tmp * 0.000277777777778); + chr0_min = int((chr0_tmp * 0.0166666666667) - (chr0_hh * 60)); + chr0_sec = int(chr0_tmp - (chr0_min * 60) - (chr0_hh * 3600)); + setprop("instrumentation/ndchrono[0]/etHh_cpt", chr0_hh); + setprop("instrumentation/ndchrono[0]/etMin_cpt", chr0_min); + setprop("instrumentation/ndchrono[0]/etSec_cpt", chr0_sec); + if (chr0_tmp >= 3600) { + setprop("instrumentation/ndchrono[0]/text", sprintf("%02d H %02d'", chr0_hh, chr0_min)); + } else { + setprop("instrumentation/ndchrono[0]/text", sprintf("%02d' %02d''", chr0_min, chr0_sec)); + } + + #Fo Chrono + chr1_tmp = getprop("instrumentation/ndchrono[1]/elapsetime-sec"); + if (chr1_tmp >= 360000) { + setprop("instrumentation/ndchrono[1]/elapsetime-sec", getprop("instrumentation/ndchrono[1]/elapsetime-sec") - 360000); + }; + chr1_hh = int(chr1_tmp * 0.000277777777778); + chr1_min = int(chr1_tmp * 0.0166666666667); + chr1_sec = int(chr1_tmp - (chr1_min * 60) - (chr1_hh * 3600)); + setprop("instrumentation/ndchrono[1]/etHh_fo", chr1_hh); + setprop("instrumentation/ndchrono[1]/etMin_fo", chr1_min); + setprop("instrumentation/ndchrono[1]/etSec_fo", chr1_sec); + if (chr1_tmp >= 3600) { + setprop("instrumentation/ndchrono[1]/text", sprintf("%02d H %02d'", chr1_hh, chr1_min)); + } else { + setprop("instrumentation/ndchrono[1]/text", sprintf("%02d' %02d''", chr1_min, chr1_sec)); + } }); var updateRudderTrim = func() { @@ -255,4 +358,4 @@ var update_items = [ ), ]; -setlistener("/controls/switches/annun-test", updateRudderTrim, 0, 0); \ No newline at end of file +setlistener("/controls/switches/annun-test", updateRudderTrim, 0, 0); diff --git a/Nasal/Systems/ADIRS/ADR.nas b/Nasal/Systems/ADIRS/ADR.nas index 59cf9668..08d6d57d 100644 --- a/Nasal/Systems/ADIRS/ADR.nas +++ b/Nasal/Systems/ADIRS/ADR.nas @@ -144,6 +144,7 @@ var ADIRU = { call(canvas_nd.ND_2.NDFo.predicates[predicate]); } }, + _excessMotion: 0, alignLoop: func() { me._roll = pts.Orientation.roll.getValue(); me._pitch = pts.Orientation.pitch.getValue(); @@ -152,13 +153,18 @@ var ADIRU = { # todo use IR values if (me._gs > 5 or abs(me._pitch) > 5 or abs(me._roll) > 10) { me.stopAlignNoAlign(); + me._excessMotion = 1; print("Excessive motion, restarting"); me.update(); # update operative me.align(calcAlignTime(pts.Position.latitude.getValue())); } elsif (me.operative == 0) { me.stopAlignNoAlign(); + me._excessMotion = 0; } elsif (pts.Sim.Time.elapsedSec.getValue() >= me._alignTime) { me.stopAlignAligned(); + me._excessMotion = 0; + } else { + me._excessMotion = 0; } if (!me.operating and pts.Sim.Time.elapsedSec.getValue() >= me._pfdTime) { @@ -318,7 +324,7 @@ var ADIRS = { } ), ], - loop: func() { + loop: func(notification) { if (me._init) { for (i = 0; i < _NUMADIRU; i = i + 1) { # update ADR units power @@ -342,7 +348,6 @@ var ADIRS = { } # Update VFE - notification = nil; foreach (var update_item; me.update_items) { update_item.update(notification); } diff --git a/Nasal/Systems/APU.nas b/Nasal/Systems/APU.nas index 8f57a2df..829acc60 100644 --- a/Nasal/Systems/APU.nas +++ b/Nasal/Systems/APU.nas @@ -101,7 +101,7 @@ var APU = { me.inletFlap.open(); me.listenSignals = 1; settimer(func() { - if (APUNodes.Controls.master.getValue() and !getprop("/systems/acconfig/autoconfig-running")) { + if (APUNodes.Controls.master.getValue() and !pts.Acconfig.running.getValue()) { me.setState(2); } }, 3); @@ -131,7 +131,7 @@ var APU = { apuStartTimer.start(); }, waitStart: func() { - if (pts.APU.rpm.getValue() >= 4.9) { + if (pts.APU.rpm.getValue() >= 4.9 or me.fastStart) { me.GenericControls.cutoff.setValue(0); if (me.fastStart) { setprop("/fdm/jsbsim/propulsion/set-running", 2); diff --git a/Nasal/Systems/Comm/Notification.nas b/Nasal/Systems/Comm/Notification.nas index 3d1e969d..51c89e0f 100644 --- a/Nasal/Systems/Comm/Notification.nas +++ b/Nasal/Systems/Comm/Notification.nas @@ -169,12 +169,12 @@ var AOC = { var serverString = ""; if (me.server.getValue() == "vatsim") { - serverString = "https://api.flybywiresim.com/metar?source=vatsim&icao="; + serverString = "https://api.flybywiresim.com/metar/" ~ airport ~ "?source=vatsim"; } else { - serverString = defaultServer; + serverString = defaultServer ~ airport; } - http.load(serverString ~ airport) + http.load(serverString) .fail(func(r) me.downloadFail(i, r)) .done(func(r) { var errs = []; @@ -213,7 +213,23 @@ var AOC = { }, processMETAR: func(r, i) { var raw = r.response; + if (find('"statusCode":404',raw) != -1) { + me.received = 0; + me.sent = 0; + mcdu.mcdu_message(i, "NO METAR AVAILABLE"); + return; + } + if (me.server.getValue() == "vatsim") { + if (find("metar", raw) != -1) { + raw = split('"metar":"', raw)[1]; + raw = split('","source":"Vatsim"}', raw)[0]; + } else { + me.received = 0; + me.sent = 0; + mcdu.mcdu_message(i, "BAD SERVER RESPONSE"); + return; + } me.lastMETAR = raw; } else if (find("", raw) != -1) { raw = split("", raw)[1]; @@ -331,7 +347,7 @@ var ATIS = { }, processATIS: func(r, i) { var raw = r.response; - if (r.response == "FBW_ERROR: D-ATIS not available at this airport" or find("atis not avail",r.response) != -1 or find('"statusCode":404',r.response) != -1) { + if (raw == "FBW_ERROR: D-ATIS not available at this airport" or find("atis not avail",raw) != -1 or find('"statusCode":404',raw) != -1) { me.received = 0; me.sent = 0; mcdu.mcdu_message(i,"NO D-ATIS AVAILABLE"); diff --git a/Nasal/Systems/FADEC/fadec-common.nas b/Nasal/Systems/FADEC/fadec-common.nas index 665e645c..510baba9 100644 --- a/Nasal/Systems/FADEC/fadec-common.nas +++ b/Nasal/Systems/FADEC/fadec-common.nas @@ -448,4 +448,4 @@ setlistener("/systems/thrust/thr-locked", func { }, 0, 0); var lockTimer = maketimer(0.1, checkLockThr); -var lockTimer2 = maketimer(0.1, checkLockThr2); +var lockTimer2 = maketimer(0.1, checkLockThr2); \ No newline at end of file diff --git a/Nasal/Systems/brakesystem.nas b/Nasal/Systems/brakesystem.nas index ca021df9..b460b2cc 100755 --- a/Nasal/Systems/brakesystem.nas +++ b/Nasal/Systems/brakesystem.nas @@ -111,7 +111,7 @@ var BrakeSystem = }, # update brake energy - update : func() + update : func(notification) { if (me.counter == 0) { me.counter = 1; @@ -122,10 +122,10 @@ var BrakeSystem = LThermalEnergy = me.thermalEnergy[0]; RThermalEnergy = me.thermalEnergy[1]; - me.CurrentTime = pts.Sim.Time.elapsedSec.getValue(); + me.CurrentTime = notification.elapsedTime; dt = me.CurrentTime - me.LastSimTime; - LBrakeLevel = pts.Fdm.JSBsim.Fcs.brake[0].getValue(); - RBrakeLevel = pts.Fdm.JSBsim.Fcs.brake[1].getValue(); + LBrakeLevel = notification.leftBrakeFCS; + RBrakeLevel = notification.rightBrakeFCS; tatdegc = pts.Fdm.JSBsim.Propulsion.tatC.getValue() or 0; if (pts.Sim.replayState.getValue() == 0 and dt < 1.0) { @@ -137,7 +137,7 @@ var BrakeSystem = LCoolingRatio = LCoolingRatio * 3; RCoolingRatio = RCoolingRatio * 3; }; - airspeed = pts.Velocities.airspeed.getValue(); + airspeed = notification.airspeedV; if (pts.Gear.position[1].getValue()) { #increase CoolingRatio if gear down according to airspeed LCoolingRatio = LCoolingRatio * airspeed; @@ -168,7 +168,7 @@ var BrakeSystem = L_Thrust = 0; R_Thrust = 0; - if (pts.Gear.wow[1].getValue()) { + if (notification.gear1Wow) { var V1 = pts.Velocities.groundspeed.getValue(); var Mass = pts.Fdm.JSBsim.Inertia.weightLbs.getValue() * me.ScalingDivisor; @@ -179,7 +179,7 @@ var BrakeSystem = LThermalEnergy += (Mass * pts.Gear.compression[1].getValue() * (math.pow(V1, 2) - math.pow(V2_L, 2)) / 2); if (pts.Controls.Gear.chocks.getValue()) { - if (!pts.Controls.Gear.parkingBrake.getValue()) { + if (!notification.parkingBrake) { # cooling effect: reduce thermal energy by (LnCoolFactor) * dt LThermalEnergy = LThermalEnergy * math.exp(LnCoolFactor * dt); } else { @@ -188,7 +188,7 @@ var BrakeSystem = LThermalEnergy = (LThermalEnergy * math.exp(LnCoolFactor * dt)) + (L_Thrust * dt); }; } else { - if (!pts.Controls.Gear.parkingBrake.getValue()) { + if (!notification.parkingBrake) { if (LBrakeLevel>0) { if (V2_L>0) { #LThermalEnergy += (Mass * (math.pow(V1, 2) - math.pow(V2_L, 2)) / 2) + L_thrust; @@ -212,7 +212,7 @@ var BrakeSystem = RThermalEnergy += (Mass * pts.Gear.compression[2].getValue() * (math.pow(V1, 2) - math.pow(V2_R, 2)) / 2); if (pts.Controls.Gear.chocks.getValue()) { - if (!pts.Controls.Gear.parkingBrake.getValue()) { + if (!notification.parkingBrake) { # cooling effect: reduce thermal energy by (RnCoolFactor) * dt RThermalEnergy = RThermalEnergy * math.exp(RnCoolFactor * dt); } else { @@ -221,7 +221,7 @@ var BrakeSystem = RThermalEnergy = (RThermalEnergy * math.exp(RnCoolFactor * dt)) + (R_Thrust * dt); }; } else { - if (!pts.Controls.Gear.parkingBrake.getValue()) { + if (!notification.parkingBrake) { if (RBrakeLevel>0) { if (V2_R>0) { #RThermalEnergy += (Mass * (math.pow(V1, 2) - math.pow(V2_R, 2)) / 2) + R_thrust; @@ -271,7 +271,7 @@ var BrakeSystem = if (LThermalEnergy>1 and !me.LSmokeActive) { # start smoke processing me.LSmokeActive = 1; - settimer(func { BrakeSys.Lsmoke(); },0); + settimer(func { BrakeSys.Lsmoke(); },0); # is settimer needed? }; if (RThermalEnergy>1 and !me.RSmokeActive) { # start smoke processing @@ -406,7 +406,7 @@ var Autobrake = { me._mode = me.mode.getValue(); me._active = me.active.getBoolValue(); if (me._gnd_speed > 72) { - if (me._mode != 0 and pts.Controls.Engines.Engine.throttle[0].getValue() < 0.15 and pts.Controls.Engines.Engine.throttle[1].getValue() < 0.15 and me._wow0 and systems.HYD.Brakes.askidSw.getValue() and systems.HYD.Psi.green.getValue() >= 2500 ) { + if (me._mode != 0 and pts.Controls.Engines.Engine.throttle[0].getValue() < 0.15 and pts.Controls.Engines.Engine.throttle[1].getValue() < 0.15 and me._wow0 and systems.HYD.Switch.nwsSwitch.getBoolValue() and systems.HYD.Psi.green.getValue() >= 2500 ) { me.active.setBoolValue(1); } elsif (me._active) { me.active.setBoolValue(0); diff --git a/Nasal/Systems/electrical.nas b/Nasal/Systems/electrical.nas index 1ff311e2..6fc42666 100644 --- a/Nasal/Systems/electrical.nas +++ b/Nasal/Systems/electrical.nas @@ -13,8 +13,6 @@ var dc2 = 0; # Main class var ELEC = { - _timer1On: 0, - _timer2On: 0, EmerElec: props.globals.getNode("/systems/electrical/some-electric-thingie/emer-elec-config"), Bus: { acEss: props.globals.getNode("/systems/electrical/bus/ac-ess"), @@ -121,6 +119,7 @@ var ELEC = { volts: props.globals.getNode("/systems/electrical/sources/emer-gen/output-volt"), hertz: props.globals.getNode("/systems/electrical/sources/emer-gen/output-hertz"), voltsRelay: props.globals.getNode("/systems/electrical/relay/emer-glc/output"), + relayPos: props.globals.getNode("/systems/electrical/relay/emer-glc/contact-pos"), }, Ext: { volts: props.globals.getNode("/systems/electrical/sources/ext/output-volt"), @@ -206,36 +205,65 @@ var ELEC = { me.Fail.tr1Fault.setBoolValue(0); me.Fail.tr2Fault.setBoolValue(0); }, - loop: func() { + _FMGC1: 0, + _FMGC2: 0, + _activeFMGC: nil, + _timer1On: 0, + _timer2On: 0, + loop: func(notification) { # Autopilot Disconnection routines - if (me.Bus.dcEssShed.getValue() < 25) { - if (fmgc.Output.ap1.getValue() and !me._timer1On) { + me._activeFMGC = fcu.FCUController.activeFMGC.getValue(); + me._FMGC1 = fmgc.Output.ap1.getValue(); + me._FMGC2 = fmgc.Output.ap2.getValue(); + + if (notification.dcEssShed < 25) { + if (me._FMGC1 and !me._timer1On) { # delay 1 cycle to avoid spurious me._timer1On = 1; - settimer(func() { - if (me.Bus.dcEssShed.getValue() < 25) { - fcu.apOff("hard", 1); - if (fcu.FCUController.activeFMGC.getValue() == 1) { - fcu.athrOff("hard"); - } + } elsif (me._FMGC1) { + if (notification.dcEssShed < 25) { + fcu.apOff("hard", 1); + if (me._activeFMGC == 1) { + fcu.athrOff("hard"); } - me._timer1On = 0; - }, 0.1); + } + me._timer1On = 0; } } - if (me.Bus.dc2.getValue() < 25) { - if (fmgc.Output.ap2.getValue() and !me._timer2On) { + if (notification.dc2 < 25) { + if (me._FMGC2 and !me._timer2On) { # delay 1 cycle to avoid spurious me._timer2On = 1; - settimer(func() { - if (me.Bus.dc2.getValue() < 25) { - fcu.apOff("hard", 2); - if (fcu.FCUController.activeFMGC.getValue() == 2) { - fcu.athrOff("hard"); - } + } elsif (me._FMGC2) { + if (notification.dc2 < 25) { + fcu.apOff("hard", 2); + if (me._activeFMGC == 2) { + fcu.athrOff("hard"); } - me._timer2On = 0; - }, 0.1); + } + me._timer2On = 0; } } }, +}; + +# Emesary +var A320Electrical = notifications.SystemRecipient.new("A320 Electrical",ELEC.loop,ELEC); +emesary.GlobalTransmitter.Register(A320Electrical); + +var input = { + "elecAC1": "/systems/electrical/bus/ac-1", + "elecAC2": "/systems/electrical/bus/ac-2", + "elecACEss": "/systems/electrical/bus/ac-ess", + "elecACEssShed": "/systems/electrical/bus/ac-ess-shed", + "dc1": "/systems/electrical/bus/dc-1", + "dc2": "/systems/electrical/bus/dc-2", + "dcBat": "/systems/electrical/bus/dc-bat", + "dcEss": "/systems/electrical/bus/dc-ess", + "dcEssShed": "/systems/electrical/bus/dc-ess-shed", + "dcHot1": "/systems/electrical/bus/dc-hot-1", + "dcHot2": "/systems/electrical/bus/dc-hot-2", +}; + +foreach (var name; keys(input)) { + emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 Electrical", name, input[name])); } \ No newline at end of file diff --git a/Nasal/Systems/fire.nas b/Nasal/Systems/fire.nas index 433e6335..d7c74a47 100644 --- a/Nasal/Systems/fire.nas +++ b/Nasal/Systems/fire.nas @@ -17,6 +17,7 @@ var cargoTestBtnOff = props.globals.initNode("/controls/fire/cargo/test-off", 0, var eng1FireWarn = props.globals.initNode("/systems/fire/engine1/warning-active", 0, "BOOL"); var eng2FireWarn = props.globals.initNode("/systems/fire/engine2/warning-active", 0, "BOOL"); var apuFireWarn = props.globals.initNode("/systems/fire/apu/warning-active", 0, "BOOL"); +var lavatoryFireWarn = props.globals.getNode("/systems/fire/lavatory/warning", 1); var eng1Inop = props.globals.initNode("/systems/fire/engine1/det-inop", 0, "BOOL"); var eng2Inop = props.globals.initNode("/systems/fire/engine2/det-inop", 0, "BOOL"); var apuInop = props.globals.initNode("/systems/fire/apu/det-inop", 0, "BOOL"); @@ -33,13 +34,15 @@ var eng1Agent2TimerTime = props.globals.initNode("/systems/fire/engine1/agent2-t var eng2Agent2TimerTime = props.globals.initNode("/systems/fire/engine2/agent2-timer-time", 0, "INT"); var apuAgentTimerTime = props.globals.initNode("/systems/fire/apu/agent-timer-time", 0, "INT"); +var fireButtons = [props.globals.getNode("/controls/engines/engine[0]/fire-btn"),props.globals.getNode("/controls/engines/engine[1]/fire-btn"),props.globals.getNode("/controls/apu/fire-btn")]; + var fire_init = func { setprop("/controls/OH/protectors/fwddisch", 0); setprop("/controls/OH/protectors/aftdisch", 0); setprop("/controls/fire/cargo/fwddisch", 0); setprop("/controls/fire/cargo/aftdisch", 0); - setprop("/systems/failures/cargo-fwd-fire", 0); - setprop("/systems/failures/cargo-aft-fire", 0); + setprop("/systems/failures/fire/cargo-fwd-fire", 0); + setprop("/systems/failures/fire/cargo-aft-fire", 0); setprop("/controls/fire/cargo/test", 0); fire_timer.start(); } @@ -276,9 +279,9 @@ var detectorLoop = { } }, sendSignal: func(system, typeLoop) { - if (system == 0 and !getprop("/systems/failures/engine-left-fire")) { return; } - elsif (system == 1 and !getprop("/systems/failures/engine-right-fire")) { return; } - elsif (system == 2 and !getprop("/systems/failures/apu-fire")) { return; } + if (system == 0 and !getprop("/systems/failures/fire/engine-left-fire")) { return; } + elsif (system == 1 and !getprop("/systems/failures/fire/engine-right-fire")) { return; } + elsif (system == 2 and !getprop("/systems/failures/fire/apu-fire")) { return; } engFireDetectorUnits.vector[system].receiveSignal(typeLoop); } }; @@ -303,8 +306,8 @@ var cargoDetectorLoop = { } }, sendSignal: func(system, typeLoop) { - if ((system == 0 or system == 1) and !getprop("/systems/failures/cargo-aft-fire")) { return; } - elsif (system == 2 and !getprop("/systems/failures/cargo-fwd-fire")) { return; } + if ((system == 0 or system == 1) and !getprop("/systems/failures/fire/cargo-aft-fire")) { return; } + elsif (system == 2 and !getprop("/systems/failures/fire/cargo-fwd-fire")) { return; } cargoSmokeDetectorUnits.vector[system].receiveSignal(typeLoop); } @@ -488,29 +491,29 @@ var checkTwoInop2Timer = maketimer(0.1, checkTwoInop2); var checkTwoInop3Timer = maketimer(0.1, checkTwoInop3); # Create fire systems -var engFireDetectorUnits = std.Vector.new([ engFireDetectorUnit.new(0, "/systems/failures/engine-left-fire", "/controls/fire/test-btn-1"), engFireDetectorUnit.new(1, "/systems/failures/engine-right-fire", "/controls/fire/test-btn-2"), engFireDetectorUnit.new(2, "/systems/failures/apu-fire", "/controls/fire/apu-test-btn") ]); -var cargoSmokeDetectorUnits = std.Vector.new([cargoSmokeDetectorUnit.new(0, "/systems/failures/cargo-aft-fire"), cargoSmokeDetectorUnit.new(1, "/systems/failures/cargo-aft-fire"), cargoSmokeDetectorUnit.new(1, "/systems/failures/cargo-fwd-fire")]); +var engFireDetectorUnits = std.Vector.new([ engFireDetectorUnit.new(0, "/systems/failures/fire/engine-left-fire", "/controls/fire/test-btn-1"), engFireDetectorUnit.new(1, "/systems/failures/fire/engine-right-fire", "/controls/fire/test-btn-2"), engFireDetectorUnit.new(2, "/systems/failures/fire/apu-fire", "/controls/fire/apu-test-btn") ]); +var cargoSmokeDetectorUnits = std.Vector.new([cargoSmokeDetectorUnit.new(0, "/systems/failures/fire/cargo-aft-fire"), cargoSmokeDetectorUnit.new(1, "/systems/failures/fire/cargo-aft-fire"), cargoSmokeDetectorUnit.new(1, "/systems/failures/fire/cargo-fwd-fire")]); # Create detector loops var engDetectorLoops = std.Vector.new([ -detectorLoop.new(0, 1, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/engine-left-fire"), detectorLoop.new(0, 2, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/engine-left-fire"), -detectorLoop.new(1, 1, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/engine-right-fire"), detectorLoop.new(1, 2, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/engine-right-fire"), -detectorLoop.new(2, 1, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire"), detectorLoop.new(2, 2, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire") +detectorLoop.new(0, 1, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/fire/engine-left-fire"), detectorLoop.new(0, 2, "/systems/fire/engine1/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/fire/engine-left-fire"), +detectorLoop.new(1, 1, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-2", "/systems/failures/fire/engine-right-fire"), detectorLoop.new(1, 2, "/systems/fire/engine2/temperature", "/systems/electrical/bus/dc-ess", "/systems/failures/fire/engine-right-fire"), +detectorLoop.new(2, 1, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/apu-fire"), detectorLoop.new(2, 2, "/systems/fire/apu/temperature", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/apu-fire") ]); var cargoDetectorLoops = std.Vector.new([ -cargoDetectorLoop.new(0, 1, "/systems/fire/cargo/aft/temperature", "/systems/failures/cargo-aft-fire"), cargoDetectorLoop.new(0, 2, "/systems/fire/cargo/aft/temperature", "/systems/failures/cargo-aft-fire"), -cargoDetectorLoop.new(1, 1, "/systems/fire/cargo/aft/temperature", "/systems/failures/cargo-aft-fire"), cargoDetectorLoop.new(1, 2, "/systems/fire/cargo/aft/temperature", "/systems/failures/cargo-aft-fire"), -cargoDetectorLoop.new(2, 1, "/systems/fire/cargo/fwd/temperature", "/systems/failures/cargo-fwd-fire"), cargoDetectorLoop.new(2, 2, "/systems/fire/cargo/fwd/temperature", "/systems/failures/cargo-fwd-fire") +cargoDetectorLoop.new(0, 1, "/systems/fire/cargo/aft/temperature", "/systems/failures/fire/cargo-aft-fire"), cargoDetectorLoop.new(0, 2, "/systems/fire/cargo/aft/temperature", "/systems/failures/fire/cargo-aft-fire"), +cargoDetectorLoop.new(1, 1, "/systems/fire/cargo/aft/temperature", "/systems/failures/fire/cargo-aft-fire"), cargoDetectorLoop.new(1, 2, "/systems/fire/cargo/aft/temperature", "/systems/failures/fire/cargo-aft-fire"), +cargoDetectorLoop.new(2, 1, "/systems/fire/cargo/fwd/temperature", "/systems/failures/fire/cargo-fwd-fire"), cargoDetectorLoop.new(2, 2, "/systems/fire/cargo/fwd/temperature", "/systems/failures/fire/cargo-fwd-fire") ]); # Create extinguisher bottles -var extinguisherBottles = std.Vector.new([extinguisherBottle.new(0, "/systems/fire/engine1/disch1", "/systems/electrical/bus/dc-hot-1", "/systems/failures/engine-left-fire", "/systems/fire/engine1/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine1/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/engine-left-fire", "/systems/fire/engine1/warning-active"), -extinguisherBottle.new(0, "/systems/fire/engine2/disch1", "/systems/electrical/bus/dc-hot-2", "/systems/failures/engine-right-fire", "/systems/fire/engine2/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine2/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/engine-right-fire", "/systems/fire/engine2/warning-active"), -extinguisherBottle.new(9, "/systems/fire/apu/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/apu-fire", "/systems/fire/apu/warning-active") ]); +var extinguisherBottles = std.Vector.new([extinguisherBottle.new(0, "/systems/fire/engine1/disch1", "/systems/electrical/bus/dc-hot-1", "/systems/failures/fire/engine-left-fire", "/systems/fire/engine1/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine1/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/fire/engine-left-fire", "/systems/fire/engine1/warning-active"), +extinguisherBottle.new(0, "/systems/fire/engine2/disch1", "/systems/electrical/bus/dc-hot-2", "/systems/failures/fire/engine-right-fire", "/systems/fire/engine2/warning-active"), extinguisherBottle.new(1, "/systems/fire/engine2/disch2", "/systems/electrical/bus/dc-2", "/systems/failures/fire/engine-right-fire", "/systems/fire/engine2/warning-active"), +extinguisherBottle.new(9, "/systems/fire/apu/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/apu-fire", "/systems/fire/apu/warning-active") ]); # There is only one bottle but the system will think there are two, so other parts work -var cargoExtinguisherBottles = std.Vector.new([extinguisherBottle.new(8, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/cargo-aft-fire", "/systems/fire/cargo/aft/warning-active", 250), extinguisherBottle.new(7, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/cargo-fwd-fire", "/systems/fire/cargo/fwd/warning-active", 250)]); +var cargoExtinguisherBottles = std.Vector.new([extinguisherBottle.new(8, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/cargo-aft-fire", "/systems/fire/cargo/aft/warning-active", 250), extinguisherBottle.new(7, "/systems/fire/cargo/disch", "/systems/electrical/bus/dc-bat", "/systems/failures/fire/cargo-fwd-fire", "/systems/fire/cargo/fwd/warning-active", 250)]); # Create CIDS channels var CIDSchannels = std.Vector.new([CIDSchannel.new("/systems/electrical/bus/dc-ess"), CIDSchannel.new("/systems/electrical/bus/dc-2")]); @@ -544,7 +547,7 @@ var createCargoFireBottleListener = func(prop, index) { # Listeners setlistener("/controls/engines/engine[0]/fire-btn", func() { - if (getprop("/controls/engines/engine[0]/fire-btn") == 1) { + if (systems.fireButtons[0].getValue() == 1) { ecam.shutUpYou(); eng1AgentTimerMakeTimer.stop(); eng1AgentTimer.setValue(10); @@ -587,7 +590,7 @@ eng1Agent2TimerMakeTimerFunc = func() { } setlistener("/controls/engines/engine[1]/fire-btn", func() { - if (getprop("/controls/engines/engine[1]/fire-btn") == 1) { + if (systems.fireButtons[1].getValue() == 1) { ecam.shutUpYou(); eng2AgentTimerMakeTimer.stop(); eng2AgentTimer.setValue(10); @@ -652,7 +655,7 @@ apuAgentTimerMakeTimerFunc = func() { } setlistener("/controls/fire/test-btn-1", func() { - if (getprop("/systems/failures/engine-left-fire")) { return; } + if (getprop("/systems/failures/fire/engine-left-fire")) { return; } if (testBtn.getValue() == 1) { if (systems.ELEC.Bus.dcBat.getValue() > 25 or systems.ELEC.Bus.dcEss.getValue() > 25) { @@ -665,7 +668,7 @@ setlistener("/controls/fire/test-btn-1", func() { }, 0, 0); setlistener("/controls/fire/test-btn-2", func() { - if (getprop("/systems/failures/engine-right-fire")) { return; } + if (getprop("/systems/failures/fire/engine-right-fire")) { return; } if (testBtn2.getValue() == 1) { if (systems.ELEC.Bus.dcBat.getValue() > 25 or systems.ELEC.Bus.dcEss.getValue() > 25) { eng2FireWarn.setBoolValue(1); @@ -677,7 +680,7 @@ setlistener("/controls/fire/test-btn-2", func() { }, 0, 0); setlistener("/controls/fire/apu-test-btn", func() { - if (getprop("/systems/failures/apu-fire")) { return; } + if (getprop("/systems/failures/fire/apu-fire")) { return; } if (apuTestBtn.getValue() == 1) { if (systems.ELEC.Bus.dcBat.getValue() > 25 or systems.ELEC.Bus.dcEss.getValue() > 25) { apuFireWarn.setBoolValue(1); @@ -689,7 +692,7 @@ setlistener("/controls/fire/apu-test-btn", func() { }, 0, 0); setlistener("/controls/fire/cargo/test", func() { - if (getprop("/systems/failures/aft-cargo-fire") or getprop("/systems/failures/fwd-cargo-fire") or systems.ELEC.Bus.dcBat.getValue() < 25 or systems.ELEC.Bus.dcEss.getValue() < 25) { return; } + if (getprop("/systems/failures/fire/aft-cargo-fire") or getprop("/systems/failures/fire/fwd-cargo-fire") or systems.ELEC.Bus.dcBat.getValue() < 25 or systems.ELEC.Bus.dcEss.getValue() < 25) { return; } if (cargoTestBtn.getBoolValue()) { cargoTestTime.setValue(elapsedTime.getValue()); cargoTestChecker.start(); diff --git a/Nasal/Systems/hydraulics.nas b/Nasal/Systems/hydraulics.nas index c3cb02c2..204c40b5 100644 --- a/Nasal/Systems/hydraulics.nas +++ b/Nasal/Systems/hydraulics.nas @@ -10,7 +10,6 @@ var HYD = { accumPressPsi: props.globals.initNode("/systems/hydraulic/yellow-accumulator-psi-cmd", 0, "INT"), leftPressPsi: props.globals.initNode("/systems/hydraulic/brakes/pressure-left-psi", 0, "INT"), rightPressPsi: props.globals.initNode("/systems/hydraulic/brakes/pressure-right-psi", 0, "INT"), - askidSw: props.globals.initNode("/systems/hydraulic/brakes/askidnwssw", 1, "BOOL"), mode: props.globals.initNode("/systems/hydraulic/brakes/mode", 0, "INT"), leftbrake: props.globals.getNode("/controls/gear/brake-left"), rightbrake: props.globals.getNode("/controls/gear/brake-right"), @@ -57,6 +56,7 @@ var HYD = { rat: props.globals.getNode("/controls/hydraulic/switches/rat-man"), yellowEDP: props.globals.getNode("/controls/hydraulic/switches/yellow-edp"), yellowElec: props.globals.getNode("/controls/hydraulic/switches/yellow-elec"), + nwsSwitch: props.globals.getNode("/controls/gear/nws-switch"), }, Valve: { yellowFire: props.globals.getNode("/systems/hydraulic/sources/yellow-edp/fire-valve"), @@ -85,97 +85,91 @@ var HYD = { me.Fail.yellowElec.setBoolValue(0); me.Fail.yellowLeak.setBoolValue(0); }, - loop: func() { - if (props.globals.getValue("/controls/gear/nws-switch") == 1) { - me.Brakes.askidSw.setBoolValue(1); #true - } else { - me.Brakes.askidSw.setBoolValue(0); #false - } - + loop: func(notification) { # Decrease accumPressPsi when green and yellow hydraulic's aren't pressurized - if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { + if (me.Brakes.leftbrake.getValue() > 0 or notification.brakesMode == 0) { lcont = lcont + 1; } else { lcont = 0; } - if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { + if (me.Brakes.rightbrake.getValue() > 0 or notification.brakesMode == 0) { rcont = rcont + 1; } else { rcont = 0; } - if (me.Psi.yellow.getValue() < me.Brakes.accumPressPsi.getValue() and me.Brakes.accumPressPsi.getValue() > 0) { + if (notification.yellow < notification.accumPressPsi and notification.accumPressPsi > 0) { if (lcont == 1) { - me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 200); + me.Brakes.accumPressPsi.setValue(notification.accumPressPsi - 200); } if (rcont == 1) { - me.Brakes.accumPressPsi.setValue(me.Brakes.accumPressPsi.getValue() - 200); + me.Brakes.accumPressPsi.setValue(notification.accumPressPsi - 200); } - if (me.Brakes.accumPressPsi.getValue() < 0) { + if (notification.accumPressPsi < 0) { me.Brakes.accumPressPsi.setValue(0); } } # Braking Pressure - if (me.Brakes.mode.getValue() == 1 or (me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() >= 2500)) { + if (notification.brakesMode == 1 or (notification.brakesMode == 2 and notification.green >= 2500)) { # Normal braking - Green OK - if (me.Brakes.leftbrake.getValue() > 0) { - me.Brakes.leftPressPsi.setValue(me.Psi.green.getValue() * pts.Fdm.JSBsim.Fcs.brake[0].getValue()); + if (notification.leftBrake > 0) { + me.Brakes.leftPressPsi.setValue(notification.green * notification.leftBrakeFCS); } else { me.Brakes.leftPressPsi.setValue(0); } - if (me.Brakes.rightbrake.getValue() > 0) { - me.Brakes.rightPressPsi.setValue(me.Psi.green.getValue() * pts.Fdm.JSBsim.Fcs.brake[1].getValue()); + if (notification.rightBrake > 0) { + me.Brakes.rightPressPsi.setValue(notification.green * notification.rightBrakeFCS); } else { me.Brakes.rightPressPsi.setValue(0); } } else { - if ((me.Brakes.mode.getValue() == 2 and me.Psi.green.getValue() < 2500) or me.Brakes.mode.getValue() == 0) { + if ((notification.brakesMode == 2 and notification.green < 2500) or notification.brakesMode == 0) { # Alternate Braking (Yellow OK + Antiskid ON + electric OK) - missing condition: BSCU OK-KO - if (me.Psi.yellow.getValue() >= 2500 and me.Brakes.askidSw.getValue() and (systems.ELEC.Bus.dc1.getValue() >= 24 or systems.ELEC.Bus.dc2.getValue() >= 24 or systems.ELEC.Bus.dcEss.getValue() >= 24)) { - if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { - me.Brakes.leftPressPsi.setValue(me.Psi.yellow.getValue() * pts.Fdm.JSBsim.Fcs.brake[0].getValue()); + if (notification.yellow >= 2500 and notification.NWSSwitch and (notification.dc1 >= 24 or notification.dc2 >= 24 or notification.dcEss >= 24)) { + if (notification.leftBrake > 0 or notification.brakesMode == 0) { + me.Brakes.leftPressPsi.setValue(notification.yellow * notification.leftBrakeFCS); } else { me.Brakes.leftPressPsi.setValue(0); } - if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { - me.Brakes.rightPressPsi.setValue(me.Psi.yellow.getValue() * pts.Fdm.JSBsim.Fcs.brake[1].getValue()); + if (notification.rightBrake > 0 or notification.brakesMode == 0) { + me.Brakes.rightPressPsi.setValue(notification.yellow * notification.rightBrakeFCS); } else { me.Brakes.rightPressPsi.setValue(0); } } else { # Alternate Braking (Yellow OK + Antiskid OFF + electric OK) - missing condition: BSCU OK-KO - if (me.Psi.yellow.getValue() >= 2500 and !me.Brakes.askidSw.getValue() and (systems.ELEC.Bus.dc1.getValue() >= 24 or systems.ELEC.Bus.dc2.getValue() >= 24 or systems.ELEC.Bus.dcEss.getValue() >= 24)) { - if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { - me.Brakes.leftPressPsi.setValue(1000 * pts.Fdm.JSBsim.Fcs.brake[0].getValue()); + if (notification.yellow >= 2500 and !notification.NWSSwitch and (notification.dc1 >= 24 or notification.dc2 >= 24 or notification.dcEss >= 24)) { + if (notification.leftBrake > 0 or notification.brakesMode == 0) { + me.Brakes.leftPressPsi.setValue(1000 * notification.leftBrakeFCS); } else { me.Brakes.leftPressPsi.setValue(0); } - if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { - me.Brakes.rightPressPsi.setValue(1000 * pts.Fdm.JSBsim.Fcs.brake[1].getValue()); + if (notification.rightBrake > 0 or notification.brakesMode == 0) { + me.Brakes.rightPressPsi.setValue(1000 * notification.rightBrakeFCS); } else { me.Brakes.rightPressPsi.setValue(0); } } else { # Alternate Braking (Yellow KO or Antiskid KO or electric KO) - missing condition: BSCU OK-KO - if (me.Brakes.accumPressPsi.getValue() < 1000 and (me.Psi.yellow.getValue() < 2500 or !me.Brakes.askidSw.getValue() or (systems.ELEC.Bus.dc1.getValue() < 24 and systems.ELEC.Bus.dc2.getValue() < 24 and systems.ELEC.Bus.dcEss.getValue() < 24))) { - if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { - me.Brakes.leftPressPsi.setValue(me.Brakes.accumPressPsi.getValue() * pts.Fdm.JSBsim.Fcs.brake[0].getValue()); + if (notification.accumPressPsi < 1000 and (notification.yellow < 2500 or !notification.NWSSwitch or (notification.dc1 < 24 and notification.dc2 < 24 and notification.dcEss < 24))) { + if (notification.leftBrake > 0 or notification.brakesMode == 0) { + me.Brakes.leftPressPsi.setValue(notification.accumPressPsi * notification.leftBrakeFCS); } else { me.Brakes.leftPressPsi.setValue(0); } - if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { - me.Brakes.rightPressPsi.setValue(me.Brakes.accumPressPsi.getValue() * pts.Fdm.JSBsim.Fcs.brake[1].getValue()); + if (notification.rightBrake > 0 or notification.brakesMode == 0) { + me.Brakes.rightPressPsi.setValue(notification.accumPressPsi * notification.rightBrakeFCS); } else { me.Brakes.rightPressPsi.setValue(0); } } else { - if (me.Brakes.leftbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { - me.Brakes.leftPressPsi.setValue(1000 * pts.Fdm.JSBsim.Fcs.brake[0].getValue()); + if (notification.leftBrake > 0 or notification.brakesMode == 0) { + me.Brakes.leftPressPsi.setValue(1000 * notification.leftBrakeFCS); } else { me.Brakes.leftPressPsi.setValue(0); } - if (me.Brakes.rightbrake.getValue() > 0 or me.Brakes.mode.getValue() == 0) { - me.Brakes.rightPressPsi.setValue(1000 * pts.Fdm.JSBsim.Fcs.brake[1].getValue()); + if (notification.rightBrake > 0 or notification.brakesMode == 0) { + me.Brakes.rightPressPsi.setValue(1000 * notification.rightBrakeFCS); } else { me.Brakes.rightPressPsi.setValue(0); } @@ -192,3 +186,25 @@ setlistener("/controls/gear/gear-down", func { pts.Controls.Gear.gearDown.setValue(1); } }); + +# Emesary +var A320Hydraulic = notifications.SystemRecipient.new("A320 Hydraulic",HYD.loop,HYD); +emesary.GlobalTransmitter.Register(A320Hydraulic); + +var input = { + "blue": "/systems/hydraulic/blue-psi", + "green": "/systems/hydraulic/green-psi", + "yellow": "/systems/hydraulic/yellow-psi", + + "brakesMode": "/systems/hydraulic/brakes/mode", + "accumPressPsi": "/systems/hydraulic/yellow-accumulator-psi-cmd", + "leftBrake": "/controls/gear/brake-left", + "rightBrake": "/controls/gear/brake-right", + "leftBrakeFCS": "/fdm/jsbsim/fcs/left-brake-cmd-norm", + "rightBrakeFCS": "/fdm/jsbsim/fcs/right-brake-cmd-norm", + "NWSSwitch": "/controls/gear/nws-switch", +}; + +foreach (var name; keys(input)) { + emesary.GlobalTransmitter.NotifyAll(notifications.FrameNotificationAddProperty.new("A320 Hydraulic", name, input[name])); +} \ No newline at end of file diff --git a/Nasal/Systems/pneumatics.nas b/Nasal/Systems/pneumatics.nas index d52864d0..97425c63 100644 --- a/Nasal/Systems/pneumatics.nas +++ b/Nasal/Systems/pneumatics.nas @@ -99,6 +99,8 @@ var PNEU = { hotAir: props.globals.getNode("/systems/air-conditioning/valves/hot-air"), starter1: props.globals.getNode("/systems/pneumatics/valves/starter-valve-1"), starter2: props.globals.getNode("/systems/pneumatics/valves/starter-valve-2"), + wingLeft: props.globals.getNode("/systems/pneumatics/valves/wing-ice-1"), + wingRight: props.globals.getNode("/systems/pneumatics/valves/wing-ice-2"), }, pressMode: props.globals.getNode("/systems/pressurization/mode", 1), init: func() { @@ -159,9 +161,9 @@ var PNEU = { me.Fail.trimValveFwd.setBoolValue(0); me.Fail.xbleed.setBoolValue(0); }, - loop: func() { - wowl = getprop("gear/gear[1]/wow"); - wowr = getprop("gear/gear[2]/wow"); + loop: func(notification) { + wowl = notification.gear1Wow; + wowr = notification.gear2Wow; # Legacy pressurization cabinalt = getprop("/systems/pressurization/cabinalt"); diff --git a/Nasal/emesary/M_frame_notification.nas b/Nasal/emesary/M_frame_notification.nas index 228b79c1..cb44c3e3 100644 --- a/Nasal/emesary/M_frame_notification.nas +++ b/Nasal/emesary/M_frame_notification.nas @@ -100,4 +100,28 @@ var frameNotification = FrameNotification.new(1); # Frame count # 5 = ECAM # 7 = FWC phases -# 10 = ECAM messages \ No newline at end of file +# 10 = ECAM messages + + +var SystemRecipient = +{ + new: func(_ident,loopFunc, instance) + { + var NewSystemRecipient = emesary.Recipient.new(_ident); + NewSystemRecipient.Receive = func(notification) + { + if (notification.NotificationType == "FrameNotification") + { + if (math.mod(notifications.frameNotification.FrameCount,5) == 0) { + call(loopFunc,[notification],instance, nil, var errors = []); + if (size(errors) > 0) { + debug.printerror(errors); + } + } + return emesary.Transmitter.ReceiptStatus_OK; + } + return emesary.Transmitter.ReceiptStatus_NotProcessed; + }; + return NewSystemRecipient; + }, +}; \ No newline at end of file diff --git a/Nasal/emesary/exec.nas b/Nasal/emesary/exec.nas index af3ad265..eda3c5e9 100644 --- a/Nasal/emesary/exec.nas +++ b/Nasal/emesary/exec.nas @@ -42,13 +42,14 @@ input = { frame_rate: "/sim/frame-rate", elapsedTime: "/sim/time/elapsed-sec", FWCPhase: "/ECAM/warning-phase", - gear0Wow: "/gear/gear[0]/wow", # Just about everything uses these properties at some stage, lets add them here! - elecAC1: "/systems/electrical/bus/ac-1", - elecAC2: "/systems/electrical/bus/ac-2", - elecACEss: "/systems/electrical/bus/ac-ess", - elecACEssShed: "/systems/electrical/bus/ac-ess-shed", + gear0Wow: "/gear/gear[0]/wow", + gear1Wow: "/gear/gear[1]/wow", + gear2Wow: "/gear/gear[2]/wow", + parkingBrake: "/controls/gear/brake-parking", + airspeedV: "/velocities/airspeed-kt", + groundspeed: "/velocities/groundspeed-kt", engine1State: "/engines/engine[0]/state", engine2State: "/engines/engine[1]/state", }; diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml index 35255b9d..c8d757cd 100644 --- a/Sounds/A320-common-sound.xml +++ b/Sounds/A320-common-sound.xml @@ -2153,14 +2153,26 @@ - - /fdm/jsbsim/fcs/left-brake-cmd-norm - 0.95 - - - /fdm/jsbsim/fcs/right-brake-cmd-norm - 0.95 - + + + /fdm/jsbsim/fcs/left-brake-cmd-norm + 0.95 + + + /gear/gear[1]/wow + 1 + + + + + /fdm/jsbsim/fcs/right-brake-cmd-norm + 0.95 + + + /gear/gear[2]/wow + 1 + + /velocities/groundspeed-kt diff --git a/Sounds/cfm56-sound.xml b/Sounds/cfm56-sound.xml index e49487ee..c98ca181 100644 --- a/Sounds/cfm56-sound.xml +++ b/Sounds/cfm56-sound.xml @@ -18,8 +18,8 @@ 1 - 0 - 20 + -5 + 5.5 0
@@ -39,8 +39,8 @@ 1 - 0 - -20 + -5 + -5.5 0
@@ -60,8 +60,8 @@ 1 - 0 - 20 + -5 + 5.5 0
@@ -81,8 +81,8 @@ 1 - 0 - -20 + -5 + -5.5 0
@@ -102,8 +102,8 @@ 1 - 0 - 20 + -5 + 5.5 0
@@ -123,8 +123,8 @@ 1 - 0 - -20 + -5 + -5.5 0
@@ -145,8 +145,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -167,8 +167,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -189,8 +189,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -211,8 +211,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -233,8 +233,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -255,8 +255,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -277,8 +277,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -299,8 +299,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -321,8 +321,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -343,8 +343,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -365,8 +365,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -387,8 +387,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -409,8 +409,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -431,8 +431,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -453,8 +453,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -475,8 +475,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -497,8 +497,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -519,8 +519,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -557,8 +557,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -587,8 +587,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -617,8 +617,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -647,8 +647,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -677,8 +677,8 @@ 60 - 0 - 20 + -5 + 5.5 0 @@ -707,8 +707,8 @@ 60 - 0 - -20 + -5 + -5.5 0 @@ -729,8 +729,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -751,8 +751,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -785,8 +785,8 @@ 90 - 0 - 20 + -5 + 5.5 0 @@ -819,8 +819,8 @@ 90 - 0 - -20 + -5 + -5.5 0 @@ -853,8 +853,8 @@ 60 - 0 - 20 + -5 + 5.5 0 @@ -887,8 +887,8 @@ 60 - 0 - -20 + -5 + -5.5 0 @@ -921,8 +921,8 @@ 500 - 0 - 20 + -5 + 5.5 0 @@ -955,8 +955,8 @@ 500 - 0 - -20 + -5 + -5.5 0 @@ -989,8 +989,8 @@ 300 - 0 - 20 + -5 + 5.5 0 @@ -1023,8 +1023,8 @@ 300 - 0 - -20 + -5 + -5.5 0 @@ -1057,8 +1057,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -1091,8 +1091,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -1116,7 +1116,7 @@ 0 - 0 + -5 1 0 195 @@ -1125,8 +1125,8 @@ 90 - 0 - 20 + -5 + 5.5 0 @@ -1150,7 +1150,7 @@ 0 - 0 + -5 -1 0 15 @@ -1159,8 +1159,8 @@ 90 - 0 - -20 + -5 + -5.5 0 @@ -1193,8 +1193,8 @@ 90 - 0 - 20 + -5 + 5.5 0 @@ -1227,8 +1227,8 @@ 90 - 0 - -20 + -5 + -5.5 0 @@ -1261,8 +1261,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -1295,8 +1295,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -1329,8 +1329,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -1363,8 +1363,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -1397,8 +1397,8 @@ 100 - 0 - 20 + -5 + 5.5 0 @@ -1431,8 +1431,8 @@ 100 - 0 - -20 + -5 + -5.5 0 @@ -1465,8 +1465,8 @@ 250 - 0 - 20 + -5 + 5.5 0 @@ -1499,8 +1499,8 @@ 250 - 0 - -20 + -5 + -5.5 0 @@ -1530,8 +1530,8 @@ 1000 - 0 - 20 + -5 + 5.5 0 @@ -1561,8 +1561,8 @@ 1000 - 0 - -20 + -5 + -5.5 0 @@ -1595,8 +1595,8 @@ 120 - 0 - 20 + -5 + 5.5 0 @@ -1629,8 +1629,8 @@ 120 - 0 - -20 + -5 + -5.5 0 @@ -1663,8 +1663,8 @@ 120 - 0 - 20 + -5 + 5.5 0 @@ -1697,8 +1697,8 @@ 120 - 0 - -20 + -5 + -5.5 0 @@ -1722,7 +1722,7 @@ 0 - 0 + -5 1 0 100 @@ -1731,8 +1731,8 @@ 120 - 0 - 20 + -5 + 5.5 0 @@ -1756,7 +1756,7 @@ 0 - 0 + -5 -1 0 280 @@ -1765,8 +1765,8 @@ 120 - 0 - -20 + -5 + -5.5 0 @@ -1799,8 +1799,8 @@ 500 - 0 - 20 + -5 + 5.5 0 @@ -1833,8 +1833,8 @@ 500 - 0 - -20 + -5 + -5.5 0 @@ -1864,8 +1864,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1889,8 +1889,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1914,8 +1914,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1939,8 +1939,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1964,8 +1964,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1989,8 +1989,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2014,8 +2014,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2039,8 +2039,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2064,8 +2064,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2089,8 +2089,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2114,8 +2114,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2139,8 +2139,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2164,8 +2164,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2189,8 +2189,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2214,8 +2214,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2239,8 +2239,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2264,8 +2264,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2289,8 +2289,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2314,8 +2314,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2339,8 +2339,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2375,8 +2375,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2400,8 +2400,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2425,8 +2425,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2450,8 +2450,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2475,8 +2475,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2500,8 +2500,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2525,8 +2525,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2550,8 +2550,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2575,8 +2575,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2600,8 +2600,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2625,8 +2625,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2650,8 +2650,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2675,8 +2675,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2700,8 +2700,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2725,8 +2725,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2750,8 +2750,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2775,8 +2775,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2800,8 +2800,8 @@ 0 - 0 - -20 + -5 + -5.5 0 diff --git a/Sounds/leapx-sound.xml b/Sounds/leapx-sound.xml index 8156494f..e684a62e 100644 --- a/Sounds/leapx-sound.xml +++ b/Sounds/leapx-sound.xml @@ -18,8 +18,8 @@ 1 - 0 - 20 + -5 + 5.5 0 @@ -39,8 +39,8 @@ 1 - 0 - -20 + -5 + -5.5 0 @@ -60,8 +60,8 @@ 1 - 0 - 20 + -5 + 5.5 0 @@ -81,8 +81,8 @@ 1 - 0 - -20 + -5 + -5.5 0 @@ -103,8 +103,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -125,8 +125,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -147,8 +147,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -169,8 +169,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -191,8 +191,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -213,8 +213,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -235,8 +235,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -257,8 +257,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -279,8 +279,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -301,8 +301,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -323,8 +323,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -345,8 +345,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -367,8 +367,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -389,8 +389,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -411,8 +411,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -433,8 +433,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -471,8 +471,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -501,8 +501,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -531,8 +531,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -561,8 +561,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -591,8 +591,8 @@ 60 - 0 - 20 + -5 + 5.5 0 @@ -621,8 +621,8 @@ 60 - 0 - -20 + -5 + -5.5 0 @@ -655,8 +655,8 @@ 90 - 0 - 20 + -5 + 5.5 0 @@ -689,8 +689,8 @@ 90 - 0 - -20 + -5 + -5.5 0 @@ -723,8 +723,8 @@ 60 - 0 - 20 + -5 + 5.5 0 @@ -757,8 +757,8 @@ 60 - 0 - -20 + -5 + -5.5 0 @@ -791,8 +791,8 @@ 500 - 0 - 20 + -5 + 5.5 0 @@ -825,8 +825,8 @@ 500 - 0 - -20 + -5 + -5.5 0 @@ -859,8 +859,8 @@ 300 - 0 - 20 + -5 + 5.5 0 @@ -893,8 +893,8 @@ 300 - 0 - -20 + -5 + -5.5 0 @@ -927,8 +927,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -961,8 +961,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -986,7 +986,7 @@ 0 - 0 + -5 1 0 195 @@ -995,8 +995,8 @@ 90 - 0 - 20 + -5 + 5.5 0 @@ -1020,7 +1020,7 @@ 0 - 0 + -5 -1 0 15 @@ -1029,8 +1029,8 @@ 90 - 0 - -20 + -5 + -5.5 0 @@ -1063,8 +1063,8 @@ 90 - 0 - 20 + -5 + 5.5 0 @@ -1097,8 +1097,8 @@ 90 - 0 - -20 + -5 + -5.5 0 @@ -1131,8 +1131,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -1165,8 +1165,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -1199,8 +1199,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -1233,8 +1233,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -1264,8 +1264,8 @@ 1000 - 0 - 20 + -5 + 5.5 0 @@ -1295,8 +1295,8 @@ 1000 - 0 - -20 + -5 + -5.5 0 @@ -1329,8 +1329,8 @@ 120 - 0 - 20 + -5 + 5.5 0 @@ -1363,8 +1363,8 @@ 120 - 0 - -20 + -5 + -5.5 0 @@ -1397,8 +1397,8 @@ 120 - 0 - 20 + -5 + 5.5 0 @@ -1431,8 +1431,8 @@ 120 - 0 - -20 + -5 + -5.5 0 @@ -1456,7 +1456,7 @@ 0 - 0 + -5 1 0 100 @@ -1465,8 +1465,8 @@ 120 - 0 - 20 + -5 + 5.5 0 @@ -1490,7 +1490,7 @@ 0 - 0 + -5 -1 0 280 @@ -1499,8 +1499,8 @@ 120 - 0 - -20 + -5 + -5.5 0 @@ -1533,8 +1533,8 @@ 500 - 0 - 20 + -5 + 5.5 0 @@ -1567,8 +1567,8 @@ 500 - 0 - -20 + -5 + -5.5 0 @@ -1598,8 +1598,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1623,8 +1623,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1648,8 +1648,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1673,8 +1673,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1698,8 +1698,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1723,8 +1723,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1748,8 +1748,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1773,8 +1773,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1798,8 +1798,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1823,8 +1823,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1848,8 +1848,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1873,8 +1873,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1898,8 +1898,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1923,8 +1923,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1948,8 +1948,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1973,8 +1973,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1998,8 +1998,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2023,8 +2023,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2059,8 +2059,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2084,8 +2084,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2109,8 +2109,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2134,8 +2134,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2159,8 +2159,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2184,8 +2184,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2209,8 +2209,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2234,8 +2234,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2259,8 +2259,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2284,8 +2284,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2309,8 +2309,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2334,8 +2334,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2359,8 +2359,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2384,8 +2384,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -2409,8 +2409,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -2434,8 +2434,8 @@ 0 - 0 - -20 + -5 + -5.5 0 diff --git a/Sounds/v2500-sound.xml b/Sounds/v2500-sound.xml index 9654322c..d4da2317 100644 --- a/Sounds/v2500-sound.xml +++ b/Sounds/v2500-sound.xml @@ -18,8 +18,8 @@ 1 - 0 - 20 + -5 + 5.5 0 @@ -39,8 +39,8 @@ 1 - 0 - -20 + -5 + -5.5 0 @@ -60,8 +60,8 @@ 1 - 0 - 20 + -5 + 5.5 0 @@ -81,8 +81,8 @@ 1 - 0 - -20 + -5 + -5.5 0 @@ -102,8 +102,8 @@ 1 - 0 - 20 + -5 + 5.5 0 @@ -123,8 +123,8 @@ 1 - 0 - -20 + -5 + -5.5 0 @@ -145,8 +145,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -167,8 +167,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -189,8 +189,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -211,8 +211,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -233,8 +233,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -255,8 +255,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -277,8 +277,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -299,8 +299,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -321,8 +321,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -343,8 +343,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -374,8 +374,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -404,8 +404,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -434,8 +434,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -464,8 +464,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -486,8 +486,8 @@ 30 - 0 - 20 + -5 + 5.5 0 @@ -508,8 +508,8 @@ 30 - 0 - -20 + -5 + -5.5 0 @@ -538,8 +538,8 @@ 60 - 0 - 20 + -5 + 5.5 0 @@ -568,8 +568,8 @@ 60 - 0 - -20 + -5 + -5.5 0 @@ -602,8 +602,8 @@ 90 - 0 - 20 + -5 + 5.5 0 @@ -636,8 +636,8 @@ 90 - 0 - -20 + -5 + -5.5 0 @@ -670,8 +670,8 @@ 60 - 0 - 20 + -5 + 5.5 0 @@ -704,8 +704,8 @@ 60 - 0 - -20 + -5 + -5.5 0 @@ -738,8 +738,8 @@ 90 - 0 - 20 + -5 + 5.5 0 @@ -772,8 +772,8 @@ 90 - 0 - -20 + -5 + -5.5 0 @@ -806,8 +806,8 @@ 120 - 0 - 20 + -5 + 5.5 0 @@ -840,8 +840,8 @@ 120 - 0 - -20 + -5 + -5.5 0 @@ -874,8 +874,8 @@ 150 - 0 - 20 + -5 + 5.5 0 @@ -908,8 +908,8 @@ 150 - 0 - -20 + -5 + -5.5 0 @@ -942,8 +942,8 @@ 150 - 0 - 20 + -5 + 5.5 0 @@ -976,8 +976,8 @@ 150 - 0 - -20 + -5 + -5.5 0 @@ -1007,8 +1007,8 @@ 1500 - 0 - 20 + -5 + 5.5 0 @@ -1038,8 +1038,8 @@ 1500 - 0 - -20 + -5 + -5.5 0 @@ -1072,8 +1072,8 @@ 200 - 0 - 20 + -5 + 5.5 0 @@ -1106,8 +1106,8 @@ 200 - 0 - -20 + -5 + -5.5 0 @@ -1140,8 +1140,8 @@ 120 - 0 - 20 + -5 + 5.5 0 @@ -1174,8 +1174,8 @@ 120 - 0 - -20 + -5 + -5.5 0 @@ -1199,7 +1199,7 @@ 0 - 0 + -5 1 0 95 @@ -1208,8 +1208,8 @@ 110 - 0 - 20 + -5 + 5.5 0 @@ -1233,7 +1233,7 @@ 0 - 0 + -5 -1 0 275 @@ -1242,8 +1242,8 @@ 110 - 0 - -20 + -5 + -5.5 0 @@ -1276,8 +1276,8 @@ 500 - 0 - 20 + -5 + 5.5 0 @@ -1310,8 +1310,8 @@ 500 - 0 - -20 + -5 + -5.5 0 @@ -1338,8 +1338,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1363,8 +1363,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1388,8 +1388,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1413,8 +1413,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1438,8 +1438,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1463,8 +1463,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1488,8 +1488,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1513,8 +1513,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1538,8 +1538,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1563,8 +1563,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1588,8 +1588,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1613,8 +1613,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1649,8 +1649,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1674,8 +1674,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1699,8 +1699,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1724,8 +1724,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1749,8 +1749,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1774,8 +1774,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1799,8 +1799,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1824,8 +1824,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1849,8 +1849,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1874,8 +1874,8 @@ 0 - 0 - -20 + -5 + -5.5 0 @@ -1899,8 +1899,8 @@ 0 - 0 - 20 + -5 + 5.5 0 @@ -1924,8 +1924,8 @@ 0 - 0 - -20 + -5 + -5.5 0 diff --git a/Systems/a320-adr.xml b/Systems/a320-adr.xml index 9d3479fd..19df4159 100644 --- a/Systems/a320-adr.xml +++ b/Systems/a320-adr.xml @@ -914,7 +914,7 @@ - + /instrumentation/radar-altimeter[1]/radar-altitude-ft 1 diff --git a/Systems/a320-aerodynamics.xml b/Systems/a320-aerodynamics.xml index 9c46f348..0aa7c0e9 100644 --- a/Systems/a320-aerodynamics.xml +++ b/Systems/a320-aerodynamics.xml @@ -152,7 +152,7 @@ aero/qbar-psf metrics/Sw-sqft hydraulics/elevator-l/final-deg - 0.0936445 + 0.0233096 @@ -162,7 +162,7 @@ aero/qbar-psf metrics/Sw-sqft hydraulics/elevator-r/final-deg - 0.0936445 + 0.0233096 @@ -306,9 +306,7 @@ velocities/mach - 0.00 0.000 - 0.20 0.000 - 0.82 0.002 + 0.82 0.000 1.10 0.016 1.80 0.012 diff --git a/Systems/a320-cfm56-5b4-engine-fadec.xml b/Systems/a320-cfm56-5b4-engine-fadec.xml new file mode 100644 index 00000000..38bb0200 --- /dev/null +++ b/Systems/a320-cfm56-5b4-engine-fadec.xml @@ -0,0 +1,223 @@ + + + + + + + + fadec/limit/rated-temp + fadec/limit/flex-rated-temp + fadec/limit/rated-thrust + + + + + +
+ /position/altitude-ft + propulsion/tat-c + + -45 -15 15 45 75 + 0 79.5 84.6 89.2 93.8 98.3 + 10000 90.1 94.8 99.1 100.6 99.3 + 43000 88.7 89.1 94.2 99.3 104.3 + +
+ + + + + + + velocities/mach + atmosphere/density-altitude + + -10000 0 10000 20000 30000 40000 50000 + 0.0 1.2600 1.0000 0.7400 0.5640 0.3920 0.2710 0.0000 + 0.2 1.1710 0.9740 0.6970 0.5360 0.3850 0.2610 0.0000 + 0.4 1.1500 0.9570 0.6920 0.5460 0.3870 0.2530 0.0000 + 0.6 1.1810 0.9410 0.7210 0.5660 0.3580 0.2180 0.0000 + 0.8 1.2290 1.0200 0.7820 0.5570 0.3040 0.1930 0.0000 + 0.9 1.2580 1.0200 0.7820 0.5220 0.2710 0.1140 0.0000 + 1.0 1.1810 0.9510 0.7210 0.4410 0.1740 0.0450 0.0000 + 1.2 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + 1.4 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 0.0000 + +
+
+
+ + + + + + + + propulsion/engine/IdleThrust + fadec/limit/rated-thrust + + + + fadec/limit/rated-thrust + + propulsion/engine[0]/IdleThrust + fadec/limit/rated-thrust + + + fadec/limit/milthrust-unmodified + + + + + + + + + + propulsion/engine[0]/IdleThrust + fadec/limit/rated-thrust + + + + + fadec/limit/rated-thrust + + propulsion/engine[0]/IdleThrust + fadec/limit/rated-thrust + + + fadec/limit/milthrust-unmodified + + + + fadec/limit/rated-thrust-n1 + 18.9 + + 85.1 + + + + fadec/limit/rated-thrust-n1 + 18.9 + + 85.1 + + + + + + + + + + + /systems/acconfig/autoconfig-running + 1 + + 0 + + + fadec/limit/rated-thrust-lbs + 0 + + + fadec/limit/fgturbine-thrust-lbs + fadec/limit/rated-thrust-lbs + + 1 + + + + + + + + + /position/altitude-ft + propulsion/tat-c + + -45 -15 15 45 75 + 0 79.5 84.6 89.2 93.8 89.1 + 10000 90.1 94.8 99.1 100.6 96.2 + 43000 88.7 89.1 94.2 99.3 97.2 + +
+
+
+ + + + + + + + fadec/limit/toga-ref + 10 + + 0.5 + + + 10 + + + + + + fadec/limit/flex-rated-temp + -/FMGC/internal/flex + propulsion/tat-c + + + + + + fadec/limit/toga-ref + + /position/altitude-ft + fadec/limit/flex-temp-input + + -45 -15 15 45 75 + 0 79.5 84.6 89.2 93.8 89.1 + 10000 90.1 94.8 99.1 100.6 96.2 + 43000 88.7 89.1 94.2 99.3 97.2 + +
+
+
+
+ + + + + + + + fadec/limit/flex-ref + 10 + + 0.5 + + + 10 + + + + + + + + + diff --git a/Systems/a320-electrical.xml b/Systems/a320-electrical.xml index ff21dced..0ebb8a29 100644 --- a/Systems/a320-electrical.xml +++ b/Systems/a320-electrical.xml @@ -1848,6 +1848,7 @@ /systems/electrical/some-electric-thingie/emer-elec-config eq 1 /systems/electrical/some-electric-thingie/generator-1-pb eq 1 + /controls/electrical/switches/gen-1 eq 1 /controls/electrical/switches/bus-tie eq 0 @@ -1857,6 +1858,7 @@ /systems/electrical/some-electric-thingie/emer-elec-config eq 1 /systems/electrical/some-electric-thingie/generator-2-pb eq 1 + /controls/electrical/switches/gen-2 eq 1 /controls/electrical/switches/bus-tie eq 0 @@ -1866,6 +1868,7 @@ /systems/electrical/some-electric-thingie/emer-elec-config eq 1 /systems/electrical/some-electric-thingie/generator-1-pb eq 1 + /controls/electrical/switches/gen-1 eq 1 @@ -1874,6 +1877,7 @@ /systems/electrical/some-electric-thingie/emer-elec-config eq 1 /systems/electrical/some-electric-thingie/generator-2-pb eq 1 + /controls/electrical/switches/gen-2 eq 1 diff --git a/Systems/a320-engine-fire.xml b/Systems/a320-engine-fire.xml index 488088e4..19b1fead 100644 --- a/Systems/a320-engine-fire.xml +++ b/Systems/a320-engine-fire.xml @@ -5,13 +5,13 @@ - + /systems/fire/engine1/temperature - /systems/failures/engine-left-fire + /systems/failures/fire/engine-left-fire 0 -5 1 30 @@ -28,13 +28,13 @@ /systems/fire/engine1/temperature - + /systems/fire/engine2/temperature
- /systems/failures/engine-right-fire + /systems/failures/fire/engine-right-fire 0 -5 1 30 @@ -51,13 +51,13 @@ /systems/fire/engine2/temperature - + /systems/fire/apu/temperature
- /systems/failures/apu-fire + /systems/failures/fire/apu-fire 0 -5 1 45 @@ -76,13 +76,13 @@ - + /systems/fire/cargo/fwd/temperature
- /systems/failures/cargo-fwd-fire + /systems/failures/fire/cargo-fwd-fire 0 -5 1 30 @@ -99,13 +99,13 @@ /systems/fire/cargo/fwd/temperature - + /systems/fire/cargo/aft/temperature
- /systems/failures/cargo-aft-fire + /systems/failures/fire/cargo-aft-fire 0 -5 1 45 @@ -121,5 +121,35 @@ /systems/fire/cargo/aft/temperature + + + + + /systems/fire/lavatory/temperature + +
+ /systems/failures/fire/lavatory-fire + + 0 -5 + 1 45 + +
+ simulation/channel-dt +
+
+
+ + 0 + 300 + + /systems/fire/lavatory/temperature +
+ + + + + /systems/fire/lavatory/temperature ge 295 + +
diff --git a/Systems/a320-fcs.xml b/Systems/a320-fcs.xml index 753fd20e..262fe1b9 100644 --- a/Systems/a320-fcs.xml +++ b/Systems/a320-fcs.xml @@ -979,8 +979,13 @@ - + fbw/tiller-handle-scheduled + 0.16 + + + + fbw/tiller-handle-cmd 20 diff --git a/Systems/a320-fuel.xml b/Systems/a320-fuel.xml index 1954fc56..49f44ceb 100644 --- a/Systems/a320-fuel.xml +++ b/Systems/a320-fuel.xml @@ -633,9 +633,9 @@ /systems/fuel/quantity/center-low eq 1 /systems/fuel/feed-center-2 eq 0 - /systems/fuel/feed-left-inner eq 0 /systems/fuel/feed-right-inner eq 1 /systems/fuel/valves/crossfeed-valve eq 1 + /consumables/fuel/tank[1]/level-gal_us le /consumables/fuel/tank[3]/unusable-gal_us /consumables/fuel/tank[3]/level-gal_us gt /consumables/fuel/tank[3]/unusable-gal_us propulsion/tank[5]/contents-lbs lt 9 @@ -649,9 +649,9 @@ /systems/fuel/feed-center-1 eq 0 /systems/fuel/feed-left-inner eq 1 - /systems/fuel/feed-right-inner eq 0 /systems/fuel/valves/crossfeed-valve eq 1 /consumables/fuel/tank[1]/level-gal_us gt /consumables/fuel/tank[1]/unusable-gal_us + /consumables/fuel/tank[3]/level-gal_us le /consumables/fuel/tank[3]/unusable-gal_us propulsion/tank[6]/contents-lbs lt 9 diff --git a/Systems/a320-fwc-phases.xml b/Systems/a320-fwc-phases.xml index 23412c65..0426d80a 100644 --- a/Systems/a320-fwc-phases.xml +++ b/Systems/a320-fwc-phases.xml @@ -229,6 +229,14 @@ + + + + + /ECAM/warning-phase eq 8 + + + diff --git a/Systems/a320-fwc.xml b/Systems/a320-fwc.xml index bca60814..71bd392e 100644 --- a/Systems/a320-fwc.xml +++ b/Systems/a320-fwc.xml @@ -5,7 +5,7 @@ - + Timer for the ECAM system @@ -63,6 +63,19 @@ 0.1 + + Timer for the ECAM system + /ECAM/warnings/logic/crossbleed-fault-timer-was-one + 0.1 + 120 + + + + Timer for the ECAM system + /controls/engines/engine[0]/fire-btn + 0.06666666666 + + Timer for the ECAM system /ECAM/warnings/logic/prv-1-not-shut-apu @@ -336,27 +349,6 @@ 1.0 - - Timer for the ECAM system - /ECAM/warnings/logic/gen-1-fault-set - 120 - 0.1818 - - - - Timer for the ECAM system - /ECAM/warnings/logic/gen-2-fault-set - 120 - 0.1818 - - - - Timer for the ECAM system - /ECAM/warnings/logic/apu-gen-fault-set - 120 - 0.2 - - Timer for the ECAM system /ECAM/warnings/logic/apu-gen-fault-reset @@ -365,7 +357,7 @@ - + @@ -475,13 +467,27 @@ + + + + /ECAM/warnings/timer/xbleed-fault-output eq 1 + + + + /ECAM/warnings/timer/xbleed-fault-output eq 1 - /ECAM/warnings/timer/xbleed-fault-output-10 eq 1 - /ECAM/warnings/timer/xbleed-fault-output-15 eq 0 + + /ECAM/warnings/timer/xbleed-fault-output eq 0 + /ECAM/warnings/timer/xbleed-fault-output-10 ne 0 + + + /ECAM/warnings/timer/xbleed-fault-eng-fire eq 0 + /ECAM/warnings/timer/xbleed-fault-eng-fire eq 1 + @@ -1448,8 +1454,8 @@ - /systems/hydraulics/warnings/green-lo-pr eq 0 - /systems/hydraulics/warnings/yellow-lo-pr eq 0 + /systems/hydraulic/warnings/green-lo-pr eq 0 + /systems/hydraulic/warnings/yellow-lo-pr eq 0 @@ -1486,7 +1492,7 @@ - + @@ -1505,6 +1511,13 @@ + + Timer for the ECAM system + /ECAM/warnings/logic/gen-1-fault-set + 120 + 0.1818 + + @@ -1566,6 +1579,13 @@ + + Timer for the ECAM system + /ECAM/warnings/logic/gen-2-fault-set + 120 + 0.1818 + + @@ -1626,6 +1646,13 @@ + + Timer for the ECAM system + /ECAM/warnings/logic/apu-gen-fault-set + 120 + 0.2 + + @@ -1658,30 +1685,505 @@ + + + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 + /systems/electrical/some-electric-thingie/emer-elec-config eq 1 + /systems/electrical/some-electric-thingie/emer-elec-config-20-sec eq 1 + + + + + /controls/electrical/switches/gen-1 + 0.2 + 120 + + + + /controls/electrical/switches/gen-2 + 0.2 + 120 + + + + + + /ECAM/warning-phase eq 6 + + + + + /ECAM/warnings/logic/elec/gen-off-60-sec + 0.01666666666 + 120 + + + + + + /ECAM/warning-phase ne 6 + /engines/engine[0]/state eq 3 + + + + + /ECAM/warnings/logic/elec/gen-1-off-60-sec-2 + 0.01666666666 + 120 + + + + + + /ECAM/warning-phase ne 6 + /engines/engine[1]/state eq 3 + + + + + /ECAM/warnings/logic/elec/gen-2-off-60-sec-2 + 0.01666666666 + 120 + + + + + + /ECAM/warnings/logic/elec/gen-1-pb eq 0 + /ECAM/warnings/flipflop/gen-1-fault eq 0 + /controls/electrical/switches/idg-1-disc eq 1 + + /ECAM/warnings/logic/elec/gen-off-60-sec-output eq 1 + /ECAM/warnings/logic/elec/gen-1-off-60-sec-2-output eq 1 + + /ECAM/warning-phase eq 6 + /ECAM/warnings/logic/gen-1-2-no-oper eq 1 + + + + + + + + + /ECAM/warnings/logic/elec/gen-2-pb eq 0 + /ECAM/warnings/flipflop/gen-2-fault eq 0 + /controls/electrical/switches/idg-2-disc eq 1 + + /ECAM/warnings/logic/elec/gen-off-60-sec-output eq 1 + /ECAM/warnings/logic/elec/gen-2-off-60-sec-2-output eq 1 + + /ECAM/warning-phase eq 6 + /ECAM/warnings/logic/gen-1-2-no-oper eq 1 + + + + + + + + + /ECAM/warnings/logic/BLUE-EMER-ELEC NE 1 + fcs/slat-pos-rate eq 0 + fcs/slat-pos-deg ge 2 + + + + + + + fcs/flap-pos-rate eq 0 + fcs/flap-pos-deg ge 2 + + + + + + + + /ECAM/warnings/flipflop/gen-1-fault eq 1 + /controls/electrical/switches/idg-1-disc eq 0 + /ECAM/warnings/logic/elec/gen-1-off eq 1 + + + /ECAM/warnings/flipflop/gen-2-fault eq 1 + /controls/electrical/switches/idg-2-disc eq 0 + /ECAM/warnings/logic/elec/gen-2-off eq 1 + + + + + + + + /ECAM/timer/ground-calc eq 0 + /ECAM/dual-failure-enabled eq 0 + + + + /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1 + /systems/electrical/bus/dc-ess lt 25 + + /ECAM/warnings/logic/SFLAPEXT eq 1 + + + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 + /systems/electrical/bus/dc-ess lt 25 + + /ECAM/warnings/logic/SSLATEXT eq 1 + + + + + hydraulics/aileron-l/pressure-switch-or eq 1 + + /systems/fctl/elac1 eq 0 + /systems/hydraulic/blue-psi lt 1500 + + /ECAM/warnings/logic/BLUE-EMER-ELEC ne 1 + + + hydraulics/aileron-r/pressure-switch-or eq 1 + + /systems/fctl/elac1 eq 0 + /systems/hydraulic/green-psi lt 1500 + + + + + /gear/gear[0]/position-norm eq 0 + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 0 + + + + + + + + + + /ECAM/timer/ground-calc eq 0 + /ECAM/dual-failure-enabled eq 0 + + + + /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1 + /systems/electrical/bus/dc-2 lt 25 + + /ECAM/warnings/logic/SFLAPEXT eq 1 + + + + + /ECAM/warnings/hyd/blue-abnorm-lo-pr ne 1 + /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1 + + /systems/electrical/bus/dc-2 lt 25 + + /ECAM/warnings/logic/SSLATEXT eq 1 + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 0 + /systems/electrical/bus/ac-1 ge 110 + + + + + + hydraulics/aileron-l/pressure-switch-or eq 1 + + /systems/fctl/elac2 eq 0 + /systems/hydraulic/green-psi lt 1500 + + /ECAM/warnings/logic/BLUE-EMER-ELEC ne 1 + + + hydraulics/aileron-r/pressure-switch-or eq 1 + + /systems/fctl/elac2 eq 0 + /systems/hydraulic/blue-psi lt 1500 + + + + + + /systems/electrical/bus/ac-1 ge 110 + /ECAM/warnings/hyd/green-abnorm-lo-pr eq 0 + + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 + + hydraulics/spoiler-l3/final-deg gt 0.01 + hydraulics/spoiler-r3/final-deg gt 0.01 + + + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 + + + hydraulics/aileron-l/pressure-switch-or eq 1 + + /systems/fctl/elac2 eq 0 + /systems/hydraulic/green-psi lt 1500 + + /ECAM/warnings/logic/BLUE-EMER-ELEC ne 1 + + + hydraulics/aileron-r/pressure-switch-or eq 1 + + /systems/fctl/elac1 eq 0 + /systems/hydraulic/green-psi lt 1500 + + + + + + + + + + + + + + + /ECAM/warnings/logic/dc-2-fuel-consumption-increased eq 1 + /systems/electrical/relay/dc-ess-shed-switch/contact-pos eq 0 + + + + + + + /ECAM/warnings/logic/dc-ess-fuel-consumption-increased eq 1 + /systems/electrical/bus/dc-2 ge 25 + + + + + + + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + /systems/electrical/bus/dc-1 lt 25 + /systems/electrical/bus/dc-2 lt 25 + /systems/electrical/bus/dc-ess lt 25 + + + + + /ECAM/warnings/logic/dc-emer-config + 120 + 5 + + + + + + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + /systems/electrical/bus/dc-1 lt 25 + /systems/electrical/bus/dc-2 lt 25 + /ECAM/warnings/logic/dc-emer-config ne 1 + + + + + /ECAM/warnings/logic/dc-1-2 + 120 + 0.5 + + + + + + /systems/electrical/bus/dc-ess lt 25 + /ECAM/warnings/logic/dc-emer-config ne 1 + + + + + /ECAM/warnings/logic/dc-ess-fault + 120 + 0.5 + + + + + + /systems/electrical/bus/dc-bat lt 25 + /ECAM/warnings/logic/dc-emer-config ne 1 + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + + + + + /ECAM/warnings/logic/dc-bat-fault + 120 + 5 + + + + + + /systems/electrical/bus/dc-1 lt 25 + /systems/electrical/bus/dc-2 ge 25 + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + + + + + /ECAM/warnings/logic/dc-1-fault + 120 + 0.5 + + + + + + /systems/electrical/bus/dc-2 lt 25 + /systems/electrical/bus/dc-1 ge 25 + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + + + + + /ECAM/warnings/logic/dc-2-fault + 120 + 0.5 + + + + + + /systems/electrical/bus/ac-1 lt 110 + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + + + + + /ECAM/warnings/logic/ac-1-fault + 120 + 5 + + + + + + /systems/electrical/bus/ac-2 lt 110 + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + + + + + /ECAM/warnings/logic/ac-2-fault + 120 + 5 + + + + + + /systems/electrical/bus/ac-ess lt 110 + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + + + + + /ECAM/warnings/logic/ac-ess-fault + 120 + 5 + + + + + + /systems/electrical/bus/dc-ess-shed lt 25 + /systems/electrical/bus/dc-ess ge 25 + + /systems/electrical/some-electric-thingie/emer-elec-config-10-sec ne 1 + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + + + + + + /ECAM/warnings/logic/dc-ess-shed-fault + 120 + 0.5 + + + + + + /systems/electrical/bus/ac-ess-shed lt 110 + /systems/electrical/bus/ac-ess ge 110 + + /systems/electrical/some-electric-thingie/emer-elec-config-10-sec ne 1 + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + + + + + + /ECAM/warnings/logic/ac-ess-shed-fault + 120 + 0.5 + + + + + + /systems/electrical/bus/ac-1 ge 110 + /controls/electrical/switches/ac-ess-feed eq 0 + /systems/electrical/relay/ac-ess-feed-2/output ge 110 + + + + + /ECAM/warnings/logic/ac-ess-bus-altn-feed-input + 120 + 2 + + + + + + /systems/electrical/some-electric-thingie/emer-elec-config ne 1 + /systems/electrical/bus/ac-ess ge 25 + /ECAM/warnings/logic/ac-ess-bus-altn-feed-output eq 1 + + + - + + + + + + /ECAM/warning-phase eq 4 + + - /ECAM/warnings/logic/stall/phase-8-output eq 0 + + /ECAM/warnings/logic/stall/phase-8-output eq 0 + /ECAM/phases/monostable/phase-8 eq 0 + /ECAM/warning-phase eq 7 - /ECAM/warnings/logic/stall/phase-4-output eq 0 + + /ECAM/warnings/logic/stall/phase-4-output eq 0 + /ECAM/warnings/logic/stall/phase-4 eq 0 + /ECAM/warning-phase eq 5 - - - - - /ECAM/warning-phase eq 4 - - @@ -1689,18 +2191,14 @@ /ECAM/warning-phase eq 5 - - - - - /ECAM/warning-phase eq 8 - - - /ECAM/warnings/logic/stall/phase-5-output eq 0 + + /ECAM/warnings/logic/stall/phase-5-output eq 0 + /ECAM/warnings/logic/stall/phase-5 eq 0 + /ECAM/warning-phase eq 6 @@ -1708,9 +2206,9 @@ - /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 1500 - /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 1500 - /it-fbw/law ne 0 + /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 1500 + /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 1500 + /it-fbw/law eq 0 /ECAM/warnings/logic/stall/phase-flipflop eq 1 @@ -1720,27 +2218,73 @@ + /it-fbw/law eq 0 /fdm/jsbsim/fcs/slat-pos-deg lt 15 - /systems/navigation/adr/output/aoa-1 ge 15 - /systems/navigation/adr/output/aoa-2 ge 15 - /systems/navigation/adr/output/aoa-3 ge 15 + + /systems/navigation/adr/output/aoa-1 ge 13.5 + /systems/navigation/adr/operating-1 eq 1 + + + /systems/navigation/adr/output/aoa-2 ge 13.5 + /systems/navigation/adr/operating-2 eq 1 + + + /systems/navigation/adr/output/aoa-3 ge 13.5 + /systems/navigation/adr/operating-3 eq 1 + + /it-fbw/law eq 0 /fdm/jsbsim/fcs/slat-pos-deg ge 15 - - /systems/navigation/adr/output/aoa-1 ge 23 - /systems/navigation/adr/output/aoa-2 ge 23 - /systems/navigation/adr/output/aoa-3 ge 23 + + /systems/navigation/adr/output/aoa-1 ge 22 + /systems/navigation/adr/operating-1 eq 1 + + + /systems/navigation/adr/output/aoa-2 ge 22 + /systems/navigation/adr/operating-2 eq 1 + + + /systems/navigation/adr/output/aoa-3 ge 22 + /systems/navigation/adr/operating-3 eq 1 + + + + /it-fbw/law ne 0 + /fdm/jsbsim/fcs/slat-pos-deg lt 15 + + + /systems/navigation/adr/output/aoa-1 ge 8 + /systems/navigation/adr/operating-1 eq 1 + + + /systems/navigation/adr/output/aoa-2 ge 8 + /systems/navigation/adr/operating-2 eq 1 + + + /systems/navigation/adr/output/aoa-3 ge 8 + /systems/navigation/adr/operating-3 eq 1 + + + + + /it-fbw/law ne 0 + /fdm/jsbsim/fcs/slat-pos-deg ge 15 + + /systems/navigation/adr/output/aoa-1 ge 14 + /systems/navigation/adr/operating-1 eq 1 + + + /systems/navigation/adr/output/aoa-2 ge 14 + /systems/navigation/adr/operating-2 eq 1 + + + /systems/navigation/adr/output/aoa-3 ge 14 + /systems/navigation/adr/operating-3 eq 1 - - /it-fbw/law ne 0 - - /systems/navigation/adr/operating-1 eq 1 - /systems/navigation/adr/operating-2 eq 1 - /systems/navigation/adr/operating-3 eq 1 @@ -1760,7 +2304,7 @@ - + @@ -1779,11 +2323,18 @@ - /ECAM/timer/ground-calc eq 0 - /ECAM/warning-phase eq 6 - /ECAM/warning-phase eq 7 + /ECAM/timer/ground-calc eq 1 /ECAM/warnings/logic/eng/ground-spoilers-output eq 1 - /ECAM/phases/monostable/phase-8-output eq 1 + + + /ECAM/warning-phase eq 6 + /ECAM/warning-phase eq 7 + + + /ECAM/phases/monostable/phase-8 eq 0 + /ECAM/phases/monostable/phase-8-output eq 0 + + @@ -1898,12 +2449,15 @@ /ECAM/warnings/logic/eng/eng-1-tla-abv-6-output eq 1 /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 - - /ECAM/warnings/logic/eng/eng-2-reverse-output eq 1 - - /ECAM/warnings/logic/eng/eng-2-reverse eq 1 - /ECAM/warnings/logic/eng/eng-1-retard-case-2-fall-output eq 0 + + /engines/engine[1]/state eq 3 + + + /ECAM/warnings/logic/eng/eng-2-reverse eq 1 + /ECAM/warnings/logic/eng/eng-1-retard-case-2 eq 0 + /ECAM/warnings/logic/eng/eng-1-retard-case-2-fall-output eq 0 + + /ECAM/warnings/logic/eng/eng-2-reverse-output eq 1 @@ -1914,12 +2468,15 @@ /ECAM/warnings/logic/eng/eng-1-tla-abv-6-2-output eq 1 /engines/engine[0]/state eq 3 - /engines/engine[1]/state eq 3 - - /ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1 - - /ECAM/warnings/logic/eng/eng-2-reverse-fall eq 0 - /ECAM/warnings/logic/eng/eng-2-tla-idle eq 1 + + /engines/engine[1]/state eq 3 + + /ECAM/warnings/logic/eng/eng-2-tla-idle-output eq 1 + + /ECAM/warnings/logic/eng/eng-2-reverse-fall eq 0 + /ECAM/warnings/logic/eng/eng-2-reverse eq 0 + /ECAM/warnings/logic/eng/eng-2-tla-idle eq 1 + @@ -1928,14 +2485,17 @@ - /ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1 /engines/engine[1]/state eq 3 - - /ECAM/warnings/logic/eng/eng-1-reverse-output eq 1 - - /ECAM/warnings/logic/eng/eng-1-reverse eq 1 - /ECAM/warnings/logic/eng/eng-2-retard-case-2-fall-output eq 0 + + /engines/engine[0]/state eq 3 + + + /ECAM/warnings/logic/eng/eng-1-reverse eq 1 + /ECAM/warnings/logic/eng/eng-2-retard-case-2 eq 0 + /ECAM/warnings/logic/eng/eng-2-retard-case-2-fall-output eq 0 + + /ECAM/warnings/logic/eng/eng-1-reverse-output eq 1 @@ -1944,14 +2504,17 @@ - /ECAM/warnings/logic/eng/eng-2-tla-abv-6-output eq 1 - /engines/engine[0]/state eq 3 + /ECAM/warnings/logic/eng/eng-2-tla-abv-6-2-output eq 1 /engines/engine[1]/state eq 3 - - /ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1 - - /ECAM/warnings/logic/eng/eng-1-reverse-fall eq 0 - /ECAM/warnings/logic/eng/eng-1-tla-idle eq 1 + + /engines/engine[0]/state eq 3 + + /ECAM/warnings/logic/eng/eng-1-tla-idle-output eq 1 + + /ECAM/warnings/logic/eng/eng-1-reverse-fall eq 0 + /ECAM/warnings/logic/eng/eng-1-reverse eq 0 + /ECAM/warnings/logic/eng/eng-1-tla-idle eq 1 + @@ -2003,9 +2566,298 @@ + + + + /ECAM/warnings/logic/eng/eng-1-thr-lvr-abv-idle eq 1 + /ECAM/warnings/logic/eng/eng-2-thr-lvr-abv-idle eq 1 + + + + + + + /engines/engine[0]/n2-actual ge 59.4 + /controls/engines/engine[0]/throttle-pos ge 0.60 + /controls/engines/engine[0]/throttle-pos lt 0.78 + + + + + /ECAM/warnings/logic/eng/thr-lever-1-mcl-mct + 120 + 0.25 + + + + + + /engines/engine[0]/n2-actual ge 59.4 + /controls/engines/engine[0]/throttle-pos ge 0.60 + /controls/engines/engine[0]/throttle-pos lt 0.83 + + + + + /ECAM/warnings/logic/eng/thr-lever-1-mct + 120 + 0.25 + + + + + + /engines/engine[1]/n2-actual ge 59.4 + /controls/engines/engine[1]/throttle-pos ge 0.60 + /controls/engines/engine[1]/throttle-pos lt 0.78 + + + + + /ECAM/warnings/logic/eng/thr-lever-2-mcl-mct + 120 + 0.25 + + + + + + /engines/engine[1]/n2-actual ge 59.4 + /controls/engines/engine[1]/throttle-pos ge 0.60 + /controls/engines/engine[1]/throttle-pos lt 0.83 + + + + + /ECAM/warnings/logic/eng/thr-lever-2-mct + 120 + 0.25 + + + + + + /ECAM/warnings/logic/eng/new-retard-logic ne 1 + + + /systems/thrust/lim-flex eq 0 + + /ECAM/warnings/logic/eng/thr-lever-2-mct-output eq 1 + /ECAM/warnings/logic/eng/thr-lever-2-mcl-mct-output eq 1 + + + + /systems/thrust/lim-flex eq 1 + /ECAM/warnings/logic/eng/thr-lever-2-mcl-mct-output eq 1 + + + /systems/thrust/lim-flex eq 0 + + /ECAM/warnings/logic/eng/thr-lever-1-mct-output eq 1 + /ECAM/warnings/logic/eng/thr-lever-1-mcl-mct-output eq 1 + + + + /systems/thrust/lim-flex eq 1 + /ECAM/warnings/logic/eng/thr-lever-1-mcl-mct-output eq 1 + + + + + + + + + /ECAM/timer/ground-calc eq 0 + + /gear/gear[1]/rollspeed-ms lt 36 + /ECAM/warning-phase ne 7 + + + /controls/engines/engine[0]/throttle-rev gt 0.0 + /controls/engines/engine[1]/throttle-rev gt 0.0 + + + + + + + + /engines/engine[0]/n2-actual ge 59.4 + + + + + /ECAM/warnings/logic/eng/eng-1-fail-cond-set-input + 120 + 0.3333 + + + + + + /controls/engines/engine[0]/cutoff-switch eq 1 + /controls/engines/engine[0]/fire-btn eq 1 + + + + + + + /engines/engine[1]/n2-actual ge 59.4 + + + + + /ECAM/warnings/logic/eng/eng-2-fail-cond-set-input + 120 + 0.3333 + + + + + + /controls/engines/engine[1]/cutoff-switch eq 1 + /controls/engines/engine[1]/fire-btn eq 1 + + + + + + + /controls/engines/engine[0]/cutoff-switch eq 0 + /controls/engines/engine[0]/fire-btn eq 0 + /engines/engine[0]/n2-actual lt 59.4 + /ECAM/warnings/logic/eng/eng-1-fail-cond eq 1 + + + + + + + /controls/engines/engine[1]/cutoff-switch eq 0 + /controls/engines/engine[1]/fire-btn eq 0 + /engines/engine[1]/n2-actual lt 59.4 + /ECAM/warnings/logic/eng/eng-2-fail-cond eq 1 + + + + + + + /engines/engine[0]/n2-actual ge 59.4 + /ECAM/dual-failure-enabled eq 1 + + + + + + + /engines/engine[1]/n2-actual ge 59.4 + /ECAM/dual-failure-enabled eq 1 + + + + + /controls/engines/engine[0]/cutoff-switch + 120 + 0.01666666666 + + + + /controls/engines/engine[1]/cutoff-switch + 120 + 0.01666666666 + + + + + + + /ECAM/warnings/logic/stall/phase-4-output eq 0 + /ECAM/warnings/logic/stall/phase-4 eq 0 + /ECAM/warning-phase eq 5 + + + + + + + + + /ECAM/warnings/logic/eng/phase-5-output eq 1 + /ECAM/warnings/logic/eng/phase-5-output-2 eq 1 + /ECAM/warnings/logic/eng/eng-1-master-60-sec eq 0 + + /ECAM/warnings/logic/eng/eng-1-fail-output eq 1 + + + + + + + + /ECAM/warnings/logic/eng/phase-5-output eq 1 + /ECAM/warnings/logic/eng/phase-5-output-2 eq 1 + /ECAM/warnings/logic/eng/eng-2-master-60-sec eq 0 + + /ECAM/warnings/logic/eng/eng-2-fail-output eq 1 + + + + + + + /ECAM/warning-phase eq 1 + /ECAM/warning-phase eq 2 + /ECAM/warning-phase eq 9 + /ECAM/warning-phase eq 10 + + + + + + + /ECAM/dual-failure-enabled eq 0 + + + + /ECAM/warnings/logic/eng/eng-shutdown-phase eq 1 + /ECAM/timer/ground-calc eq 0 + + /controls/engines/engine[0]/fire-btn eq 1 + + + /ECAM/warnings/logic/eng/eng-shutdown-phase eq 0 + /controls/engines/engine[0]/cutoff-switch eq 1 + + + + + + + + + /ECAM/dual-failure-enabled eq 0 + + + + /ECAM/warnings/logic/eng/eng-shutdown-phase eq 1 + /ECAM/timer/ground-calc eq 0 + + /controls/engines/engine[1]/fire-btn eq 1 + + + /ECAM/warnings/logic/eng/eng-shutdown-phase eq 0 + /controls/engines/engine[1]/cutoff-switch eq 1 + + + + + - + @@ -2025,7 +2877,7 @@ - + @@ -2164,8 +3016,8 @@ - /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750 - /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750 + /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 750 + /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 750 /ECAM/phases/phase-calculation/takeoff-power eq 0 @@ -2200,8 +3052,8 @@ - /instrumentation/radar-altimeter[0]/radar-altitude-ft lt 750 - /instrumentation/radar-altimeter[1]/radar-altitude-ft lt 750 + /instrumentation/radar-altimeter[0]/radar-altitude-ft-corrected lt 750 + /instrumentation/radar-altimeter[1]/radar-altitude-ft-corrected lt 750 /ECAM/phases/phase-calculation/takeoff-power eq 0 @@ -2228,11 +3080,7 @@ /ECAM/warnings/fctl/gear-lever-down-pulse eq 1 /ECAM/warnings/fctl/gear-lever-down eq 1 - - /gear/gear[0]/position-norm ne 1 - /gear/gear[1]/position-norm ne 1 - /gear/gear[2]/position-norm ne 1 - + /ECAM/warnings/fctl/gear-not-down-locked eq 1 @@ -2276,9 +3124,251 @@ /gear/gear[2]/position-norm eq 1 + + + + + /ECAM/warning-phase eq 6 + /controls/flight/flaps-input ne 0 + + /systems/navigation/adr/computation/baro-alt-corrected-1-capt ge 22000 + /systems/navigation/adr/computation/baro-alt-corrected-2-capt ge 22000 + /systems/navigation/adr/computation/baro-alt-corrected-3-capt ge 22000 + + + + + + + + fcs/flap-pos-deg lt 2 + fcs/flap-pos-deg ge 24 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/flaps-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/flaps-config-range ne 1 + + + + + + + fcs/slat-pos-deg lt 17 + fcs/slat-pos-deg ge 25 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/slats-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/slats-config-range ne 1 + + + + + + + /controls/flight/speedbrake gt 0.0 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/spd-brk-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/spd-brk-config-range ne 1 + + + + + + + hydraulics/stabilizer/final-deg gt 2.9 + hydraulics/stabilizer/final-deg lt -2.9 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/pitch-trim-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/pitch-trim-config-range ne 1 + + + + + + + hydraulics/rudder/trim-deg gt 3.6 + hydraulics/rudder/trim-deg lt -3.6 + + + + + + + + /ECAM/warning-phase eq 3 + /ECAM/warning-phase eq 4 + + /ECAM/warnings/fctl/rudder-trim-config-range eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /ECAM/warnings/fctl/rudder-trim-config-range ne 1 + + + + + + + /ECAM/warning-phase eq 3 + /controls/gear/brake-parking eq 1 + + + + + + + /ECAM/warning-phase eq 5 + /controls/gear/brake-parking eq 0 + + + + + + + /controls/flight/speedbrake gt 0.0 + + + + + /ECAM/warnings/fctl/spd-brk-still-out-50-seconds-input + 120 + 0.02 + + + + + + /ECAM/warnings/fctl/spd-brk-still-out-50-seconds eq 1 + /engines/both-at-idle eq 1 + + + + + /ECAM/warnings/fctl/spd-brk-still-out-10-seconds-input + 120 + 0.1 + + + + + + /ECAM/warning-phase eq 6 + /ECAM/warnings/fctl/spd-brk-still-out-50-seconds eq 1 + /ECAM/warnings/fctl/spd-brk-still-out-10-seconds eq 0 + + + + + /ECAM/warnings/fctl/spd-brk-still-out-1-input + 120 + 0.03333333333 + + + + + + /ECAM/warning-phase eq 7 + /controls/flight/speedbrake gt 0.0 + + + + + /ECAM/warnings/fctl/spd-brk-still-out-2-input + 120 + 0.2 + + + + + + + + + + + /ECAM/warnings/fctl/spd-brk-still-out-1 eq 1 + /ECAM/warnings/fctl/spd-brk-still-out-2 eq 1 + + + + - + @@ -2350,7 +3440,7 @@ - /systems/hydraulics/warnings/blue-lo-pr eq 1 + /systems/hydraulic/warnings/blue-lo-pr eq 1 /ECAM/warnings/hyd/engines-2-online eq 1 /ECAM/warnings/hyd/engines-2-off-in-air-output eq 1 @@ -2361,7 +3451,7 @@ - /systems/hydraulics/warnings/green-lo-pr eq 1 + /systems/hydraulic/warnings/green-lo-pr eq 1 /ECAM/warnings/hyd/engine-1-start-output eq 1 @@ -2369,7 +3459,7 @@ - /systems/hydraulics/warnings/yellow-lo-pr eq 1 + /systems/hydraulic/warnings/yellow-lo-pr eq 1 /ECAM/warnings/hyd/engine-2-start-output eq 1 @@ -2419,6 +3509,21 @@ + + + + /ECAM/warning-phase le 2 + /ECAM/warning-phase ge 9 + + /engines/engine[0]/state eq 3 + + + /ECAM/warning-phase gt 2 + /ECAM/warning-phase lt 9 + /ECAM/warning-phase ne 4 + /ECAM/warning-phase ne 5 + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 /ECAM/warnings/hyd/green-abnorm-lo-pr eq 1 @@ -2427,6 +3532,21 @@ + + + + /ECAM/warning-phase le 2 + /ECAM/warning-phase ge 9 + + /engines/engine[1]/state eq 3 + + + /ECAM/warning-phase gt 2 + /ECAM/warning-phase lt 9 + /ECAM/warning-phase ne 4 + /ECAM/warning-phase ne 5 + + /ECAM/warnings/hyd/blue-abnorm-lo-pr eq 1 /ECAM/warnings/hyd/yellow-abnorm-lo-pr eq 1 @@ -2458,16 +3578,21 @@ /engines/engine[0]/state eq 3 /engines/engine[1]/state eq 3 - fcs/flap-pos-deg ne 0 - hydraulics/spoiler-l1/final-deg gt 0 - hydraulics/spoiler-r1/final-deg gt 0 - hydraulics/spoiler-l2/final-deg gt 0 - hydraulics/spoiler-r2/final-deg gt 0 - hydraulics/spoiler-l4/final-deg gt 0 - hydraulics/spoiler-r4/final-deg gt 0 - hydraulics/spoiler-l5/final-deg gt 0 - hydraulics/spoiler-r5/final-deg gt 0 - + + /ECAM/warnings/logic/SFLAPEXT eq 1 + /systems/electrical/bus/dc-ess lt 25 + + hydraulics/spoiler-l2/final-deg gt 0.01 + hydraulics/spoiler-r2/final-deg gt 0.01 + hydraulics/spoiler-l3/final-deg gt 0.01 + hydraulics/spoiler-r3/final-deg gt 0.01 + hydraulics/spoiler-l4/final-deg gt 0.01 + hydraulics/spoiler-r4/final-deg gt 0.01 + + /systems/fctl/elac1 eq 0 + /systems/fctl/elac2 eq 0 + /systems/hydraulic/green-psi lt 1500 + @@ -2478,12 +3603,34 @@ /ECAM/timer/ground-calc eq 0 /engines/engine[0]/state eq 3 /engines/engine[1]/state eq 3 + + + /ECAM/warnings/logic/SFLAPEXT eq 1 + /systems/electrical/bus/dc-ess lt 25 + + hydraulics/spoiler-l1/final-deg gt 0.01 + hydraulics/spoiler-r1/final-deg gt 0.01 + hydraulics/spoiler-l2/final-deg gt 0.01 + hydraulics/spoiler-r2/final-deg gt 0.01 + hydraulics/spoiler-l4/final-deg gt 0.01 + hydraulics/spoiler-r4/final-deg gt 0.01 + hydraulics/spoiler-l5/final-deg gt 0.01 + hydraulics/spoiler-r5/final-deg gt 0.01 + + + /systems/fctl/elac1 eq 0 + /systems/fctl/elac2 eq 0 + /systems/hydraulic/blue-psi lt 1500 + + /ECAM/warnings/logic/BLUE-EMER-ELEC ne 1 + + - + @@ -2667,4 +3814,57 @@ + + + + + + /controls/fuel/switches/pump-center-1 eq 0 + /controls/fuel/switches/pump-center-2 eq 0 + /controls/fuel/switches/center-mode eq 1 + /systems/fuel/quantity/center-low eq 0 + /ECAM/warning-phase eq 6 + + + + + + /ECAM/warnings/fuel/center-pumps-off + 120 + 0.1 + + + + + + /systems/fuel/quantity/left-wing-inner-low eq 1 + /systems/fuel/quantity/right-wing-inner-low eq 1 + + + + + /ECAM/warnings/fuel/lo-level-l-r + 120 + 0.03333333333 + + + + + + diff --git a/Systems/a320-ground-reactions.xml b/Systems/a320-ground-reactions.xml index 0edc9ba6..0610658c 100644 --- a/Systems/a320-ground-reactions.xml +++ b/Systems/a320-ground-reactions.xml @@ -72,7 +72,6 @@ 0.02 59785 23957 - 25 0 @@ -129,7 +128,6 @@ 0.02 59785 23957 - 25 0
diff --git a/Systems/a320-hydraulic.xml b/Systems/a320-hydraulic.xml index edc5eaf9..e1857058 100644 --- a/Systems/a320-hydraulic.xml +++ b/Systems/a320-hydraulic.xml @@ -589,12 +589,12 @@ /controls/gear/brake-parking ne 1 - /systems/hydraulic/brakes/askidnwssw eq 1 + /controls/gear/nws-switch eq 1 /systems/hydraulic/green-psi ge 2500 /controls/gear/brake-parking ne 1 - /systems/hydraulic/brakes/askidnwssw eq 1 + /controls/gear/nws-switch eq 1 /systems/hydraulic/yellow-psi ge 2500 @@ -671,34 +671,34 @@ - + /systems/hydraulic/blue-psi lt 1750 - /systems/hydraulics/warnings/blue-lo-pr eq 1 + /systems/hydraulic/warnings/blue-lo-pr eq 1 /systems/hydraulic/blue-psi lt 1450 - + /systems/hydraulic/green-psi lt 1750 - /systems/hydraulics/warnings/green-lo-pr eq 1 + /systems/hydraulic/warnings/green-lo-pr eq 1 /systems/hydraulic/green-psi lt 1450 - + /systems/hydraulic/yellow-psi lt 1750 - /systems/hydraulics/warnings/yellow-lo-pr eq 1 + /systems/hydraulic/warnings/yellow-lo-pr eq 1 /systems/hydraulic/yellow-psi lt 1450 diff --git a/Systems/a320-pneumatic.xml b/Systems/a320-pneumatic.xml index bfe656d7..1ada48d2 100644 --- a/Systems/a320-pneumatic.xml +++ b/Systems/a320-pneumatic.xml @@ -1183,28 +1183,47 @@ 120 - + /systems/pneumatics/valves/crossbleed-valve-cmd eq 1 /systems/pneumatics/valves/crossbleed-valve ne 1 /controls/pneumatics/switches/x-bleed eq 2 + + + + /systems/pneumatics/valves/crossbleed-valve-cmd eq 1 /systems/pneumatics/valves/crossbleed-valve ne 1 /controls/pneumatics/switches/x-bleed eq 1 - /systems/electrical/bus/dc-2 ge 25 - - + + + + + /systems/pneumatics/warnings/crossbleed-disag-open-man eq 1 + + /systems/pneumatics/warnings/crossbleed-disag-open-auto eq 1 + /systems/electrical/bus/dc-2 ge 25 + + + + + /systems/pneumatics/valves/crossbleed-valve-cmd eq 0 /systems/pneumatics/valves/crossbleed-valve ne 0 - + + + + + + /systems/pneumatics/warnings/crossbleed-disag-closed eq 1 /systems/pneumatics/warnings/crossbleed-disag-open eq 1 diff --git a/Systems/ecam-proprules.xml b/Systems/ecam-proprules.xml index e89c7dfc..9aca49cd 100644 --- a/Systems/ecam-proprules.xml +++ b/Systems/ecam-proprules.xml @@ -6,24 +6,22 @@ monostable - true - /controls/electrical/switches/gen-1 + /controls/electrical/switches/gen-1 /systems/electrical/some-electric-thingie/generator-1-pb monostable - true - /controls/electrical/switches/gen-2 + /controls/electrical/switches/gen-2 /systems/electrical/some-electric-thingie/generator-2-pb @@ -80,6 +78,29 @@ /systems/electrical/some-electric-thingie/generator-2-reset + + monostable + + + /systems/electrical/some-electric-thingie/emer-elec-config + + /systems/electrical/some-electric-thingie/emer-elec-config-10-sec + + + + monostable + + + /systems/electrical/some-electric-thingie/emer-elec-config + + /systems/electrical/some-electric-thingie/emer-elec-config-20-sec + + + RS @@ -303,7 +324,7 @@ ECAM/warnings/altitude-alert/gear-downlocked-output - + monostable true @@ -311,9 +332,9 @@ 4.5 - ECAM/phases/monostable/phase-8 + /ECAM/phases/monostable/phase-8 - ECAM/phases/monostable/phase-8-output + /ECAM/phases/monostable/phase-8-output @@ -412,30 +433,6 @@ - - monostable - true - - - /ECAM/warnings/timer/xbleed-fault-output - - /ECAM/warnings/timer/xbleed-fault-output-10 - - - - monostable - true - - - /controls/engines/engine[0]/fire-btn - - /ECAM/warnings/timer/xbleed-fault-output-15 - - SR @@ -926,7 +923,7 @@ 1.0 - /ECAM/warnings/logic/stall/phase-8 + /ECAM/phases/monostable/phase-8 /ECAM/warnings/logic/stall/phase-8-output @@ -1029,4 +1026,139 @@ /ECAM/phases/phase-calculation/altitude-ge-800 + + + SR + + /ECAM/warnings/fctl/flaps-config-set + + + /ECAM/warnings/fctl/flaps-config-reset + + /ECAM/warnings/fctl/flaps-config-output + + + + SR + + /ECAM/warnings/fctl/slats-config-set + + + /ECAM/warnings/fctl/slats-config-reset + + /ECAM/warnings/fctl/slats-config-output + + + + SR + + /ECAM/warnings/fctl/spd-brk-config-set + + + /ECAM/warnings/fctl/spd-brk-config-reset + + /ECAM/warnings/fctl/spd-brk-config-output + + + + SR + + /ECAM/warnings/fctl/pitch-trim-config-set + + + /ECAM/warnings/fctl/pitch-trim-config-reset + + /ECAM/warnings/fctl/pitch-trim-config-output + + + + SR + + /ECAM/warnings/fctl/rudder-trim-config-set + + + /ECAM/warnings/fctl/rudder-trim-config-reset + + /ECAM/warnings/fctl/rudder-trim-config-output + + + + SR + + /ECAM/warnings/fctl/park-brk-config-set + + + /ECAM/warnings/fctl/park-brk-config-reset + + /ECAM/warnings/fctl/park-brk-config-output + + + + RS + + /ECAM/warnings/logic/eng/eng-1-fail-cond-set + + + /ECAM/warnings/logic/eng/eng-1-fail-cond-reset + + /ECAM/warnings/logic/eng/eng-1-fail-cond + + + + RS + + /ECAM/warnings/logic/eng/eng-2-fail-cond-set + + + /ECAM/warnings/logic/eng/eng-2-fail-cond-reset + + /ECAM/warnings/logic/eng/eng-2-fail-cond + + + + RS + + /ECAM/warnings/logic/eng/eng-1-fail-set + + + /ECAM/warnings/logic/eng/eng-1-fail-reset + + /ECAM/warnings/logic/eng/eng-1-fail-output + + + + RS + + /ECAM/warnings/logic/eng/eng-2-fail-set + + + /ECAM/warnings/logic/eng/eng-2-fail-reset + + /ECAM/warnings/logic/eng/eng-2-fail-output + + + + monostable + true + + + /ECAM/warnings/logic/eng/phase-5 + + /ECAM/warnings/logic/eng/phase-5-output + + + + + monostable + true + + + /ECAM/warnings/logic/eng/phase-5-output + + /ECAM/warnings/logic/eng/phase-5-output-2 + diff --git a/Systems/fadec-cfm.xml b/Systems/fadec-cfm.xml index 40447f9a..d317c0d8 100644 --- a/Systems/fadec-cfm.xml +++ b/Systems/fadec-cfm.xml @@ -10,14 +10,13 @@ OAT Thrust Scale gain 1.0 - 0.05 + 0.05
- /environment/temperature-degc - 700.788 - 400.813 - -601.000 + /fdm/jsbsim/fadec/limit/toga + 18.90 + 104.01
@@ -28,11 +27,11 @@ FLX Thrust Scale gain 1.0 - 0.05 + 0.05 - /FMGC/internal/flex + /fdm/jsbsim/fadec/limit/flex 700.788 400.813-601.000 @@ -46,7 +45,7 @@ IDLE Limitgain1.0 - 0.05 + 0.05 @@ -80,12 +79,45 @@ 0 /controls/engines/idle-limit - + + + Engines At Idle Stage 1 + gain + 1.0 + + + +
+ + /engines/engine[0]/n1-actual + /engines/engine[1]/n1-actual + + 18.90 + 103.81 +
+ 0.005 + +
+ + /engines/highest-n1-buffer + + + + Engines At Idle Stage 2 + + + /engines/highest-n1-buffer + /controls/engines/idle-limit + + + /engines/both-at-idle + + MAN One gain 1.0 - 0.05 + 0.05 @@ -107,7 +139,7 @@ MAN Twogain1.0 - 0.05 + 0.05
@@ -129,7 +161,7 @@ MAN CMD Onegain1.0 - 0.05 + 0.05 @@ -154,7 +186,7 @@ MAN CMD Two gain 1.0 - 0.05 + 0.05 @@ -179,7 +211,7 @@ N1 CMD 1 gain 1.0 - 0.05 + 0.05 @@ -220,7 +252,7 @@ N1 CMD 2 gain 1.0 - 0.05 + 0.05 @@ -1057,19 +1089,8 @@ N1 Limit TOGA gain 1.0 - 0.05 - - -
- - 0.99 - /controls/engines/throttle-scale - - 0.00 18.9 - 1.00103.8 -
-
- + 0.05 + /fdm/jsbsim/fadec/limit/toga /systems/thrust/n1/toga-lim
@@ -1077,7 +1098,7 @@ N1 Limit MCT gain 1.0 - 0.05 + 0.05 @@ -1097,19 +1118,8 @@ N1 Limit FLXgain1.0 - 0.05 - - -
- - 0.99 - /engines/flx-throttle - - 0.00 18.9 - 1.00103.8 -
-
- + 0.05 + /fdm/jsbsim/fadec/limit/flex /systems/thrust/n1/flx-lim @@ -1117,7 +1127,7 @@ N1 Limit CLB gain 1.0 - 0.05 + 0.05 diff --git a/Systems/fadec-iae.xml b/Systems/fadec-iae.xml index cf60c21c..a99feda6 100644 --- a/Systems/fadec-iae.xml +++ b/Systems/fadec-iae.xml @@ -10,7 +10,7 @@ OAT Thrust Scalegain1.0 - 0.05 + 0.05
@@ -28,7 +28,7 @@ FLX Thrust Scalegain1.0 - 0.05 + 0.05
@@ -46,7 +46,7 @@ IDLE Limitgain1.0 - 0.05 + 0.05 @@ -80,12 +80,45 @@ 0 /controls/engines/idle-limit - + + + Engines At Idle Stage 1 + gain + 1.0 + + + +
+ + /engines/engine[0]/n1-actual + /engines/engine[1]/n1-actual + + 22.40 + 103.81 +
+ 0.005 + +
+ + /engines/highest-n1-buffer + + + + Engines At Idle Stage 2 + + + /engines/highest-n1-buffer + /controls/engines/idle-limit + + + /engines/both-at-idle + + MAN One gain 1.0 - 0.05 + 0.05 @@ -107,7 +140,7 @@ MAN Twogain1.0 - 0.05 + 0.05
@@ -129,7 +162,7 @@ MAN CMD Onegain1.0 - 0.05 + 0.05 @@ -154,7 +187,7 @@ MAN CMD Two gain 1.0 - 0.05 + 0.05 @@ -1328,7 +1361,7 @@ EPR Limit TOGA gain 1.0 - 0.05 + 0.05
@@ -1356,7 +1389,7 @@ EPR CMD TOGAgain1.0 - 0.05 + 0.05 @@ -1372,7 +1405,7 @@ EPR Limit MCT gain 1.0 - 0.05 + 0.05
@@ -1400,7 +1433,7 @@ EPR CMD MCTgain1.0 - 0.05 + 0.05 @@ -1416,7 +1449,7 @@ EPR Limit FLX gain 1.0 - 0.05 + 0.05
@@ -1444,7 +1477,7 @@ EPR CMD FLXgain1.0 - 0.05 + 0.05 @@ -1460,7 +1493,7 @@ EPR Limit CLB gain 1.0 - 0.05 + 0.05
@@ -1488,7 +1521,7 @@ EPR CMD CLBgain1.0 - 0.05 + 0.05 diff --git a/Systems/pfd.xml b/Systems/pfd.xml index c3749535..733054dc 100644 --- a/Systems/pfd.xml +++ b/Systems/pfd.xml @@ -136,9 +136,79 @@ /it-autoflight/internal/alt - /instrumentation/altimeter/indicated-altitude-ft + /instrumentation/altimeter[0]/indicated-altitude-ft - /instrumentation/pfd/alt-diff + /instrumentation/pfd/alt-diff[0] + + + + Altitude bug diff + gain + 0.05 + 1.0 + + /it-autoflight/internal/alt + + + /instrumentation/altimeter[1]/indicated-altitude-ft + + /instrumentation/pfd/alt-diff[1] + + + + Altitude bug diff + gain + 0.05 + 1.0 + + /it-autoflight/internal/alt + + + /instrumentation/altimeter[2]/indicated-altitude-ft + + /instrumentation/pfd/alt-diff[2] + + + + Altitude bug diff + gain + 0.05 + 1.0 + + /it-autoflight/internal/alt + + + /instrumentation/altimeter[3]/indicated-altitude-ft + + /instrumentation/pfd/alt-diff[3] + + + + Altitude bug diff + gain + 0.05 + 1.0 + + /it-autoflight/internal/alt + + + /instrumentation/altimeter[4]/indicated-altitude-ft + + /instrumentation/pfd/alt-diff[4] + + + + Altitude bug diff + gain + 0.05 + 1.0 + + /it-autoflight/internal/alt + + + /instrumentation/altimeter[5]/indicated-altitude-ft + + /instrumentation/pfd/alt-diff[5] diff --git a/revision.txt b/revision.txt index 7d373862..801f1801 100644 --- a/revision.txt +++ b/revision.txt @@ -1 +1 @@ -45 \ No newline at end of file +47 \ No newline at end of file