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

<!--  Messerschmitt 262 HG III

      Michael KOEHNE
      
      Udpated BARANGER Emmanuel and FABER Detlef
-->

<airplane mass="8400">

  <approach speed="110" aoa="6" fuel="1.0">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.2"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.2"/>
    <control-setting axis="/controls/flight/flaps" value="1"/>
    <control-setting axis="/controls/gear/gear-down" value="1"/>
  </approach>

  <cruise speed="450" alt="19500" fuel="1.0">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="1"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="1"/>
    <control-setting axis="/controls/flight/flaps" value="0.0"/>
    <control-setting axis="/controls/gear/gear-down" value="0"/>
  </cruise>

  <cockpit x="-2.291" y="0.0" z="0.267"/>

  <!-- Fuselage with engine on top -->
  <fuselage ax="6.181" ay="0" az="-0.555" bx="-6.212" by="0" bz="-0.555" width="1.37" taper="0.5" midpoint="0.40"/>

  <fuselage ax="3.321" ay="1.160" az="-0.850" bx="-2.413" by="1.160" bz="-0.850" width="0.75" taper="0.8" midpoint="0.50"/>

  <fuselage ax="3.321" ay="-1.160" az="-0.850" bx="-2.413" by="-1.160" bz="-0.850" width="0.75" taper="0.8" midpoint="0.50"/>

  <wing x="1.6" y="0.622" z="-0.860"
        chord="4" 
        length="6.9" 
        taper="0.4"
        dihedral="3"
        sweep="47"
        camber="0.01">
        <stall aoa="16" width="3" peak="1.3"/>
        <flap0 start="0.017" end="0.573" lift="1.3" drag="1.5"/>
        <flap1 start="0.573" end="0.945" lift="1.1" drag="1.0"/>

        <control-input axis="/controls/flight/flaps" control="FLAP0"/> 
        <control-input axis="/controls/flight/aileron" control="FLAP1" square="true" split="true"/> 
        <control-input axis="/controls/flight/aileron-trim" control="FLAP1" split="true"/>

        <control-output control="FLAP0" side="left" prop="/surface-positions/left-flap-pos-norm"/>
        <control-output control="FLAP0" side="right" prop="/surface-positions/right-flap-pos-norm"/>
        <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-output control="FLAP1" prop="/surface-positions/aileron-pos-norm"/>
   </wing>

   <hstab x="-4.8" y="0" z="0.047"
         chord="1.7" 
         length="2.1" 
         taper="0.45"
         sweep="40">
         <stall aoa="20" width="3" peak="1.3"/>
         <flap0 start="0.1" end="0.8" lift="1.6" drag="1.5"/>
         <flap1 start="0.1" end="0.8" lift="1.6" drag="1.5"/>
         <control-input axis="/controls/flight/elevator" square="false" control="FLAP0" />
         <control-input axis="/controls/flight/elevator-trim" control="FLAP0"/>
         <control-output control="FLAP0" side="left" prop="/surface-positions/left-elevator-pos-norm"/>
         <control-output control="FLAP0" side="right" prop="/surface-positions/right-elevator-pos-norm"/>
  </hstab>

  <vstab x="-5.099" y="0.00" z="-0.836"
         chord="2.25" 
         length="2.3" 
         sweep="10"
         taper="0.25">
         <stall aoa="16" width="5" peak="1.5"/>
         <flap0 start="0.1" end="0.9" lift="1.8" 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"/>
  </vstab>

  <!-- 
   Junkers Jumo 004B turbojet
   8.8 kN (1,980 lbf) 8700 rpm
  -->
  <jet x="-2.350" y="1.095" z="-0.889"
       n1-idle="30" 
       n1-max="90" 
       n2-idle="35" 
       n2-max="95"
       egt="850" 
       tsfc="1.39"
       mass="1642" 
       thrust="1980" >
       <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
  </jet>
  
  <jet x="-2.350" y="-1.095" z="-0.889" 
       n1-idle="30" 
       n1-max="90" 
       n2-idle="35" 
       n2-max="95"
       egt="850"  
       tsfc="1.39"  
       mass="1642" 
       thrust="1980" >
       <control-input axis="/controls/engines/engine[1]/throttle" control="THROTTLE"/>
</jet>

  <!-- Undercarriage -->
  <!-- nose -->
  <gear x="5.627" y="0" z="-2.506"
        retract-time="7"
        compression="0.30"
        spring="1"
        damp="2" >
        <control-input axis="/controls/flight/rudder" control="STEER" src0="-1.0" src1="1.0" dst0="-0.1" dst1="0.1"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>

        <control-output control="EXTEND" prop="/gear/gear[0]/position-norm"/>

        <control-speed control="EXTEND" transition-time="7"/>
  </gear>

  <!-- left main -->
  <gear x="-0.069" y="1.085" z="-2.560"
        retract-time="7"
        compression="0.30"
        spring="1"
        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-output control="EXTEND" prop="/gear/gear[1]/position-norm"/>

        <control-speed control="EXTEND" transition-time="7"/>
  </gear>

  <!-- right main -->
  <gear x="-0.069" y="-1.085" z="-2.560"
        retract-time="7"
        compression="0.30"
        spring="1"
        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-output control="EXTEND" prop="/gear/gear[2]/position-norm"/>

        <control-speed control="EXTEND" transition-time="7"/>
  </gear>

  <!-- Internal tanks 2*280 liter wings -->
  <tank x="1.10" y="-2.3" z="-0.8" jet="true" capacity="1250"/>
  <tank x="1.10"  y="2.3" z="-0.8" jet="true" capacity="1250"/>

  <!-- CG Theorique x=1.6 y=0 z=-0.86 -->
  <ballast x="6" y="0" z="-1.55" mass="1500"/>

</airplane>

