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

<!-- Mil Mi 2 Hoplite   : 05/2024 - Emmanuel BARANGER

     Sources : https://www.wikiwand.com/en/Mil_Mi-2

     Length              :   11.4 m    (   37 ft 5 in )
     Rotor diameter      :
     Height              :   3.75 m    (   12 ft 4 in )
     Empty weigth        :   2372 kg   ( 5229 lb      )
     Max takeoff weight  :   3700 kg   ( 8157 lb      )
     Main rotor diameter :   14.5 m    (   47 ft 7 in )
     Powerplant          : 2 Klimov GTD-350P turboshaft engines ( 400 hp each )
     Fuel capacity       :    600 L    (  160 US gal  ) standard internal fuel
                           with provision for additional 423 L ( 112 US gal) in auxiliary tanks
     Cruise speed        :    194 km/h ( 110 kn       )
     Maximum speed       :    210 km/h ( 110 kn       )
-->
<airplane mass="5229" version="YASIM_VERSION_CURRENT" mtow-lbs="8157">

  <approach speed="30">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.3"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.3"/>
  </approach>

  <cruise speed="100" alt="100">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="1"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="1"/>
  </cruise>

  <rotor name="main"
         x="2.866"  y="0"  z="1.753"
         nx="0.09" ny="0" nz="1"
         fx="1"    fy="0" fz="0"
         ccw="0"
         mincollective="-12" maxcollective="12"
         mincyclicele="-12"  maxcyclicele="12"
         mincyclicail="-8"   maxcyclicail="8"
         diameter="14.5"
         numblades="3"
         weightperblade="200"
         relbladecenter="0.6"
         dynamic="1"
         rpm="300"
         rellenflaphinge="0.18"
         delta="0.108" delta3="0"
         number-of-segments="8"
         number-of-parts="8"
         chord="0.5"
         twist="-10"
         pitch-a="10"  pitch-b="15"
         flapmin="-15" flapmax="15"
         flap0="-5"    flap0factor="0"
         notorque="0"
         balance="1"
         dragfactor="0.3"
         translift-ve="30"
         translift-maxfactor="1.3"
         ground-effect-constant="0.1"
         taper="1"
         rel-len-where-incidence-is-measured="0.7"
         rel-len-blade-start="0.076"
         airfoil-lift-coefficient="12.98"
         airfoil-drag-coefficient0="0.025"
         airfoil-drag-coefficient1="0.65"
         incidence-stall-zero-speed="19"
         incidence-stall-half-sonic-speed="14.5"
         lift-factor-stall="0.18"
         stall-change-over="5.5"
         drag-factor-stall="2"
         cyclic-factor="0.8"
         rotor-correction-factor="0.95"
         downwashfactor="1">
         <control-input  control="CYCLICELE"  axis="/controls/flight/elevator-trim"/>
         <control-input  control="CYCLICAIL"  axis="/controls/flight/aileron-trim"/>
         <control-input  control="CYCLICAIL"  axis="/controls/flight/aileron"              src0="-1" src1="1" dst0="-0.50" dst1=" 0.50"/>
         <control-input  control="CYCLICELE"  axis="/controls/flight/elevator"             src0="-1" src1="1" dst0="-0.30" dst1=" 0.30"/>
         <control-input  control="COLLECTIVE" axis="/controls/engines/engine[0]/throttle"  src0=" 0" src1="1" dst0=" 0.70" dst1="-0.08"/>

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

  <rotor name="tail"
         x="-5.601" y="-0.456" z="1.010"
         nx="0" ny="1" nz="0"
         fx="1" fy="0" fz="0"
         ccw="0"
         mincollective="-20" maxcollective="14"
         diameter="2.66"
         numblades="2"
         chord="0.259"
         weightperblade="5"
         relbladecenter="0.6"
         dynamic="1"
         rpm="3584"
         rellenflaphinge="0"
         delta="0.5" delta3="0"
         translift="0"
         pitch-a="10" pitch-b="15"
         airfoil-lift-coefficient="6.4"
         airfoil-drag-coefficient0="0.0035"
         airfoil-drag-coefficient1="0.010"
         incidence-stall-zero-speed="16"
         incidence-stall-half-sonic-speed="18"
         lift-factor-stall="0.18"
         stall-change-over="5.5"
         drag-factor-stall="8"
         notorque="0"
         taper="1"
         number-of-segments="5"
         number-of-parts="4"
         rel-len-blade-start="0.4"
         rotor-correction-factor="0.98">
         <control-input control="COLLECTIVE" axis="/controls/flight/rudder-trim"/>
         <control-input control="COLLECTIVE" axis="/controls/flight/rudder"              src0="-1" src1="1" dst0="-0.10" dst1=" 0.53"/>
  </rotor>

  <!-- 2 Klimov GTD-350P turboshaft engines ( 400 hp each )

       Sources : https://www.wikiwand.com/en/PZL_GTD-350P
  -->
  <rotorgear max-power-engine="400"
             max-power-rotor-brake="100"
             rotorgear-friction="1.4"
             engine-prop-factor="0.005"
             engine-accel-limit="2"
             yasimdragfactor="18.5"
             yasimliftfactor="18">
             <control-input control="ROTORGEARENGINEON"       axis="/controls/engines/engine[0]/magnetos"/>
             <control-input control="ROTORBRAKE"              axis="/controls/rotor/brake"        src0="0" src1="1" dst0="0" dst1="1"/>
             <control-input control="ROTORRELTARGET"          axis="/controls/rotor/reltarget"    src0="0" src1="1" dst0="0" dst1="1"/>
             <control-input control="ROTORENGINEMAXRELTORQUE" axis="/controls/rotor/maxreltorque" src0="0" src1="1" dst0="0" dst1="1"/>
  </rotorgear>

  <rotorgear max-power-engine="400"
             max-power-rotor-brake="100"
             rotorgear-friction="1.4"
             engine-prop-factor="0.005"
             engine-accel-limit="2"
             yasimdragfactor="18.5"
             yasimliftfactor="18">
             <control-input control="ROTORGEARENGINEON"       axis="/controls/engines/engine[1]/magnetos"/>
             <control-input control="ROTORBRAKE"              axis="/controls/rotor/brake"        src0="0" src1="1" dst0="0" dst1="1"/>
             <control-input control="ROTORRELTARGET"          axis="/controls/rotor/reltarget"    src0="0" src1="1" dst0="0" dst1="1"/>
             <control-input control="ROTORENGINEMAXRELTORQUE" axis="/controls/rotor/maxreltorque" src0="0" src1="1" dst0="0" dst1="1"/>
  </rotorgear>

  <cockpit x="4.509" y="0.394" z="-0.380"/>

  <fuselage ax=" 5.683" ay=" 0.000" az="-0.775" bx=" 4.418" by=" 0.000" bz="-0.684" width="1.527" taper="0.50" midpoint="1"/>
  <fuselage ax=" 4.418" ay=" 0.000" az="-0.063" bx=" 1.533" by=" 0.000" bz="-0.063" width="1.527" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.533" ay=" 0.000" az="-0.063" bx=" 0.481" by=" 0.000" bz="-0.044" width="1.527" taper="0.50" midpoint="0"/>
  <fuselage ax=" 0.481" ay=" 0.000" az="-0.044" bx="-3.773" by=" 0.000" bz=" 0.036" width="0.778" taper="0.40" midpoint="0"/>
  <fuselage ax="-3.773" ay=" 0.000" az=" 0.036" bx="-5.668" by=" 0.000" bz=" 1.068" width="0.332" taper="0.40" midpoint="0"/>

  <fuselage ax=" 4.418" ay=" 0.000" az="-0.683" bx=" 1.533" by=" 0.000" bz="-0.683" width="1.527" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.861" ay=" 0.000" az="-0.759" bx=" 0.637" by=" 0.000" bz="-0.071" width="1.527" taper="0.50" midpoint="0"/>

  <fuselage ax=" 4.418" ay=" 0.000" az=" 0.437" bx=" 2.975" by=" 0.000" bz=" 0.437" width="1.527" taper="0.50" midpoint="1"/>
  <fuselage ax=" 2.975" ay=" 0.000" az=" 0.437" bx=" 1.301" by=" 0.000" bz=" 0.437" width="1.527" taper="0.50" midpoint="0"/>

  <hstab x="-3.506" y="0" z="0.014"
         chord="0.526"
         length="0.905"
         taper="1">
         <flap0 start="0.0" end="1.0" lift="1.7" drag="1.7"/>
         <control-input  control="FLAP0"  axis="/controls/flight/elevator" src0="-1" src1="1" dst0="-0.40" dst1=" 0.40"/>
  </hstab>

  <!-- front -->
  <gear x=" 4.697" y=" 0.000" z="-1.858"
        compression="0.15"
        spring="8"
        stiction="1">
        <control-input  control="STEER"  axis="/controls/flight/rudder" src0="-1.0" src1="1.0" dst0="-0.1" dst1="0.1"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

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

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

  <!-- Left -->
  <gear x=" 2.199" y=" 1.526" z="-1.852"
        compression="0.15"
        spring="8"
        stiction="1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

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

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

  <!-- Right -->
  <gear x=" 2.199" y="-1.526" z="-1.852"
        compression="0.15"
        spring="8"
        stiction="1">
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

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

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

  <!-- Tail -->
  <gear x="-4.083" y=" 0.000" z="-0.898"
        skid="1"
        compression="0.1"
        spring="8"
        stiction="1">
  </gear>


  <!-- Fuel tanks 600 L (1322.77 lbs) -->
  <tank x="2.800" y=" 0.000" z="-1.300" capacity="1322.77"/>  <!-- Fuselage         -->
  <!-- External fuel tanks 238 l (524.7 lbs) each -->
  <tank x="3.314" y=" 1.088" z="-0.830" capacity=" 524.70"/>  <!-- Left External    -->
  <tank x="3.014" y="-1.088" z="-0.830" capacity=" 524.70"/>  <!-- Right External   -->

  <!-- pilot -->
  <weight x=" 4.600" y="-0.410" z="-0.870" mass-prop="/sim/weight[0]/weight-lb"/>

  <!-- co-pilot -->
  <weight x=" 4.600" y=" 0.410" z="-0.870" mass-prop="/sim/weight[1]/weight-lb"/>

  <!-- load -->
  <weight x=" 2.900" y=" 0.000" z="-1.000" mass-prop="/sim/weight[2]/weight-lb"/>

  <!-- Mass displacement  : Rotor center on x 2.866 -->
  <ballast x=" 4.888" y=" 1.200" z="-1.470" mass="240"/>
  <ballast x=" 4.888" y=" 1.200" z="-0.470" mass="240"/>
  <ballast x=" 4.888" y="-1.200" z="-0.470" mass="240"/>
  <ballast x=" 4.888" y="-1.200" z="-1.470" mass="240"/>

  <ballast x=" 2.210" y=" 1.200" z="-1.470" mass="200"/>
  <ballast x=" 2.210" y=" 1.200" z="-0.470" mass="200"/>
  <ballast x=" 2.210" y="-1.200" z="-0.470" mass="200"/>
  <ballast x=" 2.210" y="-1.200" z="-1.470" mass="200"/>

</airplane>
