<?xml version="1.0"?>

<PropertyList>
  <sim>
    <description>Bocian 1E</description>
    <author>AJ MacLeod</author>
    <status>early production</status>
    <rating>
      <FDM type="int">2</FDM>
      <systems type="int">4</systems>
      <cockpit type="int">5</cockpit>
      <model type="int">3</model>
    </rating>

    <flight-model>yasim</flight-model>
    <aero>bocian-yasim</aero>

    <startup>
      <splash-texture>Aircraft/bocian/splash1.rgb</splash-texture>
    </startup>

    <sound>
      <path>Aircraft/bocian/Sounds/bocian-sound.xml</path>
    </sound>

    <virtual-cockpit archive="y">true</virtual-cockpit>
    <allow-toggle-cockpit archive="y">true</allow-toggle-cockpit>

    <model>
      <path>Aircraft/bocian/Models/bocian-model.xml</path>
      <fallback-model-index type="int">705</fallback-model-index>
    </model>

    <menubar>
      <default>
        <menu n="10">
          <label>Bocian</label>
          <enabled type="bool">true</enabled>
          <item>
            <label>Variometer</label>
            <binding>
              <command>nasal</command>
              <script>bocian.variometer.toggle()</script>
            </binding>
          </item>
        </menu>
      </default>
    </menubar>

    <ai>
      <scenario>thermal_demo</scenario>
    </ai>

    <view n="0">
      <internal archive="y">true</internal>
      <config>
        <pitch-offset-deg>-13.0</pitch-offset-deg>
        <x-offset-m archive="y">0.0</x-offset-m>
        <!--Right-->
        <y-offset-m archive="y">0.75</y-offset-m>
        <!--Up-->
        <z-offset-m archive="y">1.40</z-offset-m>
        <!--Back-->
      </config>
    </view>

    <view n="1">
      <config>
        <target-z-offset-m archive="y" type="double">2.8</target-z-offset-m>
      </config>
    </view>

    <view n="2">
      <config>
        <target-z-offset-m archive="y" type="double">2.8</target-z-offset-m>
      </config>
    </view>

    <view n="3">
      <config>
        <target-z-offset-m archive="y" type="double">2.8</target-z-offset-m>
      </config>
    </view>

    <view n="4">
      <config>
        <target-z-offset-m archive="y" type="double">2.8</target-z-offset-m>
      </config>
    </view>

    <view n="5">
      <config>
        <target-z-offset-m archive="y" type="double">2.8</target-z-offset-m>
      </config>
    </view>

    <help>
      <title>Bocian</title>
      <line>Vs = 58-66 km/hr</line>
      <line>VNE = 200 km/hr</line>
      <line>Aerotow Speed = 100 km/hr (90 Minimum)</line>
      <line>Winch Speed = 90-100 km/hr</line>
      <key>
        <name>throttle</name>
        <desc>control airbrakes (full throttle=full airbrakes)</desc>
      </key>
      <key>
        <name>Ctrl-w</name>
        <desc>Place Winch 1000m in front of aircraft (on ground)</desc>
      </key>
      <key>
        <name>w</name>
        <desc>Start winching</desc>
      </key>
      <key>
        <name>W</name>
        <desc>Opens winch-hook</desc>
      </key>
      <key>
        <name>Ctrl-o</name>
        <desc>Find aircraft for aerotow (must be within 60m)</desc>
      </key>
      <key>
        <name>O</name>
        <desc>opens aerotow-hook</desc>
      </key>
      <key>
        <name>o</name>
        <desc>locks aerotow-hook</desc>
      </key>

    </help>
    <hitches>
      <!-- make sure some properties do exist, when the list for multiplayer transfer is defined-->
      <!-- they need to be in the same value, as they are initilized in the FDM, to get the same values after reset
				   should fix this somehow-->
      <aerotow>
        <tow>
          <length type="float">60</length>
          <elastic-constant type="float">10000</elastic-constant>
          <weight-per-m-kg-m type="float">1</weight-per-m-kg-m>
          <dist type="float">1</dist>
          <connected-to-property-node type="bool"></connected-to-property-node>
          <brake-force type="float">100000</brake-force>
          <connected-to-ai-or-mp-callsign type ="string">*</connected-to-ai-or-mp-callsign>
          <end-force-x type ="float">0</end-force-x>
          <end-force-y type ="float">0</end-force-y>
          <end-force-z type ="float">0</end-force-z>
        </tow>
        <speed-in-tow-direction type="float">0</speed-in-tow-direction>
        <open type="bool">true</open>
        <local-pos-x type="float">0</local-pos-x>
        <local-pos-y type="float">0</local-pos-y>
        <local-pos-z type="float">0</local-pos-z>
        <is-slave type="bool">false</is-slave>
        <rope>
          <rope-diameter-mm type ="float">15</rope-diameter-mm>
        </rope>
      </aerotow>
      <winch>
        <rope>
          <rope-diameter-mm type ="float">25</rope-diameter-mm>
        </rope>
      </winch>
    </hitches>
  </sim>

  <controls>
    <winch>
      <place type="bool">false</place>
    </winch>
    <aerotow>
      <find-aircraft type="bool">false</find-aircraft>
    </aerotow>
  </controls>

  <input>
    <keyboard>
      <key n="23">
        <name>Ctrl-w</name>
        <desc>Place Winch 1000m in front of aircraft</desc>
        <binding>
          <command>nasal</command>
          <script>bocian.placeWinch()</script>
        </binding>
      </key>
      <key n="87">
        <name>W</name>
        <desc>Open winch hook</desc>
        <binding>
          <command>property-assign</command>
          <property>/sim/hitches/winch/open</property>
          <value type="bool">true</value>
        </binding>
        <binding>
          <command>property-assign</command>
          <property>/sim/model/bocian/winch-hook-pos</property>
          <value type="int">1</value>
        </binding>
        <mod-up>
          <binding>
            <command>property-assign</command>
            <property>/sim/model/bocian/winch-hook-pos</property>
            <value type="int">0</value>
          </binding>
        </mod-up>
      </key>
      <key n="119">
        <name>w</name>
        <desc>Start winch</desc>
        <binding>
          <command>nasal</command>
          <script>interpolate("/sim/hitches/winch/winch/rel-speed", 1.0, 2)</script>
        </binding>
      </key>
      <key n="15">
        <name>Ctrl-o</name>
        <desc>Find aircraft for aerotow</desc>
        <binding>
          <command>property-assign</command>
          <property>/controls/aerotow/find-aircraft</property>
          <value type="bool">true</value>
        </binding>
        <mod-up>
          <binding>
            <command>property-assign</command>
            <property>/controls/aerotow/find-aircraft</property>
            <value type="bool">false</value>
          </binding>
        </mod-up>
      </key>
      <key n="111">
        <name>o</name>
        <desc>Lock aerotow hook</desc>
        <binding>
          <command>property-assign</command>
          <property>/sim/hitches/aerotow/open</property>
          <value type="bool">false</value>
        </binding>
      </key>
      <key n="79">
        <name>O</name>
        <desc>Open aerotow hook</desc>
        <binding>
          <command>property-assign</command>
          <property>/sim/hitches/aerotow/open</property>
          <value type="bool">true</value>
        </binding>
      </key>
    </keyboard>
  </input>

  <nasal>
    <bocian>
      <file>Aircraft/bocian/Nasal/dialogues.nas</file>
      <file>Aircraft/bocian/Nasal/vario.nas</file>
      <file>Aircraft/bocian/Nasal/winch.nas</file>
      <file>Aircraft/bocian/Nasal/yawstring.nas</file>
    </bocian>
  </nasal>

  <instrumentation>
    <variometer>
      <switch type="bool">0</switch>
      <volume type="float">0.5</volume>
      <sensitivity type="float">0.175</sensitivity>
    </variometer>
  </instrumentation>

</PropertyList>
