CVS: data/Aircraft/Lockheed-NF104/Systems BLC.xml, NONE, 1.1 FCS-pitch.xml, NONE, 1.1 FCS-roll.xml, NONE, 1.1 FCS-yaw.xml, NONE, 1.1 NWS.xml, NONE, 1.1 armament.xml, NONE, 1.1 autopilot.xml, NONE, 1.1 beacon.xml, NONE, 1.1 canopy.xml, NONE, 1.1 chute.xml, NONE, 1.1 crash-detect.xml, NONE, 1.1 flaps.xml, NONE, 1.1 gear.xml, NONE, 1.1 radar.xml, NONE, 1.1 refuel.xml, NONE, 1.1 speedbrakes.xml, NONE, 1.1 tailhook.xml, NONE, 1.1

Emmanuel Baranger <[email protected]>
Newsgroups gmane.games.flightgear.cvc
Message-ID <[email protected]>
Update of /var/cvs/FlightGear-0.9/data/Aircraft/Lockheed-NF104/Systems
In directory baron.flightgear.org:/tmp/cvs-serv23742/Systems

Added Files:
	BLC.xml FCS-pitch.xml FCS-roll.xml FCS-yaw.xml NWS.xml 
	armament.xml autopilot.xml beacon.xml canopy.xml chute.xml 
	crash-detect.xml flaps.xml gear.xml radar.xml refuel.xml 
	speedbrakes.xml tailhook.xml 
Log Message:
- New NF 104 C (by separate NF 104 A and NF 104 C)

--- NEW FILE "BLC.xml" ---
<?xml version="1.0"?>

<!-- This system determines the state of the Boundary Layer Control (BLC)
     system.  The aerodynamic effects of BLC are set in the aircraft
     configuration file <aerodynamics> section, not here.  In order for
     the switch to work properly the number of engine rpm tests should
     match the number of engines installed!
--> 

<system name="BLC">

  <property>systems/BLC/active</property>

  <channel name="Boundary Layer Control">

       <switch name="systems/BLC/switch">
          <default value="0"/>
          <test  logic="AND" value="1">
               fcs/flap-pos-norm gt 0.31
               propulsion/engine[0]/n2 gt 75.0
          </test>
          <output>systems/BLC/active</output>
       </switch>

  </channel>

</system>

--- NEW FILE "FCS-pitch.xml" ---
<?xml version="1.0"?>

<system name="FCS-pitch">

  <channel name="Pitch">

   <summer name="Pitch Trim Sum">
      <input>fcs/elevator-cmd-norm</input>
      <input>fcs/pitch-trim-cmd-norm</input>
      <clipto>
        <min> -1 </min>
        <max>  1 </max>
      </clipto>
   </summer>

   <aerosurface_scale name="Elevator Control">
      <input>fcs/pitch-trim-sum</input>
      <range>
        <min> -0.35 </min>
        <max>  0.30 </max>
      </range>
      <output>fcs/elevator-pos-rad</output>
   </aerosurface_scale>

   <aerosurface_scale name="Elevator Normalized">
      <input>fcs/elevator-pos-rad</input>
      <domain>
        <min>-0.35</min>
        <max> 0.30</max>
      </domain>
      <range>
        <min>-1</min>
        <max> 1</max>
      </range>
      <output>fcs/elevator-pos-norm</output>
   </aerosurface_scale>

  </channel>

</system>

--- NEW FILE "FCS-roll.xml" ---
<?xml version="1.0"?>

<system name="FCS-roll">

  <channel name="Roll">

   <summer name="Roll Trim Sum">
      <input>fcs/aileron-cmd-norm</input>
      <input>fcs/roll-trim-cmd-norm</input>
      <clipto>
        <min> -1 </min>
        <max>  1 </max>
      </clipto>
   </summer>

<!--left aileron-->

   <aerosurface_scale name="Left Aileron Control">
      <input>fcs/roll-trim-sum</input>
      <range>
        <min> -0.35 </min>
        <max>  0.35 </max>
      </range>
      <output>fcs/left-aileron-pos-rad</output>
   </aerosurface_scale>

	<scheduled_gain name="Left Aileron Scheduled Gain">
		<input>fcs/left-aileron-pos-rad</input>
		<table>
			<independentVar>gear/gear-cmd-norm</independentVar>
			<tableData>
			0.0   0.4875
			1.0   1.0
			</tableData>
		</table>
	</scheduled_gain>

   <aerosurface_scale name="Left Aileron Normalized">
      <input>fcs/left-aileron-pos-rad</input>
      <domain>
        <min>-0.35</min>
        <max> 0.35</max>
      </domain>
      <range>
        <min>-1</min>
        <max> 1</max>
      </range>
      <output>fcs/left-aileron-pos-norm</output>
   </aerosurface_scale>

<!--right aileron-->

   <aerosurface_scale name="Right Aileron Control">
      <input>fcs/roll-trim-sum</input>
      <range>
        <min> -0.35 </min>
        <max>  0.35 </max>
      </range>
      <output>fcs/right-aileron-pos-rad</output>
   </aerosurface_scale>

	<scheduled_gain name="Right Aileron Scheduled Gain">
		<input>fcs/right-aileron-pos-rad</input>
		<table>
			<independentVar>gear/gear-cmd-norm</independentVar>
			<tableData>
			0.0   0.4875
			1.0   1.0
			</tableData>
		</table>
	</scheduled_gain>

   <aerosurface_scale name="Right Aileron Normalized">
      <input>fcs/right-aileron-pos-rad</input>
      <domain>
        <min>-0.35</min>
        <max> 0.35</max>
      </domain>
      <range>
        <min>-1</min>
        <max> 1</max>
      </range>
      <output>fcs/right-aileron-pos-norm</output>
   </aerosurface_scale>

  </channel>

</system>

--- NEW FILE "FCS-yaw.xml" ---
<?xml version="1.0"?>

<system name="FCS-yaw">

  <channel name="Yaw">

   <summer name="Rudder Command Sum">
      <input>fcs/rudder-cmd-norm</input>
      <input>fcs/yaw-trim-cmd-norm</input>
      <limit>
        <min> -1.0 </min>
        <max>  1.0 </max>
      </limit>
   </summer>

<!--yaw damper-->

   <scheduled_gain name="Yaw Damper Rate">
      <input>velocities/r-aero-rad_sec</input>
      <table>
        <independentVar lookup="row">velocities/ve-kts</independentVar>
         <tableData>
            30     0.00
            60     2.00
         </tableData>
      </table>
   </scheduled_gain>

   <scheduled_gain name="Yaw Damper Beta">
      <input>aero/beta-rad</input>
      <table>
        <independentVar lookup="row">velocities/ve-kts</independentVar>
        <tableData>
           30     0.00
           60     0.00
        </tableData>
      </table>
   </scheduled_gain>

   <summer name="Yaw Damper Sum">
      <input>fcs/yaw-damper-beta</input>
      <input>fcs/yaw-damper-rate</input>
      <limit>
        <min> -0.1 </min>
        <max>  0.1 </max>
      </limit>
   </summer>

   <scheduled_gain name="Yaw Damper Final">
      <input>fcs/yaw-damper-sum</input>
      <table>
        <independentVar lookup="row">velocities/ve-kts</independentVar>
        <tableData>
           30         0.0
           31         1.0
        </tableData>
      </table>
   </scheduled_gain>

<!--rudder-->

   <summer name="Rudder Sum">
      <input>fcs/rudder-command-sum</input>
      <input>fcs/yaw-damper-final</input>
      <limit>
        <min> -1 </min>
        <max>  1 </max>
      </limit>
   </summer>

   <aerosurface_scale name="Rudder Control">
      <input>fcs/rudder-sum</input>
      <domain>
        <min>-1.0</min>
        <max> 1.0</max>
      </domain>
      <range>
        <min> -0.25 </min>
        <max>  0.25 </max>
      </range>
      <output>fcs/rudder-pos-rad</output>
   </aerosurface_scale>

	<scheduled_gain name="Rudder Scheduled Gain">
		<input>fcs/rudder-pos-rad</input>
		<table>
			<independentVar>gear/gear-cmd-norm</independentVar>
			<tableData>
			0.0   0.4615
			1.0   1.0
			</tableData>
		</table>
	</scheduled_gain>

   <aerosurface_scale name="Rudder Normalized">
      <input>fcs/rudder-pos-rad</input>
      <domain>
        <min>-0.25</min>
        <max> 0.25</max>
      </domain>
      <range>
        <min>-1</min>
        <max> 1</max>
      </range>
      <output>fcs/rudder-pos-norm</output>
   </aerosurface_scale>

  </channel>

</system>

--- NEW FILE "NWS.xml" ---
<?xml version="1.0"?>

<system name="NWS">
	<property>systems/NWS/engaged</property>
	<channel name="Nose Wheel Steering">
		<scheduled_gain name="systems/NWS/steer-cmd">
		<input>fcs/rudder-cmd-norm</input>
			<table>
				<independentVar lookup="row">systems/NWS/engaged</independentVar>
				<tableData>
 		           0     -0.1
 		           1     -1.0
				</tableData>
			</table>
 	     <output>fcs/steer-cmd-norm</output>
 	    </scheduled_gain>
		<pure_gain name="Copy">
			<input>fcs/steer-cmd-norm</input>
				<gain>1</gain>
			<output>/sim/multiplay/generic/float[1]</output>
		</pure_gain>
	</channel>
</system>

--- NEW FILE "armament.xml" ---
<?xml version="1.0"?>

<!--***F-104C external fuel***-->

<system name="armament">

  <property value="0">systems/armament/tip-tanks/release</property>

  <channel name="Armament"><!--release tip tanks -->
     <switch name="systems/armament/tip-tanks/left-tip-tank/released">
          <default value="systems/armament/tip-tanks/left-tip-tank/released"/>
          <test value="1">
                systems/armament/droptanks/release == 1
          </test>
          <output>systems/armament/tip-tanks/left-tip-tank/released</output>
     </switch>
     <switch name="systems/armament/tip-tanks/right-tip-tank/released">
          <default value="systems/armament/tip-tanks/right-tip-tank/released"/>
          <test value="1">
                systems/armament/tip-tanks/release == 1
          </test>
          <output>systems/armament/tip-tanks/right-tip-tank/released</output>
     </switch>
  </channel>

  <channel name="Weight-loss"><!--after tip tanks released-->
     <switch name="systems/armament/tip-tanks/left-tip-tank/weight-control">
          <default value="inertia/pointmass-weight-lbs[0]"/>
          <test value="0">
                systems/armament/tip-tanks/left-tip-tank/released == 1
          </test>
          <output>inertia/pointmass-weight-lbs[0]</output>
     </switch>
     <switch name="systems/armament/tip-tanks/right-tip-tank/weight-control">
          <default value="inertia/pointmass-weight-lbs[1]"/>
          <test value="0">
                systems/armament/tip-tanks/right-tip-tank/released == 1
          </test>
          <output>inertia/pointmass-weight-lbs[1]</output>
     </switch>
  </channel>

  <channel name="Fuel-loss"><!--after drop tanks released-->
     <switch name="systems/armament/tip-tanks/left-tip-tank/fuel-level-control">
          <default value="propulsion/tank[1]/contents-lbs"/>
          <test value="0">
                systems/armament/tip-tanks/left-tip-tank/released == 1
          </test>
          <output>propulsion/tank[1]/contents-lbs</output>
     </switch>
     <switch name="systems/armament/tip-tanks/right-tip-tank/fuel-level-control">
          <default value="propulsion/tank[2]/contents-lbs"/>
          <test value="0">
                systems/armament/tip-tanks/right-tip-tank/released == 1
          </test>
          <output>propulsion/tank[2]/contents-lbs</output>
     </switch>
  </channel>


</system>

--- NEW FILE "autopilot.xml" ---
<?xml version="1.0"?>
 
<!-- autopilot configuration retuned by Kent Esbenshade: original: Generic Autopilot -->

<PropertyList>

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

  <!-- Wing leveler --> 
  <pid-controller>
    <name>Wing Leveler (Turn Coordinator based)</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>wing-leveler</value>
    </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.010</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Heading Bug Hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target roll based on diff between current heading -->
  <!-- and heading bug. -->
  <pid-controller>
    <name>Heading Bug Hold (DG based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>dg-heading-hold</value>
    </enable>
    <input>
      <prop>/autopilot/internal/fdm-heading-bug-error-deg</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/internal/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-3.0</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>     <!-- input value weighing factor -->
      <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>   <!-- input value weighing factor for -->
                           <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>     <!-- derivator time -->
      <u_min>-30.0</u_min> <!-- minimum output clamp -->
      <u_max>30.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Stage #2 drives the ailerons to achieve the desired roll deg. -->
  <pid-controller>
    <name>Heading Bug Hold (DG based) Stage 2</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>dg-heading-hold</value>
    </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.01</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- True Heading hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target roll based on diff between current heading -->
  <!-- and target heading. -->
  <pid-controller>
    <name>True Heading Hold (DG based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>true-heading-hold</value>
    </enable>
    <input>
      <prop>/autopilot/internal/true-heading-error-deg</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/internal/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-3.0</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>     <!-- input value weighing factor -->
      <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>   <!-- input value weighing factor for -->
                           <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>     <!-- derivator time -->
      <u_min>-30.0</u_min> <!-- minimum output clamp -->
      <u_max>30.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Stage #2 drives the ailerons to achieve the desired roll deg. -->
  <pid-controller>
    <name>True Heading Hold (DG based) Stage 2</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>true-heading-hold</value>
    </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.01</Kp>       <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Nav1 hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target roll based on diff between current heading -->
  <!-- and target heading. -->
  <pid-controller>
    <name>Nav1 Hold Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>nav1-hold</value>
    </enable>
    <input>
      <prop>/autopilot/internal/nav1-heading-error-deg</prop>
    </input>
    <reference>
      <value>0.0</value>
    </reference>
    <output>
      <prop>/autopilot/internal/target-roll-deg</prop>
    </output>
    <config>
      <Kp>-3.0</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>     <!-- input value weighing factor -->
      <alpha>0.1</alpha>   <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>   <!-- input value weighing factor for -->
                           <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>     <!-- derivator time -->
      <u_min>-20.0</u_min> <!-- minimum output clamp -->
      <u_max>20.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Stage #2 drives the ailerons to achieve the desired roll deg. -->
  <pid-controller>
    <name>Nav1 Hold Stage 2</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/heading</prop>
      <value>nav1-hold</value>
    </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.01</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>


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

 <!-- Simple pitch hold --> 
 <pid-controller>
    <name>Pitch hold</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</prop>
      <value>pitch-hold</value>
    </enable>
    <input>
      <prop>/orientation/pitch-deg</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-pitch-deg</prop>
    </reference>
    <output>
      <prop>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.05</Kp>      <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>1.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
   </pid-controller>

 <!-- Simple angle of attack hold --> 
 <pid-controller>
    <name>AOA hold</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</prop>
      <value>aoa-hold</value>
    </enable>
    <input>
      <prop>/orientation/alpha-deg</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-aoa-deg</prop>
    </reference>
    <output>
      <prop>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.05</Kp>      <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>0.5</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Altitude hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target rate of climb based on diff between current alt -->
  <!-- and target altitude. -->
  <pi-simple-controller>
    <name>Altitude Hold (Altimeter based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</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-climb-rate-fps</prop>
    </output>
    <config>
      <Kp>0.3</Kp>          <!-- proportional gain -->
      <Ki>0.0</Ki>          <!-- integral gain -->
      <u_min>-33.34</u_min> <!-- minimum output clamp -->
      <u_max>33.34</u_max>   <!-- maximum output clamp -->
    </config>
  </pi-simple-controller>

  <!-- Stage #2 drives the elevator-trim to achieve the desired climb rate. -->
  <pid-controller>
    <name>Altitude Hold (Altimeter based) Stage 2</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</prop>
      <value>altitude-hold</value>
    </enable>
    <input>
      <prop>/velocities/vertical-speed-fps</prop>
    </input>
    <reference>
      <prop>/autopilot/internal/target-climb-rate-fps</prop>
    </reference>
    <output>
      <prop>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.002</Kp>     <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- AGL hold.  2 stage cascade controller. -->

  <!-- Stage #1 sets target rate of climb based on diff between current agl -->
  <!-- and target agl. -->
  <pi-simple-controller>
    <name>AGL Hold (Altimeter based) Stage 1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</prop>
      <value>agl-hold</value>
    </enable>
    <input>
      <prop>/position/altitude-agl-ft</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-agl-ft</prop>
    </reference>
    <output>
      <prop>/autopilot/internal/target-climb-rate-fps</prop>
    </output>
    <config>
      <Kp>0.3</Kp>          <!-- proportional gain -->
      <Ki>0.0</Ki>          <!-- integral gain -->
      <u_min>-16.67</u_min> <!-- minimum output clamp -->
      <u_max>8.33</u_max>   <!-- maximum output clamp -->
    </config>
  </pi-simple-controller>

  <!-- Stage #2 drives the elevator-trim to achieve the desired climb rate. -->
  <pid-controller>
    <name>Altitude Hold (Altimeter based) Stage 2</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</prop>
      <value>agl-hold</value>
    </enable>
    <input>
      <prop>/velocities/vertical-speed-fps</prop>
    </input>
    <reference>
      <prop>/autopilot/internal/target-climb-rate-fps</prop>
    </reference>
    <output>
      <prop>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.002</Kp>      <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- Glideslope hold. -->

  <!-- Stage #2 drives the elevator-trim to achieve the desired climb rate. -->
  <pid-controller>
    <name>Glideslop Hold</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</prop>
      <value>gs1-hold</value>
    </enable>
    <input>
      <prop>/velocities/vertical-speed-fps</prop>
    </input>
    <reference>
      <prop>/instrumentation/nav[0]/gs-rate-of-climb</prop>
    </reference>
     <output>
      <prop>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.003</Kp>      <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

  <!-- vertical speed hold -->
  <pid-controller>
    <name>Vertical Speed Hold</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/altitude</prop>
      <value>vertical-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>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.002</Kp>      <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>


 <!-- =============================================================== -->
 <!-- Velocity Modes                                                  -->
 <!-- =============================================================== -->

 <!-- Auto throttle --> 
 <pid-controller>
    <name>Auto Throttle (5 sec lookahead)</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/speed</prop>
      <value>speed-with-throttle</value>
    </enable>
    <input>
      <!-- <prop>/autopilot/internal/lookahead-5-sec-airspeed-kt</prop> -->
      <prop>/velocities/airspeed-kt</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-speed-kt</prop>
    </reference>
    <output>
      <prop>/controls/engines/engine[0]/throttle</prop>
      <prop>/controls/engines/engine[1]/throttle</prop>
      <prop>/controls/engines/engine[2]/throttle</prop>
      <prop>/controls/engines/engine[3]/throttle</prop>
      <prop>/controls/engines/engine[4]/throttle</prop>
      <prop>/controls/engines/engine[5]/throttle</prop>
      <prop>/controls/engines/engine[6]/throttle</prop>
      <prop>/controls/engines/engine[7]/throttle</prop>
    </output>
    <config>
      <Kp>0.01</Kp>        <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>10.0</Ti>       <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>0.0</u_min>  <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

 <!-- Hold speed by varying pitch trim (Two stage cascading controller) --> 
 <pid-controller>
    <name>Speed hold (vary pitch trim) Stage #1</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/speed</prop>
      <value>speed-with-pitch-trim</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/settings/target-pitch-deg</prop>
    </output>
    <config>
      <Kp>-1.0</Kp>       <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>1.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-15.0</u_min><!-- minimum output clamp -->
      <u_max>15.0</u_max> <!-- maximum output clamp -->
    </config>
  </pid-controller>

 <pid-controller>
    <name>Speed hold (vary pitch trim) Stage #2</name>
    <debug>false</debug>
    <enable>
      <prop>/autopilot/locks/speed</prop>
      <value>speed-with-pitch-trim</value>
    </enable>
    <input>
      <prop>/orientation/pitch-deg</prop>
    </input>
    <reference>
      <prop>/autopilot/settings/target-pitch-deg</prop>
    </reference>
    <output>
      <prop>/controls/flight/elevator-trim</prop>
    </output>
    <config>
      <Kp>-0.002</Kp>      <!-- proportional gain -->
      <beta>1.0</beta>    <!-- input value weighing factor -->
      <alpha>0.1</alpha>  <!-- low pass filter weighing factor -->
      <gamma>0.0</gamma>  <!-- input value weighing factor for -->
                          <!-- unfiltered derivative error -->
      <Ti>1.0</Ti>        <!-- integrator time -->
      <Td>0.00001</Td>    <!-- derivator time -->
      <u_min>-1.0</u_min> <!-- minimum output clamp -->
      <u_max>1.0</u_max>  <!-- maximum output clamp -->
    </config>
  </pid-controller>

</PropertyList>

--- NEW FILE "beacon.xml" ---
<?xml version="1.0"?>

<system name="beacon">

  <property value="0.75">systems/beacon/frequency</property>

  <channel name="beacon">

   <fcs_function name="systems/beacon/factor">
     <function>
       <sin>
         <product>
           <property>sim-time-sec</property>
           <value>6.283185307</value>
           <property>systems/beacon/frequency</property>
         </product>
       </sin>
     </function>
     <output>/sim/multiplay/generic/float[0]</output>
   </fcs_function>
 
  </channel>

</system>

--- NEW FILE "canopy.xml" ---
<?xml version="1.0"?>

<system name="canopy">

  <channel>

   <kinematic name="Canopy Control">
     <input>systems/canopy/command</input>
     <traverse>
       <setting>
          <position>0</position>
          <time>0</time>
       </setting>
       <setting>
          <position>1</position>
          <time>2</time>
       </setting>
     </traverse>
     <output>/canopy/position-norm</output>
   </kinematic>

  </channel>

</system>

--- NEW FILE "chute.xml" ---
<?xml version="1.1"?>

<system name="chute">
	<property value="0">systems/chute/deploy</property>
	<channel name="Chute">
		<kinematic name="Parachute Deploy">
			<input>systems/chute/deploy</input>
				<traverse>
					<setting>
						<position>0</position>
						<time>0</time>
					</setting>
					<setting>
						<position>1</position>
						<time>1.5</time>
					</setting>
				</traverse>
			<output>systems/chute/unfurl-norm</output>
		</kinematic>
	</channel>
</system>

--- NEW FILE "crash-detect.xml" ---
<?xml version="1.0"?>

<system name="crash-detect">

  <property value="0">systems/crash-detect/crashed</property>

  <channel name="Over-G">

     <switch name="systems/crash-detect/over-g">
          <test value="1">
                accelerations/Nz gt 9.0
          </test>
          <output>systems/crash-detect/crashed</output>
     </switch>

  </channel>

  <channel name="impact-ground">

     <switch name="systems/crash-detect/impact">
          <test logic="AND" value="1">
                position/h-agl-ft lt 1.0
                sim-time-sec gt 1.0
          </test>
          <output>systems/crash-detect/crashed</output>
     </switch>

  </channel>

  <channel name="freeze">

    <switch name="systems/crash-detect/switch1">
          <default value="simulation/integrator/position/rotational"/>          
          <test value="0">
                systems/crash-detect/crashed eq 1
          </test>
          <output>simulation/integrator/position/rotational</output>
    </switch>
    <switch name="systems/crash-detect/switch2">
          <default value="simulation/integrator/position/translational"/>          
          <test value="0">
                systems/crash-detect/crashed eq 1
          </test>
          <output>simulation/integrator/position/translational</output>
    </switch>
    <switch name="systems/crash-detect/switch3">
          <default value="simulation/integrator/rate/rotational"/>          
          <test value="0">
                systems/crash-detect/crashed eq 1
          </test>
          <output>simulation/integrator/rate/rotational</output>
    </switch>
    <switch name="systems/crash-detect/switch4">
          <default value="simulation/integrator/rate/translational"/>          
          <test value="0">
                systems/crash-detect/crashed eq 1
          </test>
          <output>simulation/integrator/rate/translational</output>
    </switch>

  </channel>

</system>

--- NEW FILE "flaps.xml" ---
<?xml version="1.0"?>

<system name="flaps">

  <channel name="Flaps">

   <kinematic name="Flaps Control">
     <input>fcs/flap-cmd-norm</input>
     <traverse>
       <setting>
          <position>0</position>
          <time>0</time>
       </setting>
       <setting>
          <position>0.3</position>
          <time>2</time>
       </setting>
       <setting>
          <position>1</position>
          <time>5</time>
       </setting>
     </traverse>
     <output>fcs/flap-pos-norm</output>
   </kinematic>

  </channel>

</system>

--- NEW FILE "gear.xml" ---
<?xml version="1.1"?>

<system name="gear">
	<channel name="Landing Gear">
		<kinematic name="Gear Control">
		<input>gear/gear-cmd-norm</input>
			<traverse>
				<setting>
					<position>0</position>
					<time>0</time>
				</setting>
				<setting>
					<position>1</position>
					<time>5</time>
				</setting>
			</traverse>
		<output>gear/gear-pos-norm</output>
		</kinematic>
	</channel>
</system>

--- NEW FILE "radar.xml" ---
<?xml version="1.0"?>

<system name="radar">

  <channel name="Radar">

   <fcs_function name="Scope scale">
     <function>
         <quotient>
           <value>0.026</value>
           <property>systems/radar/range</property>
         </quotient>
     </function>
     <output>systems/radar/factor</output>
   </fcs_function>

  </channel>

</system>

--- NEW FILE "refuel.xml" ---
<?xml version="1.0"?>

<!--Based on David Culp's original-->

<system name="refuel">

  <property>systems/refuel/probe-cmd</property>
  <property>systems/refuel/contact</property>
  <property>systems/refuel/armed</property>

  <channel name="Refuel">

     <kinematic name="systems/refuel/probe-control">
       <input>systems/refuel/armed</input>
       <traverse>
        <setting>
          <position> 0 </position>
          <time>     0 </time>
        </setting>
        <setting>
          <position> 1 </position>
          <time>     2.5 </time>
        </setting>
       </traverse>
       <output>systems/refuel/probe-pos-norm</output>
     </kinematic>

     <switch name="systems/refuel/arming">
          <default value="0"/>
          <test logic="AND" value="1">
                systems/refuel/probe-pos-norm gt 0.99
                systems/refuel/armed == 1
          </test>
          <output>propulsion/refuel</output>
     </switch>


  </channel>

</system>

--- NEW FILE "speedbrakes.xml" ---
<?xml version="1.0"?>

<system name="speedbrakes">

  <channel name="Speedbrake">

   <kinematic name="Speedbrake Control">
     <input>fcs/speedbrake-cmd-norm</input>
     <traverse>
       <setting>
          <position> 0 </position>
          <time>     0 </time>
       </setting>
       <setting>
          <position> 1 </position>
          <time>     1 </time>
       </setting>
     </traverse>
     <output>fcs/speedbrake-pos-norm</output>
   </kinematic>

  </channel>

</system>

--- NEW FILE "tailhook.xml" ---
<?xml version="1.0"?>

<system name="hook">

  <property>systems/hook/tailhook-cmd-norm</property>
  <property value="5.6">systems/hook/tailhook-length-ft</property>
  <property value="-8.0">systems/hook/tailhook-pos-min-deg</property>
  <property value="42.0">systems/hook/tailhook-pos-max-deg</property>
  <property value="376.0">systems/hook/tailhook-offset-x-in</property>
  <property value="0.0">systems/hook/tailhook-offset-y-in</property>
  <property value="-28.0">systems/hook/tailhook-offset-z-in</property>
  <property value="-8.0">systems/hook/tailhook-pos-deg</property>
  

  <channel name="Hook">

     <kinematic name="systems/hook/tailhook-control">
       <input>systems/hook/tailhook-cmd-norm</input>
       <traverse>
        <setting>
          <position>0</position>
          <time>0</time>
        </setting>
        <setting>
          <position>1</position>
          <time>1.5</time>
        </setting>
       </traverse>
       <output>systems/hook/tailhook-pos-norm</output>
     </kinematic>

     <switch name="systems/hook/ready">
          <default value="0"/>
          <test  logic="AND" value="1">
                systems/hook/tailhook-pos-norm gt 0.99
          </test>
     </switch>

     <scheduled_gain name="systems/hook/hook-decel-multiplier">
      <input>systems/hook/ready</input>
      <table>
        <independentVar lookup="row">gear/unit[1]/wheel-speed-fps</independentVar>
         <tableData>
            0     0.00
            1     0.00
            80    2.20
         </tableData>
      </table>
     </scheduled_gain>

     <pure_gain name="systems/hook/hook-decel-force">
        <input>systems/hook/hook-decel-multiplier</input>
        <gain>inertia/weight-lbs</gain>
     </pure_gain>

     <summer name="systems/hook/force">
        <input>systems/hook/hook-decel-force</input>
        <input>forces/fbx-prop-lbs</input>
     </summer>

     <fcs_function name="systems/hook/animation-norm">
       <function>
         <product>
           <sum>
            <property>systems/hook/tailhook-pos-deg</property>
            <value>8</value>
           </sum>
           <value>0.02</value>
         </product>
       </function>
       <output>gear/tailhook-pos-norm</output>
     </fcs_function>

  </channel>

</system>


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.