<?xml version="1.0"?>
<system name="Catapult">
  <property value="0">systems/catapult/cat-pos-norm</property>
  <property value="0">systems/catapult/cat-launch-cmd</property>
  <property value="467">systems/catapult/cat-force</property>

  <!--
    http://wrightbrothershistory.blogspot.nl/2015_07_01_archive.html
    Derrick. Drop 16 1/2 (ft). Geared 3:1 = 50ft.
             Wt. 1,200 lbs. (Friday, September 9, 1904)
             Wt. 1,400 lbs (Monday, September 26, 1904)
   -->
  <channel name="Catapult">
    <switch name="Catapult Command">
      <default value="0"/>
      <test logic="AND" value="0">
          systems/catapult/cat-pos-norm gt 0.999
      </test>
      <test logic="AND" value="1">
          gear/unit[1]/WOW eq 1
          gear/unit[2]/WOW eq 1
          systems/catapult/cat-launch-cmd == 1
      </test>
      <output>systems/catapult/cat-launch-cmd</output>
    </switch>

   <kinematic name="Catapult Timer">
     <input>systems/catapult/cat-launch-cmd</input>
     <traverse>
       <setting>
          <position> 0 </position>
          <time>     0 </time>
       </setting>
       <setting>
          <position> 1 </position>
          <time>     3.6 </time>
       </setting>
     </traverse>
     <output>systems/catapult/cat-pos-norm</output>
   </kinematic>

   <switch name="Catapult Final">
     <default value="0"/>
     <test logic="AND" value="systems/catapult/cat-force">
         gear/unit[1]/WOW eq 1
         gear/unit[2]/WOW eq 1
         systems/catapult/cat-launch-cmd == 1
         systems/catapult/cat-pos-norm lt 0.999
         systems/catapult/cat-pos-norm gt 0.0
     </test>
     <output>external_reactions/catapult/magnitude</output>
   </switch>
  </channel>

</system>
