1
0
Fork 0
A320-family/Systems/fmgc-roll-yaw.xml
2022-12-31 12:56:08 -05:00

221 lines
5.3 KiB
XML

<?xml version="1.0"?>
<!-- IT-AUTOFLIGHT -->
<!-- Copyright (c) 2023 Josh Davidson (Octal450) -->
<PropertyList>
<!-- Roll Axis -->
<filter>
<name>IT-CONTROLLER: Heading/LNAV</name>
<type>gain</type>
<gain>
<expression>
<table>
<property>/velocities/airspeed-kt</property>
<entry><ind>140</ind><dep>1.6</dep></entry>
<entry><ind>360</ind><dep>2.6</dep></entry>
</table>
</expression>
</gain>
<enable>
<condition>
<and>
<property>/it-autoflight/output/apfd-on</property>
<or>
<equals>
<property>/it-autoflight/output/lat</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/lat</property>
<value>1</value>
</equals>
</or>
</and>
</condition>
</enable>
<input>/it-autoflight/internal/heading-error-deg</input>
<reference>0</reference>
<output>/it-autoflight/internal/target-roll-deg</output>
<min>
<property>/it-autoflight/internal/bank-limit</property>
<scale>-1.0</scale>
</min>
<max>/it-autoflight/internal/bank-limit</max>
</filter>
<filter>
<name>IT-CONTROLLER: VOR/LOC</name>
<type>gain</type>
<gain>
<expression>
<table>
<property>/velocities/airspeed-kt</property>
<entry><ind>140</ind><dep>1.6</dep></entry>
<entry><ind>360</ind><dep>2.6</dep></entry>
</table>
</expression>
</gain>
<enable>
<condition>
<and>
<property>/it-autoflight/output/apfd-on</property>
<equals>
<property>/it-autoflight/output/lat</property>
<value>2</value>
</equals>
</and>
</condition>
</enable>
<input>/it-autoflight/internal/nav-heading-error-deg</input>
<reference>0</reference>
<output>/it-autoflight/internal/target-roll-deg</output>
<min>
<property>/it-autoflight/internal/bank-limit</property>
<scale>-1.0</scale>
</min>
<max>/it-autoflight/internal/bank-limit</max>
</filter>
<filter>
<name>IT-CONTROLLER: Align/Rollout/Takeoff</name>
<type>gain</type>
<gain>1.0</gain>
<enable>
<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>
</enable>
<input>0</input>
<output>/it-autoflight/internal/target-roll-deg</output>
</filter>
<filter>
<name>System Command: Roll Target Inactive Sync</name>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<or>
<not><property>/it-autoflight/output/apfd-on</property></not>
<equals>
<property>/it-autoflight/output/lat</property>
<value>9</value>
</equals>
</or>
</condition>
</enable>
<input>/orientation/roll-deg</input>
<output>/it-autoflight/internal/target-roll-deg</output>
<min>
<property>/it-autoflight/internal/bank-limit</property>
<scale>-1.0</scale>
</min>
<max>/it-autoflight/internal/bank-limit</max>
</filter>
<filter>
<name>System Command: Target Roll Filter</name>
<type>noise-spike</type>
<input>/it-autoflight/internal/target-roll-deg</input>
<output>/it-autoflight/internal/target-roll</output>
<max-rate-of-change>
<condition>
<or>
<not><property>/it-autoflight/output/apfd-on</property></not>
<equals>
<property>/it-autoflight/output/lat</property>
<value>9</value>
</equals>
</or>
</condition>
<value>1000</value>
</max-rate-of-change>
<max-rate-of-change>
<condition>
<not><property>/it-autoflight/output/ap-on</property></not>
</condition>
<value>15</value>
</max-rate-of-change>
<max-rate-of-change>6</max-rate-of-change>
</filter>
<filter>
<name>System Command: Roll Rate Target</name>
<type>gain</type>
<gain>-0.06</gain>
<input>/orientation/roll-deg</input>
<reference>/it-autoflight/internal/target-roll</reference>
<output>/fdm/jsbsim/fbw/fmgc/roll-cmd</output> <!-- Inputs to the FBW Roll -->
<min>-0.33</min>
<max>0.33</max>
</filter>
<!-- Yaw Axis -->
<pi-simple-controller>
<name>IT-CONTROLLER: Yaw VOR/LOC</name>
<enable>
<condition>
<equals>
<property>/it-autoflight/output/lat</property>
<value>4</value>
</equals>
</condition>
</enable>
<input>/it-autoflight/internal/nav-heading-error-deg</input>
<reference>0</reference>
<output>/it-autoflight/internal/rudder-cmd</output>
<config>
<Kp>
<condition>
<and>
<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>-0.05</value>
</Kp>
<Kp>-0.02</Kp>
<Ki>0</Ki>
</config>
<min>-0.15</min>
<max>0.15</max>
</pi-simple-controller>
<filter>
<name>System Command: Rudder</name>
<type>noise-spike</type>
<input>
<condition>
<and>
<property>/it-autoflight/output/ap-on</property>
<equals>
<property>/it-autoflight/output/lat</property>
<value>4</value>
</equals>
</and>
</condition>
<property>/it-autoflight/internal/rudder-cmd</property>
</input>
<input>0</input>
<output>/fdm/jsbsim/fbw/fmgc/yaw-cmd</output> <!-- Inputs to the FBW Yaw -->
<max-rate-of-change>1.2</max-rate-of-change>
</filter>
</PropertyList>