<!--  MiG-15bis yasim config.
-->

<airplane mass="8633">

<!-- Approach configuration -->
  <approach speed="125" aoa="5.0" fuel="0.2">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.7"/>
    <control-setting axis="/controls/flight/flaps" value="1.0"/>
    <control-setting axis="/controls/flight/spoiler" value="0.0"/>
    <control-setting axis="/controls/gear/gear-down" value="1"/>
    <solve-weight idx="0" weight="80"/>
    <solve-weight idx="1" weight="31"/>
    <solve-weight idx="2" weight="31"/>
  </approach>

<!-- Cruise configuration -->
  <cruise speed="581" alt="1000" fuel="0.8">
<!--<cruise speed="500" alt="47500" fuel="0.6"> -->
    <control-setting axis="/controls/engines/engine[0]/throttle" value="1.0"/>
    <control-setting axis="/controls/flight/flaps" value="0.0"/>
    <control-setting axis="/controls/gear/gear-down" value="0"/>
    <solve-weight idx="0" weight="80"/>
  </cruise>

  <cockpit x="-2.12" y="0.0" z="0.8"/>

  <fuselage ax="0.0" ay="0.0" az="0.0"
            bx="-8.1" by="0" bz="0.0"
            width="1.5" taper="0.5" midpoint="0.5"/>

<!-- Wing -->
  <wing x="-3.75" y="0.75" z="0.0" 
        chord="2.46" taper="0.65"
        length="5.0" sweep="31"
        camber="0.0" dihedral="-2.0"
        incidence="0.0">

    <stall aoa="18" width="3" peak="1.6"/>

    <flap0 start="0.1" end="0.65" lift="1.3" drag="1.4"/>
    <flap1 start="0.65" end="0.95" lift="1.1" drag="1.3"/>

    <spoiler start="0.0" end="0.2" lift="1.0" drag="20.0"/>

    <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-input axis="/controls/flight/spoilers" control="SPOILER"/>

    <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="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="SPOILER" side="left" prop="/surface-positions/left-spoiler-pos-norm"/>
    <control-output control="SPOILER" side="right" prop="/surface-positions/right-spoiler-pos-norm"/>

    <control-speed control="FLAP0" transition-time="10"/>

    <control-speed control="SPOILER" transition-time="2.0"/>
  </wing>

<!-- HStab -->
  <hstab x="-8.8" y="0.08" z="1.59"
         chord="1.37" taper="0.43"
         length="1.9" sweep="33.4"
         camber="0.0" dihedral="0.0"
         effectiveness="2.4">
       
    <stall aoa="19.0" width="2" peak="1.6"/>
  
    <flap0 start="0.1" end="1" lift="1.5" drag="1.5"/>

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

    <control-speed control="FLAP0" transition-time="1.0"/>
  </hstab>

<!-- Rudder -->
  <vstab x="-7.22" y="0" z="0.5"
         chord="2.6" taper="0.47"
         length="2.75"  sweep="48"
         effectiveness="1.0">
       
    <stall aoa="24.0" width="2" peak="1.5"/>

    <flap0 start="0.1" end="1" lift="1.5" drag="1.3"/>

    <control-input axis="/controls/flight/rudder" control="FLAP0" invert="true"/>

    <control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm"/>

    <control-speed control="FLAP0" transition-time="0.5"/>
  </vstab>

<!-- Landing Gear -->
<!-- nose -->
  <gear x="-1.05" y="0" z="-1.46"
        retract-time="7" compression="0.4" spring="0.4">

    <control-input axis="/controls/flight/rudder" control="STEER" square="true"/>
    <control-input axis="/controls/gear/gear-down" control="EXTEND"/>

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

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

<!-- left main -->
  <gear x="-4.29" y="1.9" z="-1.34"
        retract-time="7" compression="0.6" spring="1.4">

    <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="-4.29" y="-1.9" z="-1.34"
        retract-time="7" compression="0.6" spring="1.4">

    <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>

<!-- Engine -->
  <jet x="-4.8" y="0.0" z="0.0"
       mass="1600" thrust="5952">
     
    <actionpt x="-8.1" y="0" z="0"/>

    <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
  </jet>

  <tank x="-4.0" y="0.0" z="0.0"
        jet="true" capacity="2100"/>

  <ballast x="-1.8" y="0" z="0" mass="1200"/> <!-- Cockpit -->
  <ballast x="-2.0" y="0" z="0" mass="2000"/> <!-- Trim ballast -->

<!--
    N-37 ammunition.
-->
  <weight x="-1.2" y="-0.3" z="-0.6" size="0.9"
          mass-prop="/yasim/weights/N-37-ammunition-weight-lbs"/>

<!--
    NR-23 (inner) ammunition.
-->
  <weight x="-1.5" y="0.29" z="-0.52" size="0.9"
          mass-prop="/yasim/weights/NR-23-I-ammunition-weight-lbs"/>

<!--
    NR-23 (outer) ammunition.
-->
  <weight x="-1.22" y="0.37" z="-0.38" size="0.9"
          mass-prop="/yasim/weights/NR-23-O-ammunition-weight-lbs"/>

</airplane>
