<?xml version="1.0" encoding="UTF-8"?>

<!--  
     Lockheed NF 104A : 2009 BARANGER Emmanuel

     sources      : 

     Envergure    :  7.84 m  ( 25 ft 9 in )
     Longueur     : 16.60 m  ( 54 ft 9 in )
     Hauteur      :  4.10 m  ( 13 ft 6 in )
     Masse a vide : 6080 kg  ( 13500 lbs )
     Moteur       : General Electric J79-GE-3B 9600 lbf
                  : Rocket AR 2                6000 lbf
     Reservoirs   :
-->

<airplane mass="13500">

  <!-- Approach configuration -->
  <approach speed="100" aoa="6">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.4"/>
    <control-setting axis="/controls/flight/flaps" value="0.4"/>
    <control-setting axis="/controls/gear/gear-down" value="1"/>
    <control-setting axis="/controls/flight/spoiler" value="0"/>
  </approach>

  <!-- Cruise configuration.   -->
  <cruise speed="700" alt="45000">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="1"/>
    <control-setting axis="/controls/flight/flaps" value="0.0"/>
    <control-setting axis="/controls/gear/gear-down" value="0"/>
    <control-setting axis="/controls/flight/spoiler" value="0"/>
  </cruise>

  <!-- pilot eyepoint -->
  <cockpit x="3.597" y="0" z="-0.154"/>

  <fuselage ax="6.902" ay="0" az="-0.952" bx="-6.923" by="0" bz="-0.382" width="1.187" midpoint= "0.25" taper="0.2" />

  <wing x="-2.012" y="0.567" z="-0.714"
        chord="3.108"
        length="3.15"
        taper="0.34"
        sweep="8"
        dihedral="-8"
        camber="0.023">
        <stall aoa="21" width="8" peak="1.3"/>
        <flap0 start="0.100" end="0.512" lift="1.2" drag="1.1"/>
        <flap1 start="0.512" end="0.761" lift="1.3" drag="1.2"/>
        <spoiler start="0" end="0.5" lift="1.3" 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-input axis="/controls/flight/spoilers" control="SPOILER"/>

        <control-output control="FLAP0" prop="/surface-positions/flaps-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-output control="SPOILER" prop="/surface-positions/speedbrake-pos-norm"/>

        <control-speed control="FLAP0" transition-time="4"/>
        <control-speed control="FLAP1" transition-time="1.5"/>
        <control-speed control="SPOILER" transition-time="2"/>
  </wing>

  <hstab x="-6.781" y="0" z="1.426"
         chord="1.624"
         length="1.654"
         taper="0.30"
         sweep="0">
         <stall aoa="22" width="13" peak="1.5"/>
         <flap0 start="0" end="1.00" lift="1.9" drag="1.4"/>

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

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

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

  <vstab x="-5.987" y="0" z="-0.003"
         chord="3.270"
         length="1.696"
         taper="0.35"
         sweep="18">
         <stall aoa="27" width="10" peak="1.5"/>
         <flap0 start="0" end=".8" lift="1.3" drag="1.3"/>

         <control-input axis="/controls/flight/rudder" control="FLAP0" 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="1.5"/>
  </vstab>

  <jet x="0" y="0" z="-0.729"
       mass="2204"
       thrust="9600"
       afterburner="10000"
       n1-idle="25"
       n1-max="100"
       n2-idle="30"
       n2-max="105"
       exhaust-speed="1150"
       rotation="0">
       <actionpt x="-6.499" y="0" z="-0.431"/>
       <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
       <control-input axis="/controls/engines/engine[0]/reheat" control="REHEAT"/>
  </jet>

  <jet x="-7.066" y="0" z="0.252"
       rotate="12"
       mass="150"
       thrust="6000">
       <actionpt x="-7.912" y="0" z="0.427"/>
       <control-input axis="/controls/switches/fusee" control="THROTTLE"/>
  </jet>

  <!-- gear -->
  <!-- nose -->
  <gear x="2.741" y="0.000" z="-2.130"
        retract-time="7"
        compression="0.44"
        spring="1.1"
        damp="1.4">
        <control-input axis="/controls/flight/rudder" control="STEER" square="false"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-speed control="EXTEND" transition-time="7"/>
        <control-output control="EXTEND" prop="/gear/gear[0]/position-norm"/>
  </gear>

  <!-- left main -->
  <gear x="-1.753" y="1.363" z="-2.183"
        retract-time="7"
        compression="0.72"
        spring="0.85"
        damp="2">
        <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-speed control="EXTEND" transition-time="7"/>
        <control-output control="EXTEND" prop="gear/gear[1]/position-norm"/>
  </gear>

  <!-- right main -->
  <gear x="-1.753" y="-1.363" z="-2.183"
        retract-time="7"
        compression="0.72"
        spring="0.85"
        damp="2">
        <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-speed control="EXTEND" transition-time="7"/>
        <control-output control="EXTEND" prop="gear/gear[2]/position-norm"/>
  </gear>


  <!-- left wing tanks -->
  <tank x="-2" y="2.2" z="-0.7" jet="true" capacity="1000"/>
  <!-- right wing tanks -->
  <tank x="-2" y="-2.2" z="-0.7" jet="true" capacity="1000"/>

  <!-- CG Theorique x=-2.012 y=0.0 z=-0.551 -->
  <ballast x="7" y="0" z="-2" mass="1000" />

</airplane>
