<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- Kawasaki Ki-61 Hien  : BARANGER Emmanuel (2014) 

     Sources              : http://en.wikipedia.org/wiki/Kawasaki_Ki-61

     Wingspan             : 12.00 m       (   39 ft 4 in )
     Length               :  8.94 m       (   29 ft 4 in )
     Height               : 33.70 m       (   12 ft 2 in )
     Empty weight         : 2,630 kg      ( 5800 lb      )
     Engine               : 1 Kawasaki Ha-40 liquid-cooled inverted V12 engine ( 1159 hp )
     Max speed            : 580 km/h      ( 313.17 kts   ) at 5000 m ( 16405 ft )
--> 
<airplane mass="5800" >

  <approach speed="80" aoa="4" >
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.2"/>
    <control-setting axis="/controls/engines/engine[0]/mixture" value="1"/>
    <solve-weight idx="0" weight="180"/>
    <solve-weight idx="1" weight="0"/>
  </approach>
  
  <cruise speed="290" alt="12140" >
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.8"/>
    <control-setting axis="/controls/engines/engine[0]/mixture" value="0.8" />
    <solve-weight idx="0" weight="180"/>
    <solve-weight idx="1" weight="0"/>
  </cruise>

  <cockpit x="0.68614" y="0" z="0.94438"/>

  <fuselage ax="3.84315" ay="0" az="0.10933" bx="-3.97128" by="0" bz="0.35219" width="0.965" taper="0.3" midpoint="0.2"/>

  <wing x="1.140" y="0.470" z="-0.31" 
        chord="2.375" 
        length="5.5" 
        taper="0.49" 
        sweep="-2" 
        dihedral="6" 
        camber="0.01">
        <stall aoa="16" width="5" peak="1.5"/>
        <flap0 start="0.02" end="0.47" lift="1.7" drag="1.9"/>
        <flap1 start="0.47" end="0.90" lift="1.4" drag="1.1"/>

        <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="7"/>
        <control-speed control="FLAP1" transition-time="1"/>
  </wing>
  
  <hstab x="-3.65413" y="0" z="0.527" 
         chord="1.13" 
         length="1.914" 
         taper="0.51"
         sweep="3"> 
         <stall aoa="16" width="8" peak="1.5"/>
         <flap0 start="0.0" end="1.0" lift="1.55" drag="1.3"/>

         <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"/>
  </hstab>

  <vstab x="-3.56820" y="0" z="0.296" 
         chord="1.777" 
         length="1.6" 
         taper="0.30" 
         sweep="20">
         <stall aoa="14" width="4" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.3" drag="1.3"/>

         <control-input axis="/controls/flight/rudder" square="true" 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"  min="1" max="-1"/>
  </vstab>

  <!-- Engines   source            : http://en.wikipedia.org/wiki/Kawasaki_Ha-40

                 name              : Kawasaki Ha40
                 type              : Twelve-cylinder liquid-cooled supercharged 60 deg inverted Vee aircraft piston engine
                 power cruise      : 1159 hp at 2500 rpm for takeoff
                                   : 1050 hp at 2400 rpm at 3700 m ( 12140 ft )
                 displacement      : 33.93 L ( 2070.5 in cube )
                 compression       : 6.9:1
                 weight            : 590 kg ( 1320 lb )

                gear-ratio="0.5"
  -->
  <propeller x="2.605" y="0.0" z="-0.126"
             mass="1320"
             moment="35"
             radius="1.59"
             cruise-speed="290"
             cruise-alt="12140"
             cruise-power="1050"
             cruise-rpm="2400"
             takeoff-power="1159"
             takeoff-rpm="2500">
             <actionpt x="3.95750" y="0" z="0.12604"/>
             <piston-engine eng-rpm="2500"
                            eng-power="1159"
                            displacement="2070.5"
                            compression="6.9"/>
             <control-input control="THROTTLE" axis="/controls/engines/engine[0]/throttle"/>
             <control-input control="STARTER" axis="/controls/engines/engine[0]/starter"/>
             <control-input control="MAGNETOS" axis="/controls/engines/engine[0]/magnetos"/>
             <control-input control="MIXTURE" axis="/controls/engines/engine[0]/mixture"/>
  </propeller>

  <!-- left main -->
  <gear x="1.84374" y="2.01464" z="-1.84672"
        compression="0.4"
        retract-time="5"
        spring="0.8"
        damp="1.2"
        sfric="1"
        dfric="1">
        <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[0]/position-norm"/>

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

  <!-- right main -->
  <gear x="1.84374" y="-2.01464" z="-1.84672"
        compression="0.4"
        retract-time="5"
        spring="0.8"
        damp="1.2"
        sfric="1"
        dfric="1">
        <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[1]/position-norm"/>

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

  <!-- Tail wheel; has castering selectable by a wheel lock -->
  <gear x="-3.54118" y="0" z="-0.50785"
        compression="0.2"
        spring="0.8"
        damp="1.2"
        sfric="1"
        dfric="1">
  </gear>

  <!-- Fuel  -->  
  <tank x="1.2" y=" 2.3" z="-0.12" capacity="210"/>
  <tank x="0.0" y=" 0.0" z="-0.70" capacity="156"/>
  <tank x="1.2" y="-2.3" z="-0.12" capacity="210"/>

  <weight x=" 0.75" y="0" z="-0.5" mass-prop="/sim/weight[0]/weight-lb"/>
  <weight x="-1.00" y="0" z="-0.5" mass-prop="/sim/weight[1]/weight-lb"/>

  <!-- Displacment mass -->
  <ballast x="4.23" y="0.001" z="-1.56" mass="600" />

</airplane>
