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

<!-- Grob G102 Astir :  Emmanuel BARANGER  2011
             Updated :  Philippe BROCORENS 2011

    source        : http://en.wikipedia.org/wiki/Grob_G102_Astir

    Wingspan      : 15.00 m    (  49 ft 3 in )
    lenght        :  6.75 m    (  22 ft 2 in )
    height        :  1.26 m    (   4 ft 2 in )
    Empty weight  :   250 kg   ( 551 lb      ) approximately
    Stall speed   :    59 km/h (  32 kt      ) without airbrakes
    Maximum speed :   170 km/h (  92 kt      )
-->
<airplane mass="551">

  <!-- Approach configuration -->
  <approach speed="30" aoa="4" glide-angle="5">
  </approach>

  <!-- Cruise configuration -->
  <cruise speed="60" alt="5000" glide-angle="15">
  </cruise>

  <!-- pilot's eyepoint -->
  <cockpit x="2.3" y="0" z="0.1"/>

  <fuselage ax="3.37" ay="0.0" az="-0.23" bx="-3.35" by="0.0" bz="-0.19" width="0.67" taper="0.1" midpoint="0.24" idrag="1"/>

  <wing x="0.769" y="0.177" z="-0.140"
        chord="0.994"
        length="7.225"
        taper="0.50"
        camber="0.004"
        sweep="-1"
        dihedral="3.52">
        <stall aoa="12" width="12" peak="1.5"/>
        <flap0 start="0.58" end="1" lift="1.55" drag="1.3"/>
        <spoiler start="0.26" end="0.42" lift="-2.3" drag="50"/>

        <control-input axis="/controls/flight/aileron" control="FLAP0" split="true"/>
        <control-input axis="/controls/flight/aileron" control="FLAP0" split="true"/>
        <control-input axis="/controls/flight/spoilers" control="SPOILER"/>
        <control-input axis="/controls/engines/engine[0]/throttle" control="SPOILER"/>

        <control-output control="SPOILER" prop="/surface-positions/speedbrake-pos-norm"/>
        <control-output control="FLAP0" side="left" prop="/surface-positions/left-aileron-pos-norm"/>
        <control-output control="FLAP0" side="right" prop="/surface-positions/right-aileron-pos-norm"/>

        <control-speed control="FLAP0" transition-time="0.8"/>
        <control-speed control="FLAP0" transition-time="0.5"/>
        <control-speed control="SPOILER" transition-time="1.5"/>
  </wing>

  <hstab x="-2.900" y="0.0" z="0.593"
         chord="0.621"
         length="1.507"
         taper="0.56"
         sweep="2">
         <stall aoa="26" width="16" peak="1.5"/>
         <flap0 start="0.0" end="1" lift="1.6" drag="1.3"/>

         <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.820" y="0" z="-0.14"
         chord="1"
         length="0.75"
         taper=".8"
         sweep="15">
         <stall aoa="24" width="14" peak="1.5"/>
         <flap0 start="0" end="1" lift="1.6" drag="1.3"/>

         <control-input axis="/controls/flight/rudder" square="true" 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>

  <!-- main wheel-->
  <gear x="1.192" y="0" z="-0.628"
        retract-time="7"
        compression="0.1"
        spring="1"
        damp="1"
        dfric="0.8"
        sfric ="0.8">
        <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[0]/position-norm"/>

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

  <!-- Tail wheel -->
  <gear x="-2.870" y="0" z="-0.386"
        compression="0.1"
        dfric="0.2"
        sfric ="0.24"
        damp="2"
        skid="1">
  </gear>

  <!--lef wing skid-->
  <gear x="0.827" y=" 7.383" z="0.051"
        skid="1"
        compression="0.10"
        spring="0.8"
        sfric="0.5"
        dfric="0.4"/>

  <!--right wing skid-->
  <gear x="0.827" y="-7.383" z="0.051"
        skid="1"
        compression="0.10"
        spring="0.8"
        sfric="0.5"
        dfric="0.4"/>

  <!-- pilots -->
  <ballast x="1.942" y="0" z="-0.178" mass="140"/>

  <!-- hitch -->
  <hitch name="winch" x="-0.73" y="0" z="-0.211">
    <tow length="51" weight-per-meter="0.1" elastic-constant="40000"  break-force="10000"/>
    <winch max-tow-length="1000" min-tow-length="1" initial-tow-length="1000" max-winch-speed="40" power="150" max-force="6000" />
    <control-input axis="/controls/winch/place" control="PLACEWINCH"/>
  </hitch>

  <hitch name="aerotow" x="-0.73" y="0" z="-0.211" force-is-calculated-by-other="0">
    <tow length="60" weight-per-meter="0.035" elastic-constant="9000" break-force="10000" mp-auto-connect-period="0.0"/>
    <winch max-tow-length="1000" min-tow-length="60" initial-tow-length="60"/>
    <control-input axis="/controls/aerotow/find-aircraft" control="FINDAITOW"/>
  </hitch>

  <!-- CG théorique x=0.824 y=0 z=-0.322
  <ballast x="-0.844" y="0" z="-0.9" mass="200"/> -->

</airplane>

