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

<!-- Ryan Navion - 2010 Emmanuel BARANGER
   
     sources          : http://en.wikipedia.org/wiki/Ryan_Navion

     wingspan         :  10.17 m   ( 33.38 ft )
     length           :   8.30 m   ( 27.25 ft )
     height           :   2.60 m   (  8.53 ft )
     empty weight     :  1247 kg   (  2750 lb )
     engine           : Continental E185 flat-6 piston engine (185/205 hp)
     Cruise speed     :   250 km/h (   135 kt )
-->

<airplane mass="930">

  <!-- Approach configuration -->
  <approach speed="40" aoa="4" 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"/>
  </approach>

  <!-- Cruise configuration -->
  <cruise speed="135" alt="6000" fuel="0.5">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.7"/>
    <control-setting axis="/controls/engines/engine[0]/mixture" value="0.6"/>
    <control-setting axis="/controls/flight/flaps" value="0.0"/>
  </cruise>

  <cockpit x="1.432" y="0.272" z="0.5567"/>

  <fuselage ax="3.961" ay="0" az="-0.148" bx="-3.601" by="0" bz="0.036" width="1.204" taper="0.5" midpoint="0.3"/>

  <wing x="1.145" y="0.339" z="-0.540" 
        chord="2.094" 
        length="4.698" 
        taper="0.58"
        sweep="-2.7"
        dihedral="7"
        camber="0.01">
        <stall aoa="18" width="6" peak="1.5"/>
        <flap0 start="0.00" end="0.63" lift="1.2" drag="1.25"/>
        <flap1 start="0.63" end="0.97" 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-output control="FLAP1" prop="/surface-positions/aileron-pos-norm"/>

        <control-speed control="FLAP0" transition-time="2"/>
  </wing>

  <hstab x="-3" y="0" z="0.183" 
         chord="1.184" 
         length="1.826" 
         taper="0.7"
         sweep="1">
         <stall aoa="14" width="2" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.5" drag="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="-3.396" y="0" z="-0.149" 
         chord="1.441"
         length="1.534"
         taper="0.4"
         sweep="6">
         <stall aoa="14" width="3" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.75" drag="1.35"/>

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

  <!-- Engines   source            : http://en.wikipedia.org/wiki/Continental_O-470

                 name              : Continental O-470
                 type              : S6-cylinder air-cooled horizontally opposed aircraft piston engine
                 power cruise      : 213 hp at 2575 rpm
                 weight            : 391 lb  ( 177 kg )
                 displacement      : 471 in3 ( 7.8 L  )
                 compression       : 7.0:1
  -->
  <propeller x="3.483" y="0" z="-0.057" 
             radius="1"
	     mass="391" 
	     moment="6"  
	     cruise-speed="135" 
	     cruise-rpm="2575"
	     cruise-alt="6000" 
	     cruise-power="213"
	     takeoff-power="280" 
	     takeoff-rpm="2600">
             <actionpt x="4.045" y="0" z="-0.057"/>
             <piston-engine eng-rpm="2700" 
                            eng-power="205"
                            displacement="471" 
                            compression="7"/>
             <control-input control="THROTTLE" axis="/controls/engines/engine[0]/throttle" src0="0.0" src1="1.0" dst0="0.0" dst1="1.0"/>
             <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" src0="0.0" src1="1.0" dst0="0.8" dst1="0.8"/>
  </propeller>
  
  <!-- Noze wheel -->
  <gear x="3.093" y="0" z="-1.399" 
        compression="0.15" 
        spring="0.8"
        on-solid="1"
        sfric="1"
        dfric="1">
        <control-input axis="/controls/flight/rudder" control="STEER" square="false"/>
        <control-input axis="/controls/gear/gear-down" control="EXTEND"/>
        <control-speed control="EXTEND" transition-time="7"/>
        <control-output control="EXTEND" prop="/gear/gear[0]/position-norm"/>
  </gear>

  <!-- Left wheel -->
  <gear x="1.487" y="1.336" z="-1.400"
        compression="0.2" 
        spring="1.8" 
        damp="0.03" 
        on-solid="1" >
        <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-speed control="EXTEND" transition-time="7"/>
        <control-output control="EXTEND" prop="gear/gear[1]/position-norm"/>
  </gear>

  <!-- Right wheel -->
  <gear x="1.487" y="-1.336" z="-1.400"
        compression="0.2" 
        spring="1.8"
        damp="0.03" 
        on-solid="1" >
        <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-speed control="EXTEND" transition-time="7"/>
        <control-output control="EXTEND" prop="gear/gear[2]/position-norm"/>
  </gear>

  <tank x="0.456" y="0" z="-0.310" capacity="56" />

  <!-- Mass distribution -->
  <ballast x="2" y="0" z="-2" mass="250"/>

</airplane>
