diff --git a/A319-100-CFM.xml b/A319-100-CFM.xml
index a2ddf86a..f526d184 100644
--- a/A319-100-CFM.xml
+++ b/A319-100-CFM.xml
@@ -5,13 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
- Bicyus (Jon Ortuondo)
- bicyus@gmail.com
- 2012-02-15
- 0.99
- Airbus A319-133 with CFM56 Engines
- Revised and fixed by Peter Brendt (jwocky) and Joshua Davidson (it0uchpods). Fork from the A320-Family aircraft project (Thanks to all authors)
-
+ Joshua Davidson (it0uchpods)
+ Pre V1.0
+ A3XX FDE
@@ -989,8 +985,8 @@ YAW MOI_________3950000______23089847_______24848934
-1.57 1.300
-0.26 0.021
0.00 0.012
- 0.26 0.028
- 1.57 1.350
+ 0.26 0.026
+ 1.57 1.340
@@ -1029,7 +1025,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/flap-pos-deg
- 0.00120
+ 0.00110
@@ -1049,7 +1045,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
gear/gear-pos-norm
- 0.030
+ 0.025
@@ -1059,7 +1055,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/speedbrake-pos-norm
- 0.03
+ 0.035
diff --git a/A319-100-IAE.xml b/A319-100-IAE.xml
index e41ce2e9..275f3da0 100644
--- a/A319-100-IAE.xml
+++ b/A319-100-IAE.xml
@@ -5,13 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
- Bicyus (Jon Ortuondo)
- bicyus@gmail.com
- 2012-02-15
- 0.99
- Airbus A319-133 with IAE V2500 Engines
- Revised and fixed by Peter Brendt (jwocky) and Joshua Davidson (it0uchpods). Fork from the A320-Family aircraft project (Thanks to all authors)
-
+ Joshua Davidson (it0uchpods)
+ Pre V1.0
+ A3XX FDE
@@ -989,8 +985,8 @@ YAW MOI_________3950000______23089847_______24848934
-1.57 1.300
-0.26 0.021
0.00 0.012
- 0.26 0.028
- 1.57 1.350
+ 0.26 0.026
+ 1.57 1.340
@@ -1029,7 +1025,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/flap-pos-deg
- 0.00120
+ 0.00110
@@ -1049,7 +1045,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
gear/gear-pos-norm
- 0.030
+ 0.025
@@ -1059,7 +1055,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/speedbrake-pos-norm
- 0.03
+ 0.035
diff --git a/A320-200-CFM.xml b/A320-200-CFM.xml
index b88d34c3..0aa91884 100644
--- a/A320-200-CFM.xml
+++ b/A320-200-CFM.xml
@@ -5,13 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
- Bicyus (Jon Ortuondo)
- bicyus@gmail.com
- 2012-02-15
- 0.99
- Airbus A320-232 with CFM56 Engines
- Revised and fixed by Peter Brendt (jwocky) and Joshua Davidson (it0uchpods). Fork from the A320-Family aircraft project (Thanks to all authors)
-
+ Joshua Davidson (it0uchpods)
+ Pre V1.0
+ A3XX FDE
@@ -989,8 +985,8 @@ YAW MOI_________3950000______23089847_______24848934
-1.57 1.300
-0.26 0.021
0.00 0.012
- 0.26 0.028
- 1.57 1.350
+ 0.26 0.026
+ 1.57 1.340
@@ -1029,7 +1025,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/flap-pos-deg
- 0.00120
+ 0.00110
@@ -1049,7 +1045,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
gear/gear-pos-norm
- 0.030
+ 0.025
@@ -1059,7 +1055,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/speedbrake-pos-norm
- 0.03
+ 0.035
diff --git a/A320-200-IAE.xml b/A320-200-IAE.xml
index 93800f55..fe98d8a1 100644
--- a/A320-200-IAE.xml
+++ b/A320-200-IAE.xml
@@ -5,13 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
- Bicyus (Jon Ortuondo)
- bicyus@gmail.com
- 2012-02-15
- 0.99
- Airbus A320-232 with IAE V2500 Engines
- Revised and fixed by Peter Brendt (jwocky) and Joshua Davidson (it0uchpods). Fork from the A320-Family aircraft project (Thanks to all authors)
-
+ Joshua Davidson (it0uchpods)
+ Pre V1.0
+ A3XX FDE
@@ -989,8 +985,8 @@ YAW MOI_________3950000______23089847_______24848934
-1.57 1.300
-0.26 0.021
0.00 0.012
- 0.26 0.028
- 1.57 1.350
+ 0.26 0.026
+ 1.57 1.340
@@ -1029,7 +1025,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/flap-pos-deg
- 0.00120
+ 0.00110
@@ -1049,7 +1045,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
gear/gear-pos-norm
- 0.030
+ 0.025
@@ -1059,7 +1055,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/speedbrake-pos-norm
- 0.03
+ 0.035
diff --git a/A320-main.xml b/A320-main.xml
index 3494da34..5d0a042c 100644
--- a/A320-main.xml
+++ b/A320-main.xml
@@ -71,7 +71,7 @@
Aircraft/A320Family/Systems/custom-autothrust.xml
- Aircraft/A320Family/Systems/engine-timing.xml
+ Aircraft/A320Family/Systems/libraries.xml
Aircraft/A320Family/Systems/fmgc-c.xml
@@ -722,6 +722,7 @@
Aircraft/A320Family/Nasal/gpws.nas
Aircraft/A320Family/Nasal/efis.nas
Aircraft/A320Family/Nasal/ECAM.nas
+ Aircraft/A320Family/Nasal/shake.nas
Aircraft/A320Family/AircraftConfig/acconfig.nas
@@ -734,7 +735,7 @@
Aircraft/A320Family/Nasal/ADIRS.nas
- Aircraft/A320Family/Nasal/thrust.nas
+ Aircraft/A320Family/Nasal/fadec.nas
Aircraft/A320Family/Nasal/it-fbw.nas
diff --git a/A321-200-CFM.xml b/A321-200-CFM.xml
index a0144bf7..3638219b 100644
--- a/A321-200-CFM.xml
+++ b/A321-200-CFM.xml
@@ -5,13 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
- Bicyus (Jon Ortuondo)
- bicyus@gmail.com
- 2012-02-15
- 0.99
- Airbus A321-231 with CFM56 Engines
- Revised and fixed by Peter Brendt (jwocky) and Joshua Davidson (it0uchpods). Fork from the A320-Family aircraft project (Thanks to all authors)
-
+ Joshua Davidson (it0uchpods)
+ Pre V1.0
+ A3XX FDE
@@ -989,8 +985,8 @@ YAW MOI_________3950000______23089847_______24848934
-1.57 1.300
-0.26 0.021
0.00 0.012
- 0.26 0.028
- 1.57 1.350
+ 0.26 0.026
+ 1.57 1.340
@@ -1029,7 +1025,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/flap-pos-deg
- 0.00120
+ 0.00110
@@ -1049,7 +1045,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
gear/gear-pos-norm
- 0.030
+ 0.025
@@ -1059,7 +1055,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/speedbrake-pos-norm
- 0.03
+ 0.035
diff --git a/A321-200-IAE.xml b/A321-200-IAE.xml
index addea7e9..862a28ab 100644
--- a/A321-200-IAE.xml
+++ b/A321-200-IAE.xml
@@ -5,13 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
- Bicyus (Jon Ortuondo)
- bicyus@gmail.com
- 2012-02-15
- 0.99
- Airbus A321-231 with IAE V2500 Engines
- Revised and fixed by Peter Brendt (jwocky) and Joshua Davidson (it0uchpods). Fork from the A320-Family aircraft project (Thanks to all authors)
-
+ Joshua Davidson (it0uchpods)
+ Pre V1.0
+ A3XX FDE
@@ -989,8 +985,8 @@ YAW MOI_________3950000______23089847_______24848934
-1.57 1.300
-0.26 0.021
0.00 0.012
- 0.26 0.028
- 1.57 1.350
+ 0.26 0.026
+ 1.57 1.340
@@ -1029,7 +1025,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/flap-pos-deg
- 0.00120
+ 0.00110
@@ -1049,7 +1045,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
gear/gear-pos-norm
- 0.030
+ 0.025
@@ -1059,7 +1055,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/speedbrake-pos-norm
- 0.03
+ 0.035
diff --git a/ACJ-IAE.xml b/ACJ-IAE.xml
index 01b9d648..fe98d8a1 100644
--- a/ACJ-IAE.xml
+++ b/ACJ-IAE.xml
@@ -5,13 +5,9 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://jsbsim.sourceforge.net/JSBSim.xsd">
- Bicyus (Jon Ortuondo)
- bicyus@gmail.com
- 2012-02-15
- 0.99
- Airbus ACJ with IAE V2500 Engines
- Revised and fixed by Peter Brendt (jwocky) and Joshua Davidson (it0uchpods). Fork from the A320-Family aircraft project (Thanks to all authors)
-
+ Joshua Davidson (it0uchpods)
+ Pre V1.0
+ A3XX FDE
@@ -989,8 +985,8 @@ YAW MOI_________3950000______23089847_______24848934
-1.57 1.300
-0.26 0.021
0.00 0.012
- 0.26 0.028
- 1.57 1.350
+ 0.26 0.026
+ 1.57 1.340
@@ -1029,7 +1025,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/flap-pos-deg
- 0.00120
+ 0.00110
@@ -1049,7 +1045,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
gear/gear-pos-norm
- 0.030
+ 0.025
@@ -1059,7 +1055,7 @@ YAW MOI_________3950000______23089847_______24848934
aero/qbar-psf
metrics/Sw-sqft
fcs/speedbrake-pos-norm
- 0.03
+ 0.035
diff --git a/Engines/cfm56_5b3.xml b/Engines/cfm56_5b3.xml
index b5a8680c..633e887f 100644
--- a/Engines/cfm56_5b3.xml
+++ b/Engines/cfm56_5b3.xml
@@ -1,23 +1,12 @@
-
27000
7.1
0.8
0.03
- 23.4
- 63.7
+ 22.4
+ 60.9
0.2
2.0
105.8
diff --git a/Engines/cfm56_5b4.xml b/Engines/cfm56_5b4.xml
index a9776fc8..6c3ddf05 100644
--- a/Engines/cfm56_5b4.xml
+++ b/Engines/cfm56_5b4.xml
@@ -1,23 +1,12 @@
-
27000
7.1
0.8
0.03
- 23.4
- 63.7
+ 22.4
+ 60.9
0.2
2.0
105.8
diff --git a/Engines/cfm56_5b6.xml b/Engines/cfm56_5b6.xml
index 78d4bec9..1b90aad7 100644
--- a/Engines/cfm56_5b6.xml
+++ b/Engines/cfm56_5b6.xml
@@ -1,23 +1,12 @@
-
27000
7.1
0.8
0.03
- 23.4
- 63.7
+ 22.4
+ 60.9
0.2
2.0
105.8
diff --git a/Engines/v2522_a5.xml b/Engines/v2522_a5.xml
index 0239f71d..01aa631a 100644
--- a/Engines/v2522_a5.xml
+++ b/Engines/v2522_a5.xml
@@ -1,23 +1,12 @@
-
26600
7.1
0.8
0.03
- 23.4
- 63.7
+ 22.4
+ 60.9
0.2
2.0
105.8
diff --git a/Engines/v2527_a5.xml b/Engines/v2527_a5.xml
index 8e125b4f..caa33883 100644
--- a/Engines/v2527_a5.xml
+++ b/Engines/v2527_a5.xml
@@ -1,23 +1,12 @@
-
26600
7.1
0.8
0.03
- 23.4
- 63.7
+ 22.4
+ 60.9
0.2
2.0
105.8
diff --git a/Engines/v2533_a5.xml b/Engines/v2533_a5.xml
index 3a5526fc..01aa631a 100644
--- a/Engines/v2533_a5.xml
+++ b/Engines/v2533_a5.xml
@@ -1,23 +1,12 @@
-
26600
7.1
0.8
0.03
- 23.4
- 63.7
+ 22.4
+ 60.9
0.2
2.0
105.8
diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml
index bbde178d..ba315382 100644
--- a/Models/FlightDeck/a320.flightdeck.xml
+++ b/Models/FlightDeck/a320.flightdeck.xml
@@ -4,6 +4,32 @@
res/fd_complete.ac
+
+ translate
+ /systems/shake/shaking
+
+ 0
+ 0
+ 0
+ 0.5
+ -0.5
+ 0.8
+
+
+
+
+ translate
+ /systems/shake/shaking
+
+ 0
+ 0
+ 0
+ 0.5
+ -0.5
+ 0.8
+
+
+
diff --git a/Models/Instruments/OHpanel/OHpanel.xml b/Models/Instruments/OHpanel/OHpanel.xml
index 6cbde5a4..d644d55c 100644
--- a/Models/Instruments/OHpanel/OHpanel.xml
+++ b/Models/Instruments/OHpanel/OHpanel.xml
@@ -2233,7 +2233,10 @@
property-toggle
controls/lighting/strobe
-
+
+ nasal
+
+
@@ -2268,7 +2271,10 @@
property-toggle
controls/lighting/beacon
-
+
+ nasal
+
+
@@ -2303,7 +2309,10 @@
property-toggle
controls/lighting/wing-lights
-
+
+ nasal
+
+
@@ -2341,7 +2350,10 @@
1
2
-
+
+ nasal
+
+
@@ -2399,6 +2411,10 @@
property-toggle
controls/lighting/landing-lights[2]
+
+ nasal
+
+
@@ -2456,7 +2472,10 @@
0.5
1
-
+
+ nasal
+
+
@@ -2659,6 +2678,10 @@
0.5
1
+
+ nasal
+
+
@@ -2697,6 +2720,10 @@
0
1
+
+ nasal
+
+
@@ -2733,6 +2760,10 @@
property-toggle
controls/switches/seatbelt-sign
+
+ nasal
+
+
@@ -2767,6 +2798,10 @@
property-toggle
controls/switches/no-smoking-sign
+
+ nasal
+
+
diff --git a/Models/Instruments/PFD/PFD1.xml b/Models/Instruments/PFD/PFD1.xml
index af922ecc..8b0802dc 100644
--- a/Models/Instruments/PFD/PFD1.xml
+++ b/Models/Instruments/PFD/PFD1.xml
@@ -207,6 +207,34 @@
+
+ select
+ pitch-mode-box
+ pitch-mode-armed-box
+ roll-mode-box
+ roll-mode-armed-box
+
+
+
+ /it-autoflight/output/fd1
+ 1
+
+
+ /it-autoflight/output/fd2
+ 1
+
+
+ /it-autoflight/output/ap1
+ 1
+
+
+ /it-autoflight/output/ap2
+ 1
+
+
+
+
+
select
rudder_bar
@@ -1594,10 +1622,46 @@
select
throttle-mode-box
-
- /modes/pfd/fma/throttle-mode-box
- 1
-
+
+
+ /modes/pfd/fma/throttle-mode-box
+ 1
+
+
+ /systems/thrust/state1
+ MAN THR
+
+
+ /systems/thrust/state2
+ MAN THR
+
+
+ /systems/thrust/state1
+ MCT
+
+
+ /systems/thrust/state2
+ MCT
+
+
+ /systems/thrust/state1
+ TOGA
+
+
+ /systems/thrust/state2
+ TOGA
+
+
+
+ /systems/thrust/state1
+ IDLE
+
+
+ /systems/thrust/state2
+ IDLE
+
+
+
diff --git a/Models/Instruments/PFD/PFD2.xml b/Models/Instruments/PFD/PFD2.xml
index 8a420242..35ef74ea 100644
--- a/Models/Instruments/PFD/PFD2.xml
+++ b/Models/Instruments/PFD/PFD2.xml
@@ -207,6 +207,34 @@
+
+ select
+ pitch-mode-box
+ pitch-mode-armed-box
+ roll-mode-box
+ roll-mode-armed-box
+
+
+
+ /it-autoflight/output/fd1
+ 1
+
+
+ /it-autoflight/output/fd2
+ 1
+
+
+ /it-autoflight/output/ap1
+ 1
+
+
+ /it-autoflight/output/ap2
+ 1
+
+
+
+
+
select
rudder_bar
@@ -1594,10 +1622,46 @@
select
throttle-mode-box
-
- /modes/pfd/fma/throttle-mode-box
- 1
-
+
+
+ /modes/pfd/fma/throttle-mode-box
+ 1
+
+
+ /systems/thrust/state1
+ MAN THR
+
+
+ /systems/thrust/state2
+ MAN THR
+
+
+ /systems/thrust/state1
+ MCT
+
+
+ /systems/thrust/state2
+ MCT
+
+
+ /systems/thrust/state1
+ TOGA
+
+
+ /systems/thrust/state2
+ TOGA
+
+
+
+ /systems/thrust/state1
+ IDLE
+
+
+ /systems/thrust/state2
+ IDLE
+
+
+
diff --git a/Models/Liveries/A319/IAE/NSS.png b/Models/Liveries/A319/IAE/NSS.png
new file mode 100644
index 00000000..41a57e59
Binary files /dev/null and b/Models/Liveries/A319/IAE/NSS.png differ
diff --git a/Models/Liveries/A319/IAE/NSS.xml b/Models/Liveries/A319/IAE/NSS.xml
new file mode 100644
index 00000000..09ac6cd6
--- /dev/null
+++ b/Models/Liveries/A319/IAE/NSS.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ Nesma Airlines
+ Liveries/A319/IAE/NSS.png
+
+
+
+
+
+ 0
+
+
+ 0
+
diff --git a/Models/Liveries/A320/IAE/DNBairlines.png b/Models/Liveries/A320/IAE/DNBairlines.png
new file mode 100644
index 00000000..95b922b1
Binary files /dev/null and b/Models/Liveries/A320/IAE/DNBairlines.png differ
diff --git a/Models/Liveries/A320/IAE/DNBairlines.xml b/Models/Liveries/A320/IAE/DNBairlines.xml
new file mode 100644
index 00000000..d7c3eccf
--- /dev/null
+++ b/Models/Liveries/A320/IAE/DNBairlines.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+ DNB Airlines
+ Liveries/A320/IAE/DNBairlines.png
+
+
+
+
+
+ 0
+
+
+ 0
+
diff --git a/Models/Liveries/A320/IAE/MSR-new.png b/Models/Liveries/A320/IAE/MSR-new.png
index 6736c52f..c43c8a1a 100644
Binary files a/Models/Liveries/A320/IAE/MSR-new.png and b/Models/Liveries/A320/IAE/MSR-new.png differ
diff --git a/Models/Liveries/A320/IAE/N531JL.xml b/Models/Liveries/A320/IAE/N531JL.xml
index 5b5a48bf..4beb96e1 100644
--- a/Models/Liveries/A320/IAE/N531JL.xml
+++ b/Models/Liveries/A320/IAE/N531JL.xml
@@ -4,7 +4,7 @@
- jetBlue (Blue Finest)
+ JetBlue (Blue Finest)
Liveries/A320/IAE/N531JL.png
diff --git a/Models/Liveries/A321/IAE/MSR-new.png b/Models/Liveries/A321/IAE/MSR-new.png
index 81911555..5284cd10 100644
Binary files a/Models/Liveries/A321/IAE/MSR-new.png and b/Models/Liveries/A321/IAE/MSR-new.png differ
diff --git a/Nasal/FMGC.nas b/Nasal/FMGC.nas
index a2075622..1cf0b528 100644
--- a/Nasal/FMGC.nas
+++ b/Nasal/FMGC.nas
@@ -14,6 +14,7 @@ setprop("/FMGC/internal/mng-kts-mach", 0);
setprop("/FMGC/internal/mach-switchover", 0);
setprop("/it-autoflight/settings/reduc-agl-ft", 3000);
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
+setprop("/it-autoflight/output/fma-pwr", 0);
var FMGCinit = func {
setprop("/FMGC/status/to-state", 0);
@@ -340,6 +341,7 @@ var APinit = func {
setprop("/it-autoflight/output/thr-mode", 2);
setprop("/it-autoflight/output/lat", 5);
setprop("/it-autoflight/output/vert", 7);
+ setprop("/it-autoflight/output/fma-pwr", 0);
setprop("/it-autoflight/settings/use-nav2-radio", 0);
setprop("/it-autoflight/settings/use-backcourse", 0);
setprop("/it-autoflight/internal/min-vs", -500);
@@ -361,14 +363,17 @@ var APinit = func {
# AP 1 Master System
setlistener("/it-autoflight/input/ap1", func {
var apmas = getprop("/it-autoflight/input/ap1");
+ var ac_ess = getprop("/systems/electrical/bus/ac-ess");
if (apmas == 0) {
+ fmabox();
setprop("/it-autoflight/output/ap1", 0);
if (getprop("/it-autoflight/sound/enableapoffsound") == 1) {
setprop("/it-autoflight/sound/apoffsound", 1);
setprop("/it-autoflight/sound/enableapoffsound", 0);
}
- } else if (apmas == 1) {
+ } else if (apmas == 1 and ac_ess >= 110) {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
+ fmabox();
setprop("/it-autoflight/output/ap1", 1);
setprop("/it-autoflight/sound/enableapoffsound", 1);
setprop("/it-autoflight/sound/apoffsound", 0);
@@ -379,14 +384,17 @@ setlistener("/it-autoflight/input/ap1", func {
# AP 2 Master System
setlistener("/it-autoflight/input/ap2", func {
var apmas = getprop("/it-autoflight/input/ap2");
+ var ac_ess = getprop("/systems/electrical/bus/ac-ess");
if (apmas == 0) {
+ fmabox();
setprop("/it-autoflight/output/ap2", 0);
if (getprop("/it-autoflight/sound/enableapoffsound2") == 1) {
setprop("/it-autoflight/sound/apoffsound2", 1);
setprop("/it-autoflight/sound/enableapoffsound2", 0);
}
- } else if (apmas == 1) {
+ } else if (apmas == 1 and ac_ess >= 110) {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
+ fmabox();
setprop("/it-autoflight/output/ap2", 1);
setprop("/it-autoflight/sound/enableapoffsound2", 1);
setprop("/it-autoflight/sound/apoffsound2", 0);
@@ -409,8 +417,10 @@ setlistener("/it-autoflight/input/athr", func {
setlistener("/it-autoflight/input/fd1", func {
var fdmas = getprop("/it-autoflight/input/fd1");
if (fdmas == 0) {
+ fmabox();
setprop("/it-autoflight/output/fd1", 0);
} else if (fdmas == 1) {
+ fmabox();
setprop("/it-autoflight/output/fd1", 1);
}
});
@@ -419,12 +429,31 @@ setlistener("/it-autoflight/input/fd1", func {
setlistener("/it-autoflight/input/fd2", func {
var fdmas = getprop("/it-autoflight/input/fd2");
if (fdmas == 0) {
+ fmabox();
setprop("/it-autoflight/output/fd2", 0);
} else if (fdmas == 1) {
+ fmabox();
setprop("/it-autoflight/output/fd2", 1);
}
});
+# FMA Boxes and Mode
+var fmabox = func {
+ var ap1 = getprop("/it-autoflight/output/ap1");
+ var ap2 = getprop("/it-autoflight/output/ap2");
+ var fd1 = getprop("/it-autoflight/output/fd1");
+ var fd2 = getprop("/it-autoflight/output/fd2");
+ if (!ap1 and !ap2 and !fd1 and !fd2) {
+ setprop("/it-autoflight/input/lat", 3);
+ setprop("/it-autoflight/input/vert", 1);
+ setprop("/it-autoflight/input/vs", 0);
+ setprop("/it-autoflight/output/fma-pwr", 0);
+ } else {
+ setprop("/it-autoflight/input/vs", 0);
+ setprop("/it-autoflight/output/fma-pwr", 1);
+ }
+}
+
# Master Lateral
setlistener("/it-autoflight/input/lat", func {
if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
diff --git a/Nasal/PFD_FMA.nas b/Nasal/PFD_FMA.nas
index 023c0953..fe944f96 100644
--- a/Nasal/PFD_FMA.nas
+++ b/Nasal/PFD_FMA.nas
@@ -244,20 +244,79 @@ var at = func {
}
}
+var boxchk = func {
+ var ap1 = getprop("/it-autoflight/output/ap1");
+ var ap2 = getprop("/it-autoflight/output/ap2");
+ var fd1 = getprop("/it-autoflight/output/fd1");
+ var fd2 = getprop("/it-autoflight/output/fd2");
+ var fma_pwr = getprop("/it-autoflight/output/fma-pwr");
+ if (ap1 and !ap2 and !fd1 and !fd2 and !fma_pwr) {
+ setprop("/it-autoflight/input/lat", 3);
+ boxchk_b();
+ } else if (!ap1 and ap2 and !fd1 and !fd2 and !fma_pwr) {
+ setprop("/it-autoflight/input/lat", 3);
+ boxchk_b();
+ } else if (!ap1 and !ap2 and fd1 and !fd2 and !fma_pwr) {
+ setprop("/it-autoflight/input/lat", 3);
+ boxchk_b();
+ } else if (!ap1 and !ap2 and !fd1 and fd2 and !fma_pwr) {
+ setprop("/it-autoflight/input/lat", 3);
+ boxchk_b();
+ }
+}
+
+var boxchk_b = func {
+ setprop("/modes/pfd/fma/roll-mode-box", 1);
+ setprop("/modes/pfd/fma/pitch-mode-box", 1);
+ settimer(func {
+ setprop("/modes/pfd/fma/roll-mode-box", 0);
+ }, 5);
+ settimer(func {
+ setprop("/modes/pfd/fma/pitch-mode-box", 0);
+ }, 5);
+ var newarmr = getprop("/modes/pfd/fma/roll-mode-armed");
+ if (newarmr != " ") {
+ setprop("/modes/pfd/fma/roll-mode-armed-box", 1);
+ settimer(func {
+ setprop("/modes/pfd/fma/roll-mode-armed-box", 0);
+ }, 5);
+ }
+ var newarmp = getprop("/modes/pfd/fma/pitch-mode-armed");
+ if (newarmp != " ") {
+ setprop("/modes/pfd/fma/pitch-mode-armed-box", 1);
+ settimer(func {
+ setprop("/modes/pfd/fma/pitch-mode-armed-box", 0);
+ }, 5);
+ }
+ var newarmp2 = getprop("/modes/pfd/fma/pitch-mode2-armed");
+ if (newarmp2 != " ") {
+ setprop("/modes/pfd/fma/pitch-mode2-armed-box", 1);
+ settimer(func {
+ setprop("/modes/pfd/fma/pitch-mode2-armed-box", 0);
+ }, 5);
+ }
+}
+
# Update AP FD ATHR
setlistener("/it-autoflight/output/ap1", func {
+ speedmach();
ap();
+ boxchk();
});
setlistener("/it-autoflight/output/ap2", func {
+ speedmach();
ap();
+ boxchk();
});
setlistener("/it-autoflight/output/fd1", func {
speedmach();
fd();
+ boxchk();
});
setlistener("/it-autoflight/output/fd2", func {
speedmach();
fd();
+ boxchk();
});
setlistener("/it-autoflight/output/athr", func {
at();
diff --git a/Nasal/electrical.nas b/Nasal/electrical.nas
index 1d7f6c0c..e03fe859 100644
--- a/Nasal/electrical.nas
+++ b/Nasal/electrical.nas
@@ -392,71 +392,73 @@ var master_elec = func {
decharge2.start();
}
- if (getprop("/systems/electrical/bus/ac-ess") == 0) {
+ if (getprop("/systems/electrical/bus/ac-ess") < 110) {
+ setprop("/it-autoflight/input/ap1", 0);
+ setprop("/it-autoflight/input/ap2", 0);
setprop("systems/electrical/on", 0);
# ai_spin.setValue(0.2);
# aispin.stop();
- setprop("systems/electrical/outputs/adf", 0);
- setprop("systems/electrical/outputs/audio-panel", 0);
- setprop("systems/electrical/outputs/audio-panel[1]", 0);
- setprop("systems/electrical/outputs/autopilot", 0);
- setprop("systems/electrical/outputs/avionics-fan", 0);
- setprop("systems/electrical/outputs/beacon", 0);
- setprop("systems/electrical/outputs/bus", 0);
- setprop("systems/electrical/outputs/cabin-lights", 0);
- setprop("systems/electrical/outputs/dme", 0);
- setprop("systems/electrical/outputs/efis", 0);
- setprop("systems/electrical/outputs/flaps", 0);
- setprop("systems/electrical/outputs/fuel-pump", 0);
- setprop("systems/electrical/outputs/fuel-pump[1]", 0);
- setprop("systems/electrical/outputs/gps", 0);
- setprop("systems/electrical/outputs/gps-mfd", 0);
- setprop("systems/electrical/outputs/hsi", 0);
- setprop("systems/electrical/outputs/instr-ignition-switch", 0);
- setprop("systems/electrical/outputs/instrument-lights", 0);
- setprop("systems/electrical/outputs/landing-lights", 0);
- setprop("systems/electrical/outputs/map-lights", 0);
- setprop("systems/electrical/outputs/mk-viii", 0);
- setprop("systems/electrical/outputs/nav", 0);
- setprop("systems/electrical/outputs/nav[1]", 0);
- setprop("systems/electrical/outputs/pitot-head", 0);
- setprop("systems/electrical/outputs/stobe-lights", 0);
- setprop("systems/electrical/outputs/tacan", 0);
- setprop("systems/electrical/outputs/taxi-lights", 0);
- setprop("systems/electrical/outputs/transponder", 0);
- setprop("systems/electrical/outputs/turn-coordinator", 0);
+ setprop("/systems/electrical/outputs/adf", 0);
+ setprop("/systems/electrical/outputs/audio-panel", 0);
+ setprop("/systems/electrical/outputs/audio-panel[1]", 0);
+ setprop("/systems/electrical/outputs/autopilot", 0);
+ setprop("/systems/electrical/outputs/avionics-fan", 0);
+ setprop("/systems/electrical/outputs/beacon", 0);
+ setprop("/systems/electrical/outputs/bus", 0);
+ setprop("/systems/electrical/outputs/cabin-lights", 0);
+ setprop("/systems/electrical/outputs/dme", 0);
+ setprop("/systems/electrical/outputs/efis", 0);
+ setprop("/systems/electrical/outputs/flaps", 0);
+ setprop("/systems/electrical/outputs/fuel-pump", 0);
+ setprop("/systems/electrical/outputs/fuel-pump[1]", 0);
+ setprop("/systems/electrical/outputs/gps", 0);
+ setprop("/systems/electrical/outputs/gps-mfd", 0);
+ setprop("/systems/electrical/outputs/hsi", 0);
+ setprop("/systems/electrical/outputs/instr-ignition-switch", 0);
+ setprop("/systems/electrical/outputs/instrument-lights", 0);
+ setprop("/systems/electrical/outputs/landing-lights", 0);
+ setprop("/systems/electrical/outputs/map-lights", 0);
+ setprop("/systems/electrical/outputs/mk-viii", 0);
+ setprop("/systems/electrical/outputs/nav", 0);
+ setprop("/systems/electrical/outputs/nav[1]", 0);
+ setprop("/systems/electrical/outputs/pitot-head", 0);
+ setprop("/systems/electrical/outputs/stobe-lights", 0);
+ setprop("/systems/electrical/outputs/tacan", 0);
+ setprop("/systems/electrical/outputs/taxi-lights", 0);
+ setprop("/systems/electrical/outputs/transponder", 0);
+ setprop("/systems/electrical/outputs/turn-coordinator", 0);
} else {
- setprop("systems/electrical/on", 1);
+ setprop("/systems/electrical/on", 1);
# aispin.start();
- setprop("systems/electrical/outputs/adf", dc_volt_std);
- setprop("systems/electrical/outputs/audio-panel", dc_volt_std);
- setprop("systems/electrical/outputs/audio-panel[1]", dc_volt_std);
- setprop("systems/electrical/outputs/autopilot", dc_volt_std);
- setprop("systems/electrical/outputs/avionics-fan", dc_volt_std);
- setprop("systems/electrical/outputs/beacon", dc_volt_std);
- setprop("systems/electrical/outputs/bus", dc_volt_std);
- setprop("systems/electrical/outputs/cabin-lights", dc_volt_std);
- setprop("systems/electrical/outputs/dme", dc_volt_std);
- setprop("systems/electrical/outputs/efis", dc_volt_std);
- setprop("systems/electrical/outputs/flaps", dc_volt_std);
- setprop("systems/electrical/outputs/fuel-pump", dc_volt_std);
- setprop("systems/electrical/outputs/fuel-pump[1]", dc_volt_std);
- setprop("systems/electrical/outputs/gps", dc_volt_std);
- setprop("systems/electrical/outputs/gps-mfd", dc_volt_std);
- setprop("systems/electrical/outputs/hsi", dc_volt_std);
- setprop("systems/electrical/outputs/instr-ignition-switch", dc_volt_std);
- setprop("systems/electrical/outputs/instrument-lights", dc_volt_std);
- setprop("systems/electrical/outputs/landing-lights", dc_volt_std);
- setprop("systems/electrical/outputs/map-lights", dc_volt_std);
- setprop("systems/electrical/outputs/mk-viii", dc_volt_std);
- setprop("systems/electrical/outputs/nav", dc_volt_std);
- setprop("systems/electrical/outputs/nav[1]", dc_volt_std);
- setprop("systems/electrical/outputs/pitot-head", dc_volt_std);
- setprop("systems/electrical/outputs/stobe-lights", dc_volt_std);
- setprop("systems/electrical/outputs/tacan", dc_volt_std);
- setprop("systems/electrical/outputs/taxi-lights", dc_volt_std);
- setprop("systems/electrical/outputs/transponder", dc_volt_std);
- setprop("systems/electrical/outputs/turn-coordinator", dc_volt_std);
+ setprop("/systems/electrical/outputs/adf", dc_volt_std);
+ setprop("/systems/electrical/outputs/audio-panel", dc_volt_std);
+ setprop("/systems/electrical/outputs/audio-panel[1]", dc_volt_std);
+ setprop("/systems/electrical/outputs/autopilot", dc_volt_std);
+ setprop("/systems/electrical/outputs/avionics-fan", dc_volt_std);
+ setprop("/systems/electrical/outputs/beacon", dc_volt_std);
+ setprop("/systems/electrical/outputs/bus", dc_volt_std);
+ setprop("/systems/electrical/outputs/cabin-lights", dc_volt_std);
+ setprop("/systems/electrical/outputs/dme", dc_volt_std);
+ setprop("/systems/electrical/outputs/efis", dc_volt_std);
+ setprop("/systems/electrical/outputs/flaps", dc_volt_std);
+ setprop("/systems/electrical/outputs/fuel-pump", dc_volt_std);
+ setprop("/systems/electrical/outputs/fuel-pump[1]", dc_volt_std);
+ setprop("/systems/electrical/outputs/gps", dc_volt_std);
+ setprop("/systems/electrical/outputs/gps-mfd", dc_volt_std);
+ setprop("/systems/electrical/outputs/hsi", dc_volt_std);
+ setprop("/systems/electrical/outputs/instr-ignition-switch", dc_volt_std);
+ setprop("/systems/electrical/outputs/instrument-lights", dc_volt_std);
+ setprop("/systems/electrical/outputs/landing-lights", dc_volt_std);
+ setprop("/systems/electrical/outputs/map-lights", dc_volt_std);
+ setprop("/systems/electrical/outputs/mk-viii", dc_volt_std);
+ setprop("/systems/electrical/outputs/nav", dc_volt_std);
+ setprop("/systems/electrical/outputs/nav[1]", dc_volt_std);
+ setprop("/systems/electrical/outputs/pitot-head", dc_volt_std);
+ setprop("/systems/electrical/outputs/stobe-lights", dc_volt_std);
+ setprop("/systems/electrical/outputs/tacan", dc_volt_std);
+ setprop("/systems/electrical/outputs/taxi-lights", dc_volt_std);
+ setprop("/systems/electrical/outputs/transponder", dc_volt_std);
+ setprop("/systems/electrical/outputs/turn-coordinator", dc_volt_std);
}
}
diff --git a/Nasal/engines.nas b/Nasal/engines.nas
index 5d00a85b..822235a2 100644
--- a/Nasal/engines.nas
+++ b/Nasal/engines.nas
@@ -1,4 +1,4 @@
-# A320Family JSB Engine System
+# A3XX JSB Engine System
# Joshua Davidson (it0uchpods)
#####################
@@ -6,12 +6,12 @@
#####################
var engines = props.globals.getNode("/engines").getChildren("engine");
-var n1_min = 23.4;
+var n1_min = 22.4;
var n2_min = 63.7;
var egt_min = 434;
var n1_spin = 5.1;
var n2_spin = 22.8;
-var n1_start = 23.3;
+var n1_start = 22.3;
var n2_start = 63.6;
var egt_start = 587;
var n1_max = 105.8;
@@ -125,7 +125,7 @@ var eng_one_n2_check = func {
if (getprop("/engines/engine[0]/egt-actual") >= egt_start) {
interpolate(engines[0].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
- if (getprop("/engines/engine[0]/n2") >= 50.8) {
+ if (getprop("/engines/engine[0]/n2") >= 55.8) {
setprop("/systems/pneumatic/eng1-starter", 0);
setprop("/engines/engine[0]/state", 3);
eng_one_n2_checkt.stop();
@@ -166,7 +166,7 @@ var eng_two_n2_check = func {
if (getprop("/engines/engine[1]/egt-actual") >= egt_start) {
interpolate(engines[1].getNode("egt-actual"), egt_min, egt_lightdn_time);
}
- if (getprop("/engines/engine[1]/n2") >= 50.8) {
+ if (getprop("/engines/engine[1]/n2") >= 55.8) {
setprop("/systems/pneumatic/eng2-starter", 0);
setprop("/engines/engine[1]/state", 3);
eng_two_n2_checkt.stop();
diff --git a/Nasal/thrust.nas b/Nasal/fadec.nas
similarity index 100%
rename from Nasal/thrust.nas
rename to Nasal/fadec.nas
diff --git a/Nasal/it-autoflight.nas b/Nasal/it-autoflight.nas
deleted file mode 100644
index ac213b63..00000000
--- a/Nasal/it-autoflight.nas
+++ /dev/null
@@ -1,1162 +0,0 @@
-# IT AUTOFLIGHT System Controller
-# Joshua Davidson (it0uchpods)
-# V3.0.0 Build 182
-# This program is 100% GPL!
-
-setprop("/it-autoflight/internal/vert-speed-fpm", 0);
-
-var ap_init = func {
- setprop("/it-autoflight/input/kts-mach", 0);
- setprop("/it-autoflight/input/ap1", 0);
- setprop("/it-autoflight/input/ap2", 0);
- setprop("/it-autoflight/input/athr", 0);
- setprop("/it-autoflight/input/cws", 0);
- setprop("/it-autoflight/input/fd1", 0);
- setprop("/it-autoflight/input/fd2", 0);
- setprop("/it-autoflight/input/hdg", 360);
- setprop("/it-autoflight/input/alt", 10000);
- setprop("/it-autoflight/input/vs", 0);
- setprop("/it-autoflight/input/fpa", 0);
- setprop("/it-autoflight/input/lat", 5);
- setprop("/it-autoflight/input/lat-arm", 0);
- setprop("/it-autoflight/input/vert", 7);
- setprop("/it-autoflight/input/prof-arm", 0);
- setprop("/it-autoflight/input/bank-limit", getprop("/it-autoflight/settings/default-bank-limit"));
- setprop("/it-autoflight/input/trk", 0);
- setprop("/it-autoflight/input/toga", 0);
- setprop("/it-autoflight/output/ap1", 0);
- setprop("/it-autoflight/output/ap2", 0);
- setprop("/it-autoflight/output/athr", 0);
- setprop("/it-autoflight/output/cws", 0);
- setprop("/it-autoflight/output/fd1", 0);
- setprop("/it-autoflight/output/fd2", 0);
- setprop("/it-autoflight/output/loc-armed", 0);
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/thr-mode", 2);
- setprop("/it-autoflight/output/retard", 0);
- setprop("/it-autoflight/output/lat", 5);
- setprop("/it-autoflight/output/vert", 7);
- setprop("/it-autoflight/output/prof-vert", 4);
- setprop("/it-autoflight/settings/use-nav2-radio", 0);
- setprop("/it-autoflight/settings/use-backcourse", 0);
- setprop("/it-autoflight/internal/min-vs", -500);
- setprop("/it-autoflight/internal/max-vs", 500);
- setprop("/it-autoflight/internal/alt", 10000);
- setprop("/it-autoflight/internal/prof-alt", 10000);
- setprop("/it-autoflight/internal/prof-wp-alt", 10000);
- setprop("/it-autoflight/internal/prof-mode", "XX");
- setprop("/it-autoflight/internal/cwsr", 0);
- setprop("/it-autoflight/internal/cwsp", 0);
- setprop("/it-autoflight/internal/fpa", 0);
- setprop("/it-autoflight/internal/prof-fpm", 0);
- setprop("/it-autoflight/internal/top-of-des-nm", 0);
- setprop("/it-autoflight/mode/thr", "PITCH");
- setprop("/it-autoflight/mode/arm", "HDG");
- setprop("/it-autoflight/mode/lat", "T/O");
- setprop("/it-autoflight/mode/vert", "T/O CLB");
- setprop("/it-autoflight/mode/prof", "NONE");
- setprop("/it-autoflight/input/spd-kts", 250);
- setprop("/it-autoflight/input/spd-mach", 0.68);
- update_armst.start();
- thrustmode();
- print("IT-AUTOFLIGHT: Done!");
-}
-
-# AP 1 Master System
-setlistener("/it-autoflight/input/ap1", func {
- var apmas = getprop("/it-autoflight/input/ap1");
- if (apmas == 0) {
- setprop("/it-autoflight/output/ap1", 0);
- setprop("/controls/flight/rudder", 0);
- if (getprop("/it-autoflight/sound/enableapoffsound") == 1) {
- setprop("/it-autoflight/sound/apoffsound", 1);
- setprop("/it-autoflight/sound/enableapoffsound", 0);
- }
- } else if (apmas == 1) {
- if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
- setprop("/controls/flight/rudder", 0);
- setprop("/it-autoflight/input/cws", 0);
- setprop("/it-autoflight/output/ap1", 1);
- setprop("/it-autoflight/sound/enableapoffsound", 1);
- setprop("/it-autoflight/sound/apoffsound", 0);
- }
- }
-});
-
-# AP 2 Master System
-setlistener("/it-autoflight/input/ap2", func {
- var apmas = getprop("/it-autoflight/input/ap2");
- if (apmas == 0) {
- setprop("/it-autoflight/output/ap2", 0);
- setprop("/controls/flight/rudder", 0);
- if (getprop("/it-autoflight/sound/enableapoffsound2") == 1) {
- setprop("/it-autoflight/sound/apoffsound2", 1);
- setprop("/it-autoflight/sound/enableapoffsound2", 0);
- }
- } else if (apmas == 1) {
- if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
- setprop("/controls/flight/rudder", 0);
- setprop("/it-autoflight/input/cws", 0);
- setprop("/it-autoflight/output/ap2", 1);
- setprop("/it-autoflight/sound/enableapoffsound2", 1);
- setprop("/it-autoflight/sound/apoffsound2", 0);
- }
- }
-});
-
-# AT Master System
-setlistener("/it-autoflight/input/athr", func {
- var atmas = getprop("/it-autoflight/input/athr");
- if (atmas == 0) {
- setprop("/it-autoflight/output/athr", 0);
- } else if (atmas == 1) {
- setprop("/it-autoflight/output/retard", 0);
- thrustmode();
- setprop("/it-autoflight/output/athr", 1);
- }
-});
-
-# CWS Master System
-setlistener("/it-autoflight/input/cws", func {
- var cwsmas = getprop("/it-autoflight/input/cws");
- if (cwsmas == 1) {
- if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
- setprop("/it-autoflight/input/ap1", 0);
- setprop("/it-autoflight/input/ap2", 0);
- setprop("/it-autoflight/internal/cws-roll-deg", getprop("/orientation/roll-deg"));
- setprop("/it-autoflight/internal/cws-pitch-deg", getprop("/orientation/pitch-deg"));
- cwsrollt.start();
- cwspitcht.start();
- setprop("/it-autoflight/output/cws", 1);
- }
- } else if (cwsmas == 0) {
- cwsrollt.stop();
- cwspitcht.stop();
- setprop("/it-autoflight/output/cws", 0);
- setprop("/controls/flight/aileron-trim", 0);
- }
-});
-
-# Flight Director 1 Master System
-setlistener("/it-autoflight/input/fd1", func {
- var fdmas = getprop("/it-autoflight/input/fd1");
- if (fdmas == 0) {
- setprop("/it-autoflight/output/fd1", 0);
- } else if (fdmas == 1) {
- setprop("/it-autoflight/output/fd1", 1);
- }
-});
-
-# Flight Director 2 Master System
-setlistener("/it-autoflight/input/fd2", func {
- var fdmas = getprop("/it-autoflight/input/fd2");
- if (fdmas == 0) {
- setprop("/it-autoflight/output/fd2", 0);
- } else if (fdmas == 1) {
- setprop("/it-autoflight/output/fd2", 1);
- }
-});
-
-# Master Lateral
-setlistener("/it-autoflight/input/lat", func {
- if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
- lateral();
- } else {
- lat_arm();
- }
-});
-
-var lateral = func {
- var latset = getprop("/it-autoflight/input/lat");
- if (latset == 0) {
- alandt.stop();
- alandt1.stop();
- lnavwptt.stop();
- setprop("/it-autoflight/output/loc-armed", 0);
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/lat", 0);
- setprop("/it-autoflight/mode/lat", "HDG");
- setprop("/it-autoflight/mode/arm", " ");
- } else if (latset == 1) {
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
- alandt.stop();
- alandt1.stop();
- lnavwptt.start();
- setprop("/it-autoflight/output/loc-armed", 0);
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/lat", 1);
- setprop("/it-autoflight/mode/lat", "LNAV");
- setprop("/it-autoflight/mode/arm", " ");
- } else {
- gui.popupTip("Please make sure you have a route set, and that it is Activated!");
- }
- } else if (latset == 2) {
- if (getprop("/it-autoflight/output/lat") == 2) {
- # Do nothing because VOR/LOC is active
- } else {
- setprop("/instrumentation/nav[0]/signal-quality-norm", 0);
- setprop("/instrumentation/nav[1]/signal-quality-norm", 0);
- setprop("/it-autoflight/output/loc-armed", 1);
- setprop("/it-autoflight/mode/arm", "LOC");
- }
- } else if (latset == 3) {
- alandt.stop();
- alandt1.stop();
- lnavwptt.stop();
- setprop("/it-autoflight/output/loc-armed", 0);
- setprop("/it-autoflight/output/appr-armed", 0);
- var hdgnow = int(getprop("/orientation/heading-magnetic-deg")+0.5);
- setprop("/it-autoflight/input/hdg", hdgnow);
- setprop("/it-autoflight/output/lat", 0);
- setprop("/it-autoflight/mode/lat", "HDG");
- setprop("/it-autoflight/mode/arm", " ");
- } else if (latset == 4) {
- lnavwptt.stop();
- setprop("/it-autoflight/output/lat", 4);
- setprop("/it-autoflight/mode/lat", "ALGN");
- } else if (latset == 5) {
- lnavwptt.stop();
- setprop("/it-autoflight/output/lat", 5);
- }
-}
-
-var lat_arm = func {
- var latset = getprop("/it-autoflight/input/lat");
- if (latset == 0) {
- setprop("/it-autoflight/input/lat-arm", 0);
- setprop("/it-autoflight/mode/arm", "HDG");
- } else if (latset == 1) {
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
- setprop("/it-autoflight/input/lat-arm", 1);
- setprop("/it-autoflight/mode/arm", "LNV");
- } else {
- gui.popupTip("Please make sure you have a route set, and that it is Activated!");
- }
- } else if (latset == 3) {
- var hdgnow = int(getprop("/orientation/heading-magnetic-deg")+0.5);
- setprop("/it-autoflight/input/hdg", hdgnow);
- setprop("/it-autoflight/input/lat-arm", 0);
- setprop("/it-autoflight/mode/arm", "HDG");
- }
-}
-
-# Master Vertical
-setlistener("/it-autoflight/input/vert", func {
- if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
- vertical();
- } else {
- vert_arm();
- }
-});
-
-var vertical = func {
- var vertset = getprop("/it-autoflight/input/vert");
- if (vertset == 0) {
- alandt.stop();
- alandt1.stop();
- prof_sys_stop();
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/vert", 0);
- setprop("/it-autoflight/mode/vert", "ALT HLD");
- if (getprop("/it-autoflight/output/loc-armed")) {
- setprop("/it-autoflight/mode/arm", "LOC");
- } else {
- setprop("/it-autoflight/mode/arm", " ");
- }
- var altnow = int((getprop("/instrumentation/altimeter/indicated-altitude-ft")+50)/100)*100;
- setprop("/it-autoflight/input/alt", altnow);
- setprop("/it-autoflight/internal/alt", altnow);
- thrustmode();
- } else if (vertset == 1) {
- alandt.stop();
- alandt1.stop();
- prof_sys_stop();
- setprop("/it-autoflight/output/appr-armed", 0);
- var altinput = getprop("/it-autoflight/input/alt");
- setprop("/it-autoflight/internal/alt", altinput);
- var vsnow = int(getprop("/velocities/vertical-speed-fps")*0.6)*100;
- setprop("/it-autoflight/input/vs", vsnow);
- setprop("/it-autoflight/output/vert", 1);
- setprop("/it-autoflight/mode/vert", "V/S");
- if (getprop("/it-autoflight/output/loc-armed")) {
- setprop("/it-autoflight/mode/arm", "LOC");
- } else {
- setprop("/it-autoflight/mode/arm", " ");
- }
- thrustmode();
- } else if (vertset == 2) {
- if (getprop("/it-autoflight/output/lat") == 2) {
- # Do nothing because VOR/LOC is active
- } else {
- setprop("/instrumentation/nav[0]/signal-quality-norm", 0);
- setprop("/instrumentation/nav[1]/signal-quality-norm", 0);
- setprop("/it-autoflight/output/loc-armed", 1);
- }
- if ((getprop("/it-autoflight/output/vert") == 2) or (getprop("/it-autoflight/output/vert") == 6)) {
- # Do nothing because G/S or LAND or FLARE is active
- } else {
- setprop("/instrumentation/nav[0]/gs-rate-of-climb", 0);
- setprop("/instrumentation/nav[1]/gs-rate-of-climb", 0);
- setprop("/it-autoflight/output/appr-armed", 1);
- setprop("/it-autoflight/mode/arm", "ILS");
- }
- } else if (vertset == 3) {
- alandt.stop();
- alandt1.stop();
- prof_sys_stop();
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var alt = getprop("/it-autoflight/internal/alt");
- var dif = calt - alt;
- var vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
- if (calt < alt) {
- setprop("/it-autoflight/internal/max-vs", vsnow);
- } else if (calt > alt) {
- setprop("/it-autoflight/internal/min-vs", vsnow);
- }
- minmaxtimer.start();
- thrustmode();
- setprop("/it-autoflight/output/vert", 0);
- setprop("/it-autoflight/mode/vert", "ALT CAP");
- } else if (vertset == 4) {
- alandt.stop();
- alandt1.stop();
- prof_sys_stop();
- setprop("/it-autoflight/output/appr-armed", 0);
- var altinput = getprop("/it-autoflight/input/alt");
- setprop("/it-autoflight/internal/alt", altinput);
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var alt = getprop("/it-autoflight/internal/alt");
- var dif = calt - alt;
- if (dif < 250 and dif > -250) {
- alt_on();
- } else {
- flch_on();
- }
- if (getprop("/it-autoflight/output/loc-armed")) {
- setprop("/it-autoflight/mode/arm", "LOC");
- } else {
- setprop("/it-autoflight/mode/arm", " ");
- }
- } else if (vertset == 5) {
- alandt.stop();
- alandt1.stop();
- prof_sys_stop();
- fpa_calct.start();
- setprop("/it-autoflight/output/appr-armed", 0);
- var altinput = getprop("/it-autoflight/input/alt");
- setprop("/it-autoflight/internal/alt", altinput);
- var fpanow = (int(10*getprop("/it-autoflight/internal/fpa")))*0.1;
- setprop("/it-autoflight/input/fpa", fpanow);
- setprop("/it-autoflight/output/vert", 5);
- setprop("/it-autoflight/mode/vert", "FPA");
- if (getprop("/it-autoflight/output/loc-armed") == 1) {
- setprop("/it-autoflight/mode/arm", "LOC");
- } else {
- setprop("/it-autoflight/mode/arm", " ");
- }
- thrustmode();
- } else if (vertset == 6) {
- setprop("/it-autoflight/output/vert", 6);
- setprop("/it-autoflight/mode/vert", "LAND");
- setprop("/it-autoflight/mode/arm", " ");
- thrustmode();
- alandt.stop();
- alandt1.start();
- prof_sys_stop();
- } else if (vertset == 7) {
- alandt.stop();
- alandt1.stop();
- prof_sys_stop();
- setprop("/it-autoflight/output/vert", 7);
- setprop("/it-autoflight/mode/arm", " ");
- var altinput = getprop("/it-autoflight/input/alt");
- setprop("/it-autoflight/internal/alt", altinput);
- prof_sys_stop();
- thrustmodet.start();
- } else if (vertset == 8) {
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1 and getprop("/it-autoflight/internal/prof-wp-alt") >= 100) {
- alandt.stop();
- alandt1.stop();
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/vert", 8);
- prof_run();
- setprop("/it-autoflight/mode/vert", "VNAV");
- setprop("/it-autoflight/mode/arm", " ");
- var altinput = getprop("/it-autoflight/input/alt");
- setprop("/it-autoflight/internal/alt", altinput);
- if (getprop("/it-autoflight/output/loc-armed")) {
- setprop("/it-autoflight/mode/arm", "LOC");
- } else {
- setprop("/it-autoflight/mode/arm", " ");
- }
- prof_maint.start();
- } else {
- gui.popupTip("Please make sure you have a route, and waypoints with altitude restrictions set, and that the route is Activated!");
- }
- }
-}
-
-var vert_arm = func {
- var vertset = getprop("/it-autoflight/input/vert");
- if (vertset == 8) {
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1 and getprop("/it-autoflight/internal/prof-wp-alt") >= 100) {
- setprop("/it-autoflight/input/prof-arm", 1);
- setprop("/it-autoflight/mode/prof", "ARMED");
- } else {
- gui.popupTip("Please make sure you have a route, and waypoints with altitude restrictions set, and that the route is Activated!");
- }
- } else {
- setprop("/it-autoflight/input/prof-arm", 0);
- setprop("/it-autoflight/mode/prof", "NONE");
- }
-}
-
-# Helpers
-var lnavwpt = func {
- if (getprop("/autopilot/route-manager/route/num") > 0) {
- if (getprop("/autopilot/route-manager/wp/dist") <= 1.0) {
- var wptnum = getprop("/autopilot/route-manager/current-wp");
- if ((wptnum + 1) < getprop("/autopilot/route-manager/route/num")) {
- setprop("/autopilot/route-manager/current-wp", wptnum + 1);
- }
- }
- }
-}
-
-var flch_on = func {
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/vert", 4);
- thrustmodet.start();
-}
-var alt_on = func {
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/vert", 0);
- setprop("/it-autoflight/mode/vert", "ALT CAP");
- setprop("/it-autoflight/internal/max-vs", 500);
- setprop("/it-autoflight/internal/min-vs", -500);
- minmaxtimer.start();
-}
-
-var fpa_calc = func {
- var VS = getprop("/velocities/vertical-speed-fps");
- var TAS = getprop("/velocities/uBody-fps");
- if(TAS < 10) TAS = 10;
- if(VS < -200) VS =-200;
- if (abs(VS/TAS) <= 1) {
- var FPangle = math.asin(VS/TAS);
- FPangle *=90;
- setprop("/it-autoflight/internal/fpa", FPangle);
- }
-}
-
-setlistener("/it-autoflight/input/kts-mach", func {
- var modez = getprop("/it-autoflight/input/kts-mach");
- if (modez == 0) {
- var iasnow = int(getprop("/instrumentation/airspeed-indicator/indicated-speed-kt")+0.5);
- setprop("/it-autoflight/input/spd-kts", iasnow);
- } else if (modez == 1) {
- var machnow = (int(1000*getprop("/velocities/mach")))*0.001;
- setprop("/it-autoflight/input/spd-mach", machnow);
- }
-});
-
-# Takeoff Modes
-# Lat Active
-var latarms = func {
- if (getprop("/position/gear-agl-ft") >= getprop("/it-autoflight/settings/lat-agl-ft")) {
- setprop("/it-autoflight/input/lat", getprop("/it-autoflight/input/lat-arm"));
- }
-}
-
-# TOGA
-setlistener("/it-autoflight/input/toga", func {
- if (getprop("/it-autoflight/input/toga") == 1) {
- setprop("/it-autoflight/input/vert", 7);
- vertical();
- setprop("/it-autoflight/output/loc-armed", 0);
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/input/toga", 0);
- togasel();
- }
-});
-
-var togasel = func {
- if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) {
- var iasnow = int(getprop("/instrumentation/airspeed-indicator/indicated-speed-kt")+0.5);
- setprop("/it-autoflight/input/spd-kts", iasnow);
- setprop("/it-autoflight/input/kts-mach", 0);
- setprop("/it-autoflight/mode/vert", "G/A CLB");
- setprop("/it-autoflight/input/lat", 3);
- } else {
- setprop("/it-autoflight/input/lat", 5);
- lateral();
- setprop("/it-autoflight/mode/lat", "T/O");
- setprop("/it-autoflight/mode/vert", "T/O CLB");
- }
-}
-
-setlistener("/it-autoflight/mode/vert", func {
- var vertm = getprop("/it-autoflight/mode/vert");
- if (vertm == "T/O CLB") {
- reduct.start();
- } else {
- reduct.stop();
- }
-});
-
-setlistener("/it-autoflight/mode/lat", func {
- var vertm = getprop("/it-autoflight/mode/lat");
- if (vertm == "T/O") {
- latarmt.start();
- } else {
- latarmt.stop();
- }
-});
-
-var toga_reduc = func {
- if (getprop("/position/gear-agl-ft") >= getprop("/it-autoflight/settings/reduc-agl-ft")) {
- if (getprop("/it-autoflight/input/prof-arm") == 1) {
- setprop("/it-autoflight/input/vert", 8);
- } else {
- setprop("/it-autoflight/input/vert", 4);
- }
- }
-}
-
-# Altitude Capture and FPA Timer Logic
-setlistener("/it-autoflight/output/vert", func {
- var vertm = getprop("/it-autoflight/output/vert");
- if (vertm == 1) {
- altcaptt.start();
- fpa_calct.stop();
- setprop("/it-autoflight/mode/prof", "NONE");
- } else if (vertm == 4) {
- altcaptt.start();
- fpa_calct.stop();
- setprop("/it-autoflight/mode/prof", "NONE");
- } else if (vertm == 5) {
- altcaptt.start();
- setprop("/it-autoflight/mode/prof", "NONE");
- } else if (vertm == 7) {
- altcaptt.start();
- fpa_calct.stop();
- setprop("/it-autoflight/mode/prof", "NONE");
- } else if (vertm == 8) {
- altcaptt.stop();
- fpa_calct.stop();
- } else {
- altcaptt.stop();
- fpa_calct.stop();
- setprop("/it-autoflight/mode/prof", "NONE");
- }
-});
-
-# Altitude Capture
-var altcapt = func {
- var vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
- if ((vsnow >= 0 and vsnow < 500) or (vsnow < 0 and vsnow > -500)) {
- setprop("/it-autoflight/internal/captvs", 100);
- setprop("/it-autoflight/internal/captvsneg", -100);
- } else if ((vsnow >= 500 and vsnow < 1000) or (vsnow < -500 and vsnow > -1000)) {
- setprop("/it-autoflight/internal/captvs", 200);
- setprop("/it-autoflight/internal/captvsneg", -200);
- } else if ((vsnow >= 1000 and vsnow < 1500) or (vsnow < -1000 and vsnow > -1500)) {
- setprop("/it-autoflight/internal/captvs", 300);
- setprop("/it-autoflight/internal/captvsneg", -300);
- } else if ((vsnow >= 1500 and vsnow < 2000) or (vsnow < -1500 and vsnow > -2000)) {
- setprop("/it-autoflight/internal/captvs", 400);
- setprop("/it-autoflight/internal/captvsneg", -400);
- } else if ((vsnow >= 2000 and vsnow < 3000) or (vsnow < -2000 and vsnow > -3000)) {
- setprop("/it-autoflight/internal/captvs", 600);
- setprop("/it-autoflight/internal/captvsneg", -600);
- } else if ((vsnow >= 3000 and vsnow < 4000) or (vsnow < -3000 and vsnow > -4000)) {
- setprop("/it-autoflight/internal/captvs", 900);
- setprop("/it-autoflight/internal/captvsneg", -900);
- } else if ((vsnow >= 4000 and vsnow < 5000) or (vsnow < -4000 and vsnow > -5000)) {
- setprop("/it-autoflight/internal/captvs", 1200);
- setprop("/it-autoflight/internal/captvsneg", -1200);
- } else if ((vsnow >= 5000) or (vsnow < -5000)) {
- setprop("/it-autoflight/internal/captvs", 1500);
- setprop("/it-autoflight/internal/captvsneg", -1500);
- }
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var alt = getprop("/it-autoflight/internal/alt");
- var dif = calt - alt;
- if (dif < getprop("/it-autoflight/internal/captvs") and dif > getprop("/it-autoflight/internal/captvsneg")) {
- if (vsnow > 0 and dif < 0) {
- setprop("/it-autoflight/input/vert", 3);
- setprop("/it-autoflight/output/thr-mode", 0);
- } else if (vsnow < 0 and dif > 0) {
- setprop("/it-autoflight/input/vert", 3);
- setprop("/it-autoflight/output/thr-mode", 0);
- }
- }
- var altinput = getprop("/it-autoflight/input/alt");
- setprop("/it-autoflight/internal/alt", altinput);
-}
-
-# Min and Max Pitch Reset
-var minmax = func {
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var alt = getprop("/it-autoflight/internal/alt");
- var dif = calt - alt;
- if (dif < 50 and dif > -50) {
- setprop("/it-autoflight/internal/max-vs", 500);
- setprop("/it-autoflight/internal/min-vs", -500);
- var vertmode = getprop("/it-autoflight/output/vert");
- if (vertmode == 1 or vertmode == 2 or vertmode == 4 or vertmode == 5 or vertmode == 6 or vertmode == 7) {
- # Do not change the vertical mode because we are not trying to capture altitude.
- } else {
- setprop("/it-autoflight/mode/vert", "ALT HLD");
- }
- minmaxtimer.stop();
- }
-}
-
-# Thrust Mode Selector
-var thrustmode = func {
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var alt = getprop("/it-autoflight/internal/alt");
- var vertm = getprop("/it-autoflight/output/vert");
- if (vertm == 4) {
- if (calt < alt) {
- setprop("/it-autoflight/output/thr-mode", 2);
- setprop("/it-autoflight/mode/thr", " PITCH");
- setprop("/it-autoflight/mode/vert", "SPD CLB");
- } else if (calt > alt) {
- setprop("/it-autoflight/output/thr-mode", 1);
- setprop("/it-autoflight/mode/thr", " PITCH");
- setprop("/it-autoflight/mode/vert", "SPD DES");
- } else {
- setprop("/it-autoflight/output/thr-mode", 0);
- setprop("/it-autoflight/mode/thr", "THRUST");
- setprop("/it-autoflight/input/vert", 3);
- }
- } else if (vertm == 7) {
- setprop("/it-autoflight/output/thr-mode", 2);
- setprop("/it-autoflight/mode/thr", " PITCH");
- } else if (vertm == 8) {
- thrustmodet.stop();
- } else {
- setprop("/it-autoflight/output/thr-mode", 0);
- setprop("/it-autoflight/mode/thr", "THRUST");
- thrustmodet.stop();
- }
-}
-
-# ILS and Autoland
-# Retard
-setlistener("/controls/flight/flaps", func {
- var flapc = getprop("/controls/flight/flaps");
- var flapl = getprop("/it-autoflight/settings/land-flap");
- if (flapc >= flapl) {
- retardt.start();
- } else {
- retardt.stop();
- }
-});
-
-var retardchk = func {
- if (getprop("/it-autoflight/settings/retard-enable") == 1) {
- var altpos = getprop("/position/gear-agl-ft");
- var retardalt = getprop("/it-autoflight/settings/retard-ft");
- var aton = getprop("/it-autoflight/output/athr");
- if (altpos < retardalt) {
- if (aton == 1) {
- setprop("/it-autoflight/output/retard", 1);
- setprop("/it-autoflight/mode/thr", "RETARD");
- atofft.start();
- } else {
- setprop("/it-autoflight/output/retard", 0);
- thrustmode();
- }
- }
- }
-}
-
-var atoffchk = func{
- var gear1 = getprop("/gear/gear[1]/wow");
- var gear2 = getprop("/gear/gear[2]/wow");
- if (gear1 == 1 or gear2 == 1) {
- setprop("/it-autoflight/input/athr", 0);
- setprop("/controls/engines/engine[0]/throttle", 0);
- setprop("/controls/engines/engine[1]/throttle", 0);
- setprop("/controls/engines/engine[2]/throttle", 0);
- setprop("/controls/engines/engine[3]/throttle", 0);
- setprop("/controls/engines/engine[4]/throttle", 0);
- setprop("/controls/engines/engine[5]/throttle", 0);
- setprop("/controls/engines/engine[6]/throttle", 0);
- setprop("/controls/engines/engine[7]/throttle", 0);
- atofft.stop();
- }
-}
-
-# LOC and G/S arming
-var update_arms = func {
- update_locarmelec();
- update_apparmelec();
-}
-
-var update_locarmelec = func {
- var loca = getprop("/it-autoflight/output/loc-armed");
- if (loca) {
- locarmcheck();
- } else {
- return 0;
- }
-}
-
-var update_apparmelec = func {
- var appra = getprop("/it-autoflight/output/appr-armed");
- if (appra) {
- apparmcheck();
- } else {
- return 0;
- }
-}
-
-var locarmcheck = func {
- var locdefl = getprop("instrumentation/nav[0]/heading-needle-deflection-norm");
- var locdefl_b = getprop("instrumentation/nav[1]/heading-needle-deflection-norm");
- if ((locdefl < 0.9233) and (getprop("instrumentation/nav[0]/signal-quality-norm") > 0.99) and (getprop("/it-autoflight/settings/use-nav2-radio") == 0)) {
- make_loc_active();
- } else if ((locdefl_b < 0.9233) and (getprop("instrumentation/nav[1]/signal-quality-norm") > 0.99) and (getprop("/it-autoflight/settings/use-nav2-radio") == 1)) {
- make_loc_active();
- } else {
- return 0;
- }
-}
-
-var make_loc_active = func {
- setprop("/it-autoflight/output/loc-armed", 0);
- setprop("/it-autoflight/output/lat", 2);
- setprop("/it-autoflight/mode/lat", "LOC");
- if (getprop("/it-autoflight/output/appr-armed") == 1) {
- # Do nothing because G/S is armed
- } else {
- setprop("/it-autoflight/mode/arm", " ");
- }
-}
-
-var apparmcheck = func {
- var signal = getprop("/instrumentation/nav[0]/gs-needle-deflection-norm");
- var signal_b = getprop("/instrumentation/nav[1]/gs-needle-deflection-norm");
- if ((signal <= -0.000000001) and (getprop("/it-autoflight/settings/use-nav2-radio") == 0) and (getprop("/it-autoflight/output/lat") == 2)) {
- make_appr_active();
- } else if ((signal_b <= -0.000000001) and (getprop("/it-autoflight/settings/use-nav2-radio") == 1) and (getprop("/it-autoflight/output/lat") == 2)) {
- make_appr_active();
- } else {
- return 0;
- }
-}
-
-var make_appr_active = func {
- prof_sys_stop();
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/vert", 2);
- setprop("/it-autoflight/mode/vert", "G/S");
- setprop("/it-autoflight/mode/arm", " ");
- if (getprop("/it-autoflight/settings/land-enable") == 1){
- alandt.start();
- }
- thrustmode();
-}
-
-# Autoland Stage 1 Logic (Land)
-var aland = func {
- var ap1 = getprop("/it-autoflight/output/ap1");
- var ap2 = getprop("/it-autoflight/output/ap2");
- var landoption = getprop("/it-autoflight/settings/autoland-without-ap");
- if (getprop("/position/gear-agl-ft") <= 100) {
- if (ap1 == 1 or ap2 == 1) {
- setprop("/it-autoflight/input/lat", 4);
- setprop("/it-autoflight/input/vert", 6);
- } else if (ap1 == 0 and ap2 == 0 and landoption) {
- setprop("/it-autoflight/input/lat", 4);
- setprop("/it-autoflight/input/vert", 6);
- } else {
- alandt.stop();
- alandt1.stop();
- }
- }
-}
-
-var aland1 = func {
- var aglal = getprop("/position/gear-agl-ft");
- if (aglal <= 50 and aglal > 5) {
- setprop("/it-autoflight/mode/vert", "FLARE");
- }
- if ((getprop("/it-autoflight/output/ap1") == 0) and (getprop("/it-autoflight/output/ap2") == 0) and (getprop("/it-autoflight/settings/autoland-without-ap") == 0)) {
- alandt.stop();
- alandt1.stop();
- setprop("/it-autoflight/output/loc-armed", 0);
- setprop("/it-autoflight/output/lat", 2);
- setprop("/it-autoflight/mode/lat", "LOC");
- setprop("/it-autoflight/output/appr-armed", 0);
- setprop("/it-autoflight/output/vert", 2);
- setprop("/it-autoflight/mode/vert", "G/S");
- setprop("/it-autoflight/mode/arm", " ");
- }
- var gear1 = getprop("/gear/gear[1]/wow");
- var gear2 = getprop("/gear/gear[2]/wow");
- if (gear1 == 1 or gear2 == 1) {
- setprop("/it-autoflight/input/ap1", 0);
- setprop("/it-autoflight/input/ap2", 0);
- alandt1.stop();
- }
-}
-
-# Autoland Stage 2 Logic (Rollout)
-# Not yet working, planned.
-
-# VNAV Profile Mode
-var prof_main = func {
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
- var altinput = getprop("/it-autoflight/input/alt");
- setprop("/it-autoflight/internal/alt", altinput);
- var wp_curr = getprop("/autopilot/route-manager/current-wp");
- var vnav_alt_wp = getprop("/autopilot/route-manager/route/wp",wp_curr,"altitude-ft");
- if (getprop("/it-autoflight/internal/prof-wp-alt") == vnav_alt_wp) {
- # Do nothing
- } else {
- setprop("/it-autoflight/internal/prof-wp-alt", vnav_alt_wp);
- }
- vnav_alt_selector();
- if (getprop("/it-autoflight/internal/prof-wp-alt") < 100) {
- setprop("/it-autoflight/input/vert", 4);
- }
- } else {
- setprop("/it-autoflight/input/vert", 4);
- }
-}
-
-var prof_sys_stop = func {
- prof_maint.stop();
- vnav_altcaptt.stop();
- vnav_minmaxt.stop();
- vnav_des_fpmt.stop();
- vnav_des_todt.stop();
- setprop("/it-autoflight/mode/prof", "NONE");
-}
-
-setlistener("/it-autoflight/input/alt", func {
- if (getprop("/it-autoflight/output/vert") == 8) {
- vnav_alt_selector();
- prof_run();
- }
-});
-
-setlistener("/it-autoflight/internal/prof-wp-alt", func {
- if (getprop("/it-autoflight/output/vert") == 8) {
- vnav_alt_selector();
- prof_run();
- }
-});
-
-setlistener("/autopilot/route-manager/current-wp", func {
- if (getprop("/it-autoflight/output/vert") == 8) {
- vnav_alt_selector();
- prof_run();
- }
-});
-
-var prof_run = func {
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
- var wp_curr = getprop("/autopilot/route-manager/current-wp");
- var wptnum = getprop("/autopilot/route-manager/current-wp");
- var vnav_alt_wp = getprop("/autopilot/route-manager/route/wp",wp_curr,"altitude-ft");
- if ((wptnum - 1) < getprop("/autopilot/route-manager/route/num")) {
- var vnav_alt_wp_prev = getprop("/autopilot/route-manager/route/wp",wp_curr - 1,"altitude-ft");
- var altcurr = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- if (vnav_alt_wp_prev >= 100) {
- if (vnav_alt_wp_prev > vnav_alt_wp) {
- vnav_des_todt.start();
- setprop("/it-autoflight/internal/prof-mode", "DES");
- } else if (vnav_alt_wp_prev == vnav_alt_wp) {
- vnav_des_todt.stop();
- setprop("/it-autoflight/internal/top-of-des-nm", 0);
- setprop("/it-autoflight/internal/prof-mode", "XX");
- } else if (vnav_alt_wp_prev <= vnav_alt_wp) {
- vnav_des_todt.stop();
- setprop("/it-autoflight/internal/top-of-des-nm", 0);
- setprop("/it-autoflight/internal/prof-mode", "CLB");
- }
- } else if (vnav_alt_wp_prev < 100) {
- if (altcurr > vnav_alt_wp) {
- vnav_des_todt.start();
- setprop("/it-autoflight/internal/prof-mode", "DES");
- } else if (altcurr == vnav_alt_wp) {
- vnav_des_todt.stop();
- setprop("/it-autoflight/internal/top-of-des-nm", 0);
- setprop("/it-autoflight/internal/prof-mode", "XX");
- } else if (altcurr <= vnav_alt_wp) {
- vnav_des_todt.stop();
- setprop("/it-autoflight/internal/top-of-des-nm", 0);
- setprop("/it-autoflight/internal/prof-mode", "CLB");
- }
- }
- } else {
- vnav_des_todt.stop();
- setprop("/it-autoflight/internal/top-of-des-nm", 0);
- }
- if (vnav_alt_wp >= 100) {
- if (getprop("/it-autoflight/internal/prof-mode") == "CLB") {
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var valt = getprop("/it-autoflight/internal/prof-alt");
- var vdif = calt - valt;
- if (vdif > 250 or vdif < -250) {
- prof_clb();
- } else {
- vnav_alt_sel();
- }
- } else if (getprop("/it-autoflight/internal/prof-mode") == "DES") {
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var valt = getprop("/it-autoflight/internal/prof-alt");
- var vdif = calt - valt;
- if (vdif > 250 or vdif < -250) {
- prof_des_spd();
- } else {
- vnav_alt_sel();
- }
- } else if (getprop("/it-autoflight/internal/prof-mode") == "XX") {
- # Do nothing for now
- }
- } else {
- setprop("/it-autoflight/input/vert", 4);
- }
- } else {
- setprop("/it-autoflight/input/vert", 4);
- }
-}
-
-# VNAV Top of Descent
-var vnav_des_tod = func {
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
- var wp_curr = getprop("/autopilot/route-manager/current-wp");
- var vnav_alt_wp = getprop("/autopilot/route-manager/route/wp",wp_curr,"altitude-ft");
- var alt_curr = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var dist = getprop("/autopilot/route-manager/wp/dist");
- var vdist = dist + 1;
- var alttl = abs(alt_curr - vnav_alt_wp);
- setprop("/it-autoflight/internal/top-of-des-nm", (alttl / 1000) * 3);
- if (vdist < getprop("/it-autoflight/internal/top-of-des-nm")) {
- vnav_des_todt.stop();
- var salt = getprop("/it-autoflight/internal/alt");
- var valt = getprop("/it-autoflight/internal/prof-wp-alt");
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var sdif = abs(calt - salt);
- var vdif = abs(calt - valt);
- if (sdif <= vdif) {
- setprop("/it-autoflight/internal/prof-alt", getprop("/it-autoflight/internal/alt"));
- } else if (sdif > vdif) {
- setprop("/it-autoflight/internal/prof-alt", getprop("/it-autoflight/internal/prof-wp-alt"));
- }
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var valt = getprop("/it-autoflight/internal/prof-alt");
- var vdif = calt - valt;
- if (vdif > 550 or vdif < -550) {
- prof_des_spd();
- } else {
- vnav_alt_sel();
- }
- }
- }
-}
-
-# VNAV Altitude Selector
-var vnav_alt_selector = func {
- var salt = getprop("/it-autoflight/internal/alt");
- var valt = getprop("/it-autoflight/internal/prof-wp-alt");
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var sdif = abs(calt - salt);
- var vdif = abs(calt - valt);
- if (getprop("/it-autoflight/internal/prof-mode") == "CLB") {
- if (sdif <= vdif) {
- setprop("/it-autoflight/internal/prof-alt", getprop("/it-autoflight/internal/alt"));
- } else if (sdif > vdif) {
- setprop("/it-autoflight/internal/prof-alt", getprop("/it-autoflight/internal/prof-wp-alt"));
- }
- } else if (getprop("/it-autoflight/internal/prof-mode") == "DES") {
- var dist = getprop("/autopilot/route-manager/wp/dist");
- var vdist = dist - 1;
- if (vdist < getprop("/it-autoflight/internal/top-of-des-nm")) {
- if (sdif <= vdif) {
- setprop("/it-autoflight/internal/prof-alt", getprop("/it-autoflight/internal/alt"));
- } else if (sdif > vdif) {
- setprop("/it-autoflight/internal/prof-alt", getprop("/it-autoflight/internal/prof-wp-alt"));
- }
- }
- }
-}
-
-# VNAV Selector
-var vnav_alt_sel = func {
- setprop("/it-autoflight/internal/max-vs", 500);
- setprop("/it-autoflight/internal/min-vs", -500);
- setprop("/it-autoflight/output/thr-mode", 0);
- setprop("/it-autoflight/output/prof-vert", 0);
- setprop("/it-autoflight/mode/thr", "THRUST");
- setprop("/it-autoflight/mode/prof", "VNAV CAP");
- vnav_minmaxt.start();
-}
-
-# VNAV Climb
-var prof_clb = func {
- vnav_des_fpmt.stop();
- setprop("/it-autoflight/output/thr-mode", 2);
- setprop("/it-autoflight/mode/thr", " PITCH");
- setprop("/it-autoflight/output/prof-vert", 4);
- setprop("/it-autoflight/mode/prof", "VNAV SPD");
- vnav_altcaptt.start();
-}
-
-# VNAV Descent
-var prof_des_spd = func {
- vnav_des_fpmt.stop();
- setprop("/it-autoflight/output/thr-mode", 1);
- setprop("/it-autoflight/mode/thr", " PITCH");
- setprop("/it-autoflight/output/prof-vert", 4);
- setprop("/it-autoflight/mode/prof", "VNAV SPD");
- vnav_altcaptt.start();
-}
-var prof_des_pth = func {
- vnav_des_fpmt.start();
- setprop("/it-autoflight/output/thr-mode", 0);
- setprop("/it-autoflight/mode/thr", "THRUST");
- setprop("/it-autoflight/output/prof-vert", 1);
- setprop("/it-autoflight/mode/prof", "VNAV PTH");
- vnav_altcaptt.start();
-}
-var vnav_des_fpm = func {
- if (getprop("/autopilot/route-manager/route/num") > 0 and getprop("/autopilot/route-manager/active") == 1) {
- var gndspd = getprop("/velocities/groundspeed-kt");
- var desfpm = ((gndspd * 0.5) * 10);
- setprop("/it-autoflight/internal/prof-fpm", desfpm);
- }
-}
-
-# VNAV Capture
-var vnav_altcapt = func {
- var vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
- if ((vsnow >= 0 and vsnow < 500) or (vsnow < 0 and vsnow > -500)) {
- setprop("/it-autoflight/internal/captvs", 100);
- setprop("/it-autoflight/internal/captvsneg", -100);
- } else if ((vsnow >= 500 and vsnow < 1000) or (vsnow < -500 and vsnow > -1000)) {
- setprop("/it-autoflight/internal/captvs", 200);
- setprop("/it-autoflight/internal/captvsneg", -200);
- } else if ((vsnow >= 1000 and vsnow < 1500) or (vsnow < -1000 and vsnow > -1500)) {
- setprop("/it-autoflight/internal/captvs", 300);
- setprop("/it-autoflight/internal/captvsneg", -300);
- } else if ((vsnow >= 1500 and vsnow < 2000) or (vsnow < -1500 and vsnow > -2000)) {
- setprop("/it-autoflight/internal/captvs", 400);
- setprop("/it-autoflight/internal/captvsneg", -400);
- } else if ((vsnow >= 2000 and vsnow < 3000) or (vsnow < -2000 and vsnow > -3000)) {
- setprop("/it-autoflight/internal/captvs", 600);
- setprop("/it-autoflight/internal/captvsneg", -600);
- } else if ((vsnow >= 3000 and vsnow < 4000) or (vsnow < -3000 and vsnow > -4000)) {
- setprop("/it-autoflight/internal/captvs", 900);
- setprop("/it-autoflight/internal/captvsneg", -900);
- } else if ((vsnow >= 4000 and vsnow < 5000) or (vsnow < -4000 and vsnow > -5000)) {
- setprop("/it-autoflight/internal/captvs", 1200);
- setprop("/it-autoflight/internal/captvsneg", -1200);
- } else if ((vsnow >= 5000) or (vsnow < -5000)) {
- setprop("/it-autoflight/internal/captvs", 1500);
- setprop("/it-autoflight/internal/captvsneg", -1500);
- }
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var valt = getprop("/it-autoflight/internal/prof-alt");
- var vdif = calt - valt;
- if (vdif < getprop("/it-autoflight/internal/captvs") and vdif > getprop("/it-autoflight/internal/captvsneg")) {
- vnav_capture_alt();
- }
-}
-
-var vnav_capture_alt = func {
- vnav_altcaptt.stop();
- vnav_des_fpmt.stop();
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var alt = getprop("/it-autoflight/internal/alt");
- var valt = getprop("/it-autoflight/internal/prof-alt");
- var vsnow = getprop("/it-autoflight/internal/vert-speed-fpm");
- if (calt < valt) {
- setprop("/it-autoflight/internal/max-vs", vsnow);
- } else if (calt > valt) {
- setprop("/it-autoflight/internal/min-vs", vsnow);
- }
- vnav_minmaxt.start();
- setprop("/it-autoflight/output/thr-mode", 0);
- setprop("/it-autoflight/output/prof-vert", 0);
- setprop("/it-autoflight/mode/thr", "THRUST");
- setprop("/it-autoflight/mode/prof", "VNAV CAP");
-}
-
-# VNAV Min and Max Pitch Reset
-var vnav_minmax = func {
- var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft");
- var valt = getprop("/it-autoflight/internal/prof-alt");
- var vdif = calt - valt;
- if (vdif < 50 and vdif > -50) {
- setprop("/it-autoflight/internal/max-vs", 500);
- setprop("/it-autoflight/internal/min-vs", -500);
- var vertmode = getprop("/it-autoflight/output/prof-vert");
- if (vertmode == 0) {
- setprop("/it-autoflight/mode/prof", "VNAV HLD");
- }
- vnav_minmaxt.stop();
- }
-}
-
-# CWS
-var cwsroll = func {
- var ail = getprop("/controls/flight/aileron");
- if (ail < 0.05 and ail > -0.05) {
- if (getprop("/it-autoflight/internal/cwsr") == 0) {
- setprop("/it-autoflight/internal/cws-roll-deg", getprop("/orientation/roll-deg"));
- }
- setprop("/it-autoflight/internal/cwsr", 1);
- } else {
- setprop("/it-autoflight/internal/cwsr", 0);
- }
-}
-
-var cwspitch = func {
- var elv = getprop("/controls/flight/elevator");
- if (elv < 0.05 and elv > -0.05) {
- if (getprop("/it-autoflight/internal/cwsp") == 0) {
- setprop("/it-autoflight/internal/cws-pitch-deg", getprop("/orientation/pitch-deg"));
- }
- setprop("/it-autoflight/internal/cwsp", 1);
- } else {
- setprop("/it-autoflight/internal/cwsp", 0);
- }
-}
-
-# For Canvas Nav Display.
-setlistener("/it-autoflight/input/hdg", func {
- setprop("/autopilot/settings/heading-bug-deg", getprop("/it-autoflight/input/hdg"));
-});
-
-setlistener("/it-autoflight/internal/alt", func {
- setprop("/autopilot/settings/target-altitude-ft", getprop("/it-autoflight/internal/alt"));
-});
-
-# Timers
-var update_armst = maketimer(0.5, update_arms);
-var altcaptt = maketimer(0.5, altcapt);
-var thrustmodet = maketimer(0.5, thrustmode);
-var minmaxtimer = maketimer(0.5, minmax);
-var retardt = maketimer(0.5, retardchk);
-var atofft = maketimer(0.5, atoffchk);
-var alandt = maketimer(0.5, aland);
-var alandt1 = maketimer(0.5, aland1);
-var cwsrollt = maketimer(0.1, cwsroll);
-var cwspitcht = maketimer(0.1, cwspitch);
-var reduct = maketimer(0.5, toga_reduc);
-var latarmt = maketimer(0.5, latarms);
-var fpa_calct = maketimer(0.1, fpa_calc);
-var lnavwptt = maketimer(1, lnavwpt);
-var prof_maint = maketimer(0.5, prof_main);
-var vnav_altcaptt = maketimer(0.5, vnav_altcapt);
-var vnav_minmaxt = maketimer(0.5, vnav_minmax);
-var vnav_des_fpmt = maketimer(0.5, vnav_des_fpm);
-var vnav_des_todt = maketimer(0.5, vnav_des_tod);
diff --git a/Nasal/libraries.nas b/Nasal/libraries.nas
index 9a0b34e2..853ee14f 100644
--- a/Nasal/libraries.nas
+++ b/Nasal/libraries.nas
@@ -88,6 +88,15 @@ setlistener("/sim/sounde/knb1", func {
}, 0.05);
});
+setlistener("/sim/sounde/switch1", func {
+ if (!getprop("/sim/sounde/switch1")) {
+ return;
+ }
+ settimer(func {
+ props.globals.getNode("/sim/sounde/switch1").setBoolValue(0);
+ }, 0.05);
+});
+
setlistener("/controls/switches/seatbelt-sign", func {
props.globals.getNode("/sim/sounde/seatbelt-sign").setBoolValue(1);
settimer(func {
@@ -154,7 +163,7 @@ setlistener("/sim/signals/fdm-initialized", func {
systems.hyd_init();
systems.press_init();
fmgc.APinit();
- externalconnections.start();
+ librariesLoop.start();
fmgc.FMGCinit();
mcdu1.MCDU_init();
mcdu2.MCDU_init();
@@ -165,6 +174,26 @@ setlistener("/sim/signals/fdm-initialized", func {
libraries.variousReset();
});
+var librariesLoop = maketimer(0.1, func {
+ var groundpwr = getprop("/controls/switches/cart");
+ var groundair = getprop("/controls/pneumatic/switches/groundair");
+ var gs = getprop("/velocities/groundspeed-kt");
+ var parkbrake = getprop("controls/gear/brake-parking");
+
+ if ((groundair or groundpwr) and ((gs > 2) or !parkbrake)) {
+ setprop("/controls/switches/cart", 0);
+ setprop("/controls/pneumatic/switches/groundair", 0);
+ }
+
+ var V = getprop("/velocities/groundspeed-kt");
+
+ if (V > 15) {
+ setprop("/systems/shake/effect", 1);
+ } else {
+ setprop("/systems/shake/effect", 0);
+ }
+});
+
var variousReset = func {
setprop("/modes/cpt-du-xfr", 0);
setprop("/modes/fo-du-xfr", 0);
@@ -182,17 +211,6 @@ var aglgears = func {
aglgears();
-var externalconnections = maketimer(0.1, func {
- var groundpwr = getprop("/controls/switches/cart");
- var groundair = getprop("/controls/pneumatic/switches/groundair");
- var gs = getprop("/velocities/groundspeed-kt");
- var parkbrake = getprop("controls/gear/brake-parking");
- if ((groundair or groundpwr) and ((gs > 2) or !parkbrake)) {
- setprop("/controls/switches/cart", 0);
- setprop("/controls/pneumatic/switches/groundair", 0);
- }
-});
-
var mcpSPDKnbPull = func {
setprop("/it-autoflight/input/spd-managed", 0);
fmgc.ManagedSPD.stop();
diff --git a/Nasal/shake.nas b/Nasal/shake.nas
new file mode 100644
index 00000000..1e008513
--- /dev/null
+++ b/Nasal/shake.nas
@@ -0,0 +1,37 @@
+# A3XX Shaking
+
+var shakeEffectA3XX = props.globals.initNode("/systems/shake/effect",0,"BOOL");
+var shakeA3XX = props.globals.initNode("/systems/shake/shaking",0,"DOUBLE");
+var rSpeed = 0;
+var sf = 0;
+var n_g_c = 0;
+var n_g_l = 0;
+var n_g_r = 0;
+
+var theShakeEffect = func{
+ n_g_c = getprop("/gear/gear[0]/compression-norm") or 0;
+ n_g_l = getprop("/gear/gear[1]/compression-norm") or 0;
+ n_g_r = getprop("/gear/gear[2]/compression-norm") or 0;
+ rSpeed = getprop("/gear/gear[0]/rollspeed-ms") or 0;
+ sf = rSpeed / 94000;
+
+ if (shakeEffectA3XX.getBoolValue() and (n_g_c > 0 or n_g_l > 0 or n_g_r > 0)) {
+ interpolate("/systems/shake/shaking", sf, 0.03);
+ settimer(func {
+ interpolate("/systems/shake/shaking", -sf * 2, 0.03);
+ }, 0.06);
+ settimer(func {
+ interpolate("/systems/shake/shaking", sf, 0.03);
+ }, 0.12);
+ settimer(theShakeEffect, 0.09);
+ } else {
+ setprop("/systems/shake/shaking", 0);
+ setprop("/systems/shake/effect",0);
+ }
+}
+
+setlistener("/systems/shake/effect", func(state){
+ if(state.getBoolValue()){
+ theShakeEffect();
+ }
+}, 1, 0);
diff --git a/Sounds/A320-common-sound.xml b/Sounds/A320-common-sound.xml
index fd132c28..27de7ed1 100644
--- a/Sounds/A320-common-sound.xml
+++ b/Sounds/A320-common-sound.xml
@@ -394,7 +394,7 @@
once
detendaa
- detenta.wav
+ Cockpit/detenta.wav
/systems/thrust/state1
@@ -409,7 +409,7 @@
once
detendba
- detentb.wav
+ Cockpit/detentb.wav
/systems/thrust/state2
@@ -424,7 +424,7 @@
once
detendab
- detenta.wav
+ Cockpit/detenta.wav
/systems/thrust/state1
@@ -439,7 +439,7 @@
once
detendbb
- detentb.wav
+ Cockpit/detentb.wav
/systems/thrust/state2
@@ -454,7 +454,7 @@
once
detendac
- detenta.wav
+ Cockpit/detenta.wav
/systems/thrust/state1
@@ -469,7 +469,7 @@
once
detendbc
- detentb.wav
+ Cockpit/detentb.wav
/systems/thrust/state2
@@ -484,7 +484,7 @@
once
detendad
- detenta.wav
+ Cockpit/detenta.wav
/systems/thrust/state1
@@ -499,7 +499,7 @@
once
detendbd
- detentb.wav
+ Cockpit/detentb.wav
/systems/thrust/state2
@@ -514,7 +514,7 @@
once
detendae
- detenta.wav
+ Cockpit/detenta.wav
/systems/thrust/state1
@@ -529,7 +529,7 @@
once
detendbe
- detentb.wav
+ Cockpit/detentb.wav
/systems/thrust/state2
@@ -544,7 +544,7 @@
once
detendaf
- detenta.wav
+ Cockpit/detenta.wav
/systems/thrust/state1
@@ -559,7 +559,7 @@
once
detendbf
- detentb.wav
+ Cockpit/detentb.wav
/systems/thrust/state2
@@ -574,7 +574,7 @@
once
detendag
- detenta.wav
+ Cockpit/detenta.wav
/controls/engines/engine[0]/reverser
@@ -589,7 +589,7 @@
once
detendbg
- detentb.wav
+ Cockpit/detentb.wav
/controls/engines/engine[1]/reverser
@@ -604,7 +604,7 @@
once
detendah
- detenta.wav
+ Cockpit/detenta.wav
/controls/engines/engine[0]/reverser
@@ -619,7 +619,7 @@
once
detendbh
- detentb.wav
+ Cockpit/detentb.wav
/controls/engines/engine[1]/reverser
@@ -667,9 +667,9 @@
- Overhead Button
+ Button
once
- Aircraft/A320Family/Sounds/oh-button.wav
+ Aircraft/A320Family/Sounds/Cockpit/button.wav
/sim/sounde/btn1
@@ -679,9 +679,9 @@
- Overhead Knob
+ Knob
once
- Aircraft/A320Family/Sounds/oh-knob.wav
+ Aircraft/A320Family/Sounds/Cockpit/knob.wav
/sim/sounde/knb1
@@ -690,5 +690,17 @@
+
+ Switch
+ once
+ Aircraft/A320Family/Sounds/Cockpit/switch.wav
+
+ /sim/sounde/switch1
+
+
+ 0.60
+
+
+
\ No newline at end of file
diff --git a/Sounds/oh-button.wav b/Sounds/Cockpit/button.wav
similarity index 100%
rename from Sounds/oh-button.wav
rename to Sounds/Cockpit/button.wav
diff --git a/Sounds/detenta.wav b/Sounds/Cockpit/detenta.wav
similarity index 100%
rename from Sounds/detenta.wav
rename to Sounds/Cockpit/detenta.wav
diff --git a/Sounds/detentb.wav b/Sounds/Cockpit/detentb.wav
similarity index 100%
rename from Sounds/detentb.wav
rename to Sounds/Cockpit/detentb.wav
diff --git a/Sounds/detentc.wav b/Sounds/Cockpit/detentc.wav
similarity index 100%
rename from Sounds/detentc.wav
rename to Sounds/Cockpit/detentc.wav
diff --git a/Sounds/detentd.wav b/Sounds/Cockpit/detentd.wav
similarity index 100%
rename from Sounds/detentd.wav
rename to Sounds/Cockpit/detentd.wav
diff --git a/Sounds/oh-knob.wav b/Sounds/Cockpit/knob.wav
similarity index 100%
rename from Sounds/oh-knob.wav
rename to Sounds/Cockpit/knob.wav
diff --git a/Sounds/Cockpit/switch.wav b/Sounds/Cockpit/switch.wav
new file mode 100644
index 00000000..605e5006
Binary files /dev/null and b/Sounds/Cockpit/switch.wav differ
diff --git a/Systems/fadec-cfm.xml b/Systems/fadec-cfm.xml
index 1029768e..5057b01d 100644
--- a/Systems/fadec-cfm.xml
+++ b/Systems/fadec-cfm.xml
@@ -55,7 +55,7 @@
/controls/engines/engine[0]/throttle-man
- 0.00 23.4
+ 0.00 22.4
0.95101.7
@@ -72,7 +72,7 @@
/controls/engines/engine[1]/throttle-man
- 0.00 23.4
+ 0.00 22.4
0.95101.7
@@ -415,7 +415,7 @@
/engines/flx-thr
- 0.00 23.4
+ 0.00 22.4
1.00105.8
@@ -448,7 +448,7 @@
/engines/engine[0]/n1
00
60
- 23.4434
+ 22.4434
110690
@@ -481,7 +481,7 @@
/engines/engine[1]/n1
00
60
- 23.4434
+ 22.4434
110690
diff --git a/Systems/fadec-iae.xml b/Systems/fadec-iae.xml
index 26cbdcc0..1a72e389 100644
--- a/Systems/fadec-iae.xml
+++ b/Systems/fadec-iae.xml
@@ -91,7 +91,7 @@
/engines/engine[0]/n1
18.00.00
- 23.40.03
+ 22.40.03
35.00.20
105.81.00
@@ -162,7 +162,7 @@
/engines/engine[1]/n1
18.00.00
- 23.40.03
+ 22.40.03
35.00.20
105.81.00
@@ -714,7 +714,7 @@
/engines/engine[0]/n1
00
60
- 23.4434
+ 22.4434
110620
@@ -747,7 +747,7 @@
/engines/engine[1]/n1
00
60
- 23.4434
+ 22.4434
110620
diff --git a/Systems/fmgc-c.xml b/Systems/fmgc-c.xml
index b590a98a..236fa249 100644
--- a/Systems/fmgc-c.xml
+++ b/Systems/fmgc-c.xml
@@ -2,13 +2,13 @@
-
- FMGC MNG SPD
- gain
- 1
- 0.05
-
-
+
+ FMGC MNG SPD
+ gain
+ 1
+ 0.05
+
+
/instrumentation/altimeter/indicated-altitude-ft
@@ -21,18 +21,18 @@
1201.1
-
-
+
+
-
+
-
- FMGC MNG MACH
- gain
- 1
- 0.05
-
-
+
+ FMGC MNG MACH
+ gain
+ 1
+ 0.05
+
+
/instrumentation/altimeter/indicated-altitude-ft
@@ -45,17 +45,17 @@
1201.03
-
-
+
+
-
+
-
- FMGC Target IAS PFD
- gain
- 1
- 0.1
-
+
+ FMGC Target IAS PFD
+ gain
+ 1
+ 0.1
+
/it-autoflight/input/kts-mach
@@ -63,15 +63,15 @@
/it-autoflight/input/spd-kts
-
-
+
+
/it-autoflight/input/kts-mach
1
-
+
/instrumentation/airspeed-indicator/indicated-speed-kt
@@ -79,9 +79,9 @@
/it-autoflight/input/spd-mach
-
+
-
-
+
+
diff --git a/Systems/it-fbw-b.xml b/Systems/it-fbw-b.xml
index 70a8c9d5..0878ee34 100644
--- a/Systems/it-fbw-b.xml
+++ b/Systems/it-fbw-b.xml
@@ -261,7 +261,7 @@
0
- /it-fbw/alpha-hld
+ /it-fbw/spd-hold
0
@@ -298,6 +298,178 @@
+
+ IT-FBW: SPD PITCH TARGET CMD
+ noise-spike
+
+
+
+
+ /it-autoflight/output/ap1
+ 0
+
+
+ /it-autoflight/output/ap2
+ 0
+
+
+ /gear/gear[1]/wow
+ 0
+
+
+ /gear/gear[2]/wow
+ 0
+
+
+ /it-fbw/spd-hold
+ 1
+
+
+
+ /it-fbw/law
+ 0
+
+
+ /it-fbw/law
+ 1
+
+
+
+
+
+
+
+
+ /controls/flight/elevator-input
+ 0129
+ -1106
+
+
+
+
+ 10
+
+
+
+ IT-FBW: SPD PITCH TARGET
+ false
+
+
+
+
+ /it-autoflight/output/ap1
+ 0
+
+
+ /it-autoflight/output/ap2
+ 0
+
+
+ /gear/gear[1]/wow
+ 0
+
+
+ /gear/gear[2]/wow
+ 0
+
+
+ /it-fbw/spd-hold
+ 1
+
+
+
+ /it-fbw/law
+ 0
+
+
+ /it-fbw/law
+ 1
+
+
+
+
+
+
+ /it-autoflight/internal/lookahead-10-sec-airspeed-kt
+
+
+ /it-fbw/spd-pitch-target
+
+
+
+ -0.50
+ 1.0
+ 0.1
+ 0.0
+ 5.0
+ 0.0001 |
+ -10
+ 20
+
+
+
+
+ IT-FBW: SPD PITCH
+ false
+
+
+
+
+ /it-autoflight/output/ap1
+ 0
+
+
+ /it-autoflight/output/ap2
+ 0
+
+
+ /gear/gear[1]/wow
+ 0
+
+
+ /gear/gear[2]/wow
+ 0
+
+
+ /it-fbw/spd-hold
+ 1
+
+
+
+ /it-fbw/law
+ 0
+
+
+ /it-fbw/law
+ 1
+
+
+
+
+
+
+ /orientation/pitch-deg
+
+
+ /it-fbw/spd-pitch-deg
+
+
+
+ -0.08
+ 1
+ 0.1
+ 0
+ 5
+ 0.001 |
+ -1
+ 1
+
+
+
IT-FBW: PITCH OPTION
false
diff --git a/Systems/it-fbw.xml b/Systems/it-fbw.xml
index 162aeb83..01080a78 100644
--- a/Systems/it-fbw.xml
+++ b/Systems/it-fbw.xml
@@ -8,8 +8,7 @@
/it-fbw/roll-lim-min
/it-fbw/pitch-lim-max
/it-fbw/pitch-lim-min
- /it-fbw/alpha-max
- /it-fbw/alpha-min
+ /it-fbw/spd-hold
@@ -81,6 +80,10 @@
/gear/gear[0]/wow
0
+
+ /it-fbw/spd-hold
+ 0
+
/it-fbw/law
diff --git a/Systems/engine-timing.xml b/Systems/libraries.xml
similarity index 93%
rename from Systems/engine-timing.xml
rename to Systems/libraries.xml
index 96d39bdf..da8c1509 100644
--- a/Systems/engine-timing.xml
+++ b/Systems/libraries.xml
@@ -11,14 +11,14 @@
/FMGC/internal/flex-cmd
- 00.0
+ 00.00
700.12
-
+
FF 1
gain
@@ -27,7 +27,7 @@
- /engines/engine[0]/fuel-flow_pph
+ /engines/engine[0]/fuel-flow_pph
0 0
2000 2387
900013847
@@ -36,7 +36,7 @@
-
+
FF 2
gain
@@ -54,7 +54,7 @@
-
+
Altitude PFD
gain
@@ -72,7 +72,7 @@
-
+
V/S PFD
noise-spike
@@ -90,7 +90,7 @@
50
-
+
V/S 2 PFD
noise-spike
@@ -100,20 +100,19 @@
5000
-
-
+
+
Throttle L
gain
1
- 0.05
-
-
-
- /controls/engines/engine[0]/reverser
- 0
-
-
+
+
+
+ /controls/engines/engine[0]/reverser
+ 0
+
+
/controls/engines/engine[0]/throttle
@@ -127,12 +126,11 @@
-
+
Throttle R
gain
1
- 0.05
@@ -148,17 +146,16 @@
/controls/engines/engine[1]/reverser
1
-
+
0
-
+
-
+
Throttle L
gain
1
- 0.05
@@ -166,7 +163,7 @@
0
- /controls/engines/engine[0]/throttle
+ /controls/engines/engine[0]/throttle
@@ -179,12 +176,11 @@
-
+
Throttle R
gain
1
- 0.05
@@ -205,7 +201,7 @@
-
+
Target Pressurize Altitude
gain
@@ -361,5 +357,4 @@
-