This repository has been archived on 2021-09-26. You can view files and clone it, but cannot push or open issues or pull requests.
IDG-A32X/Systems/fmgc-thrust.xml
2017-12-02 20:40:00 -05:00

545 lines
13 KiB
XML

<?xml version="1.0"?>
<!--
##############################################
# Copyright (c) Joshua Davidson (it0uchpods) #
##############################################
-->
<PropertyList>
<!-- =============================================================== -->
<!-- Thrust Modes -->
<!-- =============================================================== -->
<filter>
<name>KTS INPUT FILTER</name>
<debug>false</debug>
<feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to>
<input>
<property>/it-autoflight/input/spd-kts</property>
</input>
<output>/it-autoflight/internal/kts</output>
<type>noise-spike</type>
<max-rate-of-change>
<condition>
<or>
<not-equals>
<property>/it-autoflight/output/thr-mode</property>
<value>0</value>
</not-equals>
<equals>
<property>/it-autoflight/output/athr</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
</equals>
</or>
</condition>
<value>200</value>
</max-rate-of-change>
<max-rate-of-change>
<condition>
<and>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
<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>10</value>
</max-rate-of-change>
</filter>
<filter>
<name>MACH INPUT FILTER</name>
<debug>false</debug>
<feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to>
<input>
<property>/it-autoflight/input/spd-mach</property>
</input>
<output>/it-autoflight/internal/mach</output>
<type>noise-spike</type>
<max-rate-of-change>
<condition>
<or>
<not-equals>
<property>/it-autoflight/output/thr-mode</property>
<value>0</value>
</not-equals>
<equals>
<property>/it-autoflight/output/athr</property>
<value>0</value>
</equals>
<equals>
<property>/gear/gear[1]/wow</property>
<value>1</value>
</equals>
<equals>
<property>/gear/gear[2]/wow</property>
<value>1</value>
</equals>
</or>
</condition>
<value>2</value>
</max-rate-of-change>
<max-rate-of-change>
<condition>
<and>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
<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.1</value>
</max-rate-of-change>
</filter>
<filter>
<name>Throttle Comparator</name>
<type>gain</type>
<gain>1.0</gain>
<input>
<condition>
<greater-than-equals>
<property>/controls/engines/engine[0]/throttle-man</property>
<property>/controls/engines/engine[1]/throttle-man</property>
</greater-than-equals>
</condition>
<property>/controls/engines/engine[0]/throttle-man</property>
</input>
<input>
<condition>
<less-than>
<property>/controls/engines/engine[0]/throttle-man</property>
<property>/controls/engines/engine[1]/throttle-man</property>
</less-than>
</condition>
<property>/controls/engines/engine[1]/throttle-man</property>
</input>
<output>/controls/engines/throttle-pid-max</output>
</filter>
<pid-controller>
<name>IT-CONTROLLER: IAS THRUST</name>
<debug>false</debug>
<enable>
<condition>
<and>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>0</value>
</equals>
<or>
<and>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
</and>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>0</value>
</equals>
</or>
<or>
<equals>
<property>/systems/thrust/state1</property>
<value>MAN</value>
</equals>
<equals>
<property>/systems/thrust/state1</property>
<value>CL</value>
</equals>
<equals>
<property>/systems/thrust/state2</property>
<value>MAN</value>
</equals>
<equals>
<property>/systems/thrust/state2</property>
<value>CL</value>
</equals>
</or>
</and>
</condition>
</enable>
<input>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
</input>
<reference>
<property>/it-autoflight/internal/kts</property>
</reference>
<output>
<property>/controls/engines/throttle-cmd-pid</property>
</output>
<config>
<Kp>0.055</Kp>
<beta>1.0</beta>
<alpha>0.1</alpha>
<gamma>0.0</gamma>
<Ti>9.0</Ti>
<Td>0.00001</Td>
<u_min>
<property>/controls/engines/idle-limit</property>
</u_min>
<u_max>
<property>/controls/engines/throttle-pid-max</property>
</u_max>
</config>
</pid-controller>
<pid-controller>
<name>IT-CONTROLLER: MACH THRUST</name>
<debug>false</debug>
<enable>
<condition>
<and>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>1</value>
</equals>
<or>
<and>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>0</value>
</equals>
</and>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>0</value>
</equals>
</or>
<or>
<equals>
<property>/systems/thrust/state1</property>
<value>MAN</value>
</equals>
<equals>
<property>/systems/thrust/state1</property>
<value>CL</value>
</equals>
<equals>
<property>/systems/thrust/state2</property>
<value>MAN</value>
</equals>
<equals>
<property>/systems/thrust/state2</property>
<value>CL</value>
</equals>
</or>
</and>
</condition>
</enable>
<input>
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
<scale>1000.0</scale>
</input>
<reference>
<property>/it-autoflight/internal/mach</property>
<scale>1000.0</scale>
</reference>
<output>
<property>/controls/engines/throttle-cmd-pid</property>
</output>
<config>
<Kp>0.055</Kp>
<beta>1.0</beta>
<alpha>0.1</alpha>
<gamma>0.0</gamma>
<Ti>9.0</Ti>
<Td>0.00001</Td>
<u_min>
<property>/controls/engines/idle-limit</property>
</u_min>
<u_max>
<property>/controls/engines/throttle-pid-max</property>
</u_max>
</config>
</pid-controller>
<filter>
<name>IT-CONTROLLER: IDLE THRUST</name>
<debug>false</debug>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<and>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
<or>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>1</value>
</equals>
<or>
<equals>
<property>/systems/thrust/state1</property>
<value>MAN</value>
</equals>
<equals>
<property>/systems/thrust/state1</property>
<value>CL</value>
</equals>
<equals>
<property>/systems/thrust/state2</property>
<value>MAN</value>
</equals>
<equals>
<property>/systems/thrust/state2</property>
<value>CL</value>
</equals>
</or>
</and>
</condition>
</enable>
<input>
<condition>
<equals>
<property>/it-autoflight/mode/thr</property>
<value>RETARD</value>
</equals>
</condition>
<value>0.0</value>
</input>
<input>
<property>/controls/engines/idle-limit</property>
</input>
<output>
<property>/controls/engines/throttle-cmd-pid</property>
</output>
</filter>
<filter>
<name>IT-CONTROLLER: LIMIT THRUST</name>
<debug>false</debug>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<and>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
<or>
<equals>
<property>/it-autoflight/output/fd1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/fd2</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap1</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/ap2</property>
<value>1</value>
</equals>
</or>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>2</value>
</equals>
<or>
<equals>
<property>/systems/thrust/state1</property>
<value>MAN</value>
</equals>
<equals>
<property>/systems/thrust/state1</property>
<value>CL</value>
</equals>
<equals>
<property>/systems/thrust/state2</property>
<value>MAN</value>
</equals>
<equals>
<property>/systems/thrust/state2</property>
<value>CL</value>
</equals>
</or>
</and>
</condition>
</enable>
<input>
<property>/controls/engines/throttle-pid-max</property>
</input>
<output>
<property>/controls/engines/throttle-cmd-pid</property>
</output>
</filter>
<filter>
<name>IT-CONTROLLER: FEEDBACK IF DISABLED</name>
<debug>false</debug>
<type>gain</type>
<gain>1.0</gain>
<enable>
<condition>
<or>
<equals>
<property>/it-autoflight/output/athr</property>
<value>0</value>
</equals>
<and>
<not-equals>
<property>/systems/thrust/state1</property>
<value>MAN</value>
</not-equals>
<not-equals>
<property>/systems/thrust/state1</property>
<value>CL</value>
</not-equals>
<not-equals>
<property>/systems/thrust/state2</property>
<value>MAN</value>
</not-equals>
<not-equals>
<property>/systems/thrust/state2</property>
<value>CL</value>
</not-equals>
</and>
</or>
</condition>
</enable>
<input>
<condition>
<and>
<not-equals>
<property>/systems/thrust/state1</property>
<value>IDLE</value>
</not-equals>
<not-equals>
<property>/systems/thrust/state2</property>
<value>IDLE</value>
</not-equals>
</and>
</condition>
<value>1</value>
</input>
<input>0</input>
<output>
<property>/controls/engines/throttle-cmd-pid</property>
</output>
<min>
<property>/controls/engines/idle-limit</property>
</min>
<max>
<property>/controls/engines/throttle-pid-max</property>
</max>
</filter>
<!-- Engine 1 -->
<filter>
<name>Thrust Filter 1</name>
<type>gain</type>
<gain>1.0</gain>
<input>/controls/engines/throttle-cmd-pid</input>
<output>/controls/engines/engine[0]/throttle-cmd</output>
<max>
<property>/controls/engines/engine[0]/throttle-man</property>
</max>
</filter>
<!-- Engine 2 -->
<filter>
<name>Thrust Filter 2</name>
<type>gain</type>
<gain>1.0</gain>
<input>/controls/engines/throttle-cmd-pid</input>
<output>/controls/engines/engine[1]/throttle-cmd</output>
<max>
<property>/controls/engines/engine[1]/throttle-man</property>
</max>
</filter>
</PropertyList>