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

<!-- Robin DR 400-180 - Laurent Vromman
                        Oliver FAIVRE 30-01-2010

     Based on DR400 2008 - Emmanuel BARANGER 
-->

<airplane mass="1466.9">

  <!-- Approach configuration -->
  <approach speed="67" aoa="6" fuel="0.3">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.2"/>  <!--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"/>
    <solve-weight idx="3" weight="0"/> 
 </approach>

  <!-- Cruise configuration -->
  <cruise speed="134" alt="5000" fuel="1.0">
    <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"/>
    <solve-weight idx="3" weight="0"/>
  </cruise>

  <cockpit x="1.289" y="0.195" z="0.555"/>

  <fuselage ax="3.061" ay="0" az="0.029" bx="-3.268" by="0" bz="-0.020" width="1.1" midpoint="0.3" taper="0.4"/>

  <wing x="0.896" y="0.0" z="-0.384"
        chord="1.710" 
        length="2.72" 
        taper="1" 
        incidence="1"
        camber="0.01">
        <stall aoa="18" width="1.0" peak="1.5"/>
        <flap0 start="0.24" end="0.99" lift="1.4" drag="1.5"/>
        <!-- 03/02/2010 O.Faivre - Suppression de la commande invert="false" -->
        <control-input axis="/controls/flight/flaps" control="FLAP0"/>
        
        <control-output control="FLAP0" prop="/surface-positions/flap-pos-norm"/>
        
        <control-speed control="FLAP0" transition-time="5"/>
  </wing>

  <mstab x="0.896" y="2.72" z="-0.384"
        chord="1.710" 
        length="1.7" 
        taper="0.5"
        sweep="-7.5" 
        incidence="1"
        dihedral="14"
        camber="0.01">
        <stall aoa="18" width="1.0" peak="1.5"/>
        <flap1 start="0.01" end="1" lift="1.2" drag="1.1"/>
        
        <control-input axis="/controls/flight/aileron" control="FLAP1" split="true"/>
        <control-input axis="/controls/flight/aileron-trim" control="FLAP1" split="true"/> 
        
        <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"/>
        
  </mstab>

  <hstab x="-2.540" y="0.0" z="0.151" 
         chord="0.8"
         taper="1.0"
         length="1.636">
         <stall aoa="20" width="4" peak="1.5"/>
         <flap0 start="0" end="1" lift="2.0" drag="1.1"/>
       
         <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.659" y="0" z="0.169"
       chord="1.4"
       length="1.1" 
       taper="0.40"
       sweep="30">
       <stall aoa="18" width="3" peak="1.5"/>
       <flap0 start="-0.35" end="1" lift="1.6" 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" min="1" max="-1"/>
  </vstab>

 <!--  Lycoming O-363-A3A  -->
  <!-- http://www.lycoming.textron.com/engines/series/pdfs/360ci%20Engine%20Insert.pdf -->
  <propeller x="2.540" y="0.0" z="-0.067" 
            mass="252" 
             moment="6"
             radius="0.882"
             cruise-speed="131" 
             cruise-rpm="2490"
             cruise-alt="8000" 
             cruise-power="130"
             takeoff-power="170" 
             takeoff-rpm="2575" >
             <piston-engine eng-rpm="2700" 
                            alt="0000" 
                            eng-power="180" 
                            displacement="360" 
                            compression="8.5"/>
             <actionpt x="3.146" y="0.0" z="0.029" />
             <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>

  <gear x="2.560" y="0" z="-1.115" 
        compression="0.15" 
        spring="0.6">
        <control-input axis="/controls/flight/rudder" control="STEER" src0="-1.0" src1="1.0" dst0="-0.2" dst1="0.2"/>
   </gear>

  <gear x="1.020" y="1.236" z="-1.115" 
        compression="0.10" 
        spring="0.6">
        <control-input axis="/controls/gear/brake-left" control="BRAKE" split="true"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE" split="true"/>
  </gear>

  <gear x="1.020" y="-1.236" z="-1.115" 
        compression="0.10" 
        spring="0.6">
        <control-input axis="/controls/gear/brake-right" control="BRAKE" split="true"/>
        <control-input axis="/controls/gear/brake-parking" control="BRAKE" split="true"/>
  </gear>

  <!-- Fuel  -->
  <tank x="0.72" y="0.0" z="-0.382" capacity="169" />

  <!-- Pilot -->
  <weight x="1.4" y="0.30" z="0"
        mass-prop="sim/weight[0]/weight-lb"/>
  <!-- Copilot -->
  <weight x="1.4" y="-0.30" z="0"
        mass-prop="sim/weight[1]/weight-lb"/>
  <!-- Pax -->
  <weight x="0.65" y="0.30" z="0"
        mass-prop="sim/weight[2]/weight-lb"/>
  <!-- Cargo -->
  <weight x="-0.1" y="0.30" z="0"
        mass-prop="sim/weight[3]/weight-lb"/>

  <!-- Laurent Vromman : Correction du CG à vide : x~=1.5, soit 50cm avant la roue -->
  <ballast x="5.5" y="0.0" z="0.0" mass="200"/>

</airplane>
