<?xml version="1.0"?>
<!--
************************************************************************
JSBSim Handley Page Victor Bomber/Tanker

Started Feb 2009 by Alex Park, 
************************************************************************
-->

<PropertyList>

  <sim>

    <description>Handley Page Victor</description>
    <author>Alex Park</author>
    <status>alpha</status>

    <flight-model archive="y">jsb</flight-model>
    <aero archive="y">victor</aero>

    <startup>
      <splash-texture>Aircraft/victor/victork2-splash.png</splash-texture>
    </startup>

    <model>
      <path archive="y">Aircraft/victor/Models/victor.xml</path>
      <livery> 
        <file type="string"/> 
      </livery> 

    </model>

    <!-- Initial armament. Controlled by aircraft dialog -->
    <armament>BlackBuck6</armament>

    <submodels>
      <serviceable type="bool">true</serviceable>
      <path>Aircraft/victor/Models/submodels.xml</path>
    </submodels>

    <sound>
      <path>Aircraft/victor/Sounds/victor-sounds.xml</path>
    </sound>

    <menubar>
        <default>
            <menu n="10">
                <label>Victor</label>
                <enabled type="bool">true</enabled>
                <item>
                    <label>Select Livery</label>
                    <binding>
                        <command>nasal</command>
                        <script>aircraft.livery.dialog.toggle()</script>
                    </binding>
                </item>
            </menu>
        </default>
    </menubar>

    <help>
      <title>Handley Page Victor</title>
      <line>Speeds (AUW 180,000lbs)</line>
      <line></line>
      <line>Rotation: 148 kts</line>
      <line>Initial Climb: 156 kts</line>
      <line>Climb (below 20k ft): 250 kts</line>
      <line>Climb (above 20k ft): 300 kts</line>
      <line>Pattern: 181 kts</line>
      <line>Approach: 166 kts</line>
      <line>Threshhold: 151 kts</line>
      <line>Tail Chute: 145 kts</line>
      <key>
        <name>C</name>
        <desc>Tail brake chute (TBC) control</desc>
      </key>
      <key>
        <name>D</name>
        <desc>Toggle bomb bay door</desc>
      </key>
      <key>
        <name>E</name>
        <desc>Toggle crew door</desc>
      </key>
      <key>
        <name>J</name>
        <desc>Fire weaponry</desc>
      </key>
	<key>
        <name>O</name>
        <desc>Extend Refuelling Drogues</desc>
      </key>
      <key>
        <name>j/k</name>
        <desc>2 position speedbrakes</desc>
      </key>
      <key>
        <name>=</name>
        <desc>Configuration menu</desc>
      </key>
    </help>

    <panel>
      <path>Aircraft/victor/Panels/victor-vfr-panel.xml</path>
      <visibility>false</visibility>
    </panel>


    <!-- position the pilot viewpoint and angle -->
    <view n="0">
      <internal archive="y">true</internal>
      <config>
        <x-offset-m archive="y">-0.510</x-offset-m>
        <y-offset-m archive="y">1.20</y-offset-m>
        <z-offset-m archive="y">3.40</z-offset-m>
        <pitch-offset-deg>-5.0</pitch-offset-deg>
      </config>
    </view>

    <!-- position the co-pilot viewpoint and angle -->
    <!-- This is definitely a dual-control a/c -->
    <view n="1">
      <config>
        <z-offset-m type="double" archive="y">-30</z-offset-m>
        <target-z-offset-m type="double" archive="y">15</target-z-offset-m>
      </config>
    </view>
    <view n="2">
      <config>
        <!-- big plane, so extend chase view offset a bit -->
        <z-offset-m type="double" archive="y">-60</z-offset-m>
        <target-z-offset-m type="double" archive="y">15</target-z-offset-m>
        <pitch-offset-deg>8.0</pitch-offset-deg>
      </config>
    </view>

    <view n="3">
      <config>
        <!-- big plane, so extend chase view offset a bit -->
        <z-offset-m type="double" archive="y">-50</z-offset-m>
        <target-z-offset-m type="double" archive="y">15</target-z-offset-m>
      </config>
    </view>

    <view n="4">
      <config>
        <!-- big plane, so extend chase view offset a bit -->
        <target-z-offset-m type="double" archive="y">15</target-z-offset-m>
      </config>
    </view>

    <view n="5">
      <config>
        <!-- big plane, so extend chase view offset a bit -->
        <z-offset-m type="double" archive="y">-50</z-offset-m>
        <target-z-offset-m type="double" archive="y">15</target-z-offset-m>
      </config>
    </view>

    <view n="6">
      <config>
        <!-- big plane, so extend chase view offset a bit -->
        <z-offset-m type="double" archive="y">-50</z-offset-m>
        <target-z-offset-m type="double" archive="y">15</target-z-offset-m>
      </config>
    </view>

    
    <flaps>
      <setting>0.000</setting>
	<setting>0.50</setting>
      <setting>1.0</setting>
    </flaps>

    <!-- Two-position spoilers. 
   0 - Fully in
   0.5 - Parially out - 35 degrees
   1.0 - Fully extended - 55/80 degrees undercarriage up/down.
   
   We simplify the fully out position 
   
 -->
    <spoilers>
      <setting>0.00</setting>
      <setting>0.5</setting>
      <setting>1.0</setting>
    </spoilers>

    <systems>
      <electrical>
        <path>Aircraft/victor/Systems/victor-electrical.xml</path>
      </electrical>
    </systems>

    <multiplay>      
      <generic>
        <float n="0" alias="/controls/refuelling/refuelling-drogues-pos-norm"/>
        <float n="1" alias="/controls/doors/cockpit-door-pos-norm"/>
        <float n="2" alias="/controls/doors/bb-door-pos-norm"/>
        <float n="3" alias="/controls/doors/chute-door-pos-norm"/>
        <float n="4" alias="/controls/chute-pos-norm"/>
      </generic>
    </multiplay>
  </sim>

  <tanker type="bool">false</tanker>

  <consumables>
    <fuel>
      <tank n="0">
        <level-gal_us archive="y">1938</level-gal_us>
      </tank>
      <tank n="1">
        <level-gal_us archive="y">1938</level-gal_us>
      </tank>
      <tank n="2">
        <level-gal_us archive="y">1938</level-gal_us>
      </tank>
      <tank n="3">
        <level-gal_us archive="y">1938</level-gal_us>
      </tank>
    </fuel>
  </consumables>

  <engines>
    <engine n="0">
      <running>true</running>
    </engine>
    <engine n="1">
      <running>true</running>
    </engine>
    <engine n="2">
      <running>true</running>
    </engine>
    <engine n="3">
      <running>true</running>
    </engine>
  </engines>

  <controls>
    <!-- Start with the Parking Brake on, and everything closed up-->
    <gear>
      <brake-parking type="float">1.0</brake-parking>
    </gear>

    <doors>
      <cockpit-door-pos-norm type="float">0.0</cockpit-door-pos-norm>
      <bb-door-pos-norm type="float">0.0</bb-door-pos-norm>
      <chute-door-pos-norm type="float">0.0</chute-door-pos-norm>
    </doors>

    <refuelling>
      <refuelling-drogues-pos-norm type="float">0.0</refuelling-drogues-pos-norm>
    </refuelling>

    <chute-pos-norm type="float">0.0</chute-pos-norm>
    <!-- trim for level cruise -->

    <flight>
      <aileron-trim>0.027</aileron-trim>
      <rudder-trim>0.0</rudder-trim>
    </flight>

  </controls>


  <instrumentation>
    <tacan n="0">
      <name>tacan</name>
      <number>0</number>
      <serviceable type="bool" archive="y">true</serviceable>
      <switch-position type="int" archive="y">1</switch-position>
    </tacan>

    <radar>
      <!-- Used for Air-to-Air Refueling -->
      <range type="int" archive="y">20</range>
      <range-factor type="double" archive="n">20</range-factor>
      <minimized type="bool" archive="y">false</minimized>
    </radar>

    <path>Aircraft/victor/Systems/victor-instrumentation.xml</path>
  </instrumentation>

  <!-- Key mappings -->
  <input>
    <keyboard>

      <key n="61">
        <name>=</name>
        <desc>Show configuration dialog</desc>
        <binding n="0">
          <command>nasal</command>
          <script>victor.config_dialog.toggle()</script>
        </binding>
      </key>

      <key n="67">
        <name>C</name>
        <desc>Toggle Chute</desc>
        <binding n="0">
          <command>nasal</command>
          <script>victor.toggle_chute()</script>
        </binding>
      </key>

      <key n="68">
        <name>D</name>
        <desc>Toggle Bomb Bay Doors</desc>
        <binding n="0">
          <command>nasal</command>
          <script>victor.toggle_bb_doors()</script>
        </binding>
      </key>

      <key n="69">
        <name>E</name>
        <desc>Toggle Entrance Hatch</desc>
        <binding n="0">
          <command>nasal</command>
          <script>victor.toggle_cockpit_door()</script>
        </binding>
      </key>

      <key n="74">
        <name>J</name>
        <desc>Fire weaponry</desc>
        <binding n="0">
          <command>nasal</command>
          <script>victor.fire()</script>
        </binding>
      </key>

	<key n="79">
        <name>O</name>
        <desc>Extend Refuelling Drogues</desc>
        <binding n="0">
          <command>nasal</command>
          <script>victor.toggle_refuelling_drogues()</script>
        </binding>
      </key>
    </keyboard>


 
  </input>
  
  <systems>
    <refuel>
      <serviceable type="bool">true</serviceable>
      <type>probe</type>
    </refuel>
  </systems>
  <!-- Nasal files/scripts -->
  <nasal>
    <victor>
      <file>Aircraft/victor/Nasal/victor.nas</file>
    </victor>
    <failures>
      <file>Aircraft/Generic/limits.nas</file>
    </failures>
    <aar>
      <file>Aircraft/Generic/aar.nas</file>
    </aar>
  </nasal>

</PropertyList>
