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

<!--
     Sikorsky CH-37 Mojave : BARANGER Emmanuel (06/2021)
                    Update : BARANGER Emmanuel (06/2024)

     Sources  : https://www.wikiwand.com/en/Sikorsky_CH-37_Mojave

     Length             : 19.58 m    (    64 ft 3 in ) fuselage only
     Height             :   6.71 m   (    22 ft 0 in )
     Main rotor diameter: 21.95 m    (    72 ft 0 in )
     Empty weight       :  9449 kg   ( 20831 lb      )
     Max takeoff weight : 14061 kg   ( 31000 lb      )
     Powerplant         : 2 Pratt & Whitney R-2800-54 Double Wasp 18-cylinder air-cooled radial piston engines ( 2100 hp each )
     Maximum speed      :   209 km/h (   113 kn      )
     Cruise speed       :   190 km/h (   100 kn      )
-->
<airplane mass="20831" version="YASIM_VERSION_CURRENT" mtow-lbs="31000">

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

  <cruise speed="100" alt="0">
    <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="3.591" y="0" z="2.789"
         nx="0.02" ny="0" nz="1"
         fx="1" fy="0" fz="0"
         ccw="0"
         mincollective="-80" maxcollective="80"
         mincyclicele="-75"  maxcyclicele="75"
         mincyclicail="-65"  maxcyclicail="65"
         diameter="21.5"
         numblades="5"
         weightperblade="400"
         relbladecenter="0.6"
         dynamic="1"
         rpm="250"
         rellenflaphinge="0.18"
         delta=".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.0"
         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.0">
         <control-input control="CYCLICAIL"  axis="/controls/flight/aileron"             src0="-1" src1="1" dst0="-0.04" dst1=" 0.04"/>
         <control-input control="CYCLICAIL"  axis="/controls/flight/aileron-trim"/>

         <control-input control="CYCLICELE"  axis="/controls/flight/elevator"            src0="-1" src1="1" dst0="-0.04" dst1=" 0.04"/>
         <control-input control="CYCLICELE"  axis="/controls/flight/elevator-trim"/>

         <control-input control="COLLECTIVE" axis="/controls/engines/engine[0]/throttle" src0="-1" src1="1" dst0=" 0.15" dst1="-0.01"/>

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

  <rotor name="tail"
         x="-9.61591" y="1.03142" z="2.39785"
         nx="0.0" ny="-1.0" nz="0.1"
         fx="1" fy="0" fz="0"
         ccw="0"
         mincollective="-20" maxcollective="14"
         diameter="4.5"
         numblades="4"
         chord="0.3"
         weightperblade="20"
         relbladecenter="0.5"
         dynamic="0.7"
         rpm="750"
         rellenflaphinge="0"
         delta3="0"
         translift="0"
         delta="0.1"
         pitch-a="10"
         pitch-b="15"
         airfoil-lift-coefficient="7.95"
         airfoil-drag-coefficient0="0.005"
         airfoil-drag-coefficient1="0.10"
         incidence-stall-zero-speed="10"
         incidence-stall-half-sonic-speed="5.5"
         lift-factor-stall="0.08"
         stall-change-over="3"
         drag-factor-stall="2"
         notorque="0"
         taper="1"
         number-of-segments="5"
         number-of-parts="4"
         rel-len-blade-start="0.33"
         rotor-correction-factor="0.9">
         <control-input control="COLLECTIVE" axis="/controls/flight/rudder"               src0=" -1" src1="1" dst0="-1.400" dst1="1.4" invert="true"/>
         <control-input control="COLLECTIVE" axis="/controls/engines/engine[0]/throttle"  src0="0.1" src1="1" dst0="0.0007" dst1="-0.055"/>
  </rotor>

  <!-- 2 Pratt & Whitney R-2800-54 Double Wasp 18-cylinder air-cooled radial piston engines ( 2100 hp each )

       Sources : https://www.wikiwand.com/en/Pratt_&_Whitney_R-2800_Double_Wasp
  -->
  <rotorgear max-power-engine="2100"
             max-power-rotor-brake="185"
             rotorgear-friction="3.7"
             engine-prop-factor="0.01"
             engine-accel-limit="2"
             yasimdragfactor="30"
             yasimliftfactor="55">
             <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="2" dst0="0" dst1="2"/>
             <control-input control="ROTORENGINEMAXRELTORQUE" axis="/controls/rotor/maxreltorque" src0="0" src1="2" dst0="0" dst1="2"/>
  </rotorgear>

  <rotorgear max-power-engine="2100"
             max-power-rotor-brake="185"
             rotorgear-friction="3.7"
             engine-prop-factor="0.01"
             engine-accel-limit="2"
             yasimdragfactor="30"
             yasimliftfactor="55">
             <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="2" dst0="0" dst1="2"/>
             <control-input control="ROTORENGINEMAXRELTORQUE" axis="/controls/rotor/maxreltorque" src0="0" src1="2" dst0="0" dst1="2"/>
  </rotorgear>

  <!-- Fuse -->
  <fuselage ax=" 9.873" ay=" 0.000" az="-0.281" bx=" 9.442" by=" 0.000" bz="-0.281" width="1.968" taper="0.10" midpoint="1"/>
  <fuselage ax=" 9.442" ay=" 0.000" az="-0.281" bx=" 8.382" by=" 0.000" bz="-0.281" width="2.697" taper="0.74" midpoint="1"/>
  <fuselage ax=" 8.382" ay=" 0.000" az="-0.281" bx=" 2.258" by=" 0.000" bz="-0.386" width="2.697" taper="1.00" midpoint="1"/>
  <fuselage ax=" 2.258" ay=" 0.000" az="-0.386" bx="-1.834" by=" 0.000" bz="-0.386" width="2.697" taper="0.70" midpoint="0"/>
  <fuselage ax="-1.834" ay=" 0.000" az="-0.386" bx="-5.959" by=" 0.000" bz="-0.893" width="1.888" taper="0.40" midpoint="0"/>
  <fuselage ax="-6.248" ay=" 0.000" az="-0.806" bx="-9.710" by=" 0.000" bz=" 2.622" width="0.755" taper="0.50" midpoint="0"/>

  <cockpit x="7.814" y="-0.4" z="1.064"/>

  <vstab x="-6.248" y="0" z="-0.806"
         chord="1.6"
         length="5"
         taper="0.60"
         sweep="45">
         <stall aoa="16" width="4" peak="1.5"/>
  </vstab>

  <hstab x="-3.605" y="0" z="-0.924"
         chord="1.369"
         length="2.846"
         taper="1">
         <stall aoa="0" width="0" peak="1.5"/>
  </hstab>

  <!-- Left gear -->
  <gear x="4.38840" y="2.94725" z="-2.62078"
        compression="0.12"
        spring="3.2"
        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[0]/position-norm"/>

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

  <!-- Right gear -->
  <gear x="4.38840" y="-2.94725" z="-2.62078"
        compression="0.12"
        spring="3.2"
        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>

  <!-- Tail gear -->
  <gear x="-6.70002" y="0" z="-2.59928"
        compression="0.12"
        spring="3.2"
        stiction="1">
  </gear>

  <tank x="5.6" y=" 0.7" z="-0.31" capacity="1351"/>
  <tank x="5.6" y="-0.7" z="-0.31" capacity="1351"/>
  <tank x="0.4" y=" 0.7" z="-0.31" capacity=" 904"/>
  <tank x="0.4" y="-0.7" z="-0.31" capacity=" 904"/>

  <!-- pilot -->
  <weight x="7.8" y="-0.4" z="0.6" mass-prop="/sim/weight[0]/weight-lb"/>

  <ballast x="10.0" y=" 0.0" z=" -0.2" mass=" 1128"/> <!-- 0 -->

  <ballast x=" 7.4" y=" 0.0" z=" -1.5" mass="  100"/> <!-- 1 -->
  <ballast x=" 7.4" y="-3.0" z=" -2.0" mass=" 1300"/> <!-- 2 -->
  <ballast x=" 7.4" y=" 0.0" z=" -2.0" mass=" 4000"/> <!-- 3 -->
  <ballast x=" 7.4" y=" 3.0" z=" -2.0" mass=" 1300"/> <!-- 4 -->

  <ballast x=" 6.0" y=" 0.0" z=" -1.5" mass=" 1400"/> <!-- 5 -->
  <ballast x=" 3.0" y=" 0.0" z=" -1.5" mass="-2000"/> <!-- 6 -->
  <ballast x=" 0.0" y=" 0.0" z=" -1.4" mass="-2000"/> <!-- 7 -->

</airplane>
