<?xml version="1.0" encoding="UTF-8"?>

<PropertyList>

   <logic>
        <name>Lighting Landing On/Off</name>
        <input>
            <and>
                <less-than>
                    <property>/systems/electrical/outputs/landing-light</property>
                    <value>14.5</value>
                </less-than>
                <greater-than>
                    <property>/systems/electrical/outputs/landing-light</property>
                    <value>10.0</value>
                </greater-than>
				<greater-than>
					<property>/controls/lighting/landing-switch</property>
                    <value>0.0</value>
                </greater-than>
            </and>
        </input>
        <output>
            <property>/sim/model/pa38/lighting/landing</property>
        </output>
    </logic>

    <logic>
        <name>ALS Lighting Landing</name>
        <input>
            <and>
                <property>/sim/current-view/internal</property>
                <property>/sim/model/pa38/lighting/landing</property>
            </and>
        </input>
        <output>
            <property>/sim/rendering/als-secondary-lights/use-landing-light-int</property>
        </output>
    </logic>

    <logic>
        <name>ALS Lighting Exterior Landing</name>
        <input>
            <and>
                <not>
                    <property>/sim/current-view/internal</property>
                </not>
                <property>/sim/model/pa38/lighting/landing</property>
            </and>
        </input>
        <output>
            <property>/sim/rendering/als-secondary-lights/use-landing-light-ext</property>
        </output>
    </logic>

    <logic>
        <name>Nav Lights</name>
        <input>
                <and>
					<greater-than> 
						<property>/systems/electrical/outputs/nav-lights</property>
						<value>10</value>
					</greater-than>
					<greater-than> 
						<property>/controls/lighting/panel-lights</property>
						<value>-0.1</value>
					</greater-than>
				</and>
        </input>
        <output>
            <property>controls/lighting/nav-lights</property>
        </output>
    </logic>

    <filter>
        <name>panel Lights</name>
        <type>gain</type>
        <input>
            <condition>
                <and>
					<greater-than> 
						<property>/systems/electrical/outputs/panel-lights</property>
						<value>10</value>
					</greater-than>
					<greater-than> 
						<property>/controls/lighting/panel-lights</property>
						<value>-0.1</value>
					</greater-than>
				</and>
            </condition>
            <property>controls/lighting/panel-lights</property>
        </input>
        <output>
            <property>controls/lighting/instruments-norm</property>
        </output>
    </filter>

    <filter>
        <name>Anti Collision</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/anti-coll-lights</property>
                    <value>10</value>
                </greater-than>
            </condition>
            <property>controls/lighting/anti-coll-switch</property>
        </input>
        <output>
            <property>controls/lighting/strobe</property>
        </output>
    </filter>

    <filter>
        <name>Radio_lights</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/panel-lights</property>
                    <value>10</value>
                </greater-than>
            </condition>
            <expression>
                <table>
                    <property>/controls/lighting/radio-norm</property>
                    <entry><ind>0.0</ind><dep>0.0</dep></entry>
                    <entry><ind>1.0</ind><dep>.35</dep></entry>
                </table>
            </expression>
        </input>
        <output>
            <property>/sim/model/pa38/lighting/radio</property>
        </output>
    </filter>

   <filter>
        <name>Panel_lights</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/panel-lights</property>
                    <value>10</value>
                </greater-than>
            </condition>
            <expression>
                <table>
                    <property>/controls/lighting/instruments-norm</property>
                    <entry><ind>0.0</ind><dep>0.0</dep></entry>
                    <entry><ind>1.0</ind><dep>.35</dep></entry>
                </table>
            </expression>
        </input>
        <output>
            <property>sim/model/pa38/lighting/instruments</property>
        </output>
    </filter>

</PropertyList>
