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

<!-- Bell p 59 Airacomet  : BARANGER Emmanuel    2010
                 Updated  : BARANGER Emmanuel 06/2022

     source             : http://en.wikipedia.org/wiki/Bell_P-59_Airacomet

     Wingspan           : 13.87 m   (     45 ft 6 in )
     Lenght             : 11.63 m   (     38 ft 2 in )
     Height             :  3.76 m   (     12 ft 4 in )
     Empty mass         :  3600 kg  (   7940 lb      )
     Max takeoff weight :  6214 kg  (  13700 lb      )
     Engines            : 2 General Electric I-A turbojets (2000 lb each )
     Maximum speed      : 664 km/h  ( 359 kt ) at 25000 ft
-->
<airplane mass="7940" version="YASIM_VERSION_CURRENT" mtow-lbs="13700">

  <approach speed="110" aoa="2" fuel="0.4">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.2"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.2"/>
    <control-setting axis="/controls/gear/gear-down"             value="1"/>
    <solve-weight idx="0" weight="170"/>
  </approach>

  <cruise speed="340" alt="25000" fuel="1">
    <control-setting axis="/controls/engines/engine[0]/throttle" value="0.8"/>
    <control-setting axis="/controls/engines/engine[1]/throttle" value="0.8"/>
    <control-setting axis="/controls/gear/gear-down"             value="0"/>
    <solve-weight idx="0" weight="170"/>
  </cruise>

  <cockpit x="2.216" y="0" z="0.258"/>

  <!-- Cockpit -->
  <fuselage ax=" 3.379" ay=" 0.000" az="-0.089" bx=" 2.514" by=" 0.000" bz="-0.051" width="0.951" taper="0.30" midpoint="1"/>
  <fuselage ax=" 2.514" ay=" 0.000" az="-0.051" bx="-1.176" by=" 0.000" bz=" 0.055" width="0.951" taper="0.70" midpoint="0"/>
  <fuselage ax="-1.176" ay=" 0.000" az=" 0.055" bx="-5.090" by=" 0.000" bz="-0.242" width="0.649" taper="0.20" midpoint="0"/>

  <!-- Up -->
  <fuselage ax=" 5.717" ay=" 0.000" az="-0.587" bx=" 4.846" by=" 0.000" bz="-0.499" width="0.749" taper="0.30" midpoint="1"/>
  <fuselage ax=" 4.846" ay=" 0.000" az="-0.499" bx=" 3.266" by=" 0.000" bz="-0.417" width="0.969" taper="0.80" midpoint="1"/>
  <fuselage ax=" 3.266" ay=" 0.000" az="-0.417" bx="-1.213" by=" 0.000" bz="-0.417" width="0.969" taper="0.90" midpoint="0"/>
  <fuselage ax="-1.213" ay=" 0.000" az="-0.417" bx="-5.090" by=" 0.000" bz="-0.242" width="0.872" taper="0.20" midpoint="0"/>

  <!-- Down -->
  <fuselage ax=" 5.717" ay=" 0.000" az="-0.587" bx=" 4.846" by=" 0.000" bz="-0.698" width="0.749" taper="0.30" midpoint="1"/>
  <fuselage ax=" 4.846" ay=" 0.000" az="-0.698" bx=" 3.294" by=" 0.000" bz="-0.802" width="0.969" taper="0.80" midpoint="1"/>
  <fuselage ax=" 3.294" ay=" 0.000" az="-0.802" bx="-1.213" by=" 0.000" bz="-0.417" width="0.969" taper="0.90" midpoint="0"/>

  <!-- Engine left -->
  <fuselage ax=" 2.893" ay=" 0.671" az="-0.820" bx=" 2.689" by=" 0.671" bz="-0.820" width="0.730" taper="0.80" midpoint="1"/>
  <fuselage ax=" 2.689" ay=" 0.671" az="-0.820" bx=" 2.139" by=" 0.671" bz="-0.820" width="0.883" taper="0.82" midpoint="1"/>
  <fuselage ax=" 2.139" ay=" 0.671" az="-0.820" bx=" 1.207" by=" 0.671" bz="-0.820" width="0.883" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.207" ay=" 0.671" az="-0.820" bx=" 0.191" by=" 0.671" bz="-0.820" width="0.883" taper="0.80" midpoint="0"/>
  <fuselage ax=" 0.191" ay=" 0.671" az="-0.820" bx="-1.059" by=" 0.530" bz="-0.820" width="0.706" taper="0.50" midpoint="0"/>

  <!-- Engine right -->
  <fuselage ax=" 2.893" ay="-0.671" az="-0.820" bx=" 2.689" by="-0.671" bz="-0.820" width="0.730" taper="0.80" midpoint="1"/>
  <fuselage ax=" 2.689" ay="-0.671" az="-0.820" bx=" 2.139" by="-0.671" bz="-0.820" width="0.883" taper="0.82" midpoint="1"/>
  <fuselage ax=" 2.139" ay="-0.671" az="-0.820" bx=" 1.207" by="-0.671" bz="-0.820" width="0.883" taper="1.00" midpoint="1"/>
  <fuselage ax=" 1.207" ay="-0.671" az="-0.820" bx=" 0.191" by="-0.671" bz="-0.820" width="0.883" taper="0.80" midpoint="0"/>
  <fuselage ax=" 0.191" ay="-0.671" az="-0.820" bx="-1.059" by="-0.530" bz="-0.820" width="0.706" taper="0.50" midpoint="0"/>

  <wing x="0.918" y="0" z="-0.357"
        chord="3.416"
        length="6.967"
        taper="0.50"
        sweep="-1"
        dihedral="2.5"
        camber="0.005">
        <stall   aoa="20" width="1"    peak="1.5"/>
        <flap0 start="0.16" end="0.50" lift="1.3" drag="1.5"/>
        <flap1 start="0.50" end="0.96" lift="1.2" drag="1.1"/>

        <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" prop="/surface-positions/left-aileron-pos-norm"  side="left"/>
        <control-output control="FLAP1" prop="/surface-positions/right-aileron-pos-norm" side="right"/>

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

   <hstab x="-4.624" y="0" z="0.417"
         chord="1.987"
         length="2.505"
         taper="0.46"
         sweep="5">
         <stall   aoa="18" width="1" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.2" drag="1.1"/>

         <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="-4.704" y="0" z="-0.428"
         chord="2.25"
         length="2.143"
         taper="0.5"
         sweep="8">
         <stall   aoa="16" width="5" peak="1.5"/>
         <flap0 start="0"    end="1" lift="1.2" drag="1.1"/>

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

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

                 name              : General Electric J31
                 type              : Turbojet (Single stage centrifugal)
                 power cruise      : 2000 lb  (1650 lb)
                 weight            : 850 lb   ( 386 kg  )
  -->
  <jet x="1.639" y="0.533" z="-0.788"
       n1-idle="30"
       n1-max="90"
       n2-idle="35"
       n2-max="95"
       egt="850"
       tsfc="1.39"
       mass="850"
       thrust="2000">
       <actionpt x="-1.014" y="0.533" z="-0.788"/>
       <control-input control="THROTTLE" axis="/controls/engines/engine[0]/throttle"/>
  </jet>

  <jet x="1.639" y="-0.533" z="-0.788"
       n1-idle="30"
       n1-max="90"
       n2-idle="35"
       n2-max="95"
       egt="850"
       tsfc="1.39"
       mass="850"
       thrust="2000" >
       <actionpt x="-1.014" y="-0.533" z="-0.788"/>
       <control-input control="THROTTLE" axis="/controls/engines/engine[1]/throttle"/>
  </jet>

  <!-- Undercarriage -->
  <!-- nose -->
  <gear x="5.062" y="0" z="-1.881"
        compression="0.30"
        spring="1"
        damp="2" >
        <control-input  control="STEER"  axis="/controls/flight/rudder" src0="-1.0" src1="1.0" dst0="-0.8" dst1="0.8"/>
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

        <control-output control="EXTEND" prop="/gear/gear[0]/position-norm"/>

        <control-speed  control="EXTEND" transition-time="7"/>
  </gear>

  <!-- left main -->
  <gear x="1.174" y="2.823" z="-1.773"
        compression="0.30"
        spring="1"
        damp="2" >
        <control-input  control="BRAKE"  axis="/controls/gear/brake-left"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

        <control-output control="EXTEND" prop="/gear/gear[1]/position-norm"/>

        <control-speed  control="EXTEND" transition-time="7"/>
  </gear>

  <!-- right main -->
  <gear x="1.174" y="-2.823" z="-1.773"
        compression="0.30"
        spring="1"
        damp="2" >
        <control-input  control="BRAKE"  axis="/controls/gear/brake-right"/>
        <control-input  control="BRAKE"  axis="/controls/gear/brake-parking"/>
        <control-input  control="EXTEND" axis="/controls/gear/gear-down"/>

        <control-output control="EXTEND" prop="/gear/gear[2]/position-norm"/>

        <control-speed  control="EXTEND" transition-time="7"/>
  </gear>

  <!-- Internal tanks 2*280 liter wings -->
  <tank x="1.9" y="-2.3" z="-0.310" jet="true" capacity="1250"/>
  <tank x="1.9"  y="2.3" z="-0.310" jet="true" capacity="1250"/>

  <weight x="2.125" y="0" z="-0.083" mass-prop="/yasim/Bell-P-59/pilot-lb"/>

  <!-- CG -->
  <ballast x=" 5.5" y="0" z="-1" mass="1500"/>

</airplane>
