<?xml version="1.0"?>
<!--
This file is part of do228

The do228 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.

The do228 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 do228.  If not, see <http://www.gnu.org/licenses/>.

Dornier DO228 simulation by Bea Wolf (D-ECHO)
Started 06/2020
-->


<PropertyList>
	<sim>
		<checklists include="do228-checklists.xml"/>
		<flaps>
			<setting> 0.0 </setting>
			<setting> 0.17 </setting>
			<setting> 0.67 </setting>
			<setting> 1.0 </setting>
		</flaps>
		<flight-recorder>
			<replay-config type="int">0</replay-config>
			<config n="0" include="Aircraft/Generic/flightrecorder/generic-turboprop-2.xml">
				<name type="string">Dornier DO228 Flight Recorder</name>
				<!-- Custom properties -->
				<signal>
					<property type="string">/doors/baggage-front-pos-norm</property>
				</signal>
				<signal>
					<property type="string">/doors/baggage-rear-pos-norm</property>
				</signal>
				<signal>
					<property type="string">/doors/pilot-pos-norm</property>
				</signal>
				<signal>
					<property type="string">/doors/passenger-pos-norm</property>
				</signal>
				<signal>
					<property type="string">/doors/cargo-pos-norm</property>
				</signal>
			</config>
		</flight-recorder>
		<menubar>
			<default>
				<menu n="10">
					<label>Dornier DO228</label>
					<item>
						<label>Autostart</label>
						<binding>
							<command>nasal</command>
							<script>do228.autostart();</script>
						</binding>
					</item>
					<item>
						<label>Select Livery</label>
						<binding>
							<command>nasal</command>
							<script>aircraft.livery.dialog.open()</script>
						</binding>
					</item>
				</menu>
			</default>
		</menubar>
		<model>
			<path>Aircraft/do228/Models/do228.xml</path>
			<livery>
				<file type="string">PH-CGN</file>
			</livery>
		</model>
		<multiplay>
			<generic>
				<float n="0" alias="/doors/pilot-pos-norm"/>
				<float n="1" alias="/doors/passenger-pos-norm"/>
				<float n="2" alias="/doors/cargo-pos-norm"/>
				<float n="3" alias="/gear/gear[0]/rollspeed-ms"/>
				<float n="4" alias="/gear/gear[1]/rollspeed-ms"/>
				<float n="5" alias="/gear/gear[2]/rollspeed-ms"/>
				<float n="6" alias="/gear/gear[0]/steering-norm"/>
				<float n="7" alias="/doors/baggage-front-pos-norm"/>
				<float n="8" alias="/doors/baggage-rear-pos-norm"/>
			</generic>
		</multiplay>
		<sound>
			<path>Aircraft/do228/Sounds/do228-sound.xml</path>
		</sound>
		<systems>
			<path>Systems/do228-systems.xml</path>
			<property-rule n="100">
				<name>EFI-890R Property Rules</name>
				<path>Systems/efi-890r.xml</path>
			</property-rule>
			<property-rule n="101">
				<name>Lights Property Rules</name>
				<path>Systems/lights.xml</path>
			</property-rule>
			<autopilot n="0">
				<name>KFC250 Autopilot</name>
				<path>Systems/Autopilot/kfc250-autopilot.xml</path>
			</autopilot>
		</systems>
		<view>
			<name>Cockpit View</name>
			<type>lookfrom</type>
			<internal type="bool">true</internal>
			<config>
				<from-model type="bool">true</from-model>
				<from-model-idx type="int">0</from-model-idx>
				<x-offset-m type="double">-0.40</x-offset-m>	<!-- Y -->
				<y-offset-m type="double"> 0.50</y-offset-m>	<!-- Z -->
				<z-offset-m type="double">-2.75</z-offset-m>	<!-- X -->
			</config>
		</view>
	</sim>
	<!--	KFC 250 Autopilot	-->
	<autopilot>
		<buttons>
			<hdg  type="bool">0</hdg>
			<fd   type="bool">0</fd>
			<alt  type="bool">0</alt>
			<nav  type="bool">0</nav>
			<bc   type="bool">0</bc>
			<appr type="bool">0</appr>
			<yd   type="bool">0</yd>
		</buttons>
		<switches>
			<ap type="bool">0</ap>
			<!--	non-physical switches	-->
			<fd type="bool">0</fd>
			<yd type="bool">0</yd>
		</switches>
		<fd>
			<pitch-command-deg type="double">0.0</pitch-command-deg>
			<roll-command-deg type="double">0.0</roll-command-deg>
		</fd>
		<servos>
			<pitch>
				<serviceable type="bool">1</serviceable>
				<command type="double">0.0</command>
			</pitch>
			<pitch-trim>
				<serviceable type="bool">1</serviceable>
				<command type="double">0.0</command>
			</pitch-trim>
			<roll>
				<serviceable type="bool">1</serviceable>
				<command type="double">0.0</command>
			</roll>
			<yaw>
				<serviceable type="bool">1</serviceable>
				<command type="double">0.0</command>
			</yaw>
		</servos>
	</autopilot>
	<controls>
		<electric>
			<voltmeter-sel type="int">0</voltmeter-sel>
		</electric>
		<engines>
			<start-selector type="int">-1</start-selector>	<!--	-1 = GROUND; 0 = VENT; 1 = AIR	-->
			<engine n="0">
				<engine-speed type="float">0.0</engine-speed>
				<starter-cover type="bool">0</starter-cover>
			</engine>
			<engine n="1">
				<engine-speed type="float">0.0</engine-speed>
				<starter-cover type="bool">0</starter-cover>
			</engine>
		</engines>
		<flight>
			<flaps-int type="float">0.0</flaps-int>
		</flight>
		<gear>
			<nws-switch type="int">1</nws-switch>	<!--	0 = test; 1 = ON; 2 = BYPASS	-->
			<nws-45-button type="bool">false</nws-45-button>
		</gear>
		<hydraulic>
			<hydraulic-switch type="int">1</hydraulic-switch>
		</hydraulic>
		<maintenance-switch type="int">0</maintenance-switch> <!-- 0 = NORM; 1 = INV; 2 = GEAR UP -->
		<pneumatic>
			<cockpit-air type="float">0.0</cockpit-air>
			<demist type="float">0.1</demist>
			<air-cond-select type="int">0</air-cond-select>	<!-- -1 = RAM AIR; 0 = NORM; 1 = HIGH -->
			<air-cond type="bool">0</air-cond>
			<cockpit-heat type="bool">0</cockpit-heat>
			<cabin-heat type="bool">0</cabin-heat>
			<auto-temp-select type="float">0.5</auto-temp-select>
			<temp-select type="bool">0</temp-select>	<!-- 0 = AUTO; 1 = MAN -->
			<manual-control type="int">0</manual-control>	<!-- -1 = COLD ; 0 = OFF; 1 = HOT -->
		</pneumatic>
	</controls>
	<doors>
		<baggage-front-cmd-norm type="bool">0</baggage-front-cmd-norm>
		<baggage-rear-cmd-norm type="bool">0</baggage-rear-cmd-norm>
		<pilot-cmd-norm type="bool">0</pilot-cmd-norm>
		<passenger-cmd-norm type="bool">0</passenger-cmd-norm>
		<cargo-cmd-norm type="bool">0</cargo-cmd-norm>
	</doors>
	<engines>
		<engine n="0">
			<rpm alias="/engines/engine[0]/thruster/rpm" /> <!-- MP compatibility -->
		</engine>
		<engine n="1">
			<rpm alias="/engines/engine[1]/thruster/rpm" /> <!-- MP compatibility -->
		</engine>
	</engines>
	<environment>
		<aircraft-effects>
			<reflection-strength type="float">0.5</reflection-strength>
		</aircraft-effects>
	</environment>
	<gear>
		<nws-45-serviceable type="bool">true</nws-45-serviceable>
	</gear>
	<input>
		<keyboard>
			<key n="127">
				<name>Delete</name>
				<desc>Toggle reverse thrust</desc>
				<binding>
					<command>nasal</command>
					<script>do228.toggleReverse(0)</script>
				</binding>
				<binding>
					<command>nasal</command>
					<script>do228.toggleReverse(1)</script>
				</binding>
			</key>
		</keyboard>
	</input>
	<instrumentation>
		<efi-890r>
			<buttons>
				<alert-cancel type="bool">0</alert-cancel>
				<ft-m type="bool">0</ft-m>
			</buttons>
			<settings>
				<altitude-select type="int">1000</altitude-select>
				<speed type="int">150</speed>
				<kias-mach type="bool">0</kias-mach>	<!-- 0 = KIAS; 1 = MACH	-->
			</settings>
			<display-unit n="0">
				<brightness type="float">0.8</brightness>
				<brightness-btn type="int">0</brightness-btn>
			</display-unit>
			<display-unit n="1">
				<brightness type="float">0.8</brightness>
				<brightness-btn type="int">0</brightness-btn>
			</display-unit>
			<display-unit n="2">
				<brightness type="float">0.8</brightness>
				<brightness-btn type="int">0</brightness-btn>
			</display-unit>
			<display-unit n="3">
				<brightness type="float">0.8</brightness>
				<brightness-btn type="int">0</brightness-btn>
			</display-unit>
		</efi-890r>
		<eicas-messages>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
			<line>
				<message type="string" />
				<enabled type="bool">false</enabled>
				<color-red-norm type="float">1</color-red-norm>
				<color-green-norm type="float">1</color-green-norm>
				<color-blue-norm type="float">1</color-blue-norm>
			</line>
		</eicas-messages>
		<tcas>                               <!-- http://wiki.flightgear.org/index.php/TCAS -->
			<serviceable type="bool">true</serviceable>
			<inputs>
				<mode type="int">3</mode>	<!-- 0=off, 1=standby, 2=TA-only, 3=auto(TA/RA) -->
			</inputs>
			<speaker>					<!-- Speaker Configuration -->
				<max-dist> 2 </max-dist>			<!-- Max. distance where speaker is heard -->
				<reference-dist> 1 </reference-dist>	<!-- Distance to pilot -->
				<volume> 1.0 </volume>				<!-- Volume at reference distance -->
			</speaker>
		</tcas>
		<radar-altimeter>
			<serviceable type="bool">true</serviceable>
		</radar-altimeter>
	</instrumentation>
	<systems>
		<!--	TODO simulate anti-ice system	-->
		<anti-ice>
			<inlet n="0">
				<serviceable type="bool">1</serviceable>
			</inlet>
			<inlet n="1">
				<serviceable type="bool">1</serviceable>
			</inlet>
			<pitot n="0">
				<serviceable type="bool">1</serviceable>
			</pitot>
			<pitot n="1">
				<serviceable type="bool">1</serviceable>
			</pitot>
			<windshield n="0">
				<temperature-degc type="double">15.0</temperature-degc>
			</windshield>
			<windshield n="1">
				<temperature-degc type="double">15.0</temperature-degc>
			</windshield>
		</anti-ice>
		<electrical>
			<gen1-load type="double">0.0</gen1-load>
			<gen2-load type="double">0.0</gen2-load>
			<outputs>
				<turn-coordinator type="double">25.0</turn-coordinator>	<!-- temporary hack to make turn indicator always work -->
			</outputs>
		</electrical>
		<fuel>
			<filter-serviceable n="0" type="bool">1</filter-serviceable>
			<filter-serviceable n="1" type="bool">1</filter-serviceable>
		</fuel>
	</systems>
	<nasal>
		<do228>
			<file>Nasal/do228.nas</file>
			<file>Nasal/do228-instrumentation.nas</file>
			<file>Nasal/engine.nas</file>
			<file>Nasal/electrical.nas</file>
			<file>Models/callsign_placard.nas</file>
		</do228>
		<kfc250>
			<file>Nasal/kfc250.nas</file>
		</kfc250>
		<!--	Call Instruments after electrical system as they rely on electrical system properties	-->
		<canvas_efi_890r>
			<file>Models/Instruments/EFI-890R/canvas/efi-setup.nas</file>
			<file>Models/Instruments/EFI-890R/canvas/efi-890r-pfd.nas</file>
			<file>Models/Instruments/EFI-890R/canvas/efi-890r-mfd.nas</file>
			<file>Models/Instruments/EFI-890R/canvas/nd/ND.nas</file>
		</canvas_efi_890r>
		<canvas_esis_gh3900>
			<file>Models/Instruments/ESIS-GH3900/esis-gh3900.nas</file>
		</canvas_esis_gh3900>
		<canvas_rcu>
			<file>Models/Instruments/RCU/rcu.nas</file>
		</canvas_rcu>
		<thommen_clock>
			<file>Models/Instruments/Thommen-B17-clock/thommen-b17-clock.nas</file>
		</thommen_clock>
	</nasal>
</PropertyList>
