1
0
Fork 0
A320-family/Systems/fmgc-pitch.xml

625 lines
15 KiB
XML
Raw Permalink Normal View History

2019-10-14 16:48:35 +00:00
<?xml version="1.0"?>
<!-- IT-AUTOFLIGHT -->
2020-07-08 20:14:55 +00:00
<!-- Copyright (c) 2020 Josh Davidson (Octal450) -->
2019-10-14 16:48:35 +00:00
<PropertyList>
<!-- Pitch Axis -->
<filter>
2020-07-08 20:14:55 +00:00
<name>IT-CONTROLLER: Altitude Capture/Hold</name>
2019-10-14 16:48:35 +00:00
<debug>false</debug>
<type>gain</type>
<gain>-5</gain>
<input>
<expression>
<sum>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
<value>-2</value>
</sum>
</expression>
</input>
<reference>/it-autoflight/internal/alt</reference>
2020-07-08 20:14:55 +00:00
<output>/it-autoflight/internal/target-fpm-alt</output>
2019-10-14 16:48:35 +00:00
<min>/it-autoflight/internal/min-vs</min>
<max>/it-autoflight/internal/max-vs</max>
</filter>
2020-07-08 20:14:55 +00:00
<logic>
<input>
<and>
<or>
2019-10-14 16:48:35 +00:00
<equals>
<property>/it-autoflight/output/vert</property>
2020-07-08 20:14:55 +00:00
<value>4</value>
2019-10-14 16:48:35 +00:00
</equals>
2020-07-08 20:14:55 +00:00
<equals>
<property>/it-autoflight/output/vert</property>
<value>7</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>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
</or>
</and>
</input>
<output>/it-autoflight/internal/flch-active</output>
</logic>
2019-10-14 16:48:35 +00:00
<pid-controller>
2020-07-08 20:14:55 +00:00
<name>IT-CONTROLLER: Speed By Pitch</name>
2019-10-14 16:48:35 +00:00
<debug>false</debug>
<enable>
<condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/flch-active</property>
2019-10-14 16:48:35 +00:00
</condition>
</enable>
<input>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>0</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/kts-predicted-15</property>
2019-10-14 16:48:35 +00:00
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>1</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/mach-predicted-15</property>
<scale>750</scale>
2019-10-14 16:48:35 +00:00
</input>
<reference>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>0</value>
</equals>
</condition>
<property>/it-autoflight/internal/flch-kts</property>
</reference>
<reference>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>1</value>
</equals>
</condition>
<property>/it-autoflight/internal/flch-mach</property>
2020-07-08 20:14:55 +00:00
<scale>750</scale>
2019-10-14 16:48:35 +00:00
</reference>
2020-07-08 20:14:55 +00:00
<output>/it-autoflight/internal/target-fpm-flch</output>
2019-10-14 16:48:35 +00:00
<config>
2020-07-08 20:14:55 +00:00
<Kp>-55</Kp>
2019-10-14 16:48:35 +00:00
<Ti>2.5</Ti>
<Td>0.001</Td>
<u_min>
<condition>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>2</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<value>120</value>
2019-10-14 16:48:35 +00:00
</u_min>
<u_min>
<expression>
2020-07-08 20:14:55 +00:00
<difference>
2019-10-14 16:48:35 +00:00
<property>/it-autoflight/internal/vert-speed-fpm</property>
<value>2500</value>
2020-07-08 20:14:55 +00:00
</difference>
2019-10-14 16:48:35 +00:00
</expression>
</u_min>
<u_max>
<condition>
<and>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>2</value>
</equals>
<or>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
</equals>
</or>
</and>
</condition>
<value>1000</value>
</u_max>
<u_max>
<condition>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>1</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<value>-120</value>
2019-10-14 16:48:35 +00:00
</u_max>
<u_max>
<expression>
<sum>
<property>/it-autoflight/internal/vert-speed-fpm</property>
<value>2500</value>
</sum>
</expression>
</u_max>
</config>
</pid-controller>
2020-07-08 20:14:55 +00:00
<filter>
<name>Speed By Pitch Inactive Sync</name>
<debug>false</debug>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<not><property>/it-autoflight/internal/flch-active</property></not>
</condition>
</enable>
<input>/it-autoflight/internal/vert-speed-fpm</input>
<output>/it-autoflight/internal/target-fpm-flch</output>
</filter>
<logic>
<input>
<and>
<equals>
<property>/it-autoflight/output/vert</property>
<value>5</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>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
</or>
</and>
</input>
<output>/it-autoflight/internal/fpa-active</output>
</logic>
<filter>
<name>IT-CONTROLLER: FPA</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<not><property>/it-autoflight/internal/fpa-active</property></not>
</condition>
<property>/it-autoflight/internal/vert-speed-fpm</property>
</input>
<input>
<expression>
<sum>
<difference> <!-- Fix an issue with the calculation -->
<property>/it-autoflight/internal/vert-speed-fpm</property>
<product>
<property>/velocities/vertical-speed-fps</property>
<value>60</value>
</product>
</difference>
<product>
<sin>
<deg2rad>
<property>/it-autoflight/input/fpa</property>
</deg2rad>
</sin>
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
<value>101.26859142607174</value> <!-- FPM to Knot -->
</product>
</sum>
</expression>
</input>
<output>/it-autoflight/internal/target-fpm-fpa-raw</output>
<min>
<expression>
<difference>
<property>/it-autoflight/internal/vert-speed-fpm</property>
<value>2500</value>
</difference>
</expression>
</min>
<max>
<expression>
<sum>
<property>/it-autoflight/internal/vert-speed-fpm</property>
<value>2500</value>
</sum>
</expression>
</max>
</filter>
<filter>
<name>FPA FPM Filter</name>
<type>noise-spike</type>
<input>/it-autoflight/internal/target-fpm-fpa-raw</input>
<output>/it-autoflight/internal/target-fpm-fpa</output>
<max-rate-of-change>
<condition>
<not><property>/it-autoflight/internal/fpa-active</property></not>
</condition>
<value>10000</value>
</max-rate-of-change>
<max-rate-of-change>300</max-rate-of-change>
</filter>
<filter>
<name>IT-CONTROLLER: Flare FD</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<sum>
<difference> <!-- Fix an issue with the calculation -->
<property>/it-autoflight/internal/vert-speed-fpm</property>
<product>
<property>/velocities/vertical-speed-fps</property>
<value>60</value>
</product>
</difference>
<product>
<sin>
<deg2rad>
<table>
<property>/position/gear-agl-ft</property>
<entry><ind>100</ind><dep>-2.80</dep></entry>
<entry><ind> 50</ind><dep>-2.12</dep></entry>
<entry><ind> 45</ind><dep>-0.61</dep></entry>
</table>
</deg2rad>
</sin>
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
<value>101.26859142607174</value> <!-- FPM to Knot -->
</product>
</sum>
</expression>
</input>
<output>/it-autoflight/internal/target-fpm-land-fd</output>
<min>-1200</min>
<max>0</max>
</filter>
<filter>
<name>IT-CONTROLLER: Flare</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<sum>
<difference> <!-- Fix an issue with the calculation -->
<property>/it-autoflight/internal/vert-speed-fpm</property>
<product>
<property>/velocities/vertical-speed-fps</property>
<value>60</value>
</product>
</difference>
<product>
<sin>
<deg2rad>
<table>
<property>/position/gear-agl-ft</property>
<entry><ind>100</ind><dep>-2.80</dep></entry>
<entry><ind> 50</ind><dep>-2.12</dep></entry>
<entry><ind> 40</ind><dep>-1.58</dep></entry>
<entry><ind> 30</ind><dep>-1.23</dep></entry>
<entry><ind> 20</ind><dep>-0.92</dep></entry>
<entry><ind> 10</ind><dep>-0.61</dep></entry>
</table>
</deg2rad>
</sin>
<property>/instrumentation/airspeed-indicator/true-speed-kt</property>
<value>101.26859142607174</value> <!-- FPM to Knot -->
</product>
</sum>
</expression>
</input>
<output>/it-autoflight/internal/target-fpm-land</output>
<min>-1200</min>
<max>0</max>
</filter>
2019-10-14 16:48:35 +00:00
<filter>
<name>TARGET FPM</name>
<debug>false</debug>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>0</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/target-fpm-alt</property>
2019-10-14 16:48:35 +00:00
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
</condition>
<property>/it-autoflight/input/vs</property>
</input>
<input>
<condition>
<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>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/target-fpm-flch</property>
2019-10-14 16:48:35 +00:00
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>6</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/target-fpm-land-fd</property>
2019-10-14 16:48:35 +00:00
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>5</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/target-fpm-fpa-raw</property>
2019-10-14 16:48:35 +00:00
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>2</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/nav-rate-of-climb-fpm</property>
2019-10-14 16:48:35 +00:00
</input>
<output>/it-autoflight/internal/target-common-fpm</output>
</filter>
<pid-controller>
2020-07-08 20:14:55 +00:00
<name>IT-CONTROLLER: FPM Hold</name>
2019-10-14 16:48:35 +00:00
<debug>false</debug>
<enable>
<condition>
<and>
2020-07-08 20:14:55 +00:00
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
2019-10-14 16:48:35 +00:00
<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>/it-autoflight/internal/vert-speed-fpm</input>
<reference>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</equals>
</condition>
<property>/it-autoflight/internal/vs</property>
</reference>
<reference>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>5</value>
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/target-fpm-fpa</property>
2019-10-14 16:48:35 +00:00
</reference>
<reference>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
2020-07-08 20:14:55 +00:00
<value>6</value>
2019-10-14 16:48:35 +00:00
</equals>
</condition>
2020-07-08 20:14:55 +00:00
<property>/it-autoflight/internal/target-fpm-land</property>
2019-10-14 16:48:35 +00:00
</reference>
2020-07-08 20:14:55 +00:00
<reference>/it-autoflight/internal/target-common-fpm</reference>
2019-10-14 16:48:35 +00:00
<output>/it-autoflight/internal/target-pitch-deg</output>
<config>
<Kp>
<condition>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>6</value>
</not-equals>
</condition>
<expression>
<table>
<property>/fdm/jsbsim/velocities/vc-kts</property>
<entry><ind>140</ind><dep>0.0029</dep></entry>
<entry><ind>360</ind><dep>0.0009</dep></entry>
</table>
</expression>
</Kp>
<Kp>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>6</value>
</equals>
</condition>
<value>0.0055</value>
</Kp>
<Ti>2.5</Ti>
<Td>0.0001</Td>
<u_min>
<condition>
<equals>
2019-10-14 16:48:35 +00:00
<property>/it-autoflight/output/vert</property>
<value>6</value>
</equals>
2019-10-14 16:48:35 +00:00
</condition>
<value>0</value>
</u_min>
<u_min>
2019-10-14 16:48:35 +00:00
<expression>
<max>
<dif>
<property>/orientation/pitch-deg</property>
<value>5</value>
</dif>
2020-07-08 20:14:55 +00:00
<value>-15</value>
2019-10-14 16:48:35 +00:00
</max>
</expression>
</u_min>
<u_max>
<condition>
<or>
2019-10-14 16:48:35 +00:00
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
2019-10-14 16:48:35 +00:00
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
2019-10-14 16:48:35 +00:00
</equals>
</or>
</condition>
<value>10</value>
</u_max>
<u_max>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>7</value>
</equals>
2019-10-14 16:48:35 +00:00
</condition>
<expression>
<min>
<sum>
<property>/orientation/pitch-deg</property>
<value>5</value>
</sum>
<value>18</value>
2019-10-14 16:48:35 +00:00
</min>
</expression>
</u_max>
<u_max>
<expression>
<min>
<sum>
<property>/orientation/pitch-deg</property>
<value>5</value>
</sum>
<value>30</value>
</min>
</expression>
2019-10-14 16:48:35 +00:00
</u_max>
</config>
</pid-controller>
<filter>
2020-07-08 20:14:55 +00:00
<name>System Command: Pitch Target Inactive Sync</name>
2019-10-14 16:48:35 +00:00
<debug>false</debug>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
2020-07-08 20:14:55 +00:00
<not>
<and>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</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>
</not>
2019-10-14 16:48:35 +00:00
</condition>
</enable>
<input>/orientation/pitch-deg</input>
<output>/it-autoflight/internal/target-pitch-deg</output>
<min>-15</min>
<max>30</max>
</filter>
<filter>
2020-07-08 20:14:55 +00:00
<name>System Command: Pitch Rate Target</name>
2019-10-14 16:48:35 +00:00
<debug>false</debug>
<type>gain</type>
2020-07-08 20:14:55 +00:00
<gain>0.125</gain>
2019-10-14 16:48:35 +00:00
<input>/orientation/pitch-deg</input>
<reference>/it-autoflight/internal/target-pitch-deg</reference>
<output>/fdm/jsbsim/fbw/fmgc/pitch-cmd</output> <!-- Inputs to the FBW Pitch -->
<min>-0.3</min>
<max>0.3</max>
</filter>
</PropertyList>