<?xml version="1.0" encoding="UTF-8"?>
<!--
************************************************************************
JSBSim Cessna 150L.

Started May 2005 by Harald Johnsen

Cockpit Adjusted June 2011 by Tom Haigh

FDM/Engine Adjusted June 2011 by Ron Jensen

Overhauling 2016 by Harald Johnsen
************************************************************************
-->

<PropertyList>

    <sim>

        <description>Cessna 150L</description>
        <author>Harald Johnsen</author>
        <status>beta</status>

        <long-description>The Cessna 150 is a two-seat tricycle gear general aviation airplane that was designed for flight training, touring and personal use.
The Cessna 150 is the fifth most produced civilian plane ever, with 23,839 aircraft produced. The Cessna 150 was offered for sale in the 150 basic model, Commuter, Commuter II, Patroller and the aerobatic Aerobat models.
        </long-description>

        <localized>
        <fr>
            <long-description>Le Cessna 150 est un avion biplace à train tricycle qui a été conçu pour l'entraînement au vol, les tournées et l'utilisation personnelle1. Le Cessna 150 est le cinquième avion civil le plus produit, avec 23 839 avions produits.
            </long-description>
        </fr>
        <de>
            <long-description>Die Cessna 150 und Cessna 152 sind populäre zweisitzige, abgestrebte Schulterdecker des Flugzeugherstellers Cessna mit starrem Dreibeinfahrwerk. Die Leichtflugzeuge wurden speziell für die Schulung entwickelt.
            </long-description>
        </de>
        <es>
            <long-description>El Cessna 150 es un avión biplaza de propósito general equipado con tren de aterrizaje fijo en triciclo y ala alta, diseñado originalmente para labores de entrenamiento, turismo y uso personal.
            </long-description>
        </es>
        <pt>
            <long-description>O Cessna 150 é um avião a motor de combustão interna, originalmente projectado para treino de vôo. O primeiro foi produzido em 1959, como sucessor do popular Cessna 140.
            </long-description>
        </pt>
        </localized>

        <tags>
            <tag>ga</tag>
            <tag>cessna</tag>
            <tag>piston</tag>
            <tag>single-engine</tag>
            <tag>fixed-gear</tag>
            <tag>1970s</tag>
        </tags>

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


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

        <model>
            <path archive="y">Aircraft/c150/Models/c150.xml</path>
            <c150>
                <doors>
                    <door>
                        <name type="string">pilot's door</name>
                        <position-norm type="double">0.0</position-norm>
                    </door>
                    <door>
                        <name type="string">copilot's door</name>
                        <position-norm type="double">0.0</position-norm>
                    </door>
                    <door>
                        <name type="string">pilot's window</name>
                        <position-norm type="double">0.0</position-norm>
                    </door>
                    <door>
                        <name type="string">copilot's window</name>
                        <position-norm type="double">0.0</position-norm>
                    </door>
                </doors>
                <options>
                    <show-yoke type="bool">true</show-yoke>
                </options>
                <immat type="string">F-C150</immat>
                <instrument>
                    <time-hobbs-meter type="double">0.0</time-hobbs-meter>
                    <time-tach-meter type="double">0.0</time-tach-meter>
                </instrument>

                <rendering>
                    <exterior-glass-reflection>
                        <reflection-enabled type="int">1</reflection-enabled>
                        <reflection-correction type="float">0.5</reflection-correction>
                        <reflect-map-enabled type="int">1</reflect-map-enabled>
                        <reflection-fresnel type="float">0.2</reflection-fresnel>
                        <reflection-rainbow type="float">0.1</reflection-rainbow>
                        <reflection-noise type="float">0.2</reflection-noise>
                        <reflection-dynamic type="int">1</reflection-dynamic>
                        <ambient-correction type="float">0.5</ambient-correction>
                    </exterior-glass-reflection>
                    <fuselage>
                        <reflection-enabled type="int">1</reflection-enabled>
                        <reflection-correction type="float">0.0</reflection-correction>
                        <reflect-map-enabled type="int">1</reflect-map-enabled>
                        <reflection-fresnel type="float">0.1</reflection-fresnel>
                        <reflection-rainbow type="float">0.0</reflection-rainbow>
                        <reflection-noise type="float">0.0</reflection-noise>
                        <reflection-dynamic type="int">1</reflection-dynamic>
                        <ambient-correction type="float">0.0</ambient-correction>
                    </fuselage>
                    <interior-glass>
                        <reflection-strength type="float">0.75</reflection-strength>
                    </interior-glass>
                    <chrome>
                        <reflection-enabled type="int">1</reflection-enabled>
                        <reflection-correction type="float">0.0</reflection-correction>
                        <reflect-map-enabled type="int">1</reflect-map-enabled>
                        <reflection-fresnel type="float">0.1</reflection-fresnel>
                        <reflection-rainbow type="float">0.0</reflection-rainbow>
                        <reflection-noise type="float">0.0</reflection-noise>
                        <reflection-dynamic type="int">1</reflection-dynamic>
                        <ambient-correction type="float">0.0</ambient-correction>
                    </chrome>
                </rendering>
            </c150>
        </model>

        <aircraft-data>
            <path>sim/model/c150/options/show-yoke</path>
            <path>sim/model/c150/instrument/time-hobbs-meter</path>
            <path>sim/model/c150/instrument/time-tach-meter</path>
            <path>systems/electrical/battery-charge-percent</path>
            <path>sim/model/c150/immat</path>

            <path>sim/sound/c150-wind/volume</path>
            <path>sim/sound/c150-engine/volume</path>
            <path>sim/sound/c150-click/volume</path>

            <path>instrumentation/comm[0]/volume</path>
            <path>instrumentation/comm[0]/frequencies/selected-mhz</path>
            <path>instrumentation/comm[0]/frequencies/standby-mhz</path>
            <path>instrumentation/comm[0]/squelch</path>
            <path>instrumentation/nav[0]/volume</path>
            <path>instrumentation/nav[0]/audio-btn</path>
            <path>instrumentation/nav[0]/power-btn</path>
            <path>instrumentation/nav[0]/frequencies/selected-mhz</path>
            <path>instrumentation/nav[0]/frequencies/standby-mhz</path>
            
            <path>instrumentation/comm[1]/volume</path>
            <path>instrumentation/comm[1]/frequencies/selected-mhz</path>
            <path>instrumentation/comm[1]/frequencies/standby-mhz</path>
            <path>instrumentation/comm[1]/squelch</path>
            <path>instrumentation/nav[1]/volume</path>
            <path>instrumentation/nav[1]/audio-btn</path>
            <path>instrumentation/nav[1]/power-btn</path>
            <path>instrumentation/nav[1]/frequencies/selected-mhz</path>
            <path>instrumentation/nav[1]/frequencies/standby-mhz</path>

            <path>instrumentation/adf[0]/frequencies/selected-khz</path>
            <path>instrumentation/adf[0]/volume</path>
            <path>instrumentation/adf[0]/mode</path>

            <path>consumables/fuel/tank[0]/level-gal_us</path>
            <path>consumables/fuel/tank[1]/level-gal_us</path>
            <path>consumables/fuel/tank[2]/level-gal_us</path>
            <path>consumables/fuel/tank[0]/selected</path>
            <path>consumables/fuel/tank[1]/selected</path>
            <path>consumables/fuel/tank[2]/selected</path>

            <path>controls/lighting/instruments-norm</path>

        </aircraft-data>

  <!--submodels>
    <serviceable type="bool">true</serviceable>
    <path>Aircraft/c150/Models/submodels.xml</path>
  </submodels-->

  <!-- hide the 2D panel -->
 
  <!-- panel>
   <path>Aircraft/c150/Panels/c150-2d-panel.xml</path>
   <visibility archive="y">false</visibility>
  </panel -->
  <panel_2>
   <path>Aircraft/c172/Panels/c172-trans-mini-panel.xml</path>
  </panel_2>

  <!-- position the pilot viewpoint and angle -->
 
    <view>
        <internal archive="y">true</internal>
        <config>
            <x-offset-m archive="y">-0.25</x-offset-m>
            <y-offset-m archive="y">0.39</y-offset-m>
            <z-offset-m archive="y">2.35</z-offset-m>
            <pitch-offset-deg>-7</pitch-offset-deg>
            <default-field-of-view-deg type="double">76.5</default-field-of-view-deg>
        </config>
    </view>

    <!-- Position the co-pilot viewpoint and angle -->
    <view n="101">
        <name>Cockpit Right Seat 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.25</x-offset-m>
            <y-offset-m type="double">0.39</y-offset-m>
            <z-offset-m type="double">2.35</z-offset-m>
            <pitch-offset-deg type="double">-7</pitch-offset-deg>
            <default-field-of-view-deg type="double">76.5</default-field-of-view-deg>
            <limits>
                <enabled type="bool">true</enabled>
                <left>
                    <heading-max-deg type="double">140</heading-max-deg>
                    <x-offset-max-m type="double">0.15</x-offset-max-m>
                    <x-offset-threshold-deg type="double">65</x-offset-threshold-deg>
                </left>
                <right>
                    <heading-max-deg type="double">140</heading-max-deg>
                    <x-offset-max-m type="double">0.15</x-offset-max-m>
                    <x-offset-threshold-deg type="double">65</x-offset-threshold-deg>
                </right>
            </limits>
        </config>
    </view>
    
    <view n="100">
        <name>Right Wing View</name>
        <type>lookfrom</type>
        <internal>false</internal>
        <config>
            <from-model type="bool">true</from-model>
            <from-model-idx type="int">0</from-model-idx>
            <pitch-offset-deg>-3</pitch-offset-deg>
            <heading-offset-deg>80</heading-offset-deg>
            <x-offset-m type="double">10.00</x-offset-m>
            <y-offset-m type="double">0.50</y-offset-m>
            <z-offset-m type="double">2.50</z-offset-m>
        </config>
    </view>        

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

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

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

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

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

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

        <systems>
            <electrical>
                <path></path>
            </electrical>
        
            <!-- Needed by shadows in ALS and other ground effects:
                 http://forum.flightgear.org/viewtopic.php?f=4&t=25157&start=75#p232120
            -->
            <property-rule n="101">
                <path>Aircraft/c150/Systems/filters.xml</path>
            </property-rule>

            <property-rule n="102">
                <path>Aircraft/c150/Systems/als-lights.xml</path>
            </property-rule>


        </systems>

    <flaps>
        <setting>0.000</setting>
        <setting>0.250</setting> <!-- Flaps 10 -->
        <setting>0.500</setting> <!-- Flaps 20 -->
        <setting>0.750</setting> <!-- Flaps 30 -->
        <setting>1.000</setting> <!-- Flaps 40 -->
    </flaps>

        <sound>
            <path archive="y">Aircraft/c150/c150-sound.xml</path>
            <c150-engine>
                <volume type="double">0.7</volume>
            </c150-engine>
            <c150-wind>
                <volume type="double">0.7</volume>
            </c150-wind>
            <c150-click>
                <volume type="double">0.7</volume>
            </c150-click>
        </sound>

  <help include="./help.xml">
   <title>Cessna 150L</title>
    <key>
     <name>d / Shift-d</name>
     <desc>select next/previous door</desc>
    </key>
    <key>
     <name>Ctrl-D</name>
     <desc>open/close selected door</desc>
    </key>
    <key>
      <name>Shift-o</name>
      <desc>operate priming pump</desc>
    </key>
    <key>
    <name>=</name>
      <desc>Show Aircraft Options dialog</desc>
    </key>

  </help>

        <checklists include="c150-checklists.xml"/>

        <menubar>
            <default>
            <menu n="10">
                <label>Cessna 150L</label>
                <enabled type="bool">true</enabled>
                <!--item>
                    <label>Select Livery</label>
                    <binding>
                    <command>nasal</command>
                    <script>aircraft.livery.dialog.open()</script>
                    </binding>
                </item-->

                <item>
                    <label>Immatriculation</label>
                    <binding>
                    <command>nasal</command>
                    <script>c150.immat_dialog.open()</script>
                    </binding>
                </item>

                <item>
                    <label>Aircraft Options</label>
                    <binding>
                        <command>dialog-show</command>
                        <dialog-name>c150-aircraft-dialog</dialog-name>
                    </binding>
                </item>
                <item>
                    <label>Sound</label>
                    <binding>
                        <command>dialog-show</command>
                        <dialog-name>c150-sound</dialog-name>
                    </binding>
                </item>
                <item>
                    <label>Views</label>
                    <binding>
                        <command>dialog-show</command>
                        <dialog-name>c150-view</dialog-name>
                    </binding>
                </item>
                <item>
                    <label>------------------</label>
                    <enabled>false</enabled>
                </item>
                <item>
                    <label>About</label>
                    <binding>
                        <command>dialog-show</command>
                        <dialog-name>c150-about</dialog-name>
                    </binding>
                </item>


            </menu>
            </default>
        </menubar>

        <!-- Splash screens. One is randomly chosen when FlightGear starts -->
        <startup>
            <splash-texture>Aircraft/c150/splash1.png</splash-texture>
        </startup>

        <!-- Fix scrolling direction of knobs -->
        <mouse>
            <invert-mouse-wheel type="bool">true</invert-mouse-wheel>
        </mouse>

    </sim>

 <!-- trim for level cruise -->

    <controls>
        <flight>
            <!-- aileron-trim>0.027</aileron-trim -->
            <aileron-trim>0.000</aileron-trim>
            <rudder-trim>0.0</rudder-trim>
        </flight>
        <engines>
            <engine n="0">
                <magnetos>3</magnetos>
                <mixture>1.0</mixture>
                <throttle>1.0</throttle>
            </engine>
        </engines>
        <lighting>
            <nav-lights type="bool">false</nav-lights>
            <dome-light type="bool">false</dome-light>
            <beacon type="bool">false</beacon>
            <strobe type="bool">false</strobe>
            <landing-lights type="bool">false</landing-lights>
            <instruments-norm type="double">0.0</instruments-norm>
        </lighting>
        <windows>
            <windowL-angle type="double">0.0</windowL-angle>
            <windowR-angle type="double">0.0</windowR-angle>
        </windows>
    </controls>

 <autopilot>
   <config>
     <min-climb-speed-kt type="float">61.0</min-climb-speed-kt>
     <best-climb-speed-kt type="float">76.0</best-climb-speed-kt>
     <target-climb-rate-fpm type="float">400.0</target-climb-rate-fpm>
     <target-descent-rate-fpm type="float">1000.0</target-descent-rate-fpm>
     <elevator-adj-factor type="float">4000.0</elevator-adj-factor>
     <integral-contribution type="float">0.01</integral-contribution>
     <zero-pitch-throttle type="float">0.45</zero-pitch-throttle>
     <zero-pitch-trim-full-throttle type="float">0.14</zero-pitch-trim-full-throttle>
   </config>
 </autopilot>

    <instrumentation>
        <attitude-indicator>
            <config>
                <tumble-flag archive="y" type="bool">true</tumble-flag>
            </config>
        </attitude-indicator>
  
        <adf n="0">
            <ident-audible type="bool">false</ident-audible>
            <volume type="double">0.0</volume>
        </adf>
        <comm n="0">
            <power-btn type="bool">1</power-btn>
            <volume type="double">0.0</volume>
        </comm>
        <comm n="1">
            <power-btn type="bool">1</power-btn>
            <volume type="double">0.0</volume>
        </comm>
        <nav n="0">
            <volume type="double">0.7</volume>
            <power-btn type="bool">false</power-btn>
        </nav>
        <nav n="1">
            <volume type="double">0.7</volume>
            <power-btn type="bool">false</power-btn>
        </nav>
    </instrumentation>

    <engines>
        <engine>
            <rpm type="double">800</rpm>
            <running type="bool">true</running>
        </engine>
    </engines>

    <input>
        <keyboard>
            <key n="4">
                <name>Ctrl-D</name>
                <desc>Open/close selected door</desc>
                <binding>
                    <command>nasal</command>
                    <script>c150.toggle_door()</script>
                </binding>
            </key>

            <key n="61">
                <name>=</name>
                <desc>Show Aircraft Options dialog</desc>
                <binding>
                    <command>dialog-show</command>
                    <dialog-name>c150-aircraft-dialog</dialog-name>
                </binding>
            </key>

            <key n="68">
                <name>Shift-d</name>
                <desc>Select previous door</desc>
                <binding>
                    <command>nasal</command>
                    <script>c150.previous_door()</script>
                </binding>
            </key>

            <key n="100">
                <name>d</name>
                <desc>Select next door</desc>
                <binding>
                    <command>nasal</command>
                    <script>c150.next_door()</script>
                </binding>
            </key>

            <!-- map keys for priming pump -->
            <key n="79"> 
                <name>Shift-o</name>
                <desc>Operate Priming Pump.</desc>
                <binding> 
                    <command>nasal</command>
                    <script>
                        c150.pumpPrimer();
                    </script>
                </binding>
            </key>
            
        </keyboard>
    </input>
 
    <nasal>
        <std>
            <file>Nasal/std/Vector.nas</file>
        </std>
        <c150>
            <file>Aircraft/Generic/updateloop.nas</file>
            <file>Aircraft/c150/Nasal/electrical.nas</file>
            <file>Aircraft/c150/Nasal/perf-test.nas</file>
            <file>Aircraft/c150/Nasal/c150.nas</file>
            <!--file>Aircraft/c150/Nasal/sound.nas</file-->
            <file>Aircraft/Generic/limits.nas</file>
            <file>Aircraft/c150/Nasal/immat.nas</file>
            <file>Aircraft/c150/Nasal/flashlight.nas</file>
        </c150>
    </nasal>

    <payload>
        <weight>
            <name type="string">Pilot</name>
            <weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[0]"/>
            <min-lb type="double">0  </min-lb>
            <max-lb type="double">300</max-lb>
        </weight>
        <weight>
            <name type="string">Passenger 1</name>
            <weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[1]"/>
            <min-lb type="double">0  </min-lb>
            <max-lb type="double">300</max-lb>
        </weight>
        <weight>
            <name type="string">Baggages</name>
            <weight-lb alias="/fdm/jsbsim/inertia/pointmass-weight-lbs[2]"/>
            <min-lb type="double">0  </min-lb>
            <max-lb type="double">100</max-lb>
        </weight>
        <!-- fuel tanks are in jsbsim -->
    </payload>

    <consumables>
        <fuel>
            <tank n="0">
                <name>Right wing</name>
                <level-gal_us type="double">11.25</level-gal_us>
                <selected type="bool">true</selected>
            </tank>
            <tank n="1">
                <name>Left wing</name>
                <level-gal_us type="double">11.25</level-gal_us>
                <selected type="bool">true</selected>
            </tank>
            <tank n="2">
                <name>Long range</name>
                <level-gal_us type="double">0.0</level-gal_us>
                <selected type="bool">false</selected>
            </tank>
        </fuel>
    </consumables>


    <limits>
        <max-positive-g>4.4</max-positive-g>
        <max-negative-g>-1.76</max-negative-g>

        <!-- in kt -->
        <vne>140</vne>

        <!-- 1600*4.4 -->
        <!--max-lift-force>7040</max-lift-force-->

        <mass-and-balance>
            <maximum-ramp-mass-lbs>1600</maximum-ramp-mass-lbs>
            <maximum-takeoff-mass-lbs>1600</maximum-takeoff-mass-lbs>
            <maximum-landing-mass-lbs>1600</maximum-landing-mass-lbs>
            <cg>
                <dimension type="string">in</dimension>
                <limit>
                    <entry>
                        <position type="double">35.0</position>
                        <mass-lbs type="double">1450</mass-lbs>
                    </entry>
                    <entry>
                        <position type="double">35.0</position>
                        <mass-lbs type="double">1950</mass-lbs>
                    </entry>
                    <entry>
                        <position type="double">41</position>
                        <mass-lbs type="double">2550</mass-lbs>
                    </entry>
                    <entry>
                        <position type="double">47.2</position>
                        <mass-lbs type="double">2550</mass-lbs>
                    </entry>
                    <entry>
                        <position type="double">47.2</position>
                        <mass-lbs type="double">1450</mass-lbs>
                    </entry>
                </limit>
            </cg>
        </mass-and-balance>
    </limits>
</PropertyList>
