<?xml version="1.0" encoding="UTF-8"?>

<!-- Pioneer 200

     2011 Updated BARANGER Emmanuel with Melchior's script
 
     sources      : http://www.alpiaviation.com/eng/pr_p200_std.php

     Wingspan     : 7.50 m
     Lenght       : 6.15 m
     Height       : 1.00 m
     Weight       :  275 kg   ( 606 lb )
     Engines      : 
     Max speed    :  215 km/h ( 117 kt )
     Cruise speed :  185 km/h ( 100 kt )
     Stall speed  :   65 km/h (  35 kt )
-->

<airplane mass="606">

  <!-- 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="170"/>
    <solve-weight idx="1" weight="170"/>
    <solve-weight idx="2" weight="40"/>
  </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="170"/>
    <solve-weight idx="1" weight="170"/>
    <solve-weight idx="2" weight="40"/>
  </cruise>

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

  <!-- Fuselage -->
  <fuselage ax="2.777" ay="0" az="0.107" bx="-2.968" by="0" bz="0.108" width="1.065" taper="0.2" midpoint="0.4" cx="0.805" cz="1.409" idrag="1"/>

  <wing x="0.669" y="0.456" z="-0.372" 
        chord="1.436"
        length="3.292"
        taper="1"
        dihedral="2"
        camber="0.01">
        <stall aoa="20" width="1.0" peak="1.5"/>
        <flap0 start="0.01" end="0.47" lift="1.4" drag="1.5"/>
        <flap1 start="0.47" end="0.89" lift="1.2" drag="1.1"/>

        <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-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="20" width="4" peak="1.5"/>
         <flap0 start="0" end="1" lift="2.0" drag="1.1" effectiveness="2"/>

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

         <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="14" width="3" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.5" drag="1.2"/>

         <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" 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.433" 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.924" 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" />
  </propeller>
  
  <!-- Nose wheel -->
  <gear x="2.278" y="0" z="-1.100" 
        compression="0.15" 
        spring="0.8"
        on-solid="1"
        sfric="1"
        dfric="1">
        <control-input axis="/controls/flight/rudder" control="STEER" 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="0.8" 
        on-solid="1" >
        <control-input axis="/controls/gear/brake-left" control="BRAKE" split="true"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE" split="true"/>
  </gear>

  <!-- Right wheel -->
  <gear x="0.898" y="-1.009" z="-1.084" 
        compression="0.1" 
        spring="0.8"
        on-solid="1" >
        <control-input axis="/controls/gear/brake-right" control="BRAKE" split="true"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE" 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"/>

  <ballast x="1.2" y="0" z="-1" mass="350"/> 

</airplane>

