<?xml version="1.0"?>

<PropertyList>

	<sim>
    
		<!-- Info -->
	
		<description>Mikoyan-Gurevich MiG-21bis JSBSim</description>
		<author>Petar Jedvaj, David Culp, Raptor, Stuart Cassie, Gary Brown, Brendan Black, bugman and Tomaskom</author>
		<status>1.4.3</status>
	
		<rating>
			<FDM type="int">3</FDM>
			<systems type="int">2</systems>
			<cockpit type="int">3</cockpit>
			<model type="int">5</model>
		</rating>

		<tags>
			<tag>fighter</tag>
			<tag>mikoyan-gurevich</tag>
			<tag>1960s</tag>
			<tag>1970s</tag>
			<tag>1980s</tag>
			<tag>1990s</tag>
			<tag>2000s</tag>
			<tag>coldwar</tag>
			<tag>vietnam</tag>
			<tag>delta</tag>
			<tag>retractable-gear</tag>
			<tag>supersonic</tag>
			<tag>afterburner</tag>
			<tag>jet</tag>
			<tag>single-engine</tag>
		</tags>

		<flight-model>jsb</flight-model>
		<aero>MiG-21bis</aero>

		<startup>
			<splash-texture>Aircraft/MiG-21bis/Splash.png</splash-texture>
		</startup>
	
		<!-- Models -->
	
		<model>
			<path>Aircraft/MiG-21bis/Models/MiG-21bis.xml</path>
			<fallback-model-index>521</fallback-model-index>
		</model>

		<submodels> 
			<serviceable type="bool">true</serviceable>
			<path>Aircraft/MiG-21bis/Submodels.xml</path>
		</submodels>
	
		<!-- System Settings -->

		<systems>
			<autopilot>
				<path>Aircraft/MiG-21bis/Systems/Autopilot.xml</path>
			</autopilot>
		</systems>
	
		<sound>
			<path>Aircraft/MiG-21bis/Sounds/Sound.xml</path>
		</sound>
	
		<virtual-cockpit archive="y">true</virtual-cockpit>

		<panel>
			<visibility archive="y">false</visibility>
		</panel>
	
		<flaps>
			<setting>0.000</setting>
			<setting>0.500</setting> 
			<setting>1.000</setting> 
		</flaps>
	
		<!-- View Settings -->
	
		<view n="0">
			<internal archive="y">true</internal>
			<config>
				<pitch-offset-deg>-20.0</pitch-offset-deg>
				<x-offset-m archive="y"> 0.00</x-offset-m>
				<y-offset-m archive="y"> 1.08</y-offset-m>
				<z-offset-m archive="y">-3.30</z-offset-m>
				<default-field-of-view-deg type="double">75</default-field-of-view-deg>
			</config>
		</view>

		<chase-distance-m>-20</chase-distance-m>
	
		<rendering>
			<redout>
				<parameters>
					<blackout-onset-g>4.0</blackout-onset-g>
					<blackout-complete-g>8.0</blackout-complete-g>
				</parameters> 
			</redout>
		</rendering>
	
		<!-- Menu -->
	
		<menubar>
			<default>
				<menu n="100">
					<label>MiG-21bis</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 -->
	
		<help>
			<key>
				<name>s</name>
				<desc>Toggle starter valves</desc>
			</key>
			<key>
				<name>Shift-q</name>
				<desc>Fuel cut off</desc>
			</key>
			<key>
				<name>Ctrl-b</name>
				<desc>Toggle air brakes</desc>
			</key>
			<key>
				<name>d</name>
				<desc>Deploy drag parachute</desc>
			</key>
			<key>
				<name>j</name>
				<desc>Jettison drag parachute</desc>
			</key>
			<key>
				<name>m</name>
				<desc>Nose wheel steering</desc>
			</key>
			<key>
				<name>Shift-c</name>
				<desc>Toggle canopy</desc>
			</key>
			<key>
				<name>e</name>
				<desc>Eject</desc>
			</key>
			<key>
				<name>f</name>
				<desc>Gun trigger</desc>
			</key>
			<key>
				<name>q</name>
				<desc>Fire selected weapon</desc>
			</key>
			<key>
				<name>1</name>
				<desc>Select left R-60 missile</desc>
			</key>
			<key>
				<name>2</name>
				<desc>Select right R-60 missile</desc>
			</key>
			<key>
				<name>Shift-1</name>
				<desc>Select FAB-250 bombs</desc>
			</key>
			<key>
				<name>Shift-3</name>
				<desc>Select external fuel tank</desc>
			</key>
			<key>
				<name>Ctrl-d</name>
				<desc>Deselect all stations</desc>
			</key>
			<key>
				<name>Ctrl-f</name>
				<desc>Engage CSR Afterburner (below 15000ft)</desc>
			</key>

		</help>

		<!-- Multiplayer -->

		<multiplay>
			<generic>
				<string n="9" type="string"/>
				<int n="10" alias="controls/armament/trigger" />
				<float n="8" alias="/engines/engine[0]/augmentation" /> <!-- Reheat  -->
			</generic>
		</multiplay>

	</sim>

	<!-- Misc Settings -->
    
	<controls>
		<flight>
			<flaps>0</flaps>
			<elevator-trim>-0.16</elevator-trim>
			<chute_jettisoned type="int">0</chute_jettisoned>
		</flight>
		<gear>
			<brake-parking type="double">1</brake-parking>
		</gear>
		<lighting>
			<instruments-norm>0.3</instruments-norm>
		</lighting>
		<armament>
			<gunsight>
				<power-on type="bool">true</power-on>
				<intensity type="double">0.3</intensity>
			</gunsight>
		</armament>
	</controls>

	<engines>
		<engine n="0">
			<running>true</running>
		</engine>
	</engines>
    
	<instrumentation>
		<marker-beacon>
			<volume type="double" archive="y">0.0</volume>
		</marker-beacon>
		<radar>
			<range type="int" archive="y">20</range>
			<range-factor type="double" archive="n">0.001888</range-factor>
			<minimized type="bool" archive="y">false</minimized>
			<selected type="int">3</selected>
			<enabled type="bool">true</enabled>
			<az-field type="double">120</az-field>
			<range type="double">150</range>
			<range-selected type="double">50</range-selected>
			<radar2-range type="double">150</radar2-range>
			<display-rdr type="bool">true</display-rdr>
			<radar-standby type="int">3</radar-standby>
			<mode>
				<rws type="bool">true</rws>
				<tws-auto type="bool">false</tws-auto>
			</mode>
		</radar>
		<rdmi-mode type="int">0</rdmi-mode> <!-- 0=TAC, 1=VOR, 2=ADF -->
		<radar2>
			<sweep-width-m type="double">0.0844</sweep-width-m>
			<range-width-m type="double">0.0846</range-width-m>
			<radius-ppi-display-m type="double">0.0846</radius-ppi-display-m>
			<hud-eye-dist-m type="double">0.766</hud-eye-dist-m>
			<hud-radius-m type="double">0.071</hud-radius-m>
			<hud-vertical-offset-m type="double">-0.025</hud-vertical-offset-m>
		</radar2>
		<rwr>
			<display-lighting-intens type="double">0.4</display-lighting-intens>
			<symbology-lighting-intens type="double">1</symbology-lighting-intens>
		</rwr>
	</instrumentation>

	<fdm>
		<jsbsim>
			<simulation>
				<sim-time-sec>0</sim-time-sec>
			</simulation>
			<systems>
				<dump>
					<armed type="double">0</armed>
				</dump>
				<NWS>
					<engaged type="double">0</engaged>
				</NWS>
				<canopy>
					<command type="double">0</command>
					<position type="double">0</position>
				</canopy>
				<armament>
					<station1>
						<selected type="double">0</selected>
					</station1>
					<station2>
						<selected type="double">0</selected>
					</station2>
					<station3>
						<selected type="double">0</selected>
					</station3>
					<station4>
						<selected type="double">0</selected>
					</station4>
					<station5>
						<selected type="double">0</selected>
					</station5>
				</armament>
			</systems>
		</jsbsim>
	</fdm>

	<!-- Keyboard Shortcuts -->
	<input>
		<keyboard>
	
			<key n="4">
				<name>Ctrl-d</name>
				<desc>Deselect All Stations</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/station1/selected</property>
					<value type="int">0</value>
				</binding>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/station2/selected</property>
					<value type="int">0</value>
				</binding>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/station3/selected</property>
					<value type="int">0</value>
				</binding>
			</key>
	
			<key n="33">
				<name>Shift 1</name>
				<desc>Add Station 2</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/station2/selected</property>
					<value type="int">1</value>
				</binding>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/station4/selected</property>
					<value type="int">1</value>
				</binding>
			</key>

			<key n="35">
				<name>Shift 3</name>
				<desc>Add Station 3</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/station3/selected</property>
					<value type="int">1</value>
				</binding>
			</key>

			<key n="49">
				<name>1</name>
				<desc>Add Station 1</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/station1/selected</property>
					<value type="int">1</value>
				</binding>
			</key>

			<key n="50">
				<name>2</name>
				<desc>Add Station 5</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/station5/selected</property>
					<value type="int">1</value>
				</binding>
			</key>
       
			<key n="81">
				<name>Shift-Q</name>
				<desc>Fuel cut off</desc>
				<binding>
					<condition>
						<property>/sim/input/selected/engine[0]</property>
					</condition>
					<command>property-toggle</command>
					<property>/controls/engines/engine[0]/cutoff</property>
				</binding>
			</key>

			<key n="67">
				<name>C</name>
				<desc>toggle canopy</desc>
				<binding>
					<command>property-toggle</command>
					<property>fdm/jsbsim/systems/canopy/command</property>
				</binding>
			</key>

			<key n="100">
				<name>d</name>
				<desc>Deploy braking parachute</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/chute/deploy</property>
					<value type="int">1</value>
				</binding>
			</key>
			
			<key n="101">
				<name>e</name>
				<desc>Eject</desc>
				<binding>
					<command>nasal</command>
					<script>Eject.eject();</script>
				</binding>
			</key>

			<key n="102">
				<name>f</name>
				<desc>Gun trigger</desc> 
				<binding>
					<command>property-assign</command>
					<property>controls/armament/trigger</property>
					<value>true</value>
				</binding>
				<mod-up>
					<binding>
						<command>property-assign</command>
						<property>controls/armament/trigger</property>
						<value>false</value>
					</binding> 
				</mod-up>
			</key>

			<key n="106">
				<name>j</name>
				<desc>jettison braking parachute</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/chute/deploy</property>
					<value type="int">0</value>
				</binding>
				<binding>
					<command>property-assign</command>
					<property>controls/flight/chute_jettisoned</property>
					<value type="int">1</value>
				</binding>
			</key>

			<key n="109">
				<name>m</name>
				<desc>engage nose wheel steering</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/NWS/engaged</property>
					<value>1</value> 
				</binding>
				<mod-up>
					<binding>
						<command>property-assign</command>
						<property>fdm/jsbsim/systems/NWS/engaged</property>
						<value>0</value> 
					</binding>
				</mod-up>
			</key>
			
			<key n="113">
				<name>q</name>
				<desc>Release selected store</desc>
				<binding>
					<command>property-assign</command>
					<property>fdm/jsbsim/systems/armament/release</property>
					<value>1</value>
				</binding>
				<mod-up>
					<binding>
						<command>property-assign</command>
						<property>fdm/jsbsim/systems/armament/release</property>
						<value>0</value> 
					</binding>
				</mod-up>
			</key>
	    
			<key n="115">
				<name>s</name>
				<desc>Toggle starter valves</desc>
				<binding>
					<command>property-toggle</command>
					<property>controls/engines/engine[0]/starter</property>
				</binding>
				<binding>
					<command>property-toggle</command>
					<property>controls/engines/engine[1]/starter</property>
				</binding>
				<mod-up>
					<binding>
						<command>null</command>
					</binding>
				</mod-up>
			</key>

			<key n="6">
				<name>Ctrl-f</name>
				<desc>Toggle CSR Mode (modelled as 3 minutes water injection)</desc>
				<binding>
					<command>property-toggle</command>
					<property>fdm/jsbsim/propulsion/engine[0]/injection_cmd</property>
				</binding>
			</key>
	


		</keyboard>
	</input>

	<!-- Effects -->
	<gear>
		<gear n="0">
			<tyre-smoke type="int">0</tyre-smoke>
			<sprayspeed-ms type="double">0</sprayspeed-ms>
			<spray-density type="double">0</spray-density>
			<caster-angle-deg-damped type="double">0</caster-angle-deg-damped>
		</gear>
		<gear n="1">
			<tyre-smoke type="int">0</tyre-smoke>
			<sprayspeed-ms type="double">0</sprayspeed-ms>
			<spray-density type="double">0</spray-density>
		</gear>
		<gear n="2">
			<tyre-smoke type="int">0</tyre-smoke>
			<sprayspeed-ms type="double">0</sprayspeed-ms>
			<spray-density type="double">0</spray-density>
		</gear>
	</gear>

	<!-- Nasal Scripts -->
	<nasal>
		<MiG-21bis>
			<file>Aircraft/MiG-21bis/Nasal/liveries.nas</file>
		</MiG-21bis>
	    <lights>
	    	<file>Aircraft/MiG-21bis/Nasal/Lights.nas</file>
	    </lights>
		<Eject>
			<file>Aircraft/MiG-21bis/Nasal/eject.nas</file>
		</Eject>
		<tyresmoke>
			<file>Aircraft/MiG-21bis/Nasal/tyresmoke.nas</file>
		</tyresmoke>
		<rwr>
			<file>Aircraft/Instruments-3d/rwr/rwr.nas</file>
		</rwr> 
		<radardist>
			<file>Aircraft/Instruments-3d/radardist/radardist.nas</file>
		</radardist>
		<radar>
			<file>Aircraft/MiG-21bis/Nasal/radar.nas</file>
		</radar>
		<radar2>
			<file>Aircraft/Instruments-3d/radar2/radar2.nas</file>
		</radar2>
	</nasal>

</PropertyList>
