<?xml version="1.0"?>
<!--
************************************************************************
B-2 set file.

2007-1-2 Markus Zojer
************************************************************************
-->

<PropertyList>
  <sim>

    <startup>
      <splash-texture>Aircraft/B-2/spirit.rgb</splash-texture>
    </startup>

    <flight-model>yasim</flight-model>
    <status>alpha</status>
    <author>Markus Zojer</author>
    <aero>B-2-yasim</aero>
    <fuel-fraction>1.0</fuel-fraction>

    <description>Northrop B-2 Spirit</description>

    <tags>
	<tag>bomber</tag>
	<tag>grumman</tag>
	<tag>northrop</tag>
	<tag>1990s</tag>
	<tag>2000s</tag>
	<tag>2010s</tag>
	<tag>gulfwar2</tag>
	<tag>glass-cockpit</tag>
	<tag>hud</tag>
	<tag>ifr</tag>
	<tag>retractable-gear</tag>
	<tag>jet</tag>
	<tag>refuel</tag>
    </tags>

    <chase-distance-m type="double" archive="y">-65.0</chase-distance-m>

    <view n="0">
      <internal archive="y">true</internal>
      <config>
        <x-offset-m archive="y">-0.40</x-offset-m><!-- left-/right+ -->
        <y-offset-m archive="y">0.57</y-offset-m><!-- up+/down- -->
        <z-offset-m archive="y">3.5</z-offset-m><!-- back+ -->
        <pitch-offset-deg>0</pitch-offset-deg>
        <default-field-of-view-deg>60</default-field-of-view-deg>
      </config>
    </view>

    

<!-- Shift the camera target point back -->
    <view n="1">
      <config>
        <target-z-offset-m archive="y" type="double">10.0</target-z-offset-m>
      </config>
    </view>

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

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

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

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

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

    <sound>
      <audible>true</audible>
      <path>Aircraft/B-2/Sounds/B-2-sound.xml</path>
    </sound>
    
    <!-- <submodels>
	    <serviceable type="bool">true</serviceable>
	    <path>Aircraft/B-2/Submodels/agm-154.xml</path>
    </submodels>-->
    
    <submodels>
	    <serviceable type="bool">true</serviceable>
	    <path>Aircraft/B-2/Submodels/smoke_puff.xml</path>
    </submodels>

    <!--<panel>
      <path>Aircraft/B-2/Panels/there_is_no_spoon.747</path>
    </panel>


    <hud>
      <path>Aircraft/B-2/Huds/B-52F-hud1.xml</path>
      <visibility>true</visibility>
    </hud>-->

    <model>
      <path>Aircraft/B-2/Models/b2-spirit.xml</path>
         <doors>
		 <bombbay/>
		 <fuelhatch/>
		 <hatch/>
		 <fuel/>
		 <eng/>
		 <ctrl/>
		 <syst/>
		 <apmodeto/>
		 <apmodela/>
		 <apmodeast/>
		 <apmodeap/>
		 <aplt/>
		 <wpns/>
		 <syst3/>
		 <fuel3/>
	</doors>
    </model>

    <systems>
      <autopilot>
        <path>Aircraft/B-2/Systems/B-2-autopilot.xml</path>
      </autopilot>
      <!--<electrical>
        <path>Aircraft/B-2/Systems/B-2-electrical.xml</path>
      </electrical>-->
    </systems>


    <flaps>
      <setting>0.05</setting>
      <setting>0.10</setting>
      <setting>0.15</setting>
      <setting>0.20</setting>
      <setting>0.25</setting>
    </flaps>

    <spoilers>
      <setting>0.0</setting>
      <setting>0.2</setting>
      <setting>0.4</setting>
      <setting>0.7</setting>
      <setting>1.0</setting>
    </spoilers>

<!-- AoA Indexer target 1.0 deg -->
     <aoa-indexer>
       <too-slow-deg>2.5</too-slow-deg>  <!-- target +1.5 deg -->
       <slow-deg>1.5</slow-deg>          <!-- target +0.5 deg -->         
       <fast-deg>0.5</fast-deg>          <!-- target -0.5 deg -->         
       <too-fast-deg>-0.5</too-fast-deg>  <!-- target -1.5 deg -->         
     </aoa-indexer>

    <help>
      <title>B-2 Spirit</title>
      <key>
        <name>j/k</name>
        <desc>decrease/increase spoilers</desc>
      </key>
      <key>
	      <name>o</name>
	      <desc>open/close refueling hatch</desc>
      </key>
      <key>
	      <name>O</name>
	      <desc>open/close cockpit access hatch</desc>
      </key>
      <key>
	      <name>Ctrl d</name>
	      <desc>open/close bombdoors</desc>
      </key>
      
      <line>Rudder control(spoiler drag) is your friend, as you have to correct for yaw!</line>
      <line>On takeoff sideslip stabilizer is enabled automatically!</line>
      <line>5 flymodes available(LA,TO,FL,AP,AS), click on buttons to select.</line>
      <line>GLAS (Flap control) can be used to pitch the B-2 down.</line>
      <line>Takeoff speed: >160 kts</line>
      <line>Landing speed: 160-135 kts/Full spoilers</line>
      <line>No need for flaps on this plane!</line>
      <line>Good Luck!</line>
    </help>
    
   <!-- <ai>
	    <enabled type="bool">true</enabled>
	    <scenario>refueling_demo</scenario>
    </ai>-->

  </sim>



  <autopilot>
    <settings>
      <target-agl-ft type="float">1000</target-agl-ft>
      <target-altitude-ft type="float">8000</target-altitude-ft>
      <target-pitch-deg type="float">0</target-pitch-deg>
      <target-vfps type="float">0</target-vfps>
      <take-off-pitch-deg type="float">2.0</take-off-pitch-deg>
      <target-speed-kt type="float">280.0</target-speed-kt>
      <climb-out-initial-pitch-deg type="float">3.0</climb-out-initial-pitch-deg>
      <climb-out-final-pitch-deg type="float">2.0</climb-out-final-pitch-deg>
      <target-climb-rate-fpm type="float">2000.0</target-climb-rate-fpm>
     <target-descent-rate-fpm type="float">1500.0</target-descent-rate-fpm>
      <ground-roll-heading-deg type="float">-999.9</ground-roll-heading-deg>
      <target-mach type="float">0.46</target-mach>
      <target-aoa-deg type="float">1.0</target-aoa-deg>
      <max-roll-deg type="float">30</max-roll-deg>
    </settings>

    <!-- <locks>
      <aoa type="string">initialised</aoa>
      <auto-take-off type="string">enabled</auto-take-off>
      <auto-landing type="string">disabled</auto-landing>
      <rudder-control type="string">initialised</rudder-control>
      <take-off-phase type="string">initialised</take-off-phase>
</locks>-->
</autopilot>

<!-- Start with the Parking Brake on -->
  <controls>
    <gear>
      <brake-parking type="double">1.0</brake-parking>
    </gear>
    <flight>
      <flaps type="double">0.0</flaps>
      <elevator-incidence-deg type="double">0.0</elevator-incidence-deg>
    </flight>
  </controls>
  
<!-- Engine indexes -->
  <engines>
    <engine n="0">
      <engine-num type="int">0</engine-num>
    </engine>
    <engine n="1">
      <engine-num type="int">1</engine-num>
    </engine>
    <engine n="2">
      <engine-num type="int">2</engine-num>
    </engine>
    <engine n="3">
      <engine-num type="int">3</engine-num>
    </engine>
    
  </engines>

<!-- Fuel -->
  <consumables>
    <fuel>
      <tank n="0">
        <tank-num type="int">0</tank-num>
        <kill-when-empty type="bool">false</kill-when-empty>
      </tank>
      <tank n="1">
        <tank-num type="int">1</tank-num>
        <kill-when-empty type="bool">false</kill-when-empty>
      </tank>
      <tank n="2">
        <tank-num type="int">2</tank-num>
        <kill-when-empty type="bool">false</kill-when-empty>
      </tank>
      <tank n="3">
	      <tank-num type="int">3</tank-num>
	      <kill-when-empty type="bool">false</kill-when-empty>
      </tank>
      <tank n="4">
	      <tank-num type="int">4</tank-num>
	      <kill-when-empty type="bool">false</kill-when-empty>
      </tank>
      <tank n="5">
	      <tank-num type="int">5</tank-num>
	      <kill-when-empty type="bool">false</kill-when-empty>
      </tank>
    </fuel>
  </consumables>

  <instrumentation>
    <radar>
      <range type="int" archive="y">40</range>
      <minimized type="bool" archive="y">true</minimized>
    </radar>
  </instrumentation>
  
<input>
 <keyboard>
  <key n="10">
	  <name>Ctrl-J</name>
	  <desc>Jettison Inner and Outer Pylon Stores.</desc>
	  <!-- port inner -->
	  
	  <binding>
		  <command>property-assign</command>
		  <property>/controls/armament/station[0]/jettison-all</property>
		  <value type="bool">1</value>
	  </binding>
	  
	      <!-- stbd inner -->
	      
	      <binding>
		      <command>property-assign</command>
		      <property>controls/armament/station[1]/jettison-all</property>
		      <value type="bool">1</value>
	      </binding>
	      
	  </key>
	  
	  <!-- map keys for cockpit hatch/ refueling hatch -->
	       <key n="79"> 
		       <name>O</name>
		       <desc>hatch.open/close</desc>
		       <binding> 
			        <command>nasal</command>
				<script>b2.togglehatch()</script>
		       </binding>
	       </key>
	        <key n="111"> 
		       <name>o</name>
		       <desc>fuelhatch.open/close</desc>
		       <binding> 
			        <command>nasal</command>
				<script>b2.fuelhatch.toggle()</script>
		       </binding>
 		</key>
	<!-- map keys for bombbay doors -->
	
	<key n="4">
		<name>Ctrl-D</name>
		<desc>Open/close bomb bay doors</desc>
		<binding>
			<command>nasal</command>
			<script>b2.bombbay.toggle()</script>
		</binding>
   </key>
	
		
  </keyboard>
</input>

<nasal>
	<b2>
		<file>Aircraft/B-2/Nasal/b2.nas</file>
		<script>init_delay();</script>
	</b2>
	<!--<b2-fuel>
		<module>fuel</module>
		<file>Aircraft/B-2/Nasal/AAR.nas</file>
	</b2-fuel>-->

 </nasal>

</PropertyList>
