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

<!--Kamov KA-50 -->

<airplane mass="14400">

  <approach speed="60"/>

    <rotor name="main"
           x="0.68" y="0.00" z="1.71"
           nx="0.07" ny="0" nz="1."
           fx="1" fy="0" fz="0"
           ccw="1"
           mincollective="-100" maxcollective="100"
           mincyclicele="-100" maxcyclicele="100"
           mincyclicail="-100" maxcyclicail="100"
           diameter="14.5"
           numblades="3"       
           number-of-segments="8"
           number-of-parts="8"
           weightperblade="250"
           relbladecenter="0.5"
           dynamic="1"
           rpm="340"
           rellenflaphinge="0.18"
           delta3="0"
           delta="0.125"
           pitch-a="10" pitch-b="15"
           flapmin="-15" flapmax="15"
           flap0="-5" flap0factor="0"
           notorque="0"
           dragfactor="0.30"
           translift-ve="20" translift-maxfactor="1.5"
           ground-effect-constant="0.1"
           twist="-8.5"
           taper="1"
           chord="0.27"
           rel-len-where-incidence-is-measured="0.7"
           rel-len-blade-start="0.076"
           airfoil-lift-coefficient="10"
           airfoil-drag-coefficient0="0.02"
           airfoil-drag-coefficient1="0.60"
           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.0"
           cyclic-factor="0.8"
           rotor-correction-factor="0.95"
           downwashfactor="1.0">
           <control-input axis="/controls/flight/aileron-trim" control="CYCLICAIL"/>
           <control-input axis="/controls/flight/aileron" control="CYCLICAIL" src0="-1" src1="1" dst0="-0.04" dst1="0.04"/>
           <control-input axis="/controls/flight/elevator-trim" control="CYCLICELE"/>
           <control-input axis="/controls/flight/elevator" control="CYCLICELE" src0="-1" src1="1" dst0="-0.04" dst1="0.04"/>
           <control-input axis="/controls/engines/engine[0]/throttle" control="COLLECTIVE" src0="-1" src1="1" dst0="0.15" dst1="-0.01"/>
           <control-input axis="/controls/flight/rudder-trim" control="COLLECTIVE" invert="true"/>
           <control-input axis="/controls/flight/rudder" control="COLLECTIVE" invert="true" src0="-1.0" src1="1.0" dst0="0.05" dst1="-0.05"/>
    </rotor>

    <rotor name="main2"
             x="0.57" y="0.00" z="3.14"
             nx="0.07" ny="0" nz="1."
             fx="1" fy="0" fz="0"
             ccw="0"
             mincollective="-100" maxcollective="100"
             mincyclicele="-100" maxcyclicele="100"
             mincyclicail="-100" maxcyclicail="100"
             diameter="14.5"
             numblades="3"
        weightperblade="250"
        relbladecenter="0.5"
        dynamic="1" rpm="340" rellenflaphinge="0.18" delta3="0"
        delta=".125"
        pitch-a="10"
        pitch-b="15"
        flapmin="-15"
        flapmax="15"
        flap0="-5"
        flap0factor="0"
        notorque="0"
        dragfactor="0.30"
        translift-ve="20"
        translift-maxfactor="1.5"
        ground-effect-constant="0.1"
        twist="-8.5"
        taper="1"
        chord="0.27"
        number-of-segments="8"
        number-of-parts="8"
        rel-len-where-incidence-is-measured="0.7"
        rel-len-blade-start="0.076"
        airfoil-lift-coefficient="10"
        airfoil-drag-coefficient0="0.02"
        airfoil-drag-coefficient1="0.60"
        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.0"
        cyclic-factor="0.8"
        rotor-correction-factor="0.95"
        downwashfactor="1.0">
        <control-input axis="/controls/flight/aileron-trim" control="CYCLICAIL"/>
        <control-input axis="/controls/flight/aileron" control="CYCLICAIL" src0="-1" src1="1" dst0="-0.04" dst1="0.04"/>
        <control-input axis="/controls/flight/elevator-trim" control="CYCLICELE"/>
        <control-input axis="/controls/flight/elevator" control="CYCLICELE" src0="-1" src1="1" dst0="-0.04" dst1="0.04"/>
        <control-input axis="/controls/engines/engine[0]/throttle" control="COLLECTIVE" src0="-1" src1="1" dst0="0.15" dst1="-0.01"/>
        <control-input axis="/controls/flight/rudder-trim" control="COLLECTIVE" invert="true"/>
        <control-input axis="/controls/flight/rudder" control="COLLECTIVE" invert="true" src0="-1.0" src1="1.0" dst0="-0.05" dst1="0.05"/>
    </rotor>
  
  <rotorgear max-power-engine="3100"
             max-power-rotor-brake="150"
             rotorgear-friction="10"
             engine-prop-factor="0.01"
             engine-accel-limit="4"
             yasimdragfactor="40"
             yasimliftfactor="85">
             <control-input axis="/controls/engines/engine[0]/magnetos" control="ROTORGEARENGINEON"/>
             <control-input axis="/controls/rotor/brake" control="ROTORBRAKE" src0="0.0" src1="1.0" dst0="0.0" dst1="1.0"/>
             <control-input axis="/controls/rotor/reltarget" control="ROTORRELTARGET" src0="0.0" src1="2.0" dst0="0.0" dst1="2.0"/>
             <control-input axis="/controls/rotor/maxreltorque" control="ROTORENGINEMAXRELTORQUE" src0="0.0" src1="2.0" dst0="0.0" dst1="2.0"/>
  </rotorgear>

  <cockpit x="7.589" y="0.694" z="-0.570"/>

  <!-- Fuse -->
  <fuselage ax="5.5" ay="0" az="-.3" bx="2.8" by="0" bz="-.3" width="1.2" taper="0.2" midpoint="0.95" cx="1" cz="0.5" idrag="0"/>
  <fuselage ax="2.8" ay="0" az=".1" bx="1" by="0" bz=".1" width="2" taper="1.0" midpoint="0.5" cx="1" cz="0.5" idrag="0"/>
  <fuselage ax="1.0" ay="0" az=".1" bx="-1.3" by="0" bz=".1" width="2.6" taper="1.0" midpoint="0.5" cx="1" cz="0.5" idrag="0"/>

  <!-- Tail -->
  <fuselage ax="-1.3" ay="0" az=".1" bx="-7" by="0" bz=".1" width="2.6" taper=".1" midpoint="0.05" cx="1" cz="0.5" idrag="0"/>

  <vstab x="-7.5" y="1.3" z=".45"
         chord="1."
         length="2."
         taper=".5"
         effectiveness="2.0"
         sweep="0"
         incidence="0">
         <stall aoa="16" width="4" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.35" 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"/>
  </vstab>

  <hstab x="-4.8" y="0.36" z="0.6"
         chord="1.3"
         length="1.1"
         taper="0.75"
         effectiveness="1.0"
         sweep="0"
         incidence="0">
         <stall aoa="0" width="0" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.35" drag="1.3"/>

         <control-input axis="/controls/flight/elevator" control="FLAP0" square="false"/>
         <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"/>
  </hstab>

  <hstab x="-0.28" y="1.33" z="0.15"
         chord="1.4"
         length="2.1"
         taper="0.75"
         effectiveness="1.0"
         sweep="0"
         incidence="0">
         <stall aoa="0" width="0" peak="1.5"/>
  </hstab>

  <gear x="3.353" y="0" z="-1.486"
        compression="0.1"
        spring="3"
        damp="1.0"
        sfric="1.5"
        dfric="0.8">
        <control-input axis="/controls/flight/rudder" control="STEER" square="true" src0="-1" dst0="-1.0" src1="1" dst1="1.0"/>
        <control-output control="STEER" prop="controls/gear/steering"/>
        <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 gear -->
  <gear x="-1.386" y="1.350" z="-1.467"
        compression="0.1"
        spring="3.2"
        damp="1.0"
        sfric="1.5"
        dfric="0.8"
        initial-load="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[1]/position-norm"/>
        <control-speed control="EXTEND" transition-time="7"/>
  </gear>

  <!-- right gear -->
  <gear x="-1.386" y="-1.350" z="-1.467"
        compression="0.1"
        spring="3.2"
        damp="1.0"
        sfric="1.5"
        dfric="0.8"
        initial-load="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[2]/position-norm"/>
        <control-speed control="EXTEND" transition-time="7"/>
  </gear>

  <!-- Tail skid -->
  <gear x="-5.5" y="0" z="-.21"
        skid="1"
        compression="0.01"
        spring="0.1"
        sfric="1"
        dfric="1">
  </gear>

  <!-- contact points of fuselage -->
  <gear x="4.36" y="0" z="-1"
        compression="0.02"
        spring="3.2"
        damp="1.0"
        sfric="1.5"
        dfric="0.8"
        ignored-by-solver="1"
        initial-load="1">
  </gear>

  <gear x="-1" y=".8" z="-.8"
        compression="0.02"
        spring="3.2"
        damp="1.0"
        sfric="1.5"
        dfric="0.8"
        ignored-by-solver="1"
        initial-load="1">
  </gear>

  <gear x="-1" y="-.8" z="-.8"
        compression="0.02"
        spring="3.2"
        damp="1.0"
        sfric="1.5"
        dfric="0.8"
        ignored-by-solver="1"
        initial-load="1">
  </gear>

  <gear x="2.5" y="0.8" z="-.86"
        compression="0.02"
        spring="3.2"
        damp="1.0"
        sfric="1.5"
        dfric="0.8"
        ignored-by-solver="1"
        initial-load="1">
  </gear>

  <gear x="2.5" y="-.8" z="-.86"
        compression="0.02"
        spring="3.2"
        damp="1.0"
        sfric="1.5"
        dfric="0.8"
        ignored-by-solver="1"
        initial-load="1">
  </gear>

  <tank x="0" y="1.3" z="-1.2" capacity="1500"/>

  <!-- <ballast x="-0.7" y="0.0" z="-1.0" mass="450"/> -->
  <ballast x="1" y="+0.0" z=" 0" mass="2000"/>
  <ballast x="13.5" y="+0.0" z=" 0" mass="1000"/>
  <ballast x="1" y="+5.0" z=" 0" mass="500"/>
  <ballast x="1" y="-5.0" z=" 0" mass="500"/>
  <ballast x="1" y="+0.0" z=" 3" mass="500"/>
  <ballast x="1" y="+0.0" z="-3" mass="500"/>

  <!-- 
  <ballast x="+5.7" y="-3.0" z=" -4.5" mass="1300"/>
  <ballast x="+5.7" y=" 3.0" z="  -4.5" mass="1300"/>

  <ballast x="+5.7" y="+0.0" z="  2.0" mass="1400"/>
  <ballast x="+5.7" y="+0.0" z="  -2.0" mass="1400"/>
  <ballast x="+2.0" y="+0.0" z="  0.0" mass="4000"/>
  <ballast x="-1.0" y="+0.0" z="  0.0" mass="-2000"/>
  <ballast x="+5.0" y="+0.0" z="  0.0" mass="-2000"/>
  -->

  <!-- pilot -->
  <weight x="2.3" y=".0" z="-.3" mass-prop="/sim/weight[0]/weight-lb"/>

  <!-- load -->
  <weight x=".0" y="0" z=".0" mass-prop="/sim/weight[3]/weight-lb"/>

  <!-- hitch -->
  <hitch name="aerotow" 
         x=".6" y="0.0" z="-0.7" 
         force-is-calculated-by-other="0">
         <tow length="30" 
              weight-per-meter="0.035" 
              elastic-constant="9000" 
              break-force="80000" 
              mp-auto-connect-period="0.0"/>
         <winch max-tow-length="100" 
                min-tow-length="30" 
                initial-tow-length="30"/>
         <control-input axis="/controls/aerotow/find-aircraft" control="FINDAITOW"/>
  </hitch>

</airplane>

