Moved to custom IT-AUTOFLIGHT Fork in FMGC

This commit is contained in:
Joshua Davidson 2017-06-03 11:53:36 -04:00
parent a91bb25c1d
commit 656cee3f48
8 changed files with 1113 additions and 447 deletions

View file

@ -67,7 +67,7 @@
<path>Aircraft/A320Family/Systems/it-fbw-b.xml</path>
</autopilot>
<autopilot n="3">
<path>Aircraft/A320Family/Systems/it-autoflight.xml</path>
<path>Aircraft/A320Family/Systems/fmgc-autofight.xml</path>
</autopilot>
<autopilot n="4">
<path>Aircraft/A320Family/Systems/custom-autothrust.xml</path>
@ -129,7 +129,7 @@
<menu n="3">
<item>
<name>autopilot</name>
<label>IT-AUTOFLIGHT System</label>
<label>Autopilot</label>
<binding>
<command>nasal</command>
<script>
@ -751,9 +751,6 @@
<fbw>
<file>Aircraft/A320Family/Nasal/it-fbw.nas</file>
</fbw>
<itaf>
<file>Aircraft/A320Family/Nasal/it-autoflight.nas</file>
</itaf>
<fmgc>
<file>Aircraft/A320Family/Nasal/FMGC.nas</file>
</fmgc>

View file

@ -54,7 +54,7 @@ var systemsReset = func {
fmgc.FMGCinit();
mcdu1.MCDU_reset();
mcdu2.MCDU_reset();
itaf.ap_init();
fmgc.APinit();
setprop("/it-autoflight/input/fd1", 1);
setprop("/it-autoflight/input/fd2", 1);
libraries.ECAMinit();

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
# This file converts the IT-AUTOFLIGHT Mode numbers, and converts them into text strings for the Airbus Style PFD.
# Airbus PFD FMA
# Joshua Davidson (it0uchpods/411)
# Speed or Mach?

View file

@ -3,7 +3,6 @@
# V3.0.0 Build 182
# This program is 100% GPL!
print("IT-AUTOFLIGHT: Please Wait!");
setprop("/it-autoflight/internal/vert-speed-fpm", 0);
var ap_init = func {

View file

@ -153,7 +153,7 @@ setlistener("/sim/signals/fdm-initialized", func {
systems.pneu_init();
systems.hyd_init();
systems.press_init();
itaf.ap_init();
fmgc.APinit();
externalconnections.start();
fmgc.FMGCinit();
mcdu1.MCDU_init();

View file

@ -1,7 +1,5 @@
<?xml version="1.0"?>
<!-- IT-AUTOFLIGHT -->
<PropertyList>
<!-- =============================================================== -->
@ -1416,155 +1414,6 @@
<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 -->
<!-- =============================================================== -->
@ -1577,7 +1426,7 @@
<and>
<greater-than>
<property>/it-autoflight/internal/elevator-cmd</property>
<value>0.05</value>
<value>0.01</value>
</greater-than>
<or>
<equals>
@ -1621,7 +1470,7 @@
<and>
<less-than>
<property>/it-autoflight/internal/elevator-cmd</property>
<value>-0.05</value>
<value>-0.01</value>
</less-than>
<or>
<equals>
@ -1678,11 +1527,11 @@
<or>
<greater-than>
<property>/it-autoflight/internal/elevator-cmd</property>
<value>0.05</value>
<value>0.01</value>
</greater-than>
<less-than>
<property>/it-autoflight/internal/elevator-cmd</property>
<value>-0.05</value>
<value>-0.01</value>
</less-than>
</or>
</and>

View file

@ -1,281 +0,0 @@
<?xml version="1.0"?>
<!-- IT-AUTOFLIGHT: AUTOTHRUST -->
<PropertyList>
<!-- =============================================================== -->
<!-- Thrust Modes -->
<!-- =============================================================== -->
<!-- Auto throttle -->
<pid-controller>
<name>IAS THR</name>
<debug>false</debug>
<enable>
<condition>
<and>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>0</value>
</equals>
<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>/it-autoflight/output/retard</property>
<value>0</value>
</equals>
</and>
</condition>
</enable>
<input>
<property>/instrumentation/airspeed-indicator/indicated-speed-kt</property>
</input>
<reference>
<property>/it-autoflight/input/spd-kts</property>
</reference>
<output>
<property>/controls/flight/throttle-cmd</property>
</output>
<config>
<Kp>0.1</Kp>
<beta>1.0</beta>
<alpha>0.1</alpha>
<gamma>0.0</gamma>
<Ti>10.0</Ti>
<Td>0.00001</Td>
<u_min>0.0</u_min>
<u_max>0.94</u_max>
</config>
</pid-controller>
<!-- Auto throttle (Mach Hold)-->
<pid-controller>
<name>MACH THR</name>
<debug>false</debug>
<enable>
<condition>
<and>
<equals>
<property>/it-autoflight/input/kts-mach</property>
<value>1</value>
</equals>
<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>/it-autoflight/output/retard</property>
<value>0</value>
</equals>
</and>
</condition>
</enable>
<input>
<property>/instrumentation/airspeed-indicator/indicated-mach</property>
<scale>1000.0</scale>
</input>
<reference>
<property>/it-autoflight/input/spd-mach</property>
<scale>1000.0</scale>
</reference>
<output>
<property>/controls/flight/throttle-cmd</property>
</output>
<config>
<Kp>0.1</Kp>
<beta>1.0</beta>
<alpha>0.1</alpha>
<gamma>0.0</gamma>
<Ti>10.0</Ti>
<Td>0.00001</Td>
<u_min>0.0</u_min>
<u_max>0.94</u_max>
</config>
</pid-controller>
<!-- IDLE THR -->
<pid-controller>
<name>IDLE</name>
<debug>false</debug>
<enable>
<condition>
<and>
<or>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/retard</property>
<value>1</value>
</equals>
</or>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
</and>
</condition>
</enable>
<input>
<value>900</value>
</input>
<reference>
<value>0</value>
</reference>
<output>
<property>/controls/flight/throttle-cmd</property>
</output>
<config>
<Kp>0.1</Kp>
<beta>1.0</beta>
<alpha>0.1</alpha>
<gamma>0.0</gamma>
<Ti>10.0</Ti>
<Td>0.00001</Td>
<u_min>
<condition>
<equals>
<property>/it-autoflight/output/retard</property>
<value>0</value>
</equals>
</condition>
<value>0.08</value>
</u_min>
<u_min>
<condition>
<equals>
<property>/it-autoflight/output/retard</property>
<value>1</value>
</equals>
</condition>
<value>0</value>
</u_min>
<u_max>0.2</u_max>
</config>
</pid-controller>
<!-- CLB THR -->
<pid-controller>
<name>CLB</name>
<debug>false</debug>
<enable>
<condition>
<and>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>2</value>
</equals>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
<equals>
<property>/it-autoflight/output/retard</property>
<value>0</value>
</equals>
</and>
</condition>
</enable>
<input>
<value>0</value>
</input>
<reference>
<value>900</value>
</reference>
<output>
<property>/controls/flight/throttle-cmd</property>
</output>
<config>
<Kp>0.1</Kp>
<beta>1.0</beta>
<alpha>0.1</alpha>
<gamma>0.0</gamma>
<Ti>10.0</Ti>
<Td>0.00001</Td>
<u_min>0.0</u_min>
<u_max>0.95</u_max>
</config>
</pid-controller>
<filter>
<name>IT-CONTROLLER: THRUST CMD</name>
<debug>false</debug>
<feedback-if-disabled>true</feedback-if-disabled>
<initialize-to>output</initialize-to>
<enable>
<condition>
<equals>
<property>/it-autoflight/output/athr</property>
<value>1</value>
</equals>
</condition>
</enable>
<input>
<property>/controls/flight/throttle-cmd</property>
</input>
<output>
<property>/controls/engines/engine[0]/throttle</property>
<property>/controls/engines/engine[1]/throttle</property>
<property>/controls/engines/engine[2]/throttle</property>
<property>/controls/engines/engine[3]/throttle</property>
<property>/controls/engines/engine[4]/throttle</property>
<property>/controls/engines/engine[5]/throttle</property>
<property>/controls/engines/engine[6]/throttle</property>
<property>/controls/engines/engine[7]/throttle</property>
</output>
<type>noise-spike</type>
<max-rate-of-change>
<condition>
<and>
<equals>
<property>/it-autoflight/output/thr-mode</property>
<value>0</value>
</equals>
<equals>
<property>/it-autoflight/output/retard</property>
<value>0</value>
</equals>
</and>
</condition>
<value>0.20</value>
</max-rate-of-change>
<max-rate-of-change>
<condition>
<and>
<not-equals>
<property>/it-autoflight/output/thr-mode</property>
<value>0</value>
</not-equals>
<equals>
<property>/it-autoflight/output/retard</property>
<value>0</value>
</equals>
</and>
</condition>
<value>0.05</value>
</max-rate-of-change>
<max-rate-of-change>
<condition>
<equals>
<property>/it-autoflight/output/retard</property>
<value>1</value>
</equals>
</condition>
<value>0.10</value>
</max-rate-of-change>
</filter>
</PropertyList>