<?xml version="1.0"?>

<!-- Lockheed Constellation 1049h        -->
<!-- Gary R. Neely 'Buckaroo', Dec 2008  -->

<PropertyList>

  <path>mesh_lights.ac</path>

  <!-- No preview for fgrun-->
  <animation>
    <object-name>BeaconVolume_1</object-name>
    <object-name>BeaconVolume_2</object-name>	
    <object-name>NavLightVolume_left</object-name>
    <object-name>NavLightVolume_right</object-name>
    <object-name>NavLightBackVolume</object-name>
    <object-name>LightTaxiGlowH</object-name>
    <object-name>LightTaxiGlowH.001</object-name>
    <object-name>LightTaxiGlowH.002</object-name>
    <object-name>LightVolume</object-name>
    <object-name>LightVolume.001</object-name>
    <object-name>LightVolume.002</object-name>
    <object-name>LightBall</object-name>
    <nopreview/>
  </animation>

  <!-- Special Shaders -->

  <animation>
    <type>noshadow</type>
    <object-name>BeaconL</object-name>
    <object-name>BeaconU</object-name>
    <object-name>BeaconLOn</object-name>
    <object-name>BeaconUOn</object-name>
    <object-name>TailLight</object-name>
    <object-name>TailLampL</object-name>
    <object-name>TailLampLOn</object-name>
    <object-name>TailLampU</object-name>
    <object-name>WingtipL</object-name>
    <object-name>WingtipR</object-name>
    <object-name>WingtipLampL</object-name>
    <object-name>WingtipLampR</object-name>
    <object-name>WingtipLampLOn</object-name>
    <object-name>WingtipLampROn</object-name>
    <object-name>LightTaxiGlowH</object-name>
    <object-name>LightTaxiGlowH.001</object-name>
    <object-name>LightTaxiGlowH.002</object-name>
    <object-name>LightTailGlow</object-name>
    <object-name>LightNavGlowL</object-name>
    <object-name>LightNavGlowR</object-name>		
    <object-name>NavLightBackVolume</object-name>
    <object-name>NavLightVolume_right</object-name>
    <object-name>NavLightVolume_left</object-name>
    <object-name>BeaconVolume_1</object-name>
    <object-name>BeaconVolume_2</object-name>
    <object-name>LightVolume</object-name>
    <object-name>LightVolume.001</object-name>
    <object-name>LightVolume.002</object-name>
    <object-name>LightBall</object-name>
  </animation>

  <!-- working for Rembrandt -->
  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <object-name>BeaconL</object-name>
    <object-name>BeaconU</object-name>
    <object-name>BeaconLOn</object-name>
    <object-name>BeaconUOn</object-name>
    <object-name>TailLight</object-name>
    <object-name>TailLampL</object-name>
    <object-name>TailLampLOn</object-name>
    <object-name>TailLampU</object-name>
    <object-name>WingtipL</object-name>
    <object-name>WingtipR</object-name>
    <object-name>WingtipLampL</object-name>
    <object-name>WingtipLampR</object-name>
    <object-name>WingtipLampLOn</object-name>
    <object-name>WingtipLampROn</object-name>
    <object-name>LightTaxiGlowH</object-name>
    <object-name>LightTaxiGlowH.001</object-name>
    <object-name>LightTaxiGlowH.002</object-name>
    <object-name>LightTailGlow</object-name>
    <object-name>LightNavGlowL</object-name>
    <object-name>LightNavGlowR</object-name>
  </effect>

  <!-- Animations -->

  
  <!-- Rembrand - Position strobe red top / bottom -->
  <animation>
    <type>select</type>
    <object-name>BeaconVolume_1</object-name>
    <object-name>BeaconVolume_2</object-name>
    <condition>
      <and>
	<property>sim/rendering/rembrandt/enabled</property>
	<property>controls/lighting/beacon/enabled</property>
	<property>controls/lighting/beacon/state</property>
      </and>
    </condition>
  </animation>
  

  <animation>
    <type>select</type>
    <object-name>LightBeaconGlow</object-name>
    <condition>
      <and>
    	<not><property>sim/rendering/rembrandt/enabled</property></not>
        <property>controls/lighting/beacon/enabled</property>
        <property>controls/lighting/beacon/state</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>material</type>
    <object-name>BeaconLOn</object-name>
    <object-name>BeaconUOn</object-name>
    <condition>
      <property>controls/lighting/beacon/enabled</property>
      <property>controls/lighting/beacon/state</property>
    </condition>
    <emission>
      <red>1.0</red>
      <green>1.0</green>
      <blue>1.0</blue>
    </emission>
  </animation>

  <animation>
    <type>select</type>
    <object-name>BeaconLOn</object-name>
    <object-name>BeaconUOn</object-name>
    <condition>
      <and>
        <property>controls/lighting/beacon/enabled</property>
        <property>controls/lighting/beacon/state</property>
      </and>
    </condition>
  </animation>

  <!--  Rembrand - Tail -->
  <animation>
    <type>select</type>
    <object-name>NavLightBackVolume</object-name>
    <condition>
      <and>
	<property>sim/rendering/rembrandt/enabled</property>
	<property>controls/lighting/tail</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>TailLampLOn</object-name>
    <condition>
      <property>controls/lighting/tail</property>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>TailLampL</object-name>
    <condition>
      <not><property>controls/lighting/tail</property></not>
    </condition>
  </animation>

  <!--  Rembrand - Nav light - Left, Right, Tail -->
  <animation>
    <type>select</type>
    <object-name>NavLightVolume_right</object-name>
    <object-name>NavLightVolume_left</object-name>
    <condition>
      <and>
	<property>sim/rendering/rembrandt/enabled</property>
	<property>controls/lighting/tail</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>WingtipLampLOn</object-name>
    <object-name>WingtipLampROn</object-name>
    <condition>
      <property>controls/lighting/tail</property>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>WingtipLampL</object-name>
    <object-name>WingtipLampR</object-name>
    <condition>
      <not><property>controls/lighting/tail</property></not>
    </condition>
  </animation>


  <!-- Left (red) nav light -->

  <animation>
    <type>select</type>
    <object-name>LightNavGlowL</object-name>
    <condition>
      <property>controls/lighting/tail</property>
    </condition>
  </animation>

  <animation>
    <type>flash</type>
    <object-name>LightNavGlowL</object-name>
    <center>
      <x-m>-0.920</x-m>
      <y-m>-18.850</y-m>
      <z-m>1.710</z-m>
    </center>
    <axis>
      <x>-1</x>
      <y>-1</y>
      <z>0</z>
    </axis>
    <power>4</power>
    <factor>1</factor>
    <offset>0.4</offset>
    <two-sides type="bool">false</two-sides>
    <min>0.01</min>
    <max>1</max>
  </animation>

  <!-- Right (green) nav light -->

  <animation>
    <type>select</type>
    <object-name>LightNavGlowR</object-name>
    <condition>
      <property>controls/lighting/tail</property>
    </condition>
  </animation>

  <animation>
    <type>flash</type>
    <object-name>LightNavGlowR</object-name>
    <center>
      <x-m>-0.920</x-m>
      <y-m>18.850</y-m>
      <z-m>1.710</z-m>
    </center>
    <axis>
      <x>-1</x>
      <y>1</y>
      <z>0</z>
    </axis>
    <power>4</power>
    <factor>1</factor>
    <offset>0.4</offset>
    <two-sides type="bool">false</two-sides>
    <min>0.01</min>
    <max>1</max>
  </animation>


  <!-- Tail Light -->
  <!--  Rembrand - Nav light - Left, Right, Tail -->
  <animation>
    <type>select</type>
    <object-name>NavLightBackVolume</object-name>
    <condition>
      <and>
	<property>sim/rendering/rembrandt/enabled</property>
	<property>controls/lighting/tail</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>LightTailGlow</object-name>
    <condition>
      <property>controls/lighting/tail</property>
    </condition>
  </animation>

  <!-- Selections for lights when extended to deployed horizontal positions -->
  <!--  Rembrand  -->
  <animation>
    <type>select</type>
    <object-name>LightVolume</object-name>
    <object-name>LightBall</object-name>
    <condition>
      <and>
	<property>sim/rendering/rembrandt/enabled</property>
	<property>controls/lighting/taxi</property>
	<property>gear/gear[0]/position-norm</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>LightTaxiGlowH</object-name>
    <condition>
      <and>
	<property>controls/lighting/taxi</property>
	<property>gear/gear[0]/position-norm</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>LightTaxiGlowH.001</object-name>
    <condition>
      <and>
	<property>controls/lighting/landing-right</property>
	<property>controls/lighting/landing-extend-right</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>LightTaxiGlowH.002</object-name>
    <condition>
      <and>
	<property>controls/lighting/landing-left</property>
	<property>controls/lighting/landing-extend-left</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>LightVolume.001</object-name>
    <condition>
      <and>
	<property>sim/rendering/rembrandt/enabled</property>
	<property>controls/lighting/landing-right</property>
	<property>controls/lighting/landing-extend-right</property>
      </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>LightVolume.002</object-name>
    <condition>
      <and>
	<property>sim/rendering/rembrandt/enabled</property>
	<property>controls/lighting/landing-left</property>
	<property>controls/lighting/landing-extend-left</property>
      </and>
    </condition>
  </animation>

  <!-- Rembrand lights -->
  <!-- Nav light back -->
  <animation>
    <type>light</type>
    <light-type>point</light-type>
    <name>NavLightBack</name>
    <object-name>NavLightBackVolume</object-name>
    <position>
      <x>26.51</x>
      <y>0.000</y>
      <z>-1.25</z>
    </position>
    <direction>
      <x> 1.0</x>
      <y> 0.0</y>
      <z> 0.0</z>
    </direction>
    <ambient>
      <r>0.99</r>
      <g>0.99</g>
      <b>0.96</b>
      <a>1.0</a>
    </ambient>
    <diffuse>
      <r>0.99</r>
      <g>0.99</g>
      <b>0.96</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>0.99</r>
      <g>0.99</g>
      <b>0.96</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.0</l>
      <q>0.75</q>
    </attenuation>
    <exponent>3</exponent>
    <near-m>0.01</near-m>
    <far-m>36</far-m>
    <cutoff>150</cutoff>
  </animation>
  
  <!-- Nav light left -->
  <animation>
    <type>light</type>
    <light-type>point</light-type>
    <name>NavLightLeft</name>
    <object-name>NavLightVolume_left</object-name>
    <position>
      <x>0.07</x>
      <y>-24.88</y>
      <z>1.48</z>
    </position>
    <direction>
      <x> 0.0</x>
      <y>-1.0</y>
      <z> 0.0</z>
    </direction>
    <ambient>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </ambient>
    <diffuse>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.0</l>
      <q>0.75</q>
    </attenuation>
    <exponent>3</exponent>
    <near-m>0.01</near-m>
    <far-m>18</far-m>
    <cutoff>150</cutoff>
  </animation>
  
  <!-- Nav light right -->
  <animation>
    <type>light</type>
    <light-type>point</light-type>
    <name>NavLightRight</name>
    <object-name>NavLightVolume_right</object-name>
    <position>
      <x>0.07</x>
      <y>24.88</y>
      <z>1.48</z>
    </position>
    <direction>
      <x> 0.0</x>
      <y>1.0</y>
      <z> 0.0</z>
    </direction>
    <ambient>
      <r>0.0</r>
      <g>0.99</g>
      <b>0.0</b>
      <a>1.0</a>
    </ambient>
    <diffuse>
      <r>0.9</r>
      <g>0.99</g>
      <b>0.0</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>0.0</r>
      <g>0.99</g>
      <b>0.0</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.0</l>
      <q>0.75</q>
    </attenuation>
    <exponent>3</exponent>
    <near-m>0.01</near-m>
    <far-m>18</far-m>
    <cutoff>150</cutoff>
  </animation>
  
  <!-- Taxi light -->
  <animation>
    <type>light</type>
    <light-type>spot</light-type>
    <name>Landinglight</name>
    <object-name>LightVolume</object-name>
    <position>
      <x>-15.6</x>
      <y> 0.0</y>
      <z>-1.11</z>
    </position>
    <direction>
      <x>-600.0</x>
      <y>   0.0</y>
      <z>   0.0</z>
    </direction>
    <diffuse>
      <r>1.0</r>
      <g>1.0</g>
      <b>1.0</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>1.0</r>
      <g>1.0</g>
      <b>1.0</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.002</l>
      <q>0.00005</q>
    </attenuation>
    <exponent>40</exponent>
    <near-m>0.05</near-m>
    <far-m>450</far-m>
    <cutoff>40</cutoff>
  </animation>
  
  <animation>
    <type>light</type>
    <light-type>point</light-type>
    <name>LandingLightBall</name>
    <object-name>LightBall</object-name>
    <position>
      <x>-18.8</x>
      <y>  0.0</y>
      <z>-1.51</z>
    </position>
    <direction>
      <x> 1.0</x>
      <y> 0.0</y>
      <z> 0.0</z>
    </direction>
    <ambient>
      <r>0.99</r>
      <g>0.99</g>
      <b>0.96</b>
      <a>1.0</a>
    </ambient>
    <diffuse>
      <r>0.99</r>
      <g>0.99</g>
      <b>0.96</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>0.99</r>
      <g>0.99</g>
      <b>0.96</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.0</l>
      <q>0.75</q>
    </attenuation>
    <exponent>3</exponent>
    <near-m>0.01</near-m>
    <far-m>36</far-m>
    <cutoff>150</cutoff>
  </animation>
  
  <!-- Landing light right-->
  <animation>
    <type>light</type>
    <light-type>spot</light-type>
    <name>LandinglightRight</name>
    <object-name>LightVolume.001</object-name>
    <position>
      <x>-3.77</x>
      <y> 6.76</y>
      <z>-0.09</z>
    </position>
    <direction>
      <x>-600.0</x>
      <y>   0.0</y>
      <z>   0.0</z>
    </direction>
    <diffuse>
      <r>1.0</r>
      <g>1.0</g>
      <b>1.0</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>1.0</r>
      <g>1.0</g>
      <b>1.0</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.002</l>
      <q>0.00005</q>
    </attenuation>
    <exponent>40</exponent>
    <near-m>0.05</near-m>
    <far-m>450</far-m>
    <cutoff>40</cutoff>
  </animation>
  
  <!-- Landing light left-->
  <animation>
    <type>light</type>
    <light-type>spot</light-type>
    <name>LandinglightLeft</name>
    <object-name>LightVolume.002</object-name>
    <position>
      <x>-3.77</x>
      <y>-6.76</y>
      <z>-0.09</z>
    </position>
    <direction>
      <x>-600.0</x>
      <y>   0.0</y>
      <z>   0.0</z>
    </direction>
    <diffuse>
      <r>1.0</r>
      <g>1.0</g>
      <b>1.0</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>1.0</r>
      <g>1.0</g>
      <b>1.0</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.002</l>
      <q>0.00005</q>
    </attenuation>
    <exponent>40</exponent>
    <near-m>0.05</near-m>
    <far-m>450</far-m>
    <cutoff>40</cutoff>
  </animation>
  
  <!-- beacon red top -->
  <animation>
    <type>light</type>
    <light-type>point</light-type>
    <name>Beacon_top</name>
    <object-name>BeaconVolume_1</object-name>
    <position>
      <x> -0.64</x>
      <y>  0.0</y>
      <z>  2.55</z>
    </position>
    <ambient>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </ambient>
    <diffuse>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.7</l>
      <q>8</q>
    </attenuation>
    <near-m>0.01</near-m>
    <far-m>10</far-m>
  </animation>
  
  <!-- beacon red bottom -->
  <animation>
    <type>light</type>
    <light-type>point</light-type>
    <name>Beacon_bottom</name>
    <object-name>BeaconVolume_2</object-name>
    <position>
      <x>-5.47</x>
      <y> 0.0</y>
      <z>-1.15</z>
    </position>
    <ambient>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </ambient>
    <diffuse>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>0.99</r>
      <g>0.0</g>
      <b>0.0</b>
      <a>1.0</a>
    </specular>
    <attenuation>
      <c>1.0</c>
      <l>0.7</l>
      <q>8</q>
    </attenuation>
    <near-m>0.01</near-m>
    <far-m>10</far-m>
  </animation>

  <!-- John Williams kindly provided these light spots for me from his
       757-200. Let his name shine here for eternity. -->

  <model>
    <name>Taxi Light Spot</name>
    <path>Aircraft/Lockheed1049h/Models/light_c.xml</path>
    <offsets>
      <z-m>0.05</z-m> <!-- a little above the other two spots -->
    </offsets>
  </model>
  <animation>
    <type>select</type>
    <object-name>Taxi Light Spot</object-name>
    <condition>
      <not>
        <property>sim/rendering/rembrandt/enabled</property>
      </not>
      <property>controls/lighting/taxi</property>
      <property>gear/gear[0]/position-norm</property>
      <less-than>
        <property>orientation/pitch-deg</property>
        <value>10</value>
      </less-than>
    </condition>
  </animation>
  <animation>
    <type>rotate</type>  <!-- same as the nose gear, see Lockheed1049.xml -->
    <object-name>Taxi Light Spot</object-name>
    <condition>gear/gear[0]/wow</condition>
    <property>fdm/jsbsim/fcs/steer-pos-deg</property>
    <axis>
      <x1-m>-14.771</x1-m>
      <y1-m>0</y1-m>
      <z1-m>-0.63</z1-m>
      <x2-m>-15.29</x2-m>
      <y2-m>0</y2-m>
      <z2-m>-3.073</z2-m>
    </axis>
  </animation>

  <model>
    <name>Left Landing Light Spot</name>
    <path>Aircraft/Lockheed1049h/Models/light_l.xml</path>
    <offsets>
      <y-m>-8</y-m>
      <heading-deg>-26</heading-deg>
    </offsets>
  </model>
  <animation>
    <type>select</type>
    <object-name>Left Landing Light Spot</object-name>
    <condition>
      <not>
        <property>sim/rendering/rembrandt/enabled</property>
      </not>
      <property>controls/lighting/landing-left</property>
      <property>controls/lighting/landing-extend-left</property>
      <less-than>
        <property>orientation/pitch-deg</property>
        <value>10</value>
      </less-than>
    </condition>
  </animation>

  <model>
    <name>Right Landing Light Spot</name>
    <path>Aircraft/Lockheed1049h/Models/light_r.xml</path>
    <offsets>
      <y-m>8</y-m>
      <heading-deg>26</heading-deg>
    </offsets>
  </model>
  <animation>
    <type>select</type>
    <object-name>Right Landing Light Spot</object-name>
    <condition>
      <not>
        <property>sim/rendering/rembrandt/enabled</property>
      </not>
      <property>controls/lighting/landing-right</property>
      <property>controls/lighting/landing-extend-right</property>
      <less-than>
        <property>orientation/pitch-deg</property>
        <value>10</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>rotate</type>
    <!-- The light spots are always horizontal; an approximation of "parallel to the ground" -->
    <object-name>Taxi Light Spot</object-name>
    <object-name>Left Landing Light Spot</object-name>
    <object-name>Right Landing Light Spot</object-name>
    <property>orientation/pitch-deg</property>
    <factor>-1</factor>
    <center>
      <x-m>0</x-m>
      <y-m>0</y-m>
      <z-m>-1</z-m>
    </center>
    <axis>
      <x>0</x>
      <y>1</y>
      <z>0</z>
    </axis>
  </animation>
  
  <animation>
    <type>rotate</type>
    <object-name>Taxi Light Spot</object-name>
    <object-name>Left Landing Light Spot</object-name>
    <object-name>Right Landing Light Spot</object-name>
    <property>orientation/roll-deg</property>
    <factor>1</factor>
    <center>
      <x-m>0</x-m>
      <y-m>0</y-m>
      <z-m>-1</z-m>
    </center>
    <axis>
      <x>1</x>
      <y>0</y>
      <z>0</z>
    </axis>
  </animation>

  <!-- the light spots are always on the ground -->
  <animation>
    <type>translate</type>
    <object-name>Taxi Light Spot</object-name>
    <object-name>Left Landing Light Spot</object-name>
    <object-name>Right Landing Light Spot</object-name>
    <property>position/altitude-agl-ft</property>
    <factor>-0.3094</factor>
    <offset-m>2.45</offset-m>
    <axis>
      <x>0</x>
      <y>0</y>
      <z>1</z>
    </axis>
  </animation>

  <!-- the higher we are, the farther the light spots in front of us -->
  <animation>
    <type>translate</type>
    <object-name>Taxi Light Spot</object-name>
    <object-name>Left Landing Light Spot</object-name>
    <object-name>Right Landing Light Spot</object-name>
    <expression>
      <product>
        <tan>
          <deg2rad>
            <sum>
              <property>orientation/pitch-deg</property>
              <value>84</value>
            </sum>
          </deg2rad>
        </tan>
        <property>position/altitude-agl-ft</property>
        <value>0.3094</value>
      </product>
    </expression>
    <axis>
      <x>-1</x>
      <y>0</y>
      <z>0</z>
    </axis>
  </animation>

</PropertyList>
