<?xml version="1.0"?>

<PropertyList>

    <path>r22.ac</path>

    <nasal>
        <load>
            var livery_update = aircraft.livery_update.new("Aircraft/R22/Models/Liveries", 10);
        </load>

        <unload>
            livery_update.stop();
        </unload>
    </nasal>

    <animation>
      <type>material</type>
      <object-name>Boom</object-name>
      <object-name>Fuselage</object-name>
      <object-name>L.door</object-name>
      <object-name>R.door</object-name>
      <property-base>sim/model/livery</property-base>
      <texture-prop>texture</texture-prop>
      <texture>paint1.png</texture>
    </animation>

    <panel>
        <name>Center Panel</name>
        <path>Aircraft/R22/Panels/center-panel.xml</path>
        <bottom-left>
            <x-m>-1.121</x-m>
            <y-m>-0.087</y-m>
            <z-m>-1.683</z-m>
        </bottom-left>
        <bottom-right>
            <x-m>-1.121</x-m>
            <y-m>0.087</y-m>
            <z-m>-1.683</z-m>
        </bottom-right>
        <top-left>
            <x-m>-1.328</x-m>
            <y-m>-0.087</y-m>
            <z-m>-1.587</z-m>
        </top-left>			
    </panel>

    <panel>
        <name>Lower Panel</name>
        <path>Aircraft/R22/Panels/lower-panel.xml</path>
        <bottom-left>
            <x-m>-1.033</x-m>
            <y-m>-0.087</y-m>
            <z-m>-1.864</z-m>
        </bottom-left>
        <bottom-right>
            <x-m>-1.033</x-m>
            <y-m>0.087</y-m>
            <z-m>-1.864</z-m>
        </bottom-right>
        <top-left>
            <x-m>-1.120</x-m>
            <y-m>-0.087</y-m>
            <z-m>-1.684</z-m>
        </top-left>
    </panel>

    <model>
        <path>Aircraft/R22/Models/Instruments/alt.xml</path>
        <offsets>
            <x-m>-1.331</x-m>
            <y-m>-0.078</y-m>
            <z-m>-1.539</z-m>
            <pitch-deg>-5.0</pitch-deg>
        </offsets>
    </model>

    <model>
        <path>Aircraft/R22/Models/Instruments/vor.xml</path>
        <offsets>
            <x-m>-1.331</x-m>
            <y-m>0.0</y-m>
            <z-m>-1.539</z-m>
            <pitch-deg>-5.0</pitch-deg>
        </offsets>
    </model>

    <model>
        <path>Aircraft/R22/Models/Instruments/plug.xml</path>
        <offsets>
            <x-m>-1.331</x-m>
            <y-m>0.078</y-m>
            <z-m>-1.539</z-m>
            <pitch-deg>-5.0</pitch-deg>
        </offsets>
    </model>

    <model>
        <path>Aircraft/R22/Models/Instruments/vsi.xml</path>
        <offsets>
            <x-m>-1.338</x-m>
            <y-m>-0.116</y-m>
            <z-m>-1.457</z-m>
            <pitch-deg>-5.0</pitch-deg>
        </offsets>
    </model>

    <model>
        <path>Aircraft/R22/Models/Instruments/plug.xml</path>
        <offsets>
            <x-m>-1.338</x-m>
            <y-m>-0.039</y-m>
            <z-m>-1.457</z-m>
            <pitch-deg>-5.0</pitch-deg>
        </offsets>
    </model>

    <model>
        <path>Aircraft/R22/Models/Instruments/asi.xml</path>
        <offsets>
            <x-m>-1.338</x-m>
            <y-m>0.039</y-m>
            <z-m>-1.457</z-m>
            <pitch-deg>-5.0</pitch-deg>
        </offsets>
    </model>

    <model>
        <path>Aircraft/R22/Models/Instruments/rpm.xml</path>
        <offsets>
            <x-m>-1.338</x-m>
            <y-m>0.116</y-m>
            <z-m>-1.457</z-m>
            <pitch-deg>-5.0</pitch-deg>
        </offsets>
    </model>

    <model>
        <path>Aircraft/R22/Models/Instruments/compass.xml</path>
        <offsets>
            <x-m>-1.102</x-m>
            <y-m>0</y-m>
            <z-m>-1.099</z-m>
            <pitch-deg>0.0</pitch-deg>
        </offsets>
    </model>

    <animation>
        <name>Glass</name>
        <object-name>glass</object-name>
        <object-name>Rdoor.glass</object-name>
        <object-name>Ldoor.glass</object-name>
    </animation>

    <animation>
        <type>shader</type>
        <shader>chrome</shader>
        <texture>chrome2.png</texture>
        <object-name>Glass</object-name>
    </animation>

    <animation>
        <type>noshadow</type>
        <object-name>Tblades</object-name>
        <object-name>Glass</object-name>
        <object-name>Fblade1</object-name>
        <object-name>Fblade2</object-name>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Glass</object-name>
        <condition>
            <not-equals>
                <property>sim/current-view/view-number</property>
                <value>0</value>
            </not-equals>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Yoke</object-name>
        <object-name>Yokeshaft</object-name>
        <condition>
                <property>sim/yokes-visible</property>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Beacon</object-name>
        <condition>
                <property>controls/lighting/beacon-state/state</property>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Strobe</object-name>
        <condition>
                <property>controls/lighting/strobe-state/state</property>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Nav.red</object-name>
        <object-name>Nav.green</object-name>
        <condition>
            <greater-than>
                <property>systems/electrical/outputs/nav-lights</property>
                <value>0.1</value>
            </greater-than>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Mblade1</object-name>
        <object-name>Mblade2</object-name>
        <condition>
            <less-than>
                <property>rotors/main/rpm</property>
                <value>400</value>
            </less-than>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Fblade1</object-name>
        <object-name>Fblade2</object-name>
        <condition>
            <greater-than>
                <property>rotors/main/rpm</property>
                <value>399.99</value>
            </greater-than>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Tblades</object-name>
        <condition>
            <less-than>
                <property>rotors/tail/rpm</property>
                <value>900</value>
            </less-than>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>Tdisc</object-name>
        <condition>
            <greater-than>
                <property>rotors/tail/rpm</property>
                <value>899.99</value>
            </greater-than>
        </condition>
    </animation>

    <animation>
        <type>spin</type>
        <object-name>Tblades</object-name>
        <object-name>Tailshaft</object-name>
        <property>rotors/tail/rpm</property>
        <center>
            <x-m>4.396</x-m>
            <y-m>0</y-m>
            <z-m>-0.934</z-m>
        </center>
        <axis>
            <x>0.0</x>
            <y>-1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Hub</object-name>
        <object-name>Shaft</object-name>
        <property>rotors/main/blade/position-deg</property>
        <center>
            <x-m>0</x-m>
            <y-m>0</y-m>
            <z-m>0</z-m>
        </center>
        <axis>
            <x>0.0</x>
            <y>0.0</y>
            <z>1.0</z>
        </axis>
    </animation>

<!-- Blade 1-->
    <animation>
        <type>rotate</type>
        <object-name>Mblade1</object-name>
        <object-name>Hinge1</object-name>
        <object-name>Plink1</object-name>
        <property>rotors/main/blade/position-deg</property>
        <offset-deg>180</offset-deg>
        <center>
            <x-m>0</x-m>
            <y-m>0</y-m>
            <z-m>0</z-m>
        </center>
        <axis>
            <x>0.0</x>
            <y>0.0</y>
            <z>1.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Mblade1</object-name>
        <property>rotors/main/blade/incidence-deg</property>
        <center>
            <x-m>0</x-m>
            <y-m>0</y-m>
            <z-m>0</z-m>
        </center>
        <axis>
            <x>-1.0</x>
            <y>0.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Mblade1</object-name>
        <property>rotors/main/blade/flap-deg</property>
        <center>
            <x-m>-0</x-m>
            <y-m>0</y-m>
            <z-m>0.0</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Fblade1</object-name>
        <property>rotors/main/blade/flap-deg</property>
        <center>
            <x-m>-0</x-m>
            <y-m>0</y-m>
            <z-m>0.0</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Fblade1</object-name>
        <property>rotors/main/blade/position-deg</property>
        <offset-deg>180</offset-deg>
        <center>
            <x-m>0</x-m>
            <y-m>0</y-m>
            <z-m>0</z-m>
        </center>
        <axis>
            <x>0.0</x>
            <y>0.0</y>
            <z>1.0</z>
        </axis>
    </animation>

<!-- Blade 2-->
    <animation>
        <type>rotate</type>
        <object-name>Mblade2</object-name>
        <object-name>Plink2</object-name>
        <object-name>Hinge2</object-name>
        <property>rotors/main/blade[1]/position-deg</property>
        <offset-deg>180</offset-deg>
        <center>
            <x-m>0</x-m>
            <y-m>0</y-m>
            <z-m>0</z-m>
        </center>
        <axis>
            <x>0.0</x>
            <y>0.0</y>
            <z>1.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Mblade2</object-name>
        <property>rotors/main/blade[1]/incidence-deg</property>
        <center>
            <x-m>0</x-m>
            <y-m>0</y-m>
            <z-m>0</z-m>
        </center>
        <axis>
            <x>-1.0</x>
            <y>0.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Mblade2</object-name>
        <property>rotors/main/blade[1]/flap-deg</property>
        <center>
            <x-m>-0</x-m>
            <y-m>0</y-m>
            <z-m>0.0</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Fblade2</object-name>
        <property>rotors/main/blade[1]/position-deg</property>
        <offset-deg>180</offset-deg>
        <center>
            <x-m>0</x-m>
            <y-m>0</y-m>
            <z-m>0</z-m>
        </center>
        <axis>
            <x>0.0</x>
            <y>0.0</y>
            <z>1.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Fblade2</object-name>
        <property>rotors/main/blade[1]/flap-deg</property>
        <center>
            <x-m>-0</x-m>
            <y-m>0</y-m>
            <z-m>0.0</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

<!-- annunciators-->

    <animation>
        <type>select</type>
        <object-name>rpm.annun</object-name>
        <condition>
            <and>
                <property>instrumentation/alerts/rpm</property>
                <less-than>
                    <property>rotors/main/rpm</property>
                    <value>503</value>
                </less-than>
            </and>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>fuel.annun</object-name>
        <condition>
                <less-than>
                    <property>consumables/fuel/tank/level-gal_us</property>
                    <value>1.0</value>
                </less-than>
        </condition>
    </animation>

    <animation>
        <type>select</type>
        <object-name>alt.annun</object-name>
        <condition>
                <and>
                    <property>engines/engine/running</property>
                    <not>
                        <property>controls/electric/engine/generator</property>
                    </not>
                </and>
        </condition>
    </animation>

<!-- Controls -->

    <animation>
        <type>rotate</type>
        <object-name>Yokeshaft</object-name>
        <object-name>Yoke</object-name>
        <property>controls/flight/elevator</property>
        <factor>15</factor>
        <center>
            <x-m>-0.954</x-m>
            <y-m>0</y-m>
            <z-m>-1.846</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Yoke</object-name>
        <object-name>Yokeshaft</object-name>
        <property>controls/flight/aileron</property>
        <factor>15</factor>
        <center>
            <x-m>-0.954</x-m>
            <y-m>0</y-m>
            <z-m>-1.846</z-m>
        </center>
        <axis>
            <x>-1</x>
            <y>0.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>RHpedal</object-name>
        <property>controls/flight/rudder</property>
        <factor>20</factor>
        <center>
            <x-m>-1.333</x-m>
            <y-m>0</y-m>
            <z-m>-1.982</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>LHpedal</object-name>
        <property>controls/flight/rudder</property>
        <factor>-20</factor>
        <center>
            <x-m>-1.333</x-m>
            <y-m>0</y-m>
            <z-m>-1.982</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Collective</object-name>
        <property>controls/engines/engine/throttle</property>
        <factor>30</factor>
        <center>
            <x-m>-0.469</x-m>
            <y-m>0</y-m>
            <z-m>-1.969</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1.0</y>
            <z>0.0</z>
        </axis>
    </animation>

<!-- panel switches-->

    <animation>
        <type>rotate</type>
        <object-name>Key</object-name>
        <property>controls/electric/key</property>
        <factor>-20</factor>
        <center>
            <x-m>-1.157</x-m>
            <y-m>0.052</y-m>
            <z-m>-1.665</z-m>
        </center>
        <axis>
            <x>0.423</x>
            <y>0</y>
            <z>0.906</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Key</object-name>
        <condition>
            <equals>
                <property>controls/electric/key</property>
                <value>3</value>
            </equals>
        </condition>
        <property>controls/engines/engine/starter</property>
        <factor>-20</factor>
        <center>
            <x-m>-1.157</x-m>
            <y-m>0.052</y-m>
            <z-m>-1.665</z-m>
        </center>
        <axis>
            <x>0.423</x>
            <y>0</y>
            <z>0.906</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Nav.switch</object-name>
        <property>controls/lighting/nav-lights</property>
        <factor>20</factor>
        <center>
            <x-m>-1.158</x-m>
            <y-m>0.0</y-m>
            <z-m>-1.667</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Strobe.switch</object-name>
        <property>controls/lighting/strobe</property>
        <factor>20</factor>
        <center>
            <x-m>-1.158</x-m>
            <y-m>0.0</y-m>
            <z-m>-1.667</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Alt.switch</object-name>
        <property>controls/electric/engine/generator</property>
        <factor>20</factor>
        <center>
            <x-m>-1.158</x-m>
            <y-m>0.0</y-m>
            <z-m>-1.667</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Batt.switch</object-name>
        <property>controls/electric/battery-switch</property>
        <factor>20</factor>
        <center>
            <x-m>-1.158</x-m>
            <y-m>0.0</y-m>
            <z-m>-1.667</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Clutch.guard</object-name>
        <property>controls/engines/engine/clutchguard</property>
        <factor>100</factor>
        <center>
            <x-m>-1.146</x-m>
            <y-m>0.0</y-m>
            <z-m>-1.673</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>1</y>
            <z>0</z>
        </axis>
    </animation>

    <animation>
        <type>rotate</type>
        <object-name>Clutch.switch</object-name>
        <property>controls/engines/engine/clutch</property>
        <factor>30</factor>
        <center>
            <x-m>-1.158</x-m>
            <y-m>0.0</y-m>
            <z-m>-1.667</z-m>
        </center>
        <axis>
            <x>0</x>
            <y>-1</y>
            <z>0</z>
        </axis>
    </animation>

</PropertyList>
