From 71ec680bc5ee44c0c3d9e739c95817879639f478 Mon Sep 17 00:00:00 2001 From: Joshua Davidson <joshuadavidson2000@gmail.com> Date: Wed, 11 Jan 2017 17:39:47 -0500 Subject: [PATCH] some fixes, and new ITAF --- A319-100-IAE-set.xml | 6 +- A320-200-IAE-set.xml | 5 +- A320-main.xml | 45 +- A321-200-IAE-set.xml | 6 +- Engines/v2522_a5.xml | 4 +- Engines/v2527_a5.xml | 6 +- Engines/v2533_a5.xml | 4 +- Models/FlightDeck/a320.flightdeck.xml | 8 + Models/Instruments/PFD/res/pfd-3d.ac | 2 +- Models/Instruments/PFD/res/pfd-3d.ac.bak | 558 -------------------- Models/LandingGears/a320.mlg.left.xml | 4 +- Models/LandingGears/a320.mlg.right.xml | 4 +- Models/LandingGears/a320.nlg.xml | 4 +- Nasal/PFD_FMA.nas | 10 +- Nasal/it-autoflight.nas | 243 +++++++-- Nasal/systems.nas | 7 +- Nasal/tyresmoke.nas | 52 -- Nasal/v-speeds.nas | 38 -- README.md | 2 +- Sounds/FL2070/iae13a.wav | Bin 608326 -> 608326 bytes Sounds/FL2070/iae14b.wav | Bin 800578 -> 800578 bytes Systems/autopilot-dlg.xml | 33 +- Systems/engine-timing.xml | 4 +- Systems/it-autoflight.xml | 623 ++++++++++++++--------- Systems/it-autothrust.xml | 4 +- 25 files changed, 663 insertions(+), 1009 deletions(-) delete mode 100644 Models/Instruments/PFD/res/pfd-3d.ac.bak delete mode 100644 Nasal/tyresmoke.nas delete mode 100644 Nasal/v-speeds.nas diff --git a/A319-100-IAE-set.xml b/A319-100-IAE-set.xml index 8bef86b2..f51b8b78 100644 --- a/A319-100-IAE-set.xml +++ b/A319-100-IAE-set.xml @@ -70,8 +70,6 @@ <A320> <file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file> - <file>Aircraft/A320Family/Nasal/v-speeds.nas</file> - <file>Aircraft/A320Family/Nasal/tyresmoke.nas</file> <file>Aircraft/A320Family/Nasal/systems.nas</file> <file>Aircraft/A320Family/Nasal/a319livery.nas</file> <file>Aircraft/A320Family/Models/Instruments/ND/ND.nas</file> @@ -79,13 +77,11 @@ <file>Aircraft/A320Family/Nasal/efis.nas</file> <file>Aircraft/A320Family/Nasal/PFD_FMA.nas</file> <file>Aircraft/A320Family/Nasal/fctl.nas</file> + <file>Aircraft/A320Family/Nasal/LGCIU.nas</file> </A320> <itaf> <file>Aircraft/A320Family/Nasal/it-autoflight.nas</file> </itaf> - <lgciu> - <file>Aircraft/A320Family/Nasal/LGCIU.nas</file> - </lgciu> <thrust> <file>Aircraft/A320Family/Nasal/thrust.nas</file> </thrust> diff --git a/A320-200-IAE-set.xml b/A320-200-IAE-set.xml index 44347315..86aec940 100644 --- a/A320-200-IAE-set.xml +++ b/A320-200-IAE-set.xml @@ -70,8 +70,6 @@ <A320> <file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file> - <file>Aircraft/A320Family/Nasal/v-speeds.nas</file> - <file>Aircraft/A320Family/Nasal/tyresmoke.nas</file> <file>Aircraft/A320Family/Nasal/systems.nas</file> <file>Aircraft/A320Family/Nasal/a320livery.nas</file> <file>Aircraft/A320Family/Models/Instruments/ND/ND.nas</file> @@ -79,12 +77,11 @@ <file>Aircraft/A320Family/Nasal/efis.nas</file> <file>Aircraft/A320Family/Nasal/PFD_FMA.nas</file> <file>Aircraft/A320Family/Nasal/fctl.nas</file> - <file>Aircraft/A320Family/Nasal/LGCIU.nas</file> <!-- it0uchpods please leave this here! --> + <file>Aircraft/A320Family/Nasal/LGCIU.nas</file> </A320> <itaf> <file>Aircraft/A320Family/Nasal/it-autoflight.nas</file> </itaf> - <thrust> <file>Aircraft/A320Family/Nasal/thrust.nas</file> </thrust> diff --git a/A320-main.xml b/A320-main.xml index 3be973f5..aab0623c 100644 --- a/A320-main.xml +++ b/A320-main.xml @@ -223,44 +223,49 @@ <max-lb type="double">3300.320</max-lb> </weight> </payload> - - + <it-autoflight> <config> <altitude-dial-mode>0</altitude-dial-mode> <roll> <umin>-0.40</umin> <umax>0.40</umax> - <kp>0.09</kp> - <ti>10.0</ti> - <td>0.00001</td> - </roll> - <vorloc> <kp>0.06</kp> + <kp-vloc>0.09</kp-vloc> <ti>10.0</ti> <td>0.00001</td> - </vorloc> + <kp-cws>0.09</kp-cws> + </roll> <pitch> - <umin>-0.25</umin> - <umax>0.25</umax> + <umin>-0.30</umin> + <umax>0.30</umax> <kp>-0.05</kp> <ti>10.0</ti> <td>0.0001</td> + <kp-cws>-0.07</kp-cws> </pitch> - <flch> - <umin>-0.25</umin> - <umax>0.25</umax> - <kp>-0.03</kp> - <ti>10.0</ti> - <td>0.00001</td> - </flch> - <gs> - <kp>0.10</kp> - </gs> + <cmd> + <roll-scale>5</roll-scale> + <vorloc>-4.0</vorloc> + <alt>0.025</alt> + <vs>0.07</vs> + <flch>-0.30</flch> + <gs>0.10</gs> + </cmd> <autoland> + <kp-roll>0.10</kp-roll> <kp-pitch>0.01</kp-pitch> + <kp-rudder>-0.3</kp-rudder> </autoland> </config> + <settings> + <flare-altitude>40</flare-altitude> + <land-enable>1</land-enable> + <land-flap>0.645</land-flap> + <retard-ft>40</retard-ft> + <retard-enable>0</retard-enable> + <toga-pitch>15</toga-pitch> + </settings> </it-autoflight> <autopilot> diff --git a/A321-200-IAE-set.xml b/A321-200-IAE-set.xml index 641c2005..d1c00839 100644 --- a/A321-200-IAE-set.xml +++ b/A321-200-IAE-set.xml @@ -70,8 +70,6 @@ <A320> <file>Aircraft/A320Family/Nasal/engines.nas</file> <file>Aircraft/A320Family/Nasal/electrical.nas</file> - <file>Aircraft/A320Family/Nasal/v-speeds.nas</file> - <file>Aircraft/A320Family/Nasal/tyresmoke.nas</file> <file>Aircraft/A320Family/Nasal/systems.nas</file> <file>Aircraft/A320Family/Nasal/a321livery.nas</file> <file>Aircraft/A320Family/Models/Instruments/ND/ND.nas</file> @@ -79,13 +77,11 @@ <file>Aircraft/A320Family/Nasal/efis.nas</file> <file>Aircraft/A320Family/Nasal/PFD_FMA.nas</file> <file>Aircraft/A320Family/Nasal/fctl.nas</file> + <file>Aircraft/A320Family/Nasal/LGCIU.nas</file> </A320> <itaf> <file>Aircraft/A320Family/Nasal/it-autoflight.nas</file> </itaf> - <lgciu> - <file>Aircraft/A320Family/Nasal/LGCIU.nas</file> - </lgciu> <thrust> <file>Aircraft/A320Family/Nasal/thrust.nas</file> </thrust> diff --git a/Engines/v2522_a5.xml b/Engines/v2522_a5.xml index 6fa1db4e..100fde84 100644 --- a/Engines/v2522_a5.xml +++ b/Engines/v2522_a5.xml @@ -17,9 +17,9 @@ <tsfc> 0.8 </tsfc> <bleed> 0.03</bleed> <idlen1> 23.4 </idlen1> - <idlen2> 63.7 </idlen2> + <idlen2> 62.7 </idlen2> <maxn1> 105.8 </maxn1> - <maxn2> 112.5 </maxn2> + <maxn2> 102.1 </maxn2> <augmented> 0 </augmented> <injected> 0 </injected> diff --git a/Engines/v2527_a5.xml b/Engines/v2527_a5.xml index 8d5c1a7e..2fb6405a 100644 --- a/Engines/v2527_a5.xml +++ b/Engines/v2527_a5.xml @@ -13,13 +13,13 @@ <turbine_engine name="V2527_A5"> <milthrust> 26600 </milthrust> - <bypassratio> 0.1 </bypassratio> + <bypassratio> 2.0 </bypassratio> <tsfc> 0.8 </tsfc> <bleed> 0.03</bleed> <idlen1> 23.4 </idlen1> - <idlen2> 63.7 </idlen2> + <idlen2> 62.7 </idlen2> <maxn1> 105.8 </maxn1> - <maxn2> 112.5 </maxn2> + <maxn2> 102.1 </maxn2> <augmented> 0 </augmented> <injected> 0 </injected> diff --git a/Engines/v2533_a5.xml b/Engines/v2533_a5.xml index 5b75d6dd..6c5b3ac8 100644 --- a/Engines/v2533_a5.xml +++ b/Engines/v2533_a5.xml @@ -17,9 +17,9 @@ <tsfc> 0.8 </tsfc> <bleed> 0.03</bleed> <idlen1> 23.4 </idlen1> - <idlen2> 63.7 </idlen2> + <idlen2> 62.7 </idlen2> <maxn1> 105.8 </maxn1> - <maxn2> 112.5 </maxn2> + <maxn2> 102.1</maxn2> <augmented> 0 </augmented> <injected> 0 </injected> diff --git a/Models/FlightDeck/a320.flightdeck.xml b/Models/FlightDeck/a320.flightdeck.xml index fde25907..afe7300b 100644 --- a/Models/FlightDeck/a320.flightdeck.xml +++ b/Models/FlightDeck/a320.flightdeck.xml @@ -265,6 +265,14 @@ <property>/it-autoflight/output/lat</property> <value>2</value> </equals> + <equals> + <property>/it-autoflight/output/lat</property> + <value>4</value> + </equals> + <equals> + <property>/it-autoflight/output/lat</property> + <value>5</value> + </equals> </or> </condition> </animation> diff --git a/Models/Instruments/PFD/res/pfd-3d.ac b/Models/Instruments/PFD/res/pfd-3d.ac index 5eb548ac..715455da 100644 --- a/Models/Instruments/PFD/res/pfd-3d.ac +++ b/Models/Instruments/PFD/res/pfd-3d.ac @@ -444,7 +444,7 @@ refs 4 kids 0 OBJECT poly name "alt-tape-2" -loc 0.00091828 0.000295199 -0.0595814 +loc 0.00133137 0.000295199 -0.0595814 texture "alt-tape-2.png" crease 45.000000 numvert 4 diff --git a/Models/Instruments/PFD/res/pfd-3d.ac.bak b/Models/Instruments/PFD/res/pfd-3d.ac.bak deleted file mode 100644 index 31b13aeb..00000000 --- a/Models/Instruments/PFD/res/pfd-3d.ac.bak +++ /dev/null @@ -1,558 +0,0 @@ -AC3Db -MATERIAL "ac3dmat1" rgb 1 1 1 amb 0 0 0 emis 0.658824 0.670588 0.67451 spec 0 0 0 shi 128 trans 0 -OBJECT world -kids 28 -OBJECT poly -name "horizon" -loc -0.00063943 0.000620101 0.00496066 -texture "horizon.png" -crease 45.000000 -numvert 4 -0 0.0443777 -0.0369368 -0 0.0443777 0.0369368 -0 -0.0443777 0.0369368 -0 -0.0443777 -0.0369368 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0.5875 0.5875 -1 0.4125 0.5875 -2 0.4125 0.4125 -3 0.5875 0.4125 -kids 0 -OBJECT poly -name "hdg-tape" -loc -0.00063943 -0.0623471 0.00488526 -texture "hdg-tape.png" -crease 45.000000 -numvert 4 -0 -0.00631734 -0.0361253 -0 -0.00631734 0.0361253 -0 0.00631731 0.0361253 -0 0.00631731 -0.0361253 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.0605338 0.994588 -2 -0.0513565 0.994588 -1 -0.0513565 -0.0462684 -0 0.0605338 -0.0462684 -kids 0 -OBJECT poly -name "trk-ind" -loc 0.00063943 -0.0623471 0.00488526 -texture "trk-ind.png" -crease 45.000000 -numvert 4 -0 -0.00631734 -0.0361253 -0 -0.00631734 0.0361253 -0 0.00631731 0.0361253 -0 0.00631731 -0.0361253 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.0605338 0.994588 -2 -0.0513565 0.994588 -1 -0.0513565 -0.0462684 -0 0.0605338 -0.0462684 -kids 0 -OBJECT poly -name "loc-crs" -loc 0.00063943 -0.0623471 0.00488526 -texture "loc-crs.png" -crease 45.000000 -numvert 4 -0 -0.00631734 -0.0361253 -0 -0.00631734 0.0361253 -0 0.00631731 0.0361253 -0 0.00631731 -0.0361253 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.0605338 0.994588 -2 -0.0513565 0.994588 -1 -0.0513565 -0.0462684 -0 0.0605338 -0.0462684 -kids 0 -OBJECT poly -name "hdg-bug" -loc 0.00063943 -0.0563471 0.00488526 -texture "hdg-bug.png" -crease 45.000000 -numvert 4 -0 -0.00601734 -0.0361253 -0 -0.00601734 0.0361253 -0 0.00601731 0.0361253 -0 0.00601731 -0.0361253 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.0605338 0.994588 -2 -0.0513565 0.994588 -1 -0.0513565 -0.0462684 -0 0.0605338 -0.0462684 -kids 0 -OBJECT poly -name "alt-tape-1" -loc -0.00063943 -0.000264099 -0.0474465 -texture "alt-tape.png" -crease 45.000000 -numvert 4 -0 0.0428304 -0.00806341 -0 0.0428304 0.00806338 -0 -0.0428304 0.00806338 -0 -0.0428304 -0.00806341 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0.990386 0.217208 -1 0.022378 0.217208 -2 0.0223766 0.0507198 -3 0.990386 0.0507198 -kids 0 -OBJECT poly -name "spd-tape" -loc -0.00063943 -0.000264099 0.0592757 -texture "spd-tape.png" -crease 45.000000 -numvert 4 -0 -0.0428304 -0.00990531 -0 -0.0428304 0.00990527 -0 0.0428304 0.00990527 -0 0.0428304 -0.00990531 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.498074 0.321737 -2 0.00829178 0.321737 -1 0.00829178 0.0447528 -0 0.498074 0.0447528 -kids 0 -OBJECT poly -name "vsi" -loc 0.00091828 -0.000133 -0.068225 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 -0.040099 -0.00324333 -0 -0.040099 0.00324335 -0 0.040099 0.00324335 -0 0.040099 -0.00324333 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.660342 0.662271 -2 0.638535 0.662271 -1 0.638535 0.258462 -0 0.660342 0.258462 -kids 0 -OBJECT poly -name "spdtrnd-up" -loc 0.00133822 0.021479 0.0513726 -texture "spdtrend.png" -crease 45.000000 -numvert 4 -0 0.0210118 -0.00234548 -0 0.0210118 0.00234544 -0 -0.0210118 0.00234544 -0 -0.0210118 -0.00234548 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0 0.496308 -1 1.03601 0.496308 -2 1.03601 -0.00461811 -3 0 -0.00461811 -kids 0 -OBJECT poly -name "fd_pitch" -loc 0.00132974 0.000487308 0.00486699 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 0.000477445 -0.01934 -0 0.000477445 0.01934 -0 -0.000477445 0.01934 -0 -0.000477445 -0.01934 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0.510324 0.464321 -1 0.762653 0.464321 -2 0.762653 0.461267 -3 0.510324 0.461267 -kids 0 -OBJECT poly -name "centerbar" -loc 0.001346 -0.0015161 0.00461461 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 -0.00534438 -0.0329828 -0 -0.00534438 0.0335832 -0 0.00534438 0.0335832 -0 0.00534438 -0.0329828 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.403727 0.933591 -2 0.909275 0.933591 -1 0.909275 0.783893 -0 0.403727 0.783893 -kids 0 -OBJECT poly -name "sidestick-pos" -loc 0.00133541 0.000550993 0.00362843 -texture "autoland.png" -crease 45.000000 -numvert 4 -0 0.0056307 -0.00368095 -0 -0.0056307 -0.00368095 -0 -0.0056307 0.00676597 -0 0.0056307 0.00676597 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.791565 0.449709 -2 0.68209 0.449709 -1 0.68209 0.0104858 -0 0.791565 0.0104858 -kids 0 -OBJECT poly -name "sidestick-max" -loc 0.00091828 -0.0216617 0.0287131 -texture "autoland.png" -crease 45.000000 -numvert 8 -0 0.00402807 0.00438482 -0 -0.00402807 0.00438482 -0 -0.00402807 -0.00238551 -0 0.00402807 -0.00238551 -0 0.00402807 -0.0523576 -0 -0.00402807 -0.0523576 -0 -0.00402807 -0.0455873 -0 0.00402807 -0.0455873 -numsurf 2 -SURF 0x30 -mat 0 -refs 4 -0 0.629302 0.44775 -1 0.520441 0.44775 -2 0.520441 0.0183234 -3 0.629302 0.0183234 -SURF 0x30 -mat 0 -refs 4 -7 0.629302 0.0183234 -6 0.520441 0.0183234 -5 0.520441 0.44775 -4 0.629302 0.44775 -kids 0 -OBJECT poly -name "sidestick-max" -loc 0.00091828 0.0234689 0.0287131 -texture "autoland.png" -crease 45.000000 -numvert 8 -0 -0.00378506 -0.00238554 -0 -0.00378506 0.0043848 -0 0.00378506 0.0043848 -0 0.00378506 -0.00238554 -0 -0.00378506 -0.0455873 -0 -0.00378506 -0.0523576 -0 0.00378506 -0.0523576 -0 0.00378506 -0.0455873 -numsurf 2 -SURF 0x30 -mat 0 -refs 4 -3 0.629302 0.44775 -2 0.520441 0.44775 -1 0.520441 0.0183234 -0 0.629302 0.0183234 -SURF 0x30 -mat 0 -refs 4 -4 0.629302 0.0183234 -5 0.520441 0.0183234 -6 0.520441 0.44775 -7 0.629302 0.44775 -kids 0 -OBJECT poly -name "gsscale" -loc 0.00091828 0.0004113 -0.0352752 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 -0.0361804 -0.00381497 -0 0.0361804 -0.00381499 -0 0.0361804 0.00381497 -0 -0.0361804 0.00381498 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0.99826 0.988171 -1 0.99826 0.0824336 -2 0.947974 0.0824336 -3 0.947974 0.988171 -kids 0 -OBJECT poly -name "locscale" -loc 0.00091828 -0.0478575 0.00489046 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 -0.00428779 -0.0357276 -0 -0.00428779 0.0357276 -0 0.00428777 0.0357276 -0 0.00428777 -0.0357276 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.501561 0.112546 -2 0.964105 0.112546 -1 0.964105 0.00122176 -0 0.501561 0.00122176 -kids 0 -OBJECT poly -name "gspointer" -loc 0.00226889 9.10088e-006 -0.0356073 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 0.00547617 0.0031265 -0 -0.00547617 0.0031265 -0 -0.00547617 -0.00312652 -0 0.00547617 -0.00312652 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0.239237 0.294683 -1 0.442683 0.294683 -2 0.442683 0.0549766 -3 0.239237 0.0549766 -kids 0 -OBJECT poly -name "locpointer" -loc 0.00226889 -0.0482638 0.00541306 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 -0.0031265 -0.00547615 -0 -0.0031265 0.00547617 -0 0.00312651 0.00547617 -0 0.00312651 -0.00547615 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.239237 0.294683 -2 0.442683 0.294683 -1 0.442683 0.0549766 -0 0.239237 0.0549766 -kids 0 -OBJECT poly -name "vls-tape" -loc 0.00091828 -0.000281699 0.0476063 -texture "vls-tape.png" -crease 45.000000 -numvert 4 --1e-005 0.0424935 -0.00136903 --1e-005 0.0424935 0.00136901 --1e-005 -0.0424935 0.00136901 --1e-005 -0.0424935 -0.00136903 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 1 0.321832 -1 0 0.321832 -2 0 0.0448185 -3 1 0.0448185 -kids 0 -OBJECT poly -name "stall-tape" -loc 0.00091828 -0.000281699 0.0476063 -texture "spd-tape.png" -crease 45.000000 -numvert 4 -0 0.0424935 -0.00136903 -0 0.0424935 0.00136901 -0 -0.0424935 0.00136901 -0 -0.0424935 -0.00136903 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0.598403 0.321832 -1 0.501577 0.321832 -2 0.501577 0.0448185 -3 0.598403 0.0448185 -kids 0 -OBJECT poly -name "vfe-tape" -loc 0.00091828 -0.000281699 0.0476063 -texture "spd-tape.png" -crease 45.000000 -numvert 4 -0 -0.0424935 -0.00136903 -0 -0.0424935 0.00136901 -0 0.0424935 0.00136901 -0 0.0424935 -0.00136903 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.66857 0.321965 -2 0.605455 0.321965 -1 0.605455 0.0450599 -0 0.66857 0.0450599 -kids 0 -OBJECT poly -name "bank" -loc 0.00147448 0.0381779 0.00511426 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 -0.00444023 -0.00535177 -0 -0.00444022 0.00535178 -0 0.00444023 0.00535178 -0 0.00444023 -0.00535177 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.348876 0.567016 -2 0.505593 0.567016 -1 0.505593 0.295057 -0 0.348876 0.295057 -kids 0 -OBJECT poly -name "alt-tape-2" -loc 0.00091828 0.000295199 -0.0595814 -texture "alt-tape-2.png" -crease 45.000000 -numvert 4 -0 -0.00598263 -0.00278856 -0 -0.00598263 0.00278853 -0 0.00598263 0.00278853 -0 0.00598263 -0.00278856 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.962665 0.356135 -2 0.0568116 0.356135 -1 0.0568116 -0.130193 -0 0.962665 -0.130193 -kids 0 -OBJECT poly -name "radar-alt" -loc 0.000360576 -0.000264099 -0.0474465 -texture "radar-alt.png" -crease 45.000000 -numvert 4 -0 0.0428304 -0.00806341 -0 0.0428304 0.00806338 -0 -0.0428304 0.00806338 -0 -0.0428304 -0.00806341 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0.990386 0.217208 -1 0.022378 0.217208 -2 0.0223766 0.0507198 -3 0.990386 0.0507198 -kids 0 -OBJECT poly -name "landing-elev" -loc 0.000360576 -0.000264099 -0.0474465 -texture "arpt-elev.png" -crease 45.000000 -numvert 4 -0 0.0428304 -0.00806341 -0 0.0428304 0.00806338 -0 -0.0428304 0.00806338 -0 -0.0428304 -0.00806341 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 0.990386 0.217208 -1 0.022378 0.217208 -2 0.0223766 0.0507198 -3 0.990386 0.0507198 -kids 0 -OBJECT poly -name "rect" -loc 0.0643506 4.65661e-010 2.32831e-010 -texture "mask.png" -crease 45.000000 -numvert 4 --0.0639733 0.0784821 -0.0784821 --0.0639733 0.0784821 0.0784821 --0.0639733 -0.0784821 0.0784821 --0.0639733 -0.0784821 -0.0784821 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -0 1 1 -1 0 1 -2 0 0 -3 1 0 -kids 0 -OBJECT poly -name "spdtrnd-down" -loc 0.00133822 -0.0211824 0.0513713 -texture "spdtrend.png" -crease 45.000000 -numvert 4 -0 0.0210118 0.00234548 -0 0.0210118 -0.00234545 -0 -0.0210118 -0.00234544 -0 -0.0210118 0.00234548 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0 0.496308 -2 1.03601 0.496308 -1 1.03601 -0.00461811 -0 0 -0.00461811 -kids 0 -OBJECT poly -name "fd_roll" -loc 0.00132974 0.000720247 0.00491576 -texture "symbols.png" -crease 45.000000 -numvert 4 -0 0.0195466 -0.000502482 -0 -0.0195466 -0.000502482 -0 -0.0195466 0.000502482 -0 0.0195466 0.000502482 -numsurf 1 -SURF 0x30 -mat 0 -refs 4 -3 0.510324 0.464321 -2 0.762653 0.464321 -1 0.762653 0.461267 -0 0.510324 0.461267 -kids 0 diff --git a/Models/LandingGears/a320.mlg.left.xml b/Models/LandingGears/a320.mlg.left.xml index 6792237e..3cc72ece 100644 --- a/Models/LandingGears/a320.mlg.left.xml +++ b/Models/LandingGears/a320.mlg.left.xml @@ -14,7 +14,7 @@ </overlay> </model> - <model> + <!--model> <name>Port tire smoke</name> <path>Aircraft/Generic/Effects/tyre-smoke-port.xml</path> <offsets> @@ -22,7 +22,7 @@ <y-m>0</y-m> <z-m>-0.572</z-m> </offsets> - </model> + </model--> <!-- Gear compression --> <animation> diff --git a/Models/LandingGears/a320.mlg.right.xml b/Models/LandingGears/a320.mlg.right.xml index 2f07c133..2481f8de 100644 --- a/Models/LandingGears/a320.mlg.right.xml +++ b/Models/LandingGears/a320.mlg.right.xml @@ -14,7 +14,7 @@ </overlay> </model> - <model> + <!--model> <name>Starboard tire smoke</name> <path>Aircraft/Generic/Effects/tyre-smoke-stbd.xml</path> <offsets> @@ -22,7 +22,7 @@ <y-m>0</y-m> <z-m>-0.572</z-m> </offsets> - </model> + </model--> <!-- Gear compression --> <animation> diff --git a/Models/LandingGears/a320.nlg.xml b/Models/LandingGears/a320.nlg.xml index efe0fac8..66d17c21 100644 --- a/Models/LandingGears/a320.nlg.xml +++ b/Models/LandingGears/a320.nlg.xml @@ -14,7 +14,7 @@ </offsets> </model> - <model> + <!--model> <name>Nose tire smoke</name> <path>Aircraft/Generic/Effects/tyre-smoke-nose.xml</path> <offsets> @@ -22,7 +22,7 @@ <y-m>0</y-m> <z-m>-2.314</z-m> </offsets> - </model> + </model--> <!-- Gear compression --> <animation> diff --git a/Nasal/PFD_FMA.nas b/Nasal/PFD_FMA.nas index 9ef5b33e..9be5017d 100644 --- a/Nasal/PFD_FMA.nas +++ b/Nasal/PFD_FMA.nas @@ -3,7 +3,7 @@ # Speed or Mach? var speedmach = func { - if (getprop("/it-autoflight/output/vert") == 4) { + if ((getprop("/it-autoflight/output/vert") == 4) or (getprop("/it-autoflight/output/vert") == 6) or (getprop("/it-autoflight/output/vert") == 7)) { # Do nothing because it's in FLCH mode. } else { if (getprop("/it-autoflight/input/kts-mach") == 0) { @@ -42,6 +42,8 @@ setlistener("/it-autoflight/mode/lat", func { setprop("/modes/pfd/fma/roll-mode", "LOC"); } else if (lat == "ALGN") { setprop("/modes/pfd/fma/roll-mode", "ALN"); + } else if (lat == "T/O") { + setprop("/modes/pfd/fma/roll-mode", " "); } }); @@ -60,10 +62,16 @@ setlistener("/it-autoflight/mode/vert", func { setprop("/modes/pfd/fma/pitch-mode", "OP CLB"); } else if (vert == "SPD DES") { setprop("/modes/pfd/fma/pitch-mode", "OP DES"); + } else if (vert == "FPA") { + setprop("/modes/pfd/fma/pitch-mode", "FPA"); } else if (vert == "LAND 3") { setprop("/modes/pfd/fma/pitch-mode", "LAND"); } else if (vert == "FLARE") { setprop("/modes/pfd/fma/pitch-mode", "FLARE"); + } else if (vert == "T/O CLB") { + setprop("/modes/pfd/fma/pitch-mode", "SRS"); + } else if (vert == "G/A CLB") { + setprop("/modes/pfd/fma/pitch-mode", "SRS"); } }); diff --git a/Nasal/it-autoflight.nas b/Nasal/it-autoflight.nas index a8450537..c085c51e 100644 --- a/Nasal/it-autoflight.nas +++ b/Nasal/it-autoflight.nas @@ -1,18 +1,15 @@ # IT AUTOFLIGHT System Controller by Joshua Davidson (it0uchpods/411). -# V3.0.0 Milestone 3 Build 78 +# V3.0.0 Build 110 +# This program is 100% GPL! print("IT-AUTOFLIGHT: Please Wait!"); -setprop("/it-autoflight/settings/retard-enable", 1); # Do not change this here! See IT-AUTOFLIGHT's Help.txt -setprop("/it-autoflight/settings/retard-ft", 50); # Do not change this here! See IT-AUTOFLIGHT's Help.txt -setprop("/it-autoflight/settings/land-flap", 0.6); # Do not change this here! See IT-AUTOFLIGHT's Help.txt -setprop("/it-autoflight/settings/land-enable", 1); # Do not change this here! See IT-AUTOFLIGHT's Help.txt -setprop("/it-autoflight/autoland/flare-altitude", 20); # Do not change this here! See IT-AUTOFLIGHT's Help.txt 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/spd-kts", 200); @@ -20,25 +17,31 @@ var ap_init = func { setprop("/it-autoflight/input/hdg", 360); setprop("/it-autoflight/input/alt", 10000); setprop("/it-autoflight/input/vs", 0); - setprop("/it-autoflight/input/lat", 0); - setprop("/it-autoflight/input/vert", 4); + setprop("/it-autoflight/input/lat", 5); + setprop("/it-autoflight/input/vert", 7); setprop("/it-autoflight/input/bank-limit", 30); 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/at", 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", 0); setprop("/it-autoflight/output/retard", 0); - setprop("/it-autoflight/settings/min-pitch", -4); + setprop("/it-autoflight/settings/min-pitch", -8); setprop("/it-autoflight/settings/max-pitch", 8); - setprop("/it-autoflight/internal/min-pitch", -4); + setprop("/it-autoflight/internal/min-pitch", -8); setprop("/it-autoflight/internal/max-pitch", 8); setprop("/it-autoflight/internal/alt", 10000); - setprop("/it-autoflight/autoland/target-vs", "-500"); + setprop("/it-autoflight/internal/cwsr", 0); + setprop("/it-autoflight/internal/cwsp", 0); + setprop("/it-autoflight/autoland/target-vs", "-650"); + setprop("/it-autoflight/mode/lat", "T/O"); + setprop("/it-autoflight/mode/vert", "T/O CLB"); update_arms(); print("IT-AUTOFLIGHT: Done!"); } @@ -48,6 +51,7 @@ 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); @@ -65,6 +69,7 @@ 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); @@ -87,6 +92,29 @@ setlistener("/it-autoflight/input/athr", func { } }); +# CWS Master System +setlistener("/it-autoflight/input/cws", func { + var cwsmas = getprop("/it-autoflight/input/cws"); + if (cwsmas == 1) { + setprop("/it-autoflight/sound/enableapoffsound", 1); + setprop("/it-autoflight/sound/apoffsound", 0); + setprop("/it-autoflight/sound/enableapoffsound2", 1); + setprop("/it-autoflight/sound/apoffsound2", 0); + setprop("/it-autoflight/output/ap1", 0); + setprop("/it-autoflight/output/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"); @@ -109,14 +137,22 @@ setlistener("/it-autoflight/input/fd2", func { # Master Lateral setlistener("/it-autoflight/input/lat", func { + lateral(); +}); + +var lateral = func { var latset = getprop("/it-autoflight/input/lat"); if (latset == 0) { + alandt.stop(); + alandt1.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) { + alandt.stop(); + alandt1.stop(); setprop("/it-autoflight/output/loc-armed", 0); setprop("/it-autoflight/output/appr-armed", 0); setprop("/it-autoflight/output/lat", 1); @@ -128,6 +164,8 @@ setlistener("/it-autoflight/input/lat", func { setprop("/it-autoflight/output/appr-armed", 0); setprop("/it-autoflight/mode/arm", "LOC"); } else if (latset == 3) { + alandt.stop(); + alandt1.stop(); setprop("/it-autoflight/output/loc-armed", 0); setprop("/it-autoflight/output/appr-armed", 0); setprop("/it-autoflight/output/lat", 0); @@ -138,13 +176,21 @@ setlistener("/it-autoflight/input/lat", func { } else if (latset == 4) { setprop("/it-autoflight/output/lat", 4); setprop("/it-autoflight/mode/lat", "ALGN"); + } else if (latset == 5) { + setprop("/it-autoflight/output/lat", 5); } -}); +} # Master Vertical setlistener("/it-autoflight/input/vert", func { + vertical(); +}); + +var vertical = func { var vertset = getprop("/it-autoflight/input/vert"); if (vertset == 0) { + alandt.stop(); + alandt1.stop(); setprop("/it-autoflight/output/appr-armed", 0); setprop("/it-autoflight/output/vert", 0); setprop("/it-autoflight/mode/vert", "ALT HLD"); @@ -156,8 +202,10 @@ setlistener("/it-autoflight/input/vert", func { var altnow = int((getprop("/instrumentation/altimeter/indicated-altitude-ft")+50)/100)*100; setprop("/it-autoflight/input/alt", altnow); setprop("/it-autoflight/internal/alt", altnow); - flchthrust(); + thrustmode(); } else if (vertset == 1) { + alandt.stop(); + alandt1.stop(); var altinput = getprop("/it-autoflight/input/alt"); setprop("/it-autoflight/internal/alt", altinput); var vsnow = int(getprop("/velocities/vertical-speed-fps")*0.6)*100; @@ -170,14 +218,21 @@ setlistener("/it-autoflight/input/vert", func { } else { setprop("/it-autoflight/mode/arm", " "); } - flchthrust(); + thrustmode(); } else if (vertset == 2) { - setprop("/instrumentation/nav/signal-quality-norm", 0); - setprop("/it-autoflight/output/loc-armed", 1); + if (getprop("/it-autoflight/output/lat") == 2) { + # Do nothing because VORLOC is active + } else { + setprop("/instrumentation/nav/signal-quality-norm", 0); + setprop("/it-autoflight/output/loc-armed", 1); + } setprop("/instrumentation/nav/gs-rate-of-climb", 0); setprop("/it-autoflight/output/appr-armed", 1); setprop("/it-autoflight/mode/arm", "ILS"); + setprop("/it-autoflight/autoland/target-vs", "-650"); } else if (vertset == 3) { + alandt.stop(); + alandt1.stop(); var pitchdeg = getprop("/orientation/pitch-deg"); var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft"); var alt = getprop("/it-autoflight/internal/alt"); @@ -190,7 +245,10 @@ setlistener("/it-autoflight/input/vert", func { minmaxtimer.start(); setprop("/it-autoflight/output/vert", 0); setprop("/it-autoflight/mode/vert", "ALT CAP"); + thrustmode(); } else if (vertset == 4) { + alandt.stop(); + alandt1.stop(); var altinput = getprop("/it-autoflight/input/alt"); setprop("/it-autoflight/internal/alt", altinput); var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft"); @@ -207,29 +265,36 @@ setlistener("/it-autoflight/input/vert", func { setprop("/it-autoflight/mode/arm", " "); } } else if (vertset == 5) { - # VNAV not ready yet, so do nothing + # FPA not ready yet, so do nothing } else if (vertset == 6) { setprop("/it-autoflight/output/vert", 6); setprop("/it-autoflight/mode/vert", "LAND 3"); setprop("/it-autoflight/mode/arm", " "); - flchthrust(); + thrustmode(); alandt.stop(); alandt1.start(); - setprop("/it-autoflight/autoland/target-vs", "-500"); + setprop("/it-autoflight/autoland/target-vs", "-650"); + } else if (vertset == 7) { + setprop("/it-autoflight/output/vert", 7); + setprop("/it-autoflight/mode/arm", " "); + togasel(); + thrustmode(); + alandt.stop(); + alandt1.stop(); } -}); +} var flch_on = func { setprop("/it-autoflight/output/appr-armed", 0); setprop("/it-autoflight/output/vert", 4); - flchtimer.start(); + 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-pitch", 8); - setprop("/it-autoflight/internal/min-pitch", -4); + setprop("/it-autoflight/internal/min-pitch", -8); } setlistener("/it-autoflight/input/kts-mach", func { @@ -256,10 +321,36 @@ setlistener("/it-autoflight/output/vert", func { }); 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", 150); + setprop("/it-autoflight/internal/captvsneg", -150); + } else if ((vsnow >= 1000 and vsnow < 1500) or (vsnow < -1000 and vsnow > -1500)) { + setprop("/it-autoflight/internal/captvs", 200); + setprop("/it-autoflight/internal/captvsneg", -200); + } else if ((vsnow >= 1500 and vsnow < 2000) or (vsnow < -1500 and vsnow > -2000)) { + setprop("/it-autoflight/internal/captvs", 300); + setprop("/it-autoflight/internal/captvsneg", -300); + } else if ((vsnow >= 2000 and vsnow < 3000) or (vsnow < -2000 and vsnow > -3000)) { + setprop("/it-autoflight/internal/captvs", 450); + setprop("/it-autoflight/internal/captvsneg", -450); + } else if ((vsnow >= 3000 and vsnow < 4000) or (vsnow < -3000 and vsnow > -4000)) { + setprop("/it-autoflight/internal/captvs", 650); + setprop("/it-autoflight/internal/captvsneg", -650); + } else if ((vsnow >= 4000 and vsnow < 5000) or (vsnow < -4000 and vsnow > -5000)) { + setprop("/it-autoflight/internal/captvs", 1000); + setprop("/it-autoflight/internal/captvsneg", -1000); + } else if ((vsnow >= 5000) or (vsnow < -5000)) { + setprop("/it-autoflight/internal/captvs", 1250); + setprop("/it-autoflight/internal/captvsneg", -1250); + } var calt = getprop("/instrumentation/altimeter/indicated-altitude-ft"); var alt = getprop("/it-autoflight/internal/alt"); var dif = calt - alt; - if (dif < 500 and dif > -500) { + if (dif < getprop("/it-autoflight/internal/captvs") and dif > getprop("/it-autoflight/internal/captvsneg")) { setprop("/it-autoflight/input/vert", 3); setprop("/it-autoflight/output/thr-mode", 0); } @@ -267,8 +358,8 @@ var altcapt = func { setprop("/it-autoflight/internal/alt", altinput); } -# FLCH Thrust Mode Selector -var flchthrust = func { +# 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"); @@ -276,20 +367,23 @@ var flchthrust = func { if (calt < alt) { setprop("/it-autoflight/output/thr-mode", 2); setprop("/it-autoflight/mode/thr", " PITCH"); - setprop("/it-autoflight/mode/vert", "SPD CLB"); + 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"); + 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 { setprop("/it-autoflight/output/thr-mode", 0); - setprop("/it-autoflight/mode/thr", "THRUST"); - flchtimer.stop(); + setprop("/it-autoflight/mode/thr", "THRUST"); + thrustmodet.stop(); } } @@ -300,9 +394,9 @@ var minmax = func { var dif = calt - alt; if (dif < 100 and dif > -100) { setprop("/it-autoflight/internal/max-pitch", 8); - setprop("/it-autoflight/internal/min-pitch", -4); + setprop("/it-autoflight/internal/min-pitch", -5); var vertmode = getprop("/it-autoflight/output/vert"); - if (vertmode == 1 or vertmode == 2 or vertmode == 4) { + 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"); @@ -334,7 +428,7 @@ var retardchk = func { atofft.start(); } else { setprop("/it-autoflight/output/retard", 0); - flchthrust(); + thrustmode(); } } } @@ -362,6 +456,26 @@ setlistener("/it-autoflight/input/hdg", func { setprop("/autopilot/settings/heading-bug-deg", getprop("/it-autoflight/input/hdg")); }); +# TOGA +setlistener("/it-autoflight/input/toga", func { + if (getprop("/it-autoflight/input/toga") == 1) { + setprop("/it-autoflight/input/vert", 7); + setprop("/it-autoflight/output/loc-armed", 0); + setprop("/it-autoflight/output/appr-armed", 0); + setprop("/it-autoflight/input/toga", 0); + } +}); + +var togasel = func { + if ((getprop("/gear/gear[1]/wow") == 0) and (getprop("/gear/gear[2]/wow") == 0)) { + setprop("/it-autoflight/mode/vert", "G/A CLB"); + } else { + setprop("/it-autoflight/input/lat", 5); + setprop("/it-autoflight/mode/lat", "T/O"); + setprop("/it-autoflight/mode/vert", "T/O CLB"); + } +} + # LOC and G/S arming var update_arms = func { update_locarmelec(); @@ -383,9 +497,6 @@ var update_apparmelec = func { var appra = getprop("/it-autoflight/output/appr-armed"); if (appra) { apparmcheck(); - if (getprop("/it-autoflight/settings/land-enable") == 1){ - alandt.start(); - } } else { return 0; } @@ -414,7 +525,10 @@ var apparmcheck = func { setprop("/it-autoflight/output/vert", 2); setprop("/it-autoflight/mode/vert", "G/S"); setprop("/it-autoflight/mode/arm", " "); - flchthrust(); + if (getprop("/it-autoflight/settings/land-enable") == 1){ + alandt.start(); + } + thrustmode(); } else { return 0; } @@ -424,19 +538,35 @@ var apparmcheck = func { var aland = func { var ap1 = getprop("/it-autoflight/output/ap1"); var ap2 = getprop("/it-autoflight/output/ap2"); - if (ap1 or ap2) { - if (getprop("/position/gear-agl-ft") <= 150) { + if (getprop("/position/gear-agl-ft") <= 100) { + if (ap1 or ap2) { + 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"); - var flarealt = getprop("/it-autoflight/autoland/flare-altitude"); + var flarealt = getprop("/it-autoflight/settings/flare-altitude"); if (aglal <= flarealt and aglal > 5) { setprop("/it-autoflight/mode/vert", "FLARE"); setprop("/it-autoflight/autoland/target-vs", "-120"); } + if ((getprop("/it-autoflight/output/ap1") == 0) and (getprop("/it-autoflight/output/ap2") == 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) { @@ -447,13 +577,40 @@ var aland1 = func { } # Autoland Stage 2 Logic (Rollout) -# Coming soon, for now we just disconnect the AP on touch down. + + +# 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); + } +} # Timers var altcaptt = maketimer(0.5, altcapt); -var flchtimer = maketimer(0.5, flchthrust); +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); \ No newline at end of file +var alandt1 = maketimer(0.5, aland1); +var cwsrollt = maketimer(0.1, cwsroll); +var cwspitcht = maketimer(0.1, cwspitch); diff --git a/Nasal/systems.nas b/Nasal/systems.nas index 67f2ecc3..d603b7d8 100644 --- a/Nasal/systems.nas +++ b/Nasal/systems.nas @@ -179,14 +179,11 @@ var triggerDoor = func(door, doorName, doorDesc) setlistener("/sim/signals/fdm-initialized", func { itaf.ap_init(); var autopilot = gui.Dialog.new("sim/gui/dialogs/autopilot/dialog", "Aircraft/A320Family/Systems/autopilot-dlg.xml"); - setprop("/it-autoflight/settings/retard-enable", 0); # Enable or disable automatic autothrottle retard. - setprop("/it-autoflight/settings/retard-ft", 50); # Add this to change the retard altitude. - setprop("/it-autoflight/settings/land-flap", 0.645); # Define the landing flaps here. This is needed for autoland, and retard. - setprop("/it-autoflight/settings/land-enable", 1); # Enable or disable automatic landing. - setprop("/it-autoflight/autoland/flare-altitude", 40); # Altitude when the flare mode starts in an autoland. setprop("/controls/engines/thrust-limit", "TOGA"); setprop("/controls/engines/epr-limit", 1.301); setprop("/controls/engines/n1-limit", 97.8); + setprop("/it-autoflight/input/fd1", 1); + setprop("/it-autoflight/input/fd2", 1); }); var aglgears = func { diff --git a/Nasal/tyresmoke.nas b/Nasal/tyresmoke.nas deleted file mode 100644 index 8b449aba..00000000 --- a/Nasal/tyresmoke.nas +++ /dev/null @@ -1,52 +0,0 @@ -var nose_wow_sav = 0; -var left_wow_sav = 0; -var right_wow_sav = 0; - -var tyresmoke = func() { - - if ((getprop("/sim/replay/time") == 0) or (getprop("/sim/replay/time") == nil)) { - - if (getprop("/position/altitude-agl-ft") < 30) { - - var nose_wow_cur = getprop("/gear/gear/wow"); - var left_wow_cur = getprop("/gear/gear[3]/wow"); - var right_wow_cur = getprop("/gear/gear[4]/wow"); - - if (nose_wow_cur and !nose_wow_sav) - setprop("/aircraft/tyresmoke/nose", 1); - else - setprop("/aircraft/tyresmoke/nose", 0); - - if (left_wow_cur and !left_wow_sav) - setprop("/aircraft/tyresmoke/left", 1); - else - setprop("/aircraft/tyresmoke/left", 0); - - if (right_wow_cur and !right_wow_sav) - setprop("/aircraft/tyresmoke/right", 1); - else - setprop("/aircraft/tyresmoke/right", 0); - - nose_wow_sav = nose_wow_cur; - left_wow_sav = left_wow_cur; - right_wow_sav = right_wow_cur; - - if (left_wow_cur and (getprop("/velocities/airspeed-kt") > 70) and (getprop("controls/gear/brake-left") > 0.5)) { - setprop("/aircraft/tyresmoke/left", 1); - } - - if (right_wow_cur and (getprop("/velocities/airspeed-kt") > 70) and (getprop("controls/gear/brake-right") > 0.5)) { - setprop("/aircraft/tyresmoke/right", 1); - } - - } else { - - setprop("/aircraft/tyresmoke/nose", 0); - setprop("/aircraft/tyresmoke/left", 0); - setprop("/aircraft/tyresmoke/right", 0); - - } - - } - -}; diff --git a/Nasal/v-speeds.nas b/Nasal/v-speeds.nas deleted file mode 100644 index 72b778c1..00000000 --- a/Nasal/v-speeds.nas +++ /dev/null @@ -1,38 +0,0 @@ -# Create initial announced variables at startup of the sim -V1 = ""; -VR = ""; -V2 = ""; - -# The actual function -var vspeeds = func { - - # Create/populate variables at each function cycle - # Retrieve total aircraft weight and convert to kg. - WT = getprop("/fdm/jsbsim/inertia/weight-lbs")*0.00045359237; - flaps = getprop("/instrumentation/fmc/to-flap"); - - # Calculate V-speeds with flaps 10 - if (flaps == 10) { - V1 = (0.3*(WT-80))+125; - VR = (0.3*(WT-80))+140; - V2 = (0.3*(WT-80))+150; - } - - # Calculate V-speeds with flaps 15 - elsif (flaps == 15) { - V1 = (0.3*(WT-80))+115; - VR = (0.3*(WT-80))+130; - V2 = (0.3*(WT-80))+140; - } - - # Export the calculated V-speeds to the property-tree, for further use - setprop("/instrumentation/fmc/vspeeds/V1",V1); - setprop("/instrumentation/fmc/vspeeds/VR",VR); - setprop("/instrumentation/fmc/vspeeds/V2",V2); - - # Repeat the function each second - settimer(vspeeds, 1); -} - -# Only start the function when the FDM is initialized, to prevent the problem of not-yet-created properties. -_setlistener("/sim/signals/fdm-initialized", vspeeds); diff --git a/README.md b/README.md index 5cd03153..b5ee609e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # A320Family -Airbus A320 Family for FlightGear. A320-200 Flyable! A319-200/A321-200 Flyable soon! Note: Flaps indicator still missing from ECAM, coming soon! \ No newline at end of file +Airbus A320 Family for FlightGear. Note: Flaps indicator still missing from ECAM, coming soon! \ No newline at end of file diff --git a/Sounds/FL2070/iae13a.wav b/Sounds/FL2070/iae13a.wav index 61dae78928ff6c0cd359270f0d48262ddba632b2..ab2a97feedcd9e7420deff3bc7cc27ddb76528aa 100644 GIT binary patch delta 53 zcmX>$LG{=K)d@Q7Ih&b)m>Gy!fS47C*?^dRd(LK#ACnt(T6Gw=>M%KMo}S{)`3L}V CffjuL delta 49 zcmX>$LG{=K)d@Q7DpS~in0>p-6b^^YjXJG5jIBCMtvbxDIxMX^tXp;1eoUU8;?DU9 E0Kw-GcmMzZ diff --git a/Sounds/FL2070/iae14b.wav b/Sounds/FL2070/iae14b.wav index c359d6fd02b9181edf4d68732893b44a268a292a..89c4bd782e96d567b4be652bf40be6768bf63e1c 100644 GIT binary patch delta 60 zcmX@~&fw5Hg9$qAR)5%mm;;D8ftYK%)gNv(t45tx9mZB2rdA#1RvngB9oAMIwyiqs Me1E1VnDIOU01QeN-~a#s delta 63 zcmX@~&fw5Hg9$qAK~^k4%nHP8K+F!r96-zo#9Z5htho99H0reKFt+M2wdyc$)nQSy Knx0_B^9TUUr4+FM diff --git a/Systems/autopilot-dlg.xml b/Systems/autopilot-dlg.xml index 270104d1..a1a07871 100644 --- a/Systems/autopilot-dlg.xml +++ b/Systems/autopilot-dlg.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8" ?> -<!-- IT-AUTOFLIGHT Autoflight Control Dialog --> +<!-- IT-AUTOFLIGHT Autopilot Control Dialog --> <PropertyList> @@ -13,7 +13,7 @@ <layout>hbox</layout> <text> <halign>left</halign> - <label>IT-AUTOFLIGHT V3.0.0 Beta</label> + <label>IT-AUTOFLIGHT System</label> </text> <button> <halign>right</halign> @@ -56,17 +56,17 @@ </binding> </button> <button> - <legend>CWS</legend> - <pref-width>35</pref-width> <enable> <equals> - <property>/it-autoflight/settings/CWS-allowed</property> - <value>blahblahblahblah</value> + <property>/it-autoflight/settings/enable-cws</property> + <value>1</value> </equals> </enable> + <legend>CWS</legend> + <pref-width>35</pref-width> <binding> <command>property-toggle</command> - <property>/it-autoflight/unused/input/cws</property> + <property>/it-autoflight/input/cws</property> </binding> </button> <button> @@ -120,7 +120,7 @@ <label>[CWS]</label> <visible> <equals> - <property>/it-autoflight/unused/output/cws</property> + <property>/it-autoflight/output/cws</property> <value>1</value> </equals> </visible> @@ -240,16 +240,9 @@ <row>0</row> <col>1</col> <legend>TOGA</legend> - <enable> - <equals> - <property>/it-autoflight/unused/toga</property> - <value>blahblahblahblah</value> - </equals> - </enable> <binding> - <command>property-cycle</command> - <property>/it-autoflight/toga</property> - <value>0</value> + <command>property-assign</command> + <property>/it-autoflight/input/toga</property> <value>1</value> </binding> </button> @@ -763,7 +756,7 @@ <button> <pref-width>40</pref-width> - <legend>VNAV</legend> + <legend>FPA</legend> <enable> <equals> <property>/it-autoflight/settings/disabled-button</property> @@ -772,8 +765,8 @@ </enable> <binding> <command>property-assign</command> - <property>/it-autoflight/unused/vnav</property> - <value>1</value> + <property>/it-autoflight/input/vert</property> + <value>5</value> </binding> </button> diff --git a/Systems/engine-timing.xml b/Systems/engine-timing.xml index 45960eb2..b7999f9d 100644 --- a/Systems/engine-timing.xml +++ b/Systems/engine-timing.xml @@ -14,7 +14,7 @@ <entry><ind> 18</ind><dep>0.988</dep></entry> <entry><ind> 23</ind><dep>1.000</dep></entry> <entry><ind> 35</ind><dep>1.060</dep></entry> - <entry><ind>105.0</ind><dep>1.322</dep></entry> + <entry><ind>105.8</ind><dep>1.322</dep></entry> </table> </expression> </input> @@ -33,7 +33,7 @@ <entry><ind> 18</ind><dep>0.988</dep></entry> <entry><ind> 23</ind><dep>1.000</dep></entry> <entry><ind> 35</ind><dep>1.060</dep></entry> - <entry><ind>105.0</ind><dep>1.322</dep></entry> + <entry><ind>105.8</ind><dep>1.322</dep></entry> </table> </expression> </input> diff --git a/Systems/it-autoflight.xml b/Systems/it-autoflight.xml index 2230465d..4d6f429b 100644 --- a/Systems/it-autoflight.xml +++ b/Systems/it-autoflight.xml @@ -219,6 +219,14 @@ <property>/it-autoflight/output/lat</property> <value>1</value> </equals> + <equals> + <property>/it-autoflight/output/lat</property> + <value>4</value> + </equals> + <equals> + <property>/it-autoflight/output/lat</property> + <value>5</value> + </equals> </or> </condition> </enable> @@ -236,7 +244,9 @@ </and> </condition> <property>/it-autoflight/internal/heading-bug-error-deg</property> - <scale>6.3</scale> + <scale> + <property>/it-autoflight/config/cmd/roll-scale</property> + </scale> </input> <input> <condition> @@ -252,7 +262,9 @@ </and> </condition> <property>/it-autoflight/internal/true-heading-error-deg</property> - <scale>6.3</scale> + <scale> + <property>/it-autoflight/config/cmd/roll-scale</property> + </scale> </input> <input> <condition> @@ -262,7 +274,24 @@ </equals> </condition> <property>/it-autoflight/internal/lnav-hdg-error-deg</property> - <scale>6.3</scale> + <scale> + <property>/it-autoflight/config/cmd/roll-scale</property> + </scale> + </input> + <input> + <condition> + <or> + <equals> + <property>/it-autoflight/output/lat</property> + <value>4</value> + </equals> + <equals> + <property>/it-autoflight/output/lat</property> + <value>5</value> + </equals> + </or> + </condition> + <value>0</value> </input> <output> <property>/it-autoflight/internal/target-roll-deg</property> @@ -307,67 +336,6 @@ </u_max> </filter> - <pid-controller> - <name>IT-CONTROLLER: ROLL</name> - <debug>false</debug> - <enable> - <condition> - <and> - <or> - <equals> - <property>/it-autoflight/output/lat</property> - <value>0</value> - </equals> - <equals> - <property>/it-autoflight/output/lat</property> - <value>1</value> - </equals> - </or> - <or> - <equals> - <property>/it-autoflight/output/ap1</property> - <value>1</value> - </equals> - <equals> - <property>/it-autoflight/output/ap2</property> - <value>1</value> - </equals> - </or> - </and> - </condition> - </enable> - <input> - <property>/orientation/roll-deg</property> - </input> - <reference> - <property>/it-autoflight/internal/target-roll-deg</property> - </reference> - <output> - <property>/it-autoflight/internal/aileron-cmd</property> - </output> - <config> - <Kp> - <property>/it-autoflight/config/roll/kp</property> - </Kp> - <beta>1.0</beta> - <alpha>0.1</alpha> - <gamma>0.0</gamma> - <Ti> - <property>/it-autoflight/config/roll/ti</property> - </Ti> - <Td> - <property>/it-autoflight/config/roll/td</property> - </Td> - <u_min> - <property>/it-autoflight/config/roll/umin</property> - </u_min> - <u_max> - <property>/it-autoflight/config/roll/umax</property> - </u_max> - </config> - </pid-controller> - - <pid-controller> <name>VORLOC TRK</name> <debug>false</debug> @@ -389,38 +357,34 @@ <property>/it-autoflight/internal/target-roll-deg</property> </output> <config> - <Kp>-5.0</Kp> - <beta>1.0</beta> - <alpha>1.0</alpha> - <gamma>0.0</gamma> - <Ti>10.0</Ti> - <Td>0.00001</Td> - <u_min>-30.0</u_min> - <u_max>30.0</u_max> + <Kp> + <property>/it-autoflight/config/cmd/vorloc</property> + </Kp> + <beta>1.0</beta> + <alpha>0.1</alpha> + <gamma>0.0</gamma> + <Ti>10.0</Ti> + <Td>0.00001</Td> + <u_min>-30</u_min> + <u_max>30</u_max> </config> </pid-controller> - + <pid-controller> - <name>IT-CONTROLLER: VORLOC</name> + <name>IT-CONTROLLER: ROLL</name> <debug>false</debug> <enable> <condition> - <and> + <or> <equals> - <property>/it-autoflight/output/lat</property> - <value>2</value> + <property>/it-autoflight/output/ap1</property> + <value>1</value> </equals> - <or> - <equals> - <property>/it-autoflight/output/ap1</property> - <value>1</value> - </equals> - <equals> - <property>/it-autoflight/output/ap2</property> - <value>1</value> - </equals> - </or> - </and> + <equals> + <property>/it-autoflight/output/ap2</property> + <value>1</value> + </equals> + </or> </condition> </enable> <input> @@ -434,17 +398,41 @@ </output> <config> <Kp> - <property>/it-autoflight/config/vorloc/kp</property> + <condition> + <not-equals> + <property>/it-autoflight/output/lat</property> + <value>2</value> + </not-equals> + </condition> + <property>/it-autoflight/config/roll/kp</property> + </Kp> + <Kp> + <condition> + <equals> + <property>/it-autoflight/output/lat</property> + <value>2</value> + </equals> + </condition> + <property>/it-autoflight/config/roll/kp-vloc</property> + </Kp> + <Kp> + <condition> + <equals> + <property>/it-autoflight/output/lat</property> + <value>4</value> + </equals> + </condition> + <property>/it-autoflight/config/autoland/kp-roll</property> </Kp> <beta>1.0</beta> <alpha>0.1</alpha> - <gamma>0.0</gamma> + <gamma>0.0</gamma> <Ti> - <property>/it-autoflight/config/vorloc/ti</property> - </Ti> + <property>/it-autoflight/config/roll/ti</property> + </Ti> <Td> - <property>/it-autoflight/config/vorloc/td</property> - </Td> + <property>/it-autoflight/config/roll/td</property> + </Td> <u_min> <property>/it-autoflight/config/roll/umin</property> </u_min> @@ -453,9 +441,9 @@ </u_max> </config> </pid-controller> - + <filter> - <name>IT-CONTROLLER: ROLL FILTER</name> + <name>IT-CONTROLLER: ROLL CMD</name> <debug>false</debug> <feedback-if-disabled>true</feedback-if-disabled> <initialize-to>output</initialize-to> @@ -478,7 +466,7 @@ </input> <output>/controls/flight/aileron</output> <type>noise-spike</type> - <max-rate-of-change>0.8</max-rate-of-change> + <max-rate-of-change>0.9</max-rate-of-change> </filter> <!-- =============================================================== --> @@ -506,7 +494,9 @@ <property>/it-autoflight/internal/target-pitch-deg</property> </output> <config> - <Kp>0.025</Kp> + <Kp> + <property>/it-autoflight/config/cmd/alt</property> + </Kp> <beta>1.0</beta> <alpha>0.5</alpha> <gamma>0.0</gamma> @@ -543,7 +533,9 @@ <property>/it-autoflight/internal/target-pitch-deg</property> </output> <config> - <Kp>0.07</Kp> + <Kp> + <property>/it-autoflight/config/cmd/vs</property> + </Kp> <beta>1.0</beta> <alpha>0.1</alpha> <gamma>0.0</gamma> @@ -570,11 +562,11 @@ </condition> </enable> <input> - <prop>/it-autoflight/internal/vert-speed-fpm</prop> + <property>/it-autoflight/internal/vert-speed-fpm</property> <scale>0.2</scale> </input> <reference> - <prop>/it-autoflight/autoland/target-vs</prop> + <property>/it-autoflight/autoland/target-vs</property> <scale>0.2</scale> </reference> <output> @@ -621,14 +613,14 @@ </output> <config> <Kp> - <property>/it-autoflight/config/gs/kp</property> + <property>/it-autoflight/config/cmd/gs</property> </Kp> <beta>1.0</beta> <alpha>0.5</alpha> <gamma>0.0</gamma> <Ti>10.0</Ti> <Td>0.0001</Td> - <u_min>-10</u_min> + <u_min>-5</u_min> <u_max>7</u_max> </config> </pid-controller> @@ -638,10 +630,16 @@ <debug>false</debug> <enable> <condition> - <equals> - <property>/it-autoflight/output/vert</property> - <value>4</value> - </equals> + <or> + <equals> + <property>/it-autoflight/output/vert</property> + <value>4</value> + </equals> + <equals> + <property>/it-autoflight/output/vert</property> + <value>7</value> + </equals> + </or> </condition> </enable> <input> @@ -686,11 +684,12 @@ <property>/it-autoflight/internal/target-pitch-deg</property> </output> <config> - <Kp>-0.30</Kp> + <Kp> + <property>/it-autoflight/config/cmd/flch</property> + </Kp> <beta>1.0</beta> <alpha>0.1</alpha> <gamma>0.0</gamma> - <Ti>10.0</Ti> <Td>0.00001</Td> <u_min> @@ -709,7 +708,7 @@ <property>/instrumentation/altimeter/indicated-altitude-ft</property> </less-than> </condition> - <value>-15.0</value> + <value>-7.0</value> </u_min> <u_max> <condition> @@ -732,103 +731,44 @@ </config> </pid-controller> - <pid-controller> - <name>IT-CONTROLLER: FLCH</name> - <debug>false</debug> - <enable> - <condition> - <and> - <equals> - <property>/it-autoflight/output/vert</property> - <value>4</value> - </equals> - <or> - <equals> - <property>/it-autoflight/output/ap1</property> - <value>1</value> - </equals> - <equals> - <property>/it-autoflight/output/ap2</property> - <value>1</value> - </equals> - </or> - </and> - </condition> - </enable> - <input> - <property>/orientation/pitch-deg</property> - </input> - <reference> - <property>/it-autoflight/internal/target-pitch-deg</property> - </reference> - <output> - <property>/it-autoflight/internal/elevator-cmd</property> - </output> - <config> - <Kp> - <property>/it-autoflight/config/flch/kp</property> - </Kp> - <beta>1.0</beta> - <alpha>0.1</alpha> - <gamma>0.0</gamma> - <Ti> - <property>/it-autoflight/config/flch/ti</property> - </Ti> - <Td> - <property>/it-autoflight/config/flch/td</property> - </Td> - <u_min> - <property>/it-autoflight/config/flch/umin</property> - </u_min> - <u_max> - <property>/it-autoflight/config/flch/umax</property> - </u_max> - </config> - </pid-controller> - <pid-controller> <name>IT-CONTROLLER: PITCH</name> <debug>false</debug> <enable> <condition> - <and> - <or> - <equals> - <property>/it-autoflight/output/vert</property> - <value>0</value> - </equals> - <equals> - <property>/it-autoflight/output/vert</property> - <value>1</value> - </equals> - <equals> - <property>/it-autoflight/output/vert</property> - <value>2</value> - </equals> - <equals> - <property>/it-autoflight/output/vert</property> - <value>6</value> - </equals> - </or> - <or> - <equals> - <property>/it-autoflight/output/ap1</property> - <value>1</value> - </equals> - <equals> - <property>/it-autoflight/output/ap2</property> - <value>1</value> - </equals> - </or> - </and> + <or> + <equals> + <property>/it-autoflight/output/ap1</property> + <value>1</value> + </equals> + <equals> + <property>/it-autoflight/output/ap2</property> + <value>1</value> + </equals> + </or> </condition> </enable> <input> <property>/orientation/pitch-deg</property> </input> <reference> + <condition> + <not-equals> + <property>/it-autoflight/output/vert</property> + <value>7</value> + </not-equals> + </condition> <property>/it-autoflight/internal/target-pitch-deg</property> </reference> + <reference> + <condition> + <equals> + <property>/it-autoflight/output/vert</property> + <value>7</value> + </equals> + </condition> + <property>/it-autoflight/settings/toga-pitch</property> + </reference> <output> <property>/it-autoflight/internal/elevator-cmd</property> </output> @@ -855,7 +795,7 @@ </pid-controller> <filter> - <name>IT-CONTROLLER: PITCH FILTER</name> + <name>IT-CONTROLLER: PITCH CMD</name> <debug>false</debug> <feedback-if-disabled>true</feedback-if-disabled> <initialize-to>output</initialize-to> @@ -878,9 +818,236 @@ </input> <output>/controls/flight/elevator</output> <type>noise-spike</type> - <max-rate-of-change>0.15</max-rate-of-change> + <max-rate-of-change>0.3</max-rate-of-change> </filter> + <!-- =============================================================== --> + <!-- Rudder Control --> + <!-- =============================================================== --> + + <pi-simple-controller> + <name>RUDDER VORLOC TRK</name> + <debug>false</debug> + <enable> + <condition> + <equals> + <property>/it-autoflight/output/lat</property> + <value>4</value> + </equals> + </condition> + </enable> + <input> + <property>/it-autoflight/internal/nav1-heading-error-deg</property> + </input> + <reference> + <value>0</value> + </reference> + <output>/it-autoflight/internal/rudder-cmd</output> + <config> + <Kp> + <property>/it-autoflight/config/autoland/kp-rudder</property> + </Kp> + <Ki>0</Ki> + </config> + <min>-0.25</min> + <max>0.25</max> + </pi-simple-controller> + + <filter> + <name>IT-CONTROLLER: RUDDER CMD</name> + <debug>false</debug> + <feedback-if-disabled>true</feedback-if-disabled> + <initialize-to>output</initialize-to> + <enable> + <condition> + <or> + <equals> + <property>/it-autoflight/output/ap1</property> + <value>1</value> + </equals> + <equals> + <property>/it-autoflight/output/ap2</property> + <value>1</value> + </equals> + </or> + </condition> + </enable> + <input> + <condition> + <not-equals> + <property>/it-autoflight/output/lat</property> + <value>4</value> + </not-equals> + </condition> + <value>0</value> + </input> + <input> + <condition> + <equals> + <property>/it-autoflight/output/lat</property> + <value>4</value> + </equals> + </condition> + <property>/it-autoflight/internal/rudder-cmd</property> + </input> + <output>/controls/flight/rudder</output> + <type>noise-spike</type> + <max-rate-of-change>0.20</max-rate-of-change> + </filter> + + <!-- =============================================================== --> + <!-- Control Wheel Steering --> + <!-- =============================================================== --> + + <pid-controller> + <name>IT-CONTROLLER: CWS ROLL</name> + <debug>false</debug> + <enable> + <condition> + <and> + <equals> + <property>/it-autoflight/internal/cwsr</property> + <value>1</value> + </equals> + <equals> + <property>/it-autoflight/output/cws</property> + <value>1</value> + </equals> + </and> + </condition> + </enable> + <input> + <property>/orientation/roll-deg</property> + </input> + <reference> + <property>/it-autoflight/internal/cws-roll-deg</property> + </reference> + <output> + <property>/it-autoflight/internal/cws-ail-cmd</property> + </output> + <config> + <Kp> + <property>/it-autoflight/config/roll/kp</property> + </Kp> + <beta>1.0</beta> + <alpha>0.1</alpha> + <gamma>0.0</gamma> + <Ti> + <property>/it-autoflight/config/roll/ti</property> + </Ti> + <Td> + <property>/it-autoflight/config/roll/td</property> + </Td> + <u_min>-1.0</u_min> + <u_max>1.0</u_max> + </config> + </pid-controller> + + <filter> + <name>IT-CONTROLLER: CWS ROLL CMD</name> + <debug>false</debug> + <feedback-if-disabled>true</feedback-if-disabled> + <initialize-to>output</initialize-to> + <enable> + <condition> + <equals> + <property>/it-autoflight/output/cws</property> + <value>1</value> + </equals> + </condition> + </enable> + <input> + <condition> + <equals> + <property>/it-autoflight/internal/cwsr</property> + <value>1</value> + </equals> + </condition> + <property>/it-autoflight/internal/cws-ail-cmd</property> + </input> + <input> + <condition> + <equals> + <property>/it-autoflight/internal/cwsr</property> + <value>0</value> + </equals> + </condition> + <value>0</value> + </input> + <output>/controls/flight/aileron-trim</output> + <type>noise-spike</type> + <max-rate-of-change>0.9</max-rate-of-change> + </filter> + + <pid-controller> + <name>IT-CONTROLLER: CWS PITCH</name> + <debug>false</debug> + <enable> + <condition> + <and> + <equals> + <property>/it-autoflight/internal/cwsp</property> + <value>1</value> + </equals> + <equals> + <property>/it-autoflight/output/cws</property> + <value>1</value> + </equals> + </and> + </condition> + </enable> + <input> + <property>/orientation/pitch-deg</property> + </input> + <reference> + <property>/it-autoflight/internal/cws-pitch-deg</property> + </reference> + <output> + <property>/it-autoflight/internal/cws-elv-cmd</property> + </output> + <config> + <Kp> + <property>/it-autoflight/config/pitch/kp-cws</property> + </Kp> + <beta>1.0</beta> + <alpha>0.1</alpha> + <gamma>0.0</gamma> + <Ti> + <property>/it-autoflight/config/pitch/ti</property> + </Ti> + <Td> + <property>/it-autoflight/config/pitch/td</property> + </Td> + <u_min>-1.0</u_min> + <u_max>1.0</u_max> + </config> + </pid-controller> + + <filter> + <name>IT-CONTROLLER: CWS PITCH CMD</name> + <debug>false</debug> + <feedback-if-disabled>true</feedback-if-disabled> + <initialize-to>output</initialize-to> + <enable> + <condition> + <equals> + <property>/it-autoflight/output/cws</property> + <value>1</value> + </equals> + </condition> + </enable> + <input> + <property>/it-autoflight/internal/cws-elv-cmd</property> + </input> + <output>/controls/flight/elevator-trim</output> + <type>noise-spike</type> + <max-rate-of-change>0.5</max-rate-of-change> + </filter> + + <!-- =============================================================== --> + <!-- Autotrim --> + <!-- =============================================================== --> + <pid-controller> <name>AP PITCH HELPER PLUS</name> <debug>false</debug> @@ -970,7 +1137,7 @@ </pid-controller> <filter> - <name>IT-CONTROLLER: PITCH TRIM FILTER</name> + <name>IT-CONTROLLER: PITCH TRIM CMD</name> <debug>false</debug> <feedback-if-disabled>true</feedback-if-disabled> <initialize-to>output</initialize-to> @@ -1008,48 +1175,6 @@ <max-rate-of-change>0.01</max-rate-of-change> </filter> - <!-- =============================================================== --> - <!-- Rudder Control --> - <!-- =============================================================== --> - - <pid-controller> - <name>IT-CONTROLLER: RUDDER ZERO</name> - <debug>false</debug> - <enable> - <condition> - <or> - <equals> - <property>/it-autoflight/output/ap1</property> - <value>1</value> - </equals> - <equals> - <property>/it-autoflight/output/ap2</property> - <value>1</value> - </equals> - </or> - </condition> - </enable> - <input> - <value>/controls/flight/rudder</value> - </input> - <reference> - <value>0</value> - </reference> - <output> - <property>/controls/flight/rudder</property> - </output> - <config> - <Kp>5</Kp> - <beta>1.0</beta> - <alpha>0.1</alpha> - <gamma>0.0</gamma> - <Ti>10</Ti> - <Td>0.00001</Td> - <u_min>-0.1</u_min> - <u_max>0.1</u_max> - </config> - </pid-controller> - <!-- =============================================================== --> <!-- Flight Director --> <!-- =============================================================== --> @@ -1077,6 +1202,12 @@ <type>gain</type> <gain>1.0</gain> <input> + <condition> + <not-equals> + <property>/it-autoflight/output/vert</property> + <value>7</value> + </not-equals> + </condition> <expression> <dif> <property>/it-autoflight/internal/target-pitch-deg</property> @@ -1084,6 +1215,20 @@ </dif> </expression> </input> + <input> + <condition> + <equals> + <property>/it-autoflight/output/vert</property> + <value>7</value> + </equals> + </condition> + <expression> + <dif> + <property>/it-autoflight/settings/toga-pitch</property> + <property>/orientation/pitch-deg</property> + </dif> + </expression> + </input> <output>/it-autoflight/fd/pitch-bar</output> </filter> diff --git a/Systems/it-autothrust.xml b/Systems/it-autothrust.xml index cee6ebb9..3080687b 100644 --- a/Systems/it-autothrust.xml +++ b/Systems/it-autothrust.xml @@ -231,7 +231,7 @@ </pid-controller> <filter> - <name>IT-CONTROLLER: THRUST FILTER</name> + <name>IT-CONTROLLER: THRUST CMD</name> <debug>false</debug> <feedback-if-disabled>true</feedback-if-disabled> <initialize-to>output</initialize-to> @@ -285,7 +285,7 @@ </equals> </and> </condition> - <value>0.05</value> + <value>0.20</value> </max-rate-of-change> <max-rate-of-change> <condition>