<!--  C130-H YASim config. - 2008 Emmanuel BARANGER
                                  update by Jettoo
					    and Pierre GEOFFROY    
      Envergure : 40.4 m (132 ft 7 in)
      Longueur  : 29.8 m (97 ft 9 in)
      Hauteur   : 11.6 m (38 ft 3 in)
      Poids vide: 34600 kg (76120 lbs)
      Moteurs   : 4 Allison T56-A-15 turboprops 4591 CV, 13820 RPM, 871 kg (1920 lbs)
	Helices   : Hamilton Standard 43E60-6901A (1074 lbs)
      Vitesse   : 644 km/h (348 kts)
-->
<airplane mass="76120">

  <!-- Configuration d'approche -->
  <approach speed="118" aoa="4" fuel="0.4">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[2]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[3]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[2]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[3]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/flight/flaps" value="1.0"/>
    <control-setting axis="/controls/gear/gear-down" value="1"/>
  </approach>

<!-- Configuration de croisiere -->
<cruise speed="348" alt="28000" fuel="0.7">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="1.0"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="1.0"/>
    <control-setting axis="/controls/engines/engine[2]/throttle" value="1.0"/>
    <control-setting axis="/controls/engines/engine[3]/throttle" value="1.0"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[1]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[2]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/engines/engine[3]/propeller-pitch" value="1.0"/>
    <control-setting axis="/controls/flight/flaps" value="0.0"/>
    <control-setting axis="/controls/gear/gear-down" value="0"/>
  </cruise>

  <cockpit x="10.333" y="0.598" z="3.005"/>

  <!-- Fuselage -->
  <fuselage ax="12.05" ay="0" az="2.08" bx="-8.81" by="0" bz="2.08" width="4.304" taper="0.40" midpoint="0.5"/>
  <!-- nose 
  <fuselage ax="13.17" ay="0" az="1.20" bx="11.20" by="0" bz="1.20" width="1.40" taper="0.40" midpoint="0.4"/>-->
  <!-- back 
  <fuselage ax="-8.60" ay="0" az="3.08" bx="-16.43" by="0" bz="4.18" width="2.60" taper="0.35" midpoint="0.4"/>-->

  <!-- Ailes -->
  <wing x="-1.486" y="1.240" z="3.660" taper="0.52" length="18.680" chord="5.201" sweep="0" dihedral="1.0" camber="0.08" incidence="0">
        <stall aoa="16.0" width="5" peak="1.3"/>
        <flap0 start="0.048" end="0.679" lift="1.5" drag="1.6"/>
        <flap1 start="0.679" end="0.990" lift="1.2" drag="1.3"/>

        <control-input axis="/controls/flight/flaps" control="FLAP0"/>
        <control-input axis="/controls/flight/aileron" control="FLAP1" split="true"/>
        <control-input axis="/controls/flight/aileron-trim" control="FLAP1" split="true"/>
 
        <control-output control="FLAP0" prop="/surface-positions/flap-pos-norm"/>

        <control-output control="FLAP1" side="left" prop="/surface-positions/left-aileron-pos-norm"/>
        <control-output control="FLAP1" side="right" prop="/surface-positions/right-aileron-pos-norm"/>

        <control-speed control="FLAP0" transition-time="15"/>
        <control-speed control="FLAP1" transition-time="1.0"/>
  </wing>

  <!-- Gouverne de profondeur -->
  <hstab x="-12.648" y="0.370" z="4.090" taper="0.43" length="7.247" chord="4.494" sweep="0" dihedral="0.0">
         <stall aoa="20.0" width="4" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.5" drag="1.4"/>

         <control-input axis="/controls/flight/elevator" control="FLAP0"/>
         <control-input axis="/controls/flight/elevator-trim" control="FLAP0"/>

         <control-output control="FLAP0" side="left" prop="/surface-positions/elevator-pos-norm"/>

         <control-speed control="FLAP0" transition-time="2.0"/>
  </hstab>

  <!-- Gouverne de direction -->
  <vstab x="-12.181" y="0" z="4.296" taper="0.32" length="6.704" chord="5.776" sweep="30">
         <stall aoa="16.0" width="4" peak="1.5"/>
         <flap0 start="0.25" end="0.8" lift="1.8" drag="1.5"/>

         <control-input axis="/controls/flight/rudder" control="FLAP0" effectiveness="1.0" invert="true"/>
         <control-input axis="/controls/flight/rudder-trim" control="FLAP0" invert="true"/>

         <control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm"/>

        <control-speed control="FLAP0" transition-time="2.0"/>
  </vstab>

  <!-- Moteurs et helices -->
  <!-- Exterieur gauche -->
  <propeller x="1.92" y="9.821" z="3.307" 
	mass="2994" 
	moment="110" 
	radius="2.8" 
	cruise-speed="292" 
	cruise-rpm="920" 
	cruise-power="1800" 
	cruise-alt="25000" 
	min-rpm="220" 
	max-rpm="1020"> 
      <actionpt x="3.764" y="9.821" z="3.622"/>
      <turbine-engine eng-power="4591" 
				eng-rpm="1020" 
				alt="28000" 
				flat-rating="4150" 
				min-n2="70" 
				max-n2="100"/> 
      <control-input axis="/controls/engines/engine[0]/propeller-pitch" control="ADVANCE"/>
      <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
      <control-input axis="/controls/engines/engine[0]/starter" control="STARTER"/>
      <control-input axis="/controls/engines/engine[0]/magnetos" control="MAGNETOS"/>
      <control-input axis="/controls/engines/engine[0]/boost" control="BOOST"/>
    </propeller>

  <!-- Interieur gauche -->
  <propeller x="1.92" y="4.929" z="3.307" 
	mass="2994" 
	moment="110" 
	radius="2.8" 
	cruise-speed="292" 
	cruise-rpm="920" 
	cruise-power="1800" 
	cruise-alt="25000" 
	min-rpm="220" 
	max-rpm="1020"
      fine-stop="0.25">   
      <actionpt x="3.764" y="4.926" z="3.622"/>
      <turbine-engine 	eng-power="4591" 
				eng-rpm="1020" 
				alt="28000" 
				flat-rating="4150" 
				min-n2="70" 
				max-n2="100"/> 
      <control-input axis="/controls/engines/engine[1]/propeller-pitch" control="ADVANCE"/>
      <control-input axis="/controls/engines/engine[1]/throttle" control="THROTTLE"/>
      <control-input axis="/controls/engines/engine[1]/starter" control="STARTER"/>
      <control-input axis="/controls/engines/engine[1]/magnetos" control="MAGNETOS"/>
      <control-input axis="/controls/engines/engine[1]/boost" control="BOOST"/>
    </propeller>

    <!-- Interieur droit 0.0738-->
  <propeller x="1.92" y="-4.929" z="3.307" 
	mass="2994" 
	moment="110" 
	radius="2.8" 
	cruise-speed="292" 
	cruise-rpm="920" 
	cruise-power="1800" 
	cruise-alt="25000" 
	min-rpm="220" 
	max-rpm="1020">  
      <actionpt x="3.764" y="-4.926" z="3.622"/>
      <turbine-engine 	eng-power="4591" 
				eng-rpm="1020" 
				alt="28000" 
				flat-rating="4150" 
				min-n2="70" 
				max-n2="100"/> 
      <control-input axis="/controls/engines/engine[2]/propeller-pitch" control="ADVANCE"/>
      <control-input axis="/controls/engines/engine[2]/throttle" control="THROTTLE"/>
      <control-input axis="/controls/engines/engine[2]/starter" control="STARTER"/>
      <control-input axis="/controls/engines/engine[2]/magnetos" control="MAGNETOS"/>
      <control-input axis="/controls/engines/engine[2]/boost" control="BOOST"/>
    </propeller>

  <!-- Exterieur droit -->
  <propeller x="1.92" y="-9.821" z="3.307" 
	mass="2994" 
	moment="110" 
	radius="2.8" 
	cruise-speed="292" 
	cruise-rpm="920" 
	cruise-power="1800" 
	cruise-alt="25000" 
	min-rpm="220" 
	max-rpm="1020">  
      <actionpt x="3.764" y="-9.821" z="3.622"/>
      <turbine-engine 	eng-power="4591" 
				eng-rpm="1020" 
				alt="28000" 
				flat-rating="4150" 
				min-n2="70" 
				max-n2="100"/> 
      <control-input axis="/controls/engines/engine[3]/propeller-pitch" control="ADVANCE"/>
      <control-input axis="/controls/engines/engine[3]/throttle" control="THROTTLE"/>
      <control-input axis="/controls/engines/engine[3]/starter" control="STARTER"/>
      <control-input axis="/controls/engines/engine[3]/magnetos" control="MAGNETOS"/>
      <control-input axis="/controls/engines/engine[3]/boost" control="BOOST"/>
    </propeller>

  <!-- Poition des roues au sol -->
  <!-- Nez -->
  <gear x="9.511" y="0" z="-0.898" retract-time="7" compression="0.2" spring="0.4">
        <control-input axis="/controls/flight/rudder" control="STEER" square="true"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="STEER" prop="/gear/gear[0]/steering-norm"/>
        <control-output control="EXTEND" prop="/gear/gear[0]/position-norm"/>
        <control-speed control="EXTEND" transition-time="7"/>
  </gear>

  <!-- Gauche avant -->
  <gear x="0.831" y="2.125" z="-0.896" retract-time="7" compression="0.2" spring="0.6">
        <control-input axis="/controls/gear/brake-left" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="EXTEND" prop="/gear/gear[1]/position-norm"/>
        <control-speed control="EXTEND" transition-time="10"/>
  </gear>

  <!-- Droite avant -->
  <gear x="0.831" y="-2.125" z="-0.896" retract-time="7" compression="0.2" spring="0.6">
        <control-input axis="/controls/gear/brake-right" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="EXTEND" prop="/gear/gear[2]/position-norm"/>
        <control-speed control="EXTEND" transition-time="10"/>
  </gear>

  <!-- Gauche arriere -->
  <gear x="-0.702" y="2.125" z="-0.896" retract-time="7" compression="0.2" spring="0.6">
        <control-input axis="/controls/gear/brake-left" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="EXTEND" prop="/gear/gear[3]/position-norm"/>
        <control-speed control="EXTEND" transition-time="10"/>
  </gear>

  <!-- Droite arriere -->
  <gear x="-0.702" y="-2.125" z="-0.896" retract-time="7" compression="0.2" spring="0.6">
        <control-input axis="/controls/gear/brake-right" control="BRAKE"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-output control="EXTEND" prop="/gear/gear[4]/position-norm"/>
        <control-speed control="EXTEND" transition-time="10"/>
  </gear>

  <!-- Reservoirs de carburant -->
  <!-- 1 et 4 - Reservoirs principaux d'extremites -->
  <!-- adjusted tanks to get a balanced aircraft/approx position)-->
  <tank x="-0.1" y="14.732" z="3.927" capacity="8710"/>
  <tank x="-0.1" y="-14.732" z="3.927" capacity="8710"/>
  <!-- 2 et 3 - Reservoirs principaux interieurs -->
  <tank x="-0.7" y="7.041" z="3.796" capacity="7995"/>
  <tank x="-0.7" y="-7.041" z="3.796" capacity="7995"/>
  <!-- 5 et 6 - Reservoirs auxiliaires -->
  <tank x="-1.0" y="2.451" z="3.770" capacity="5915"/>
  <tank x="-1.0" y="-2.451" z="3.770" capacity="5915"/>

  <!-- 7 et 8 - Reservoirs supplementaires sur pylones -->
  <!-- non utilise pour le moment -->
  <tank x="-0.933" y="7.701" z="2.179" capacity="5299"/>
  <tank x="-0.933" y="-7.701" z="2.179" capacity="5299"/>

  <!-- Ballast CG au centre de la corde des ailes x=1.469 y=0 z=3.772 -->
  <!--radar -->
  <ballast x="13.00" y="0.0" z="1.20" mass="2000"/>
  <!--cockpit -->
  <ballast x="10.50" y="0.0" z="2.00" mass="4000"/>
  <!--more ballast added (for balance)-->
  <ballast x="17.76" y="0.0" z="1.00" mass="6000"/>
  <!--removed from tail -->
  <ballast x="-17.14" y="0.0" z="0.00" mass="-9000"/>
  
</airplane>