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

<!-- Nakajima-B5N Kate - 2011 Emmanuel BARANGER
   
     sources          : http://en.wikipedia.org/wiki/Nakajima_B5N
     wingspan         : 15.52 m    ( 50 ft 11   in )
     length           : 10.30 m    ( 33 ft 91/2 in )
     height           :  3.70 m    ( 12 ft 15/8 in )
     max speed        :   378 km/h ( 204 kn        )
     empty weight     :  2279 kg   ( 5024 lb       )
     engine           : Nakajima Sakae 11 radial engine (1000 hp)
-->
<airplane mass="5024" version="YASIM_VERSION_CURRENT">

  <approach speed="70" aoa="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/engines/engine[0]/propeller-pitch" value="1"/>
    <control-setting axis="/controls/engines/engine[0]/boost" value="0"/>
    <control-setting axis="/controls/flight/flaps" value="1"/>
    <control-setting axis="/controls/gear/gear-down" value="1"/>
  </approach>

  <cruise speed="185" alt="6400">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.7"/>
    <control-setting axis="/controls/engines/engine[0]/mixture" value="0.7"/>
    <control-setting axis="/controls/engines/engine[0]/propeller-pitch" value="0.2"/>
    <control-setting axis="/controls/engines/engine[0]/boost" value="1"/>
    <control-setting axis="/controls/flight/flaps" value="0"/>
    <control-setting axis="/controls/gear/gear-down" value="0"/>
  </cruise>

  <cockpit x="2.380" y="0" z="0.662"/>

  <fuselage ax="4.743" ay="0" az="-0.164" bx=" 2.652" by="0" bz="-0.097" width="1.205" taper="0.6" midpoint="1"/>
  <fuselage ax="2.652" ay="0" az="-0.097" bx="-5.133" by="0" bz=" 0.105" width="1.205" taper="0.2" midpoint="0"/>

  <wing x="1.4" y="0.467" z="-0.530" 
        chord="3.100"
        length="7.263" 
        taper="0.5" 
        dihedral="4.5"
        camber="0.005">
        <stall aoa="20" width="1" peak="1.5"/>
        <flap0 start="0.048" end="0.375" lift="1.5" drag="1.2"/>
        <flap1 start="0.468" end="0.906" 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/flaps-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="20"/>
  </wing>

  <hstab x="-3.944" y="0.0" z="0.089" 
         chord="1.752"
         length="2.353" 
         taper="0.35"
         sweep="7">
         <stall aoa="18" width="1" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.2" 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="-3.941" y="0.00" z="0.192" 
         chord="1.738"
         length="1.600" 
         taper="0.35"
         sweep="11">
         <stall aoa="14" width="1" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.2" drag="1.1"/>

         <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"/>
  </vstab>

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

                 name              : Nakajima Sakae
                 type              : 14-cylinder air-cooled two-row radial engine
                 power cruise      :   1020 hp at 2600 rpm at 6400 ft (1950 m)
                 weight            :    533 kg ( 1180 lb  )
                 displacement      : 27.8 L    ( 1700 in3 )
                 compression       : 7:1
  -->
  <propeller x="4.316" y="0" z="-0.161"
             radius="1.615" 
             mass="1180"
             moment="10.5"
             cruise-alt="6400"
             cruise-power="1020"
             cruise-speed="190"
             cruise-rpm="2500"
             min-rpm="700"
             max-rpm="2800"
             contra="1">
             <actionpt x="4.911" y="0" z="-0.161"/>
             <control-input axis="/controls/engines/engine[0]/propeller-pitch" control="ADVANCE" />
             <piston-engine eng-power="1020"
                            eng-rpm="2800"
                            compression="7"
                            displacement="1700">
                            <control-input axis="/controls/engines/engine[0]/throttle" control="THROTTLE"/>
                            <control-input axis="/controls/engines/engine[0]/starter" control="STARTER"/>
                            <control-input axis="/controls/engines/engine[0]/magnetos" control="MAGNETOS"/>
                            <control-input axis="/controls/engines/engine[0]/mixture" control="MIXTURE"/>
                            <control-input axis="/controls/engines/engine[0]/boost" control="BOOST"/>
             </piston-engine>
  </propeller>

  <gear x="2.460" y="1.940" z="-2.187"
        compression="0.2"
        retract-time="7">
        <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[0]/position-norm"/>
        
        <control-speed control="EXTEND" transition-time="6.2"/>
  </gear>

  <gear x="2.460" y="-1.940" z="-2.187"
        compression="0.2" 
        retract-time="7">
        <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[1]/position-norm"/>
        
        <control-speed control="EXTEND" transition-time="6"/>
  </gear>

  <gear x="-4.696" y="0" z="-0.386"
        compression="0.2"
        retract-time="7">
        <control-input axis="/controls/flight/rudder" control="STEER" src0="-1.0" src1="1.0" dst0=".25" dst1="-.25"/>
        <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>

  <tank x="1.4" y=" 2.7" z="-0.400" capacity="570"/>
  <tank x="1.0" y=" 0.0" z="-0.355" capacity="884"/>
  <tank x="1.4" y="-2.7" z="-0.400" capacity="570"/>

  <!-- Crosse d'appontage -->
  <hook x="-3.237" y="0" z="-0.401"
        length="1.181"
        down-angle="15"
        up-angle="-10">
        <control-input axis="/controls/gear/tailhook" control="HEXTEND"/>
        <control-speed control="HEXTEND" transition-time="4"/>
  </hook>

  <!-- Launch-bar --> 
  <launchbar x="2.460" y="0" z="-2.187"  length="0.6">
             <control-input axis="/controls/gear/launchbar" control="LEXTEND"/>
             <control-speed control="LEXTEND" transition-time="1"/>
  </launchbar>
    
  <!-- Mass distribution -->
  <ballast x="-1" y="0" z="-1" mass="400"/>

</airplane>
