<?xml version="1.0"?>

<!--Radar Altimeter A6-E -->

<PropertyList>
  <path>radar-altimeter.ac</path>

  <animation>
    <type>select</type>
    <object-name>needle</object-name>
    <condition>
      <less-than>
        <property>orientation/roll-deg</property>
        <value>45</value>
      </less-than>
      <greater-than>
        <property>orientation/roll-deg</property>
        <value>-45</value>
      </greater-than>
      <less-than>
        <property>orientation/pitch-deg</property>
        <value>45</value>
      </less-than>
      <greater-than>
        <property>orientation/pitch-deg</property>
        <value>-45</value>
      </greater-than>
      <less-than>
        <property>position/altitude-agl-ft</property>
        <value>5000</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <name>needle</name>
    <type>rotate</type>
    <object-name>needle</object-name>
    <property>position/altitude-agl-ft</property>
    <min>0</min>
    <max>6000</max>
    <offset>-5</offset>
    <interpolation>
      <entry><ind>0</ind><dep>180</dep></entry>
      <entry><ind>10</ind><dep>171</dep></entry>
      <entry><ind>50</ind><dep>138</dep></entry>
      <entry><ind>100</ind><dep>100</dep></entry>
      <entry><ind>150</ind><dep>78</dep></entry>
      <entry><ind>250</ind><dep>55</dep></entry>
      <entry><ind>400</ind><dep>24</dep></entry>
      <entry><ind>500</ind><dep>3</dep></entry>
      <entry><ind>600</ind><dep>-11</dep></entry>
      <entry><ind>1000</ind><dep>-40</dep></entry>
      <entry><ind>2000</ind><dep>-81</dep></entry> 
      <entry><ind>3000</ind><dep>-101</dep></entry>
      <entry><ind>5000</ind><dep>-138</dep></entry>
      <entry><ind>6000</ind><dep>-150</dep></entry>
    </interpolation>
    <center>
      <x-m>0</x-m>
      <y-m>0</y-m>
      <z-m>0</z-m>
    </center> 
    <axis>
      <x>1</x>
      <y>0</y>
      <z>0</z>
    </axis>
  </animation>

  <!-- radar altitude out of range off-flag and stowed-needle -->
  <animation>
    <type>select</type>
    <object-name>off-flag</object-name>
    <condition>
      <or>
        <less-than>
          <property>orientation/roll-deg</property>
          <value>-45</value>
        </less-than>
        <greater-than>
          <property>orientation/roll-deg</property>
          <value>45</value>
        </greater-than>
        <less-than>
          <property>orientation/pitch-deg</property>
          <value>-45</value>
        </less-than>
        <greater-than>
          <property>orientation/pitch-deg</property>
          <value>45</value>
        </greater-than>
        <greater-than>
          <property>position/altitude-agl-ft</property>
          <value>5000</value>
        </greater-than>
      </or>
    </condition>
  </animation>
  <animation>
    <type>select</type>
    <object-name>stowed-needle</object-name>
    <condition>
      <or>
        <less-than>
          <property>orientation/roll-deg</property>
          <value>-45</value>
        </less-than>
        <greater-than>
          <property>orientation/roll-deg</property>
          <value>45</value>
        </greater-than>
        <less-than>
          <property>orientation/pitch-deg</property>
          <value>-45</value>
        </less-than>
        <greater-than>
          <property>orientation/pitch-deg</property>
          <value>45</value>
        </greater-than>
        <greater-than>
          <property>position/altitude-agl-ft</property>
          <value>5000</value>
        </greater-than>
      </or>
    </condition>
  </animation>

<!-- low-altitude limit bug -->
  <animation>
    <name>bug</name>
    <type>rotate</type>
    <object-name>bug</object-name>
    <property>sim/model/A-6E/instrumentation/radar-altimeter/limit-bug</property>
    <min>0</min>
    <max>6000</max>
    <offset>-5</offset>
    <interpolation>
      <entry><ind>0</ind><dep>180</dep></entry>
      <entry><ind>10</ind><dep>171</dep></entry>
      <entry><ind>50</ind><dep>138</dep></entry>
      <entry><ind>100</ind><dep>100</dep></entry>
      <entry><ind>150</ind><dep>78</dep></entry>
      <entry><ind>250</ind><dep>55</dep></entry>
      <entry><ind>400</ind><dep>24</dep></entry>
      <entry><ind>500</ind><dep>3</dep></entry>
      <entry><ind>600</ind><dep>-11</dep></entry>
      <entry><ind>1000</ind><dep>-40</dep></entry>
      <entry><ind>2000</ind><dep>-81</dep></entry> 
      <entry><ind>3000</ind><dep>-101</dep></entry>
      <entry><ind>5000</ind><dep>-138</dep></entry>
      <entry><ind>6000</ind><dep>-150</dep></entry>
    </interpolation>
    <center>
      <x-m>0</x-m>
      <y-m>0</y-m>
      <z-m>0</z-m>
    </center>
    <axis>
      <x>1</x>
      <y>0</y>
      <z>0</z>
    </axis>
  </animation>

  <!-- Minimal Altitude Limit Bug Setting Knob -->
  <animation>
    <name>low-knob-left-fine</name>
    <type>pick</type>
    <visible>true</visible>
    <object-name>low-knob-left</object-name>
    <action>
      <button>0</button>
      <repeatable>true</repeatable>
      <interval-sec>0.2</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>sim/model/A-6E/instrumentation/radar-altimeter/limit-bug</property>
        <step>-20</step>
        <min>50</min>
      </binding>
    </action>
  </animation>

  <animation>
    <name>low-knob-left-coarse</name>
    <type>pick</type>
    <visible>true</visible>
    <object-name>low-knob-left</object-name>
    <action>
      <button>1</button>
      <repeatable>true</repeatable>
      <interval-sec>0.2</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>sim/model/A-6E/instrumentation/radar-altimeter/limit-bug</property>
        <step>-100</step>
        <min>50</min>
      </binding>
    </action>
  </animation>

  <animation>
    <name>low-knob-right-fine</name>
    <type>pick</type>
    <visible>true</visible>
    <object-name>low-knob-right</object-name>
    <action>
      <button>0</button>
      <repeatable>true</repeatable>
      <interval-sec>0.2</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>sim/model/A-6E/instrumentation/radar-altimeter/limit-bug</property>
        <step>20</step>
        <max>5000</max>
      </binding>
    </action>
  </animation>

  <animation>
    <name>low-knob-right-coarse</name>
    <type>pick</type>
    <visible>true</visible>
    <object-name>low-knob-right</object-name>
    <action>
      <button>1</button>
      <repeatable>true</repeatable>
      <interval-sec>0.2</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>sim/model/A-6E/instrumentation/radar-altimeter/limit-bug</property>
        <step>100</step>
        <max>5000</max>
      </binding>
    </action>
  </animation>

  <!-- low-altitude warning-light -->
  <animation>
    <type>select</type>
    <object-name>low-lamp</object-name>
    <condition>
        <less-than>
          <property>orientation/roll-deg</property>
          <value>45</value>
        </less-than>
        <greater-than>
          <property>orientation/roll-deg</property>
          <value>-45</value>
        </greater-than>
        <less-than>
          <property>orientation/pitch-deg</property>
          <value>45</value>
        </less-than>
        <greater-than>
          <property>orientation/pitch-deg</property>
          <value>-45</value>
        </greater-than>
        <less-than>
          <property>position/altitude-agl-ft</property>
          <property>sim/model/A-6E/instrumentation/radar-altimeter/limit-bug</property>
        </less-than>
    </condition>
  </animation>


<!-- lighting -->
  <animation>
    <object-name>radar-alti</object-name>
    <type>material</type>
    <condition><not><property>sim/rendering/rembrandt/enabled</property></not></condition>
    <emission>
      <factor-prop>controls/lighting/instruments-norm</factor-prop>
      <red>0.55</red>
      <green>0.24</green>
      <blue>0.10</blue>
    </emission>
  </animation>

  <animation>
    <object-name>low-lamp</object-name> 
    <type>material</type>
    <emission>
      <red>1</red>
      <green>1</green>
      <blue>1</blue>
    </emission>
  </animation>

  <animation>
    <type>range</type>
    <min-m>0</min-m>
    <max-m>15</max-m>
  </animation>

</PropertyList>
