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

Beagle Pup Common Initialization

Copyright (c) 2015 Richard Senior

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.

**************************************************************************
-->

<PropertyList>

  <autopilot>
    <locks>
      <active type="bool">false</active>
      <altitude-hold type="bool">false</altitude-hold>
      <heading-hold type="bool">false</heading-hold>
    </locks>
    <sperry>
      <alt-hold-button type="bool">false</alt-hold-button>
      <elev-trim type="double">0.0</elev-trim>
      <main-switch type="bool">false</main-switch>
      <pitch-select type="double">0.0</pitch-select>
      <roll-trim type="double">0.0</roll-trim>
      <turn-select type="double">0.0</turn-select>
    </sperry>
  </autopilot>

  <consumables>
    <fuel>
      <tank n="0">
        <name>Manifold</name>
        <hidden type="bool">1</hidden>
      </tank>
      <tank n="1">
        <name>Left Wing</name>
      </tank>
      <tank n="2">
        <name>Right Wing</name>
      </tank>
    </fuel>
  </consumables>

  <controls>
    <anti-ice>
      <engine>
        <carb-heat-norm type="double">0.0</carb-heat-norm>
      </engine>
    </anti-ice>
    <electric>
      <battery-switch type="bool">false</battery-switch>
      <engine>
        <fuel-pump type="bool">false</fuel-pump>
        <starter-master type="bool">false</starter-master>
        <generator type="bool">false</generator>
      </engine>
    </electric>
    <engines>
      <engine n="0">
        <magnetos type="int">0</magnetos>
        <mixture type="double">0.0</mixture>
      </engine>
    </engines>
    <flight>
      <!-- Temporary, until trim tab is implemented properly -->
      <aileron-trim>0.075</aileron-trim>
      <elevator-trim>-0.18</elevator-trim>
      <rudder-trim>0.006</rudder-trim>
    </flight>
    <gear>
      <brake-parking type="double">1.0</brake-parking>
    </gear>
    <lighting>
      <beacon type="bool">false</beacon>
      <beacon-state type="bool">false</beacon-state>
      <nav-lights type="bool">false</nav-lights>
      <panel-norm>0.3</panel-norm>
      <landing-lights type="bool">false</landing-lights>
      <taxi-light type="bool">false</taxi-light>
    </lighting>
  </controls>

  <engines>
    <engine n="0">
      <carb-temp-degc alias="/fdm/jsbsim/systems/carburettor/carb-temp-degC"/>
      <cht-degc alias="/fdm/jsbsim/propulsion/engine/cht-degC"/>
      <oil-temperature-degc alias="/fdm/jsbsim/propulsion/engine/oil-temperature-degC"/>
    </engine>
  </engines>

  <fdm>
    <jsbsim>
      <tuning>
        <lift-propwash>1.0</lift-propwash>
        <lift-alpha>1.0</lift-alpha>
        <lift-pitch-rate>1.0</lift-pitch-rate>
        <lift-alpha-rate>1.0</lift-alpha-rate>
        <lift-elevator>1.0</lift-elevator>
        <lift-flap>0.85</lift-flap>
        <drag-minimum>1.8</drag-minimum>
        <drag-alpha>1.0</drag-alpha>
        <drag-induced>1.0</drag-induced>
        <drag-mach>1.0</drag-mach>
        <drag-beta>1.0</drag-beta>
        <drag-elevator>1.0</drag-elevator>
        <drag-gear>1.0</drag-gear>
        <drag-flap>1.0</drag-flap>
        <side-beta>1.0</side-beta>
        <side-roll-rate>1.0</side-roll-rate>
        <side-yaw-rate>1.0</side-yaw-rate>
        <side-rudder>1.0</side-rudder>
        <pitch-propwash>1.0</pitch-propwash>
        <pitch-alpha>0.03</pitch-alpha>
        <pitch-elevator>1.0</pitch-elevator>
        <pitch-damp>1.2</pitch-damp>
        <pitch-alphadot>1.0</pitch-alphadot>
        <roll-differential-propwash>1.0</roll-differential-propwash>
        <roll-beta>1.0</roll-beta>
        <roll-damp>1.0</roll-damp>
        <roll-yaw>1.0</roll-yaw>
        <roll-aileron>1.0</roll-aileron>
        <roll-rudder>1.0</roll-rudder>
        <yaw-alpha>1.0</yaw-alpha>
        <yaw-beta>1.0</yaw-beta>
        <yaw-roll-rate>1.0</yaw-roll-rate>
        <yaw-damp>1.0</yaw-damp>
        <yaw-rudder>1.0</yaw-rudder>
        <yaw-aileron>1.0</yaw-aileron>
      </tuning>
    </jsbsim>
  </fdm>

  <input>
    <keyboard include="Interface/keyboard.xml"/>
  </input>

  <instrumentation>
    <adf>
      <adf-btn type="bool">true</adf-btn>
      <power-btn type="bool">false</power-btn>
      <volume-norm type="double">0.0</volume-norm>
    </adf>
    <comm>
      <power-btn type="bool">false</power-btn>
      <volume type="double">0.0</volume>
    </comm>
    <dme>
      <mode-btn type="int">0</mode-btn>
      <power-btn type="bool">false</power-btn>
    </dme>
    <fuel-gauge>
      <tank-select type="int">0</tank-select>
    </fuel-gauge>
    <transponder>
      <inputs>
        <knob-mode type="int">0</knob-mode>
      </inputs>
    </transponder>
  </instrumentation>

  <nasal>
    <pup>
      <!-- Eventually these will be rationalized into a smaller set -->
      <file>Nasal/controls.nas</file>
      <file>Nasal/dialog.nas</file>
      <file>Nasal/electrical.nas</file>
      <file>Nasal/fuel.nas</file>
      <file>Nasal/liveries.nas</file>
      <file>Nasal/messages.nas</file>
      <file>Nasal/thunder.nas</file>
      <file>Nasal/util.nas</file>
    </pup>
    <instruments>
      <file>Aircraft/Beagle-Pup/Models/Instruments/ADF/KR87.nas</file>
      <file>Aircraft/Beagle-Pup/Models/Instruments/DME/KN62A.nas</file>
      <file>Aircraft/Beagle-Pup/Models/Instruments/Transponder/KT76A.nas</file>
      <script><![CDATA[
        KN62A.new();
        KT76A.new();
        ]]></script>
    </instruments>
    <generic>
      <file>Aircraft/Generic/autochecklist.nas</file>
      <file>Aircraft/Generic/limits.nas</file>
    </generic>
  </nasal>

  <sim include="Interface/views.xml">

    <checklists include="Checklists/checklists.xml"/>
    <help include="Interface/help.xml"/>
    <menubar include="Interface/menubar.xml"/>

    <author>Richard Senior</author>
    <aircraft-version>0.26.4</aircraft-version>
    <flight-model>jsb</flight-model>

    <aircraft-data>
      <!-- There seems to be a bug with the first entry, so use a dummy -->
      <path>autopilot/sperry/dummy</path>
      <path>autopilot/sperry/elev-trim</path>
      <path>autopilot/sperry/roll-trim</path>
      <path>consumables/fuel/tank[1]/level-gal_imp</path>
      <path>consumables/fuel/tank[2]/level-gal_imp</path>
      <path>controls/lighting/panel-norm</path>
      <path>fdm/jsbsim/inertia/pointmass-weight-lbs[1]</path>
      <path>fdm/jsbsim/inertia/pointmass-weight-lbs[2]</path>
      <path>fdm/jsbsim/inertia/pointmass-weight-lbs[3]</path>
      <path>sim/model/preferences/realism/carb-ice</path>
      <path>sim/model/preferences/realism/gyro-spindown</path>
      <path>sim/model/preferences/realism/pitot-ice</path>
    </aircraft-data>

    <airport>
      <runways>
        <start-offset-m>20</start-offset-m>
      </runways>
    </airport>

    <flaps>
      <setting>0.00</setting>
      <setting>0.38</setting>
      <setting>1.00</setting>
    </flaps>

    <flight-recorder include="Systems/flightrecorder.xml"/>

    <model>
      <livery>
        <file type="string"/>
      </livery>
      <preferences>
        <realism>
          <carb-ice type="bool">false</carb-ice>
          <gyro-spindown type="bool">false</gyro-spindown>
          <pitot-ice type="bool">false</pitot-ice>
        </realism>
      </preferences>
      <shaders>
        <chrome>
          <ambient-correction>0.4</ambient-correction>
        </chrome>
        <glass>
          <ambient-correction>0.3</ambient-correction>
        </glass>
      </shaders>
    </model>

    <multiplay>
      <generic>
        <int n="0" alias="/controls/lighting/beacon-state"/>
        <float n="0" alias="/controls/lighting/panel-norm"/>
        <float n="1" alias="/systems/electrical/outputs/landing-lights"/>
        <float n="2" alias="/systems/electrical/outputs/nav-lights"/>
        <float n="3" alias="/systems/electrical/outputs/panel-lights"/>
        <float n="4" alias="/systems/electrical/outputs/taxi-light"/>
      </generic>
    </multiplay>

    <rating>
      <FDM type="int">2</FDM>
      <systems type="int">2</systems>
      <cockpit type="int">2</cockpit>
      <model type="int">2</model>
    </rating>

    <rendering>
      <als-secondary-lights>
        <landing-light1-offset-deg type="float">5</landing-light1-offset-deg>
        <landing-light2-offset-deg type="float">0</landing-light2-offset-deg>
        <landing-light3-offset-deg type="float">3</landing-light3-offset-deg>
      </als-secondary-lights>
    </rendering>

    <sound>
      <audible>true</audible>
      <cabin-volume type="double">0.8</cabin-volume>
      <click type="bool">false</click>
    </sound>

    <systems include="Systems/electrical.xml">
      <autopilot>
        <path>Systems/autopilot.xml</path>
      </autopilot>
      <autopilot n="1"/>
      <property-rule n="100">
        <path>Systems/filters.xml</path>
      </property-rule>
      <property-rule n="101">
        <path>Systems/autopilot-logic.xml</path>
      </property-rule>
    </systems>

    <tags>
      <tag>ga</tag>
      <tag>trainer</tag>
      <tag>1960s</tag>
      <tag>ifr</tag>
      <tag>fixed-gear</tag>
      <tag>piston</tag>
      <tag>1-engine</tag>
    </tags>

  </sim>

  <limits>
    <max-flap-extension-speed>
      <flaps type="double">0.0</flaps>
      <speed type="double">100</speed>
    </max-flap-extension-speed>
    <vne type="double">150</vne>
  </limits>

  <payload>
    <weight n="0">
      <name type="string">Pilot</name>
      <weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[1]"/>
      <min-lb type="double">0</min-lb>
      <max-lb type="double">280</max-lb>
    </weight>
    <weight n="1">
      <name type="string">Co-Pilot</name>
      <weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[2]"/>
      <min-lb type="double">0</min-lb>
      <max-lb type="double">280</max-lb>
    </weight>
  </payload>

</PropertyList>
