1
0
Fork 0
A320-family/Systems/fmgc-drivers.xml
2022-06-29 11:59:20 -04:00

955 lines
22 KiB
XML

<?xml version="1.0"?>
<!-- IT-AUTOFLIGHT -->
<!-- Copyright (c) 2020 Joshua Davidson (Octal450) -->
<PropertyList>
<!-- Logic -->
<logic>
<input>
<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>
</input>
<output>/it-autoflight/output/apfd-on</output>
</logic>
<logic>
<input>
<or>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
</input>
<output>/it-autoflight/output/ap-on</output>
</logic>
<!-- Predictors -->
<predict-simple>
<name>IAS 5 Second Predictor</name>
<input>/instrumentation/airspeed-indicator/indicated-speed-kt</input>
<output>/it-autoflight/internal/kts-predicted-5</output>
<seconds>5</seconds>
<filter-gain>0</filter-gain>
</predict-simple>
<predict-simple>
<name>MACH 5 Second Predictor</name>
<input>/instrumentation/airspeed-indicator/indicated-mach</input>
<output>/it-autoflight/internal/mach-predicted-5</output>
<seconds>5</seconds>
<filter-gain>0</filter-gain>
</predict-simple>
<predict-simple>
<name>IAS 15 Second Predictor</name>
<input>/instrumentation/airspeed-indicator/indicated-speed-kt</input>
<output>/it-autoflight/internal/kts-predicted-15</output>
<seconds>15</seconds>
<filter-gain>0</filter-gain>
</predict-simple>
<predict-simple>
<name>MACH 15 Second Predictor</name>
<input>/instrumentation/airspeed-indicator/indicated-mach</input>
<output>/it-autoflight/internal/mach-predicted-15</output>
<seconds>15</seconds>
<filter-gain>0</filter-gain>
</predict-simple>
<!-- Autopilot Helpers/Calculators -->
<filter>
<name>Auto Bank Limit</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<table>
<property>/velocities/mach</property>
<entry><ind>0.55</ind><dep>25</dep></entry>
<entry><ind>0.80</ind><dep>20</dep></entry>
<entry><ind>0.90</ind><dep>10</dep></entry>
</table>
</expression>
</input>
<output>/it-autoflight/internal/bank-limit</output>
</filter>
<filter>
<name>FMGC Managed Knots</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<product>
<value>266</value>
<table>
<property>/FMGC/internal/cost-index</property>
<entry><ind> 0</ind><dep>1.00</dep></entry>
<entry><ind>120</ind><dep>1.19</dep></entry>
</table>
</product>
</expression>
</input>
<output>/FMGC/internal/mng-alt-spd</output>
<min>250</min>
<max>345</max>
</filter>
<filter>
<name>FMGC Managed Mach</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<product>
<table>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
<entry><ind>20000</ind><dep>0.625</dep></entry>
<entry><ind>42000</ind><dep>0.805</dep></entry>
</table>
<table>
<property>/FMGC/internal/cost-index</property>
<entry><ind> 0</ind><dep>0.97</dep></entry>
<entry><ind>120</ind><dep>1.05</dep></entry>
</table>
</product>
</expression>
</input>
<output>/FMGC/internal/mng-alt-mach</output>
<min>0.500</min>
<max>0.815</max>
</filter>
<filter>
<name>FMGC Target Knots PFD</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>0</value>
</equals>
</condition>
<property>/it-autoflight/input/kts</property>
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>1</value>
</equals>
</condition>
<expression>
<product>
<div>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
</div>
<property>/it-autoflight/input/mach</property>
</product>
</expression>
</input>
<output>/FMGC/internal/target-ias-pfd</output>
</filter>
<filter>
<name>Knots Sync</name>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>1</value>
</equals>
</condition>
</enable>
<input>
<expression>
<floor>
<sum>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
<value>0.5</value>
</sum>
</floor>
</expression>
</input>
<output>/it-autoflight/input/kts</output>
</filter>
<filter>
<name>Mach Sync</name>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>0</value>
</equals>
</condition>
</enable>
<input>
<expression>
<div>
<floor>
<sum>
<product>
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
<value>1000</value>
</product>
<value>0.5</value>
</sum>
</floor>
<value>1000</value>
</div>
</expression>
</input>
<output>/it-autoflight/input/mach</output>
</filter>
<filter>
<name>Knots Rate</name>
<type>derivative</type>
<input>/velocities/airspeed-kt</input>
<output>/it-autoflight/internal/kts-rate-raw</output>
<filter-time>1.0</filter-time>
</filter>
<filter>
<name>Knots Rate Lag</name>
<type>exponential</type>
<input>
<condition>
<less-than>
<property>/velocities/airspeed-kt</property>
<value>1</value>
</less-than>
</condition>
<value>0</value>
</input>
<input>/it-autoflight/internal/kts-rate-raw</input>
<output>/it-autoflight/internal/kts-rate</output>
<filter-time>0.08</filter-time>
</filter>
<filter>
<name>Flch Knots Rate Command</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<equals>
<property>/it-autoflight/mode/vert</property>
<value>T/O CLB</value>
</equals>
</condition>
<expression>
<product>
<difference>
<sum>
<property>/it-autoflight/settings/togaspd</property>
<value>10</value>
</sum>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
</difference>
<value>0.08</value>
</product>
</expression>
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>1</value>
</equals>
</condition>
<expression>
<product>
<difference>
<max>
<min>
<property>/it-autoflight/input/mach</property>
<property>/FMGC/internal/vmax-mach</property>
</min>
<property>/FMGC/internal/vls-mach</property>
</max>
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
</difference>
<value>80</value>
</product>
</expression>
</input>
<input>
<expression>
<product>
<difference>
<max>
<min>
<property>/it-autoflight/input/kts</property>
<property>/FMGC/internal/vmax</property>
</min>
<property>/FMGC/internal/vls</property>
</max>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
</difference>
<value>0.08</value>
</product>
</expression>
</input>
<output>/it-autoflight/internal/flch-kts-error-cmd</output>
<min>
<condition>
<equals>
<property>/it-autoflight/output/vert</property>
<value>7</value>
</equals>
</condition>
<value>-0.8</value>
</min>
<min>-1.2</min>
<max>1.2</max>
</filter>
<filter>
<name>Flch Knots Rate Filter</name>
<type>noise-spike</type>
<feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to>
<input>/it-autoflight/internal/flch-kts-error-cmd</input>
<output>/it-autoflight/internal/flch-kts-error</output>
<max-rate-of-change>
<condition>
<and>
<or>
<equals>
<property>/it-autoflight/output/vert</property>
<value>4</value>
</equals>
<equals>
<property>/it-autoflight/output/vert</property>
<value>7</value>
</equals>
</or>
<property>/it-autoflight/output/apfd-on</property>
<equals>
<property>/gear/gear[1]/wow</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>0</value>
</equals>
</and>
</condition>
<value>2.5</value>
</max-rate-of-change>
<max-rate-of-change>100</max-rate-of-change>
</filter>
<filter>
<name>Heading Deg</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<property>/instrumentation/efis/mfd/true-north</property>
</condition>
<property>/orientation/heading-deg</property>
</input>
<input>/orientation/heading-magnetic-deg</input>
<reference>0</reference>
<output>/it-autoflight/internal/heading-deg</output>
<output>/instrumentation/pfd/heading-deg</output>
</filter>
<filter>
<name>Track Deg</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<and>
<property>/instrumentation/efis/mfd/true-north</property>
<greater-than-equals>
<property>/velocities/groundspeed-kt</property>
<value>1</value>
</greater-than-equals>
</and>
</condition>
<property>/orientation/track-deg</property>
</input>
<input>
<condition>
<and>
<not><property>/instrumentation/efis/mfd/true-north</property></not>
<greater-than-equals>
<property>/velocities/groundspeed-kt</property>
<value>1</value>
</greater-than-equals>
</and>
</condition>
<property>/orientation/track-magnetic-deg</property>
</input>
<input>/it-autoflight/internal/heading-deg</input>
<reference>0</reference>
<output>/it-autoflight/internal/track-deg</output>
<output>/instrumentation/pfd/track-deg</output>
</filter>
<filter>
<name>Drift Angle</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<less-than>
<property>/velocities/groundspeed-kt</property>
<value>1</value>
</less-than>
</condition>
<property>/orientation/heading-magnetic-deg</property>
</input>
<input>/orientation/track-magnetic-deg</input>
<reference>/orientation/heading-magnetic-deg</reference>
<output>/it-autoflight/internal/drift-angle-deg</output>
<period>
<min>-180</min>
<max>180</max>
</period>
</filter>
<filter>
<name>Get Back on Magenta</name>
<type>gain</type>
<gain>
<expression>
<table>
<property>/fdm/jsbsim/velocities/vc-kts</property>
<entry><ind>140</ind><dep>50</dep></entry>
<entry><ind>360</ind><dep>20</dep></entry>
</table>
</expression>
</gain>
<input>/instrumentation/gps/wp/wp[1]/course-error-nm</input>
<output>/it-autoflight/internal/course-error-deg</output>
<min>-45</min>
<max>45</max>
</filter>
<filter>
<name>Heading Error Deg</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<and>
<equals>
<property>/it-autoflight/output/lat</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/input/trk</property>
<value>0</value>
</equals>
</and>
</condition>
<property>/it-autoflight/input/hdg</property>
<offset>
<property>/it-autoflight/internal/heading-deg</property>
<scale>-1.0</scale>
</offset>
</input>
<input>
<condition>
<and>
<equals>
<property>/it-autoflight/output/lat</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/input/trk</property>
<value>1</value>
</equals>
</and>
</condition>
<property>/it-autoflight/input/hdg</property>
<offset>
<property>/it-autoflight/internal/track-deg</property>
<scale>-1.0</scale>
</offset>
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/output/lat</property>
<value>1</value>
</equals>
</condition>
<expression>
<sum>
<property>/instrumentation/gps/wp/leg-true-course-deg</property>
<property>/it-autoflight/internal/course-error-deg</property>
<product>
<property>/it-autoflight/internal/drift-angle-deg</property>
<value>-1.0</value>
</product>
<product>
<property>/orientation/heading-deg</property>
<value>-1.0</value>
</product>
</sum>
</expression>
</input>
<input>0</input>
<output>/it-autoflight/internal/heading-error-deg</output>
<period>
<min>-180</min>
<max>180</max>
</period>
</filter>
<filter>
<name>Vertical Speed Sync</name>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<not-equals>
<property>/it-autoflight/output/vert</property>
<value>1</value>
</not-equals>
</condition>
</enable>
<input>
<expression>
<floor>
<sum>
<property>/it-autoflight/internal/vert-speed-fpm</property>
<value>0.5</value>
</sum>
</floor>
</expression>
</input>
<output>/it-autoflight/input/vs</output>
</filter>
<filter>
<name>VS Abs</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs>0.02</update-interval-secs>
<input>
<expression>
<abs>
<property>/it-autoflight/input/vs</property>
</abs>
</expression>
</input>
<output>/it-autoflight/input/vs-abs</output>
</filter>
<filter>
<name>FPA Abs</name>
<type>gain</type>
<gain>1.0</gain>
<update-interval-secs>0.02</update-interval-secs>
<input>
<expression>
<abs>
<property>/it-autoflight/input/fpa</property>
</abs>
</expression>
</input>
<output>/it-autoflight/input/fpa-abs</output>
</filter>
<filter>
<name>Nav Error Deg</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<property>/instrumentation/nav[0]/radials/target-auto-hdg-deg</property>
<offset>
<property>/orientation/heading-deg</property>
<scale>-1.0</scale>
</offset>
</input>
<output>/it-autoflight/internal/nav-heading-error-deg</output>
<period>
<min>-180</min>
<max>180</max>
</period>
</filter>
<filter>
<name>Nav Course Error Deg</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<property>/instrumentation/nav[0]/radials/selected-deg</property>
<offset>
<property>/orientation/track-magnetic-deg</property>
<scale>-1.0</scale>
</offset>
</input>
<output>/it-autoflight/internal/nav-course-track-error-deg</output>
<period>
<min>-180</min>
<max>180</max>
</period>
</filter>
<filter>
<name>Internal Vertical Speed</name>
<type>gain</type>
<gain>1.0</gain>
<input>/instrumentation/gps/indicated-vertical-speed</input>
<output>/it-autoflight/internal/vert-speed-fpm</output>
</filter>
<filter>
<name>Nav G/S FPM Calc</name>
<type>gain</type>
<gain>1.0</gain>
<input> <!-- Under 110ft glideslope data starts to become unusable -->
<condition>
<and>
<or>
<equals>
<property>/it-autoflight/output/vert</property>
<value>2</value>
</equals>
<equals>
<property>/it-autoflight/output/vert</property>
<value>6</value>
</equals>
</or>
<less-than-equals>
<property>/position/gear-agl-ft</property>
<value>110</value>
</less-than-equals>
</and>
</condition>
<expression>
<min>
<property>/it-autoflight/internal/nav-rate-of-climb-fpm</property>
<value>-500</value>
</min>
</expression>
</input>
<input>/instrumentation/nav[0]/gs-rate-of-climb-fpm</input>
<output>/it-autoflight/internal/nav-rate-of-climb-fpm</output>
<min>
<condition>
<not-equals>
<property>/options/steep-ils</property>
<value>1</value>
</not-equals>
</condition>
<value>-1200</value>
</min>
<min>
<condition>
<equals>
<property>/options/steep-ils</property>
<value>1</value>
</equals>
</condition>
<value>-2200</value>
</min>
<max>0</max>
</filter>
<filter>
<name>Heading Predictor Stage 1</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<equals>
<property>/it-autoflight/input/trk</property>
<value>0</value>
</equals>
</condition>
<expression>
<sum>
<div>
<property>/orientation/roll-deg</property>
<table>
<property>/velocities/airspeed-kt</property>
<entry><ind>140</ind><dep>1.8</dep></entry>
<entry><ind>360</ind><dep>2.8</dep></entry>
</table>
</div>
<property>/it-autoflight/internal/heading-deg</property>
</sum>
</expression>
</input>
<input>
<condition>
<equals>
<property>/it-autoflight/input/trk</property>
<value>1</value>
</equals>
</condition>
<expression>
<sum>
<div>
<property>/orientation/roll-deg</property>
<table>
<property>/velocities/airspeed-kt</property>
<entry><ind>140</ind><dep>1.8</dep></entry>
<entry><ind>360</ind><dep>2.8</dep></entry>
</table>
</div>
<property>/it-autoflight/internal/track-deg</property>
</sum>
</expression>
</input>
<output>/it-autoflight/internal/heading-predicted-cmd</output>
</filter>
<filter>
<name>Heading Predictor Stage 2</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<greater-than-equals>
<property>/it-autoflight/internal/heading-predicted-cmd</property>
<value>360.5</value>
</greater-than-equals>
</condition>
<expression>
<dif>
<property>/it-autoflight/internal/heading-predicted-cmd</property>
<value>360</value>
</dif>
</expression>
</input>
<input>
<condition>
<less-than>
<property>/it-autoflight/internal/heading-predicted-cmd</property>
<value>0.5</value>
</less-than>
</condition>
<expression>
<sum>
<property>/it-autoflight/internal/heading-predicted-cmd</property>
<value>360</value>
</sum>
</expression>
</input>
<input>/it-autoflight/internal/heading-predicted-cmd</input>
<output>/it-autoflight/internal/heading-predicted</output>
</filter>
<filter>
<name>Altitude Predictor</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<sum>
<div>
<property>/it-autoflight/internal/vert-speed-fpm</property>
<value>5</value>
</div>
<property>/instrumentation/altimeter/indicated-altitude-ft</property>
</sum>
</expression>
</input>
<output>/it-autoflight/internal/altitude-predicted</output>
</filter>
<filter>
<name>Internal FPA Computer</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<expression>
<dif>
<property>/orientation/pitch-deg</property>
<property>/orientation/alpha-deg</property>
</dif>
</expression>
</input>
<output>/it-autoflight/internal/fpa</output>
</filter>
<!-- Flight Director -->
<filter>
<name>FD Target Roll Filter</name>
<type>noise-spike</type>
<input>/it-autoflight/internal/target-roll-deg</input>
<output>/it-autoflight/internal/target-roll-fd</output>
<max-rate-of-change>
<condition>
<and>
<not-equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</not-equals>
<not-equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</not-equals>
</and>
</condition>
<value>1000</value>
</max-rate-of-change>
<max-rate-of-change>15</max-rate-of-change>
</filter>
<filter>
<name>FD Roll</name>
<type>noise-spike</type>
<input>
<expression>
<difference>
<property>/it-autoflight/internal/target-roll-fd</property>
<property>/orientation/roll-deg</property>
</difference>
</expression>
</input>
<output>/it-autoflight/fd/roll-bar</output>
<min>-30</min>
<max>30</max>
<max-rate-of-change>20</max-rate-of-change>
</filter>
<filter>
<name>FD Pitch Takeoff</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<equals>
<property>/it-autoflight/mode/vert</property>
<value>T/O CLB</value>
</equals>
</condition>
<expression>
<product>
<table>
<property>/orientation/pitch-deg</property>
<entry><ind> 1</ind><dep>4.8</dep></entry>
<entry><ind>10</ind><dep>0.0</dep></entry>
</table>
<table>
<property>/position/gear-agl-ft</property>
<entry><ind> 5</ind><dep>1</dep></entry>
<entry><ind>30</ind><dep>0</dep></entry>
</table>
</product>
</expression>
</input>
<input>0</input>
<output>/it-autoflight/fd/pitch-bar-takeoff</output>
</filter>
<filter>
<name>FD Pitch</name>
<type>noise-spike</type>
<input>
<expression>
<sum>
<rad2deg>
<asin>
<div>
<difference>
<property>/it-autoflight/internal/target-common-fpm</property>
<property>/it-autoflight/internal/vert-speed-fpm</property>
</difference>
<product>
<max>
<property>/instrumentation/airspeed-indicator[0]/true-speed-kt</property>
<value>100</value>
</max>
<value>151.90288713910761</value> <!-- FPM to Knot * 1.5 -->
</product>
</div>
</asin>
</rad2deg>
<property>/it-autoflight/fd/pitch-bar-takeoff</property>
</sum>
</expression>
</input>
<output>/it-autoflight/fd/pitch-bar</output>
<min>-15</min>
<max>15</max>
<max-rate-of-change>10</max-rate-of-change>
</filter>
<filter>
<name>Accel Altitude</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<or>
<and>
<equals>
<property>/engines/engine[0]/state</property>
<value>3</value>
</equals>
<not>
<equals>
<property>/engines/engine[1]/state</property>
<value>3</value>
</equals>
</not>
</and>
<and>
<not>
<equals>
<property>/engines/engine[0]/state</property>
<value>3</value>
</equals>
</not>
<equals>
<property>/engines/engine[1]/state</property>
<value>3</value>
</equals>
</and>
</or>
</condition>
<expression>
<property>/FMGC/internal/eng-out-reduc</property>
</expression>
</input>
<input>
<expression>
<property>/FMGC/internal/accel-agl-ft</property>
</expression>
</input>
<output>/it-autoflight/settings/accel-ft</output>
</filter>
</PropertyList>