zkv1000 / Systems / autopilot.xml /
Sébastien MARQUE commit initial
56c0030 7 years ago
1 contributor
414 lines | 10.141kb
<?xml version="1.0"?>
 
<!-- From Generic Autopilot Configuration -->

<PropertyList>

  <!-- =============================================================== -->
  <!-- Roll Axis Modes                                                 -->
  <!-- =============================================================== -->

  <pid-controller>
    <name>Wing Leveler (Turn Coordinator based)</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <equals>
            <property>/autopilot/locks/roll</property>
            <value>wing-leveler</value>
          </equals>
          <not>
            <property>/autopilot/locks/passive-mode</property>
          </not>
        </and>
      </condition>
    </enable>
    <input>
      <prop>/instrumentation/turn-indicator/indicated-turn-rate</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/controls/flight/aileron</prop>
    </output>
    <config>
      <Kp>0.5</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.00001</Td>
      <u_min>-1.0</u_min>
      <u_max>1.0</u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>Heading Bug Hold (DG based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/roll</prop>
      <value>dg-heading-hold</value>
    </enable>
    <input>
      <prop>/autopilot/internal/heading-bug-error-deg</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/internal/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.00001</Td>
      <u_min>-22.0</u_min>
      <u_max>22.0</u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>NAV Hold Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/roll</prop>
      <value>nav1-hold</value>
    </enable>
    <input>
      <prop>/instrumentation/zkv1000/cdi/course-deflection</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/internal/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.00001</Td>
      <u_min>-22.0</u_min>
      <u_max>22.0</u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>Approach mode Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/roll</prop>
      <value>APR</value>
    </enable>
    <input>
      <prop>/instrumentation/zkv1000/cdi/course-deflection</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/internal/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.00001</Td>
      <u_min>-22.0</u_min>
      <u_max>22.0</u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>Ailerons control</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <not-equals>
            <property>/autopilot/locks/roll</property>
            <value>wing-leveler</value>
          </not-equals>
          <not>
            <property>/autopilot/locks/passive-mode</property>
          </not>
        </and>
      </condition>  
      <honor-passive>true</honor-passive>
    </enable>
    <input>
      <prop>/orientation/roll-deg</prop>
    </input>
    <reference>
      <prop>/autopilot/internal/target-roll-deg</prop>
    </reference>
    <output>
      <prop>/controls/flight/aileron</prop>
    </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>-1.0</u_min>
      <u_max>1.0</u_max>
    </config>
  </pid-controller>

 <!-- =============================================================== -->
 <!-- Pitch Axis Modes                                                -->
 <!-- =============================================================== -->

 <pid-controller>
    <name>Pitch hold</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <equals>
            <property>/autopilot/locks/pitch</property>
            <value>pitch-hold</value>
          </equals>
          <not>
            <property>/autopilot/locks/passive-mode</property>
          </not>
        </and>
      </condition>
    </enable>
    <input>
      <prop>/orientation/pitch-deg</prop>
    </input>
    <reference>
      <prop>/autopilot/internal/target-pitch-deg</prop>
    </reference>
    <output>
      <prop>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.05</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>1.0</Ti>
      <Td>0.00001</Td>
      <u_min>-1.0</u_min>
      <u_max>1.0</u_max>
    </config>
   </pid-controller>
  
  <pid-controller>
    <name>Altitude Hold</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/pitch</prop>
      <value>altitude-hold</value>
    </enable>
    <input>
      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-altitude-ft</prop>
    </reference>
    <output>
      <prop>/autopilot/internal/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>0.025</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>50.0</Ti>
      <Td>0.0</Td>
      <u_min>-20.0</u_min>
      <u_max>15.0</u_max>
    </config>
  </pid-controller>

  <!--pid-controller>
    <name>Selected Altitude Hold</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/pitch</prop>
      <value>ALTS</value>
    </enable>
    <input>
      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-altitude-ft</prop>
    </reference>
    <output>
      <prop>/autopilot/internal/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>0.025</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>50.0</Ti>
      <Td>0.0</Td>
      <u_min>-20.0</u_min>
      <u_max>15.0</u_max>
    </config>
  </pid-controller-->

  <pid-controller>
    <name>Glideslop Hold</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/pitch</prop>
      <value>glide-slope</value>
    </enable>
    <input>
      <prop>/instrumentation/zkv1000/cdi/gs-deflection</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/internal/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>-1.5</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>10.0</Ti>
      <Td>0.0</Td>
      <u_min>-10</u_min>
      <u_max>5</u_max>
    </config>
  </pid-controller>

  <pi-simple-controller>
    <name>Vertical Speed Hold</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/pitch</prop>
      <value>version-speed-hold</value>
    </enable>
    <input>
      <prop>/velocities/vertical-speed-fps</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/vertical-speed-fpm</prop>
      <scale>0.01667</scale>
    </reference>
    <output>
      <prop>/autopilot/internal/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>0.05</Kp>
      <Ki>0.1</Ki>
      <u_min>-20.0</u_min>
      <u_max>15.0</u_max>
    </config>
  </pi-simple-controller>

  <pid-controller>
    <name>Flight Change Level (altitude) stage #1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/pitch</prop>
      <value>flight-level-change</value>
    </enable>
    <input>
      <prop>/instrumentation/altimeter/indicated-altitude-ft</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-altitude-ft</prop>
    </reference>
    <output>
      <prop>/autopilot/internal/flc-altitude-pitch-deg</prop>
    </output>
    <config>
      <Kp>0.025</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>50.0</Ti>
      <Td>0.0</Td>
      <u_min>-20.0</u_min>
      <u_max>15.0</u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>Flight Change Level (airspeed) stage #1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/pitch</prop>
      <value>flight-level-change</value>
    </enable>
    <input>
      <prop>/autopilot/internal/lookahead-5-sec-airspeed-kt</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-speed-kt</prop>
    </reference>
    <output>
      <prop>/autopilot/internal/flc-airspeed-pitch-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>1.0</Ti>
      <Td>0.00001</Td>
      <u_min>-15.0</u_min>
      <u_max>15.0</u_max>
    </config>
  </pid-controller>

  <pid-controller>
    <name>Elevator Trim Control</name>
    <debug>false</debug>
    <enable>
      <condition>
        <and>
          <not-equals>
            <property>/autopilot/locks/pitch</property>
            <value>pitch-hold</value>
          </not-equals>
          <not>
            <property>/autopilot/locks/passive-mode</property>
          </not>
        </and>
      </condition>
      <honor-passive>true</honor-passive>
    </enable>
    <input>
      <prop>/orientation/pitch-deg</prop>
    </input>
    <reference>
      <prop>/autopilot/internal/target-pitch-deg</prop>
    </reference>
    <output>
      <prop>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.25</Kp>
      <beta>1.0</beta>
      <alpha>0.1</alpha>
      <gamma>0.0</gamma>
      <Ti>20.0</Ti>
      <Td>0.000001</Td>
      <u_min>-1.0</u_min>
      <u_max>1.0</u_max>
    </config>
  </pid-controller>

</PropertyList>