<?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>31.5</value>
                </less-than>
                <greater-than>
                    <property>/systems/electrical/outputs/landing-light</property>
                    <value>20.0</value>
                </greater-than>
                <property>/controls/lighting/landing-light</property>
            </and>
        </input>
        <output>
            <property>/sim/model/c152/lighting/landing</property>
        </output>
    </logic>

    <logic>
        <name>Lighting Taxi On/Off</name>
        <input>
            <and>
                <less-than>
                    <property>/systems/electrical/outputs/taxi-light</property>
                    <value>31.5</value>
                </less-than>
                <greater-than>
                    <property>/systems/electrical/outputs/taxi-light</property>
                    <value>20.0</value>
                </greater-than>
                <property>/controls/lighting/taxi-light</property>
            </and>
        </input>
        <output>
            <property>/sim/model/c152/lighting/taxi</property>
        </output>
    </logic>

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

    <logic>
        <name>ALS Lighting Taxi</name>
        <input>
            <and>
                <property>/sim/current-view/internal</property>
                <property>/sim/model/c152/lighting/taxi</property>
            </and>
        </input>
        <output>
            <property>/sim/rendering/als-secondary-lights/use-alt-landing-light</property>
        </output>
    </logic>

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

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


    <filter>
        <name>Nav Lights</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/nav-lights</property>
                    <value>16</value>
                </greater-than>
            </condition>
            <property>controls/lighting/nav-lights-switch</property>
        </input>
        <output>
            <property>controls/lighting/nav-lights</property>
        </output>
    </filter>

    <filter>
        <name>Beacon</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/beacon-pitot</property>
                    <value>16</value>
                </greater-than>
            </condition>
            <property>controls/lighting/beacon-switch</property>
        </input>
        <output>
            <property>controls/lighting/beacon</property>
        </output>
    </filter>

    <filter>
        <name>Strobe</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/strobe</property>
                    <value>16</value>
                </greater-than>
            </condition>
            <property>controls/lighting/strobe-switch</property>
        </input>
        <output>
            <property>controls/lighting/strobe</property>
        </output>
    </filter>

    <filter>
        <name>Pitot</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/beacon-pitot</property>
                    <value>16</value>
                </greater-than>
            </condition>
            <property>controls/anti-ice/pitot-heat-switch</property>
        </input>
        <output>
            <property>controls/anti-ice/pitot-heat</property>
        </output>
    </filter>

    <filter>
        <name>Radio_lights</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/instrument-lights</property>
                    <value>16</value>
                </greater-than>
            </condition>
            <property>controls/lighting/radio-norm</property>
        </input>
        <output>
            <property>/sim/model/c152/lighting/radio</property>
        </output>
    </filter>

    <filter>
        <name>instrument_lights</name>
        <type>gain</type>
        <input>
            <condition>
                <greater-than> 
                    <property>/systems/electrical/outputs/instrument-lights</property>
                    <value>16</value>
                </greater-than>
            </condition>
            <property>controls/lighting/instruments-norm</property>
        </input>
        <output>
            <property>/sim/model/c152/lighting/instruments</property>
        </output>
    </filter>

</PropertyList>
