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

<!-- Pioneer 200   : BARANGER Emmanuel 2007

          Updated  : BARANGER Emmanuel with Melchior's script 2011
          Updated  : BARANGER Emmanuel 03/2021
          Updated  : BARANGER Emmanuel 10/2024

     sources       : https://alpiaviation.com/airplane/pioneer-200/
                     https://www.wikiwand.com/en/Alpi_Pioneer_200

     Wingspan      :  7.30 m   ( 23 ft 11 in )
     Lenght        :  6.15 m
     Height        :  1.00 m
     Empty weight  : 264.0 kg  (  582 lb     )
     Gross weight  : 472.5 kg  ( 1042 lb     )
     Engines       : 1 ROTAX 912 UL, 80 hp
     Max speed     :  215 km/h ( 117 kt      )
     Cruise speed  :  185 km/h ( 100 kt      )
     Stall speed   :   65 km/h (  35 kt      )
     Fuel capacity : 54 litres (  14 US gal  )
-->
<airplane mass="582" version="YASIM_VERSION_CURRENT" mtow-lbs="1042">

  <!-- Approach configuration -->
  <approach speed="35" aoa="2" fuel="0.2">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.2"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"  value="1.0"/>
    <control-setting axis="/controls/flight/flaps"               value="1.0"/>
    <solve-weight idx="0"                                        weight="150"/>
    <solve-weight idx="1"                                        weight="0"/>
    <solve-weight idx="2"                                        weight="0"/>
  </approach>

  <!-- Cruise configuration -->
  <cruise speed="100" alt="6000" fuel="0.5">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.75"/>
    <control-setting axis="/controls/engines/engine[0]/mixture"  value="1.0"/>
    <control-setting axis="/controls/flight/flaps"               value="0.0"/>
    <solve-weight idx="0"                                        weight="150"/>
    <solve-weight idx="1"                                        weight="0"/>
    <solve-weight idx="2"                                        weight="0"/>
  </cruise>

  <cockpit x="0.590" y="0.231" z="0.50"/>

  <!-- Casserole -->
  <fuselage ax="3.063" ay=" 0.000" az=" 0.107" bx="2.910" by=" 0.000" bz=" 0.107" width="0.146" taper="0.00" midpoint="1"/>
  <fuselage ax="2.910" ay=" 0.000" az=" 0.107" bx="2.777" by=" 0.000" bz=" 0.107" width="0.213" taper="0.68" midpoint="1"/>

  <!-- Fuselage up -->
  <fuselage ax=" 2.777" ay=" 0.106" az=" 0.107" bx=" 2.690" by=" 0.106" bz=" 0.107" width="0.280" taper="0.76" midpoint="1"/>
  <fuselage ax=" 2.777" ay=" 0.000" az=" 0.107" bx=" 2.690" by=" 0.000" bz=" 0.107" width="0.280" taper="0.76" midpoint="1"/>
  <fuselage ax=" 2.777" ay="-0.106" az=" 0.107" bx=" 2.690" by="-0.106" bz=" 0.107" width="0.280" taper="0.76" midpoint="1"/>

  <fuselage ax=" 2.664" ay=" 0.109" az=" 0.107" bx=" 2.258" by=" 0.199" bz=" 0.107" width="0.399" taper="0.70" midpoint="1"/>
  <fuselage ax=" 2.690" ay=" 0.000" az=" 0.107" bx=" 2.275" by=" 0.000" bz=" 0.107" width="0.399" taper="0.70" midpoint="1"/>
  <fuselage ax=" 2.664" ay="-0.109" az=" 0.107" bx=" 2.258" by="-0.199" bz=" 0.107" width="0.399" taper="0.70" midpoint="1"/>

  <fuselage ax=" 2.299" ay=" 0.192" az=" 0.107" bx=" 1.118" by=" 0.203" bz=" 0.107" width="0.543" taper="0.74" midpoint="1"/>
  <fuselage ax=" 2.275" ay=" 0.000" az=" 0.107" bx=" 1.118" by=" 0.000" bz=" 0.107" width="0.543" taper="0.74" midpoint="1"/>
  <fuselage ax=" 2.299" ay="-0.192" az=" 0.107" bx=" 1.118" by="-0.203" bz=" 0.107" width="0.543" taper="0.74" midpoint="1"/>

  <fuselage ax=" 1.118" ay=" 0.203" az=" 0.107" bx="-0.054" by=" 0.192" bz=" 0.107" width="0.543" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.118" ay="-0.203" az=" 0.107" bx="-0.054" by="-0.192" bz=" 0.107" width="0.543" taper="1.00" midpoint="1"/>

  <fuselage ax="-0.054" ay=" 0.192" az=" 0.107" bx="-2.594" by=" 0.000" bz="-0.001" width="0.543" taper="0.10" midpoint="0"/>
  <fuselage ax="-0.054" ay="-0.192" az=" 0.107" bx="-2.594" by=" 0.000" bz="-0.001" width="0.543" taper="0.10" midpoint="0"/>

  <!-- Fuselage down -->
  <fuselage ax=" 2.777" ay=" 0.106" az=" 0.008" bx=" 2.690" by=" 0.106" bz=" 0.008" width="0.280" taper="0.76" midpoint="1"/>
  <fuselage ax=" 2.777" ay=" 0.000" az=" 0.008" bx=" 2.690" by=" 0.000" bz=" 0.008" width="0.280" taper="0.76" midpoint="1"/>
  <fuselage ax=" 2.777" ay="-0.106" az=" 0.008" bx=" 2.690" by="-0.106" bz=" 0.008" width="0.280" taper="0.76" midpoint="1"/>

  <fuselage ax=" 2.661" ay=" 0.110" az="-0.003" bx=" 2.270" by=" 0.189" bz="-0.119" width="0.399" taper="0.70" midpoint="1"/>
  <fuselage ax=" 2.654" ay=" 0.000" az="-0.003" bx=" 2.255" by=" 0.000" bz="-0.119" width="0.399" taper="0.70" midpoint="1"/>
  <fuselage ax=" 2.661" ay="-0.110" az="-0.003" bx=" 2.270" by="-0.189" bz="-0.119" width="0.399" taper="0.70" midpoint="1"/>

  <fuselage ax=" 2.299" ay=" 0.192" az="-0.109" bx=" 1.118" by=" 0.203" bz="-0.194" width="0.543" taper="0.74" midpoint="1"/>
  <fuselage ax=" 2.297" ay=" 0.000" az="-0.109" bx=" 1.120" by=" 0.000" bz="-0.194" width="0.543" taper="0.74" midpoint="1"/>
  <fuselage ax=" 2.299" ay="-0.192" az="-0.109" bx=" 1.118" by="-0.203" bz="-0.194" width="0.543" taper="0.74" midpoint="1"/>

  <fuselage ax=" 1.118" ay=" 0.203" az="-0.194" bx="-0.054" by=" 0.192" bz="-0.194" width="0.543" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.118" ay="-0.203" az="-0.194" bx="-0.054" by="-0.192" bz="-0.194" width="0.543" taper="1.00" midpoint="1"/>

  <fuselage ax="-0.054" ay=" 0.192" az="-0.194" bx="-2.594" by=" 0.000" bz="-0.001" width="0.543" taper="0.10" midpoint="0"/>
  <fuselage ax="-0.054" ay="-0.192" az="-0.194" bx="-2.594" by=" 0.000" bz="-0.001" width="0.543" taper="0.10" midpoint="0"/>

  <!-- Canopy -->
  <fuselage ax=" 1.547" ay=" 0.135" az=" 0.229" bx=" 1.049" by=" 0.135" bz=" 0.324" width="0.560" taper="0.40" midpoint="1"/>
  <fuselage ax=" 1.112" ay=" 0.135" az=" 0.321" bx=" 0.629" by=" 0.135" bz=" 0.321" width="0.737" taper="0.76" midpoint="1"/>
  <fuselage ax=" 0.629" ay=" 0.135" az=" 0.321" bx=" 0.109" by=" 0.192" bz=" 0.282" width="0.737" taper="0.76" midpoint="0"/>
  <fuselage ax=" 0.109" ay=" 0.192" az=" 0.282" bx="-2.594" by=" 0.000" bz=" 0.091" width="0.543" taper="0.10" midpoint="0"/>

  <fuselage ax=" 1.547" ay="-0.135" az=" 0.229" bx=" 1.049" by="-0.135" bz=" 0.324" width="0.560" taper="0.40" midpoint="1"/>
  <fuselage ax=" 1.112" ay="-0.135" az=" 0.321" bx=" 0.629" by="-0.135" bz=" 0.321" width="0.737" taper="0.76" midpoint="1"/>
  <fuselage ax=" 0.629" ay="-0.135" az=" 0.321" bx=" 0.109" by="-0.192" bz=" 0.282" width="0.737" taper="0.76" midpoint="0"/>
  <fuselage ax=" 0.109" ay="-0.192" az=" 0.282" bx="-2.594" by=" 0.000" bz=" 0.091" width="0.543" taper="0.10" midpoint="0"/>

  <wing x="0.669" y="0" z="-0.372"
        chord="1.436"
        length="3.746"
        taper="1"
        dihedral="2"
        camber="0.005">
        <stall   aoa="20" width="1"    peak="1.5"/>
        <flap0 start="0.13" end="0.54" lift="1.4" drag="1.5"/>
        <flap1 start="0.54" end="0.91" lift="1.2" drag="1.2"/>

        <control-input  control="FLAP0" axis="/controls/flight/flaps"/>
        <control-input  control="FLAP1" axis="/controls/flight/aileron" split="true"/>
        <control-input  control="FLAP1" axis="/controls/flight/aileron-trim" 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="5"/>
  </wing>

  <hstab x="-2.507" y="0" z=".074"
         chord=".913"
         length="1.169"
         taper="1">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.4" drag="1.2"/>

         <control-input  control="FLAP0" axis="/controls/flight/elevator"/>
         <control-input  control="FLAP0" axis="/controls/flight/elevator-trim"/>

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

  <vstab x="-2.468" y="0" z=".111"
         chord="0.990"
         length="1.002"
         taper="0.54"
         sweep="8">
         <stall  aoa="16" width="1" peak="1.5"/>
         <flap0 start="0"   end="1" lift="1.2" drag="1.2"/>

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

         <control-output control="FLAP0" prop="/surface-positions/rudder-pos-norm" min="1" max="-1"/>
  </vstab>

  <!-- engine:    ROTAX 912 A2
       propeller: JUNKERS AVY-2 STD
  =================================================================================
  TO-/MC- engine power(kW): 59,6/58
                      RPM : 5800/5500
  propeller max RPM: 2552
  diameter: 1,72 m
  MTOM: 620 kg
  noise (dB): 66,0 (ICAO chapter 10, annex 16), 76,4 (ICAO chapter 10, annex 10.4a)
  ref: http://www.rotax-aircraft-engines.com/a_engine_912.htm  -->
  <propeller x="2.393" y="0.0" z="0.107"
             radius="0.82"
             cruise-speed="84"
             cruise-rpm="2112"
             cruise-alt="6000"
             cruise-power="58"
             takeoff-power="81"
             takeoff-rpm="2552"
             mass="178"
             moment="2.94"
             gear-ratio="0.440" >
             <actionpt x="2.884" y="0.0" z="0.107" />
             <piston-engine eng-rpm="5800"
                            eng-power="81"
                            displacement="73.91"
                            compression="9.0">
                            <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" />
             </piston-engine>
  </propeller>

  <!-- Nose wheel -->
  <gear x="2.278" y="0" z="-1.100"
        compression="0.12"
        spring="1"
        stiction="1">
        <control-input control="STEER" axis="/controls/flight/rudder" src0="-1.0" src1="1.0" dst0="-0.5" dst1="0.5"/>
  </gear>

  <!-- Left wheel -->
  <gear x="0.898" y="1.009" z="-1.084"
        compression="0.1"
        spring="1"
        stiction="1">
        <control-input control="BRAKE" axis="/controls/gear/brake-left"    split="true"/>
        <control-input control="BRAKE" axis="/controls/gear/brake-parking" split="true"/>
  </gear>

  <!-- Right wheel -->
  <gear x="0.898" y="-1.009" z="-1.084"
        compression="0.1"
        spring="1"
        stiction="1">
        <control-input control="BRAKE" axis="/controls/gear/brake-right"   split="true"/>
        <control-input control="BRAKE" axis="/controls/gear/brake-parking" split="true"/>
  </gear>

  <!-- Fuel
       ==========
       The tank is located behind the pilot and co-pilot seats
       It has a capacity of 54 L
       Motorisation accepts Avgas 100LL or Super Sans Plomb 95 (Unlead 85 MON octan indice) without any limitation
  -->
  <tank x="0.140" y="0" z="-.250" capacity="75.3" />

  <!-- Mass distribution -->

  <!-- Pilot, copilot, baggage -->
  <weight x="0.524" y=" 0.231" z="0.099" mass-prop="/sim/weight[0]/weight-lb"/>
  <weight x="0.524" y="-0.231" z="0.099" mass-prop="/sim/weight[1]/weight-lb"/>
  <weight x="0.179" y=" 0.000" z="0.230" mass-prop="/sim/weight[2]/weight-lb"/>

  <!-- Mass distribution
       Dilbert : The cg should be about 1/6 chord ahead of the chord center.
                 1.436 / 6     = 0.239
                 0.669 + 0.239 = 0.908 - 1.227
  -->
  <ballast x="2.5" y="0" z="0" mass="133"/>

</airplane>
