<?xml version="1.0"?>
<!--
  Zeppelin LZ 121 "Nordstern" airship for FlightGear.

  Copyright (C) 2010 - 2012  Anders Gidenstam  (anders(at)gidenstam.org)
  This file is licensed under the GPL license version 2 or later.
-->
<PropertyList>

 <!-- Overlay these to set the compass indication and heading bug source
      properties.
 -->
 <params>
  <indicated-heading-deg>instrumentation/magnetic-compass[0]/indicated-heading-deg</indicated-heading-deg>
  <heading-bug-deg>autopilot/settings/heading-bug-deg</heading-bug-deg>
  <serviceable>instrumentation/magnetic-compass[0]/serviceable</serviceable>
 </params>

 <path>compass.ac</path>

 <offsets>
  <!-- x/y/z == back/right/up -->
  <x-m> 0.000 </x-m>
  <y-m> 0.000 </y-m>
  <z-m> 0.000 </z-m>
 </offsets>

 <!-- Rembrandt transparency markup. -->
 <effect>
  <inherits-from>Effects/model-transparent</inherits-from>
  <object-name>glass</object-name>
 </effect>

 <animation>
  <type>pick</type>
  <object-name>heading_bug_knob</object-name>
  <visible>true</visible>
  <action>
   <button>0</button>
   <repeatable>true</repeatable>
   <interval-sec>0.2</interval-sec>
   <binding>
    <command>property-adjust</command>
    <property alias="../../../../params/heading-bug-deg"/>
    <step>1.0</step>
    <min>0.0</min>
    <max>359.0</max>
    <wrap>true</wrap>
   </binding>
  </action>
  <action>
   <button>1</button>
   <repeatable>true</repeatable>
   <interval-sec>0.2</interval-sec>
   <binding>
    <command>property-adjust</command>
    <property alias="../../../../params/heading-bug-deg"/>
    <step>-1.0</step>
    <min>0.0</min>
    <max>359.0</max>
    <wrap>true</wrap>
   </binding>
  </action>
  <action>
   <button>3</button>
   <repeatable>false</repeatable>
   <binding>
    <command>property-adjust</command>
    <property alias="../../../../params/heading-bug-deg"/>
    <step>1.0</step>
    <min>0.0</min>
    <max>359.0</max>
    <wrap>true</wrap>
   </binding>
  </action>
  <action>
   <button>4</button>
   <repeatable>false</repeatable>
   <binding>
    <command>property-adjust</command>
    <property alias="../../../../params/heading-bug-deg"/>
    <step>-1.0</step>
    <min>0.0</min>
    <max>359.0</max>
    <wrap>true</wrap>
   </binding>
  </action>
 </animation>

 <!-- animation> 
  <type>material</type>
  <emission> 
   <factor-prop>controls/lighting/panel-norm</factor-prop>
   <red>0.75</red>
   <green>0.25</green>
   <blue>0.25</blue>
  </emission>
 </animation -->

 <animation>
  <name>compass_unit</name>
  <object-name>housing</object-name>
  <object-name>glass</object-name>
  <object-name>lid</object-name>
  <object-name>card</object-name>
  <object-name>heading_bug</object-name>
  <object-name>heading_bug_knob</object-name>
 </animation>

 <animation>
  <type>rotate</type>
  <object-name>compass_unit</object-name>
  <property>orientation/roll-deg</property>
  <factor>1.0</factor>
  <center>
   <x-m>  0.00 </x-m>
   <y-m>  0.00 </y-m>
   <z-m>  0.25 </z-m>
  </center>
  <axis>
   <x>1.0</x>
   <y>0.0</y>
   <z>0.0</z>
  </axis>
 </animation>

 <animation>
  <type>rotate</type>
  <object-name>gimbal</object-name>
  <object-name>compass_unit</object-name>
  <property>orientation/pitch-deg</property>
  <factor>-1.0</factor>
  <center>
   <x-m>  0.00 </x-m>
   <y-m>  0.00 </y-m>
   <z-m>  0.25 </z-m>
  </center>
  <axis>
   <x>0.0</x>
   <y>1.0</y>
   <z>0.0</z>
  </axis>
 </animation>

 <animation>
  <type>rotate</type>
  <object-name>card</object-name>
  <property alias="../../params/indicated-heading-deg"/>
  <factor>1.0</factor>
  <center>
   <x-m>  0.00 </x-m>
   <y-m>  0.00 </y-m>
   <z-m>  0.00 </z-m>
  </center>
  <axis>
   <x>0.0</x>
   <y>0.0</y>
   <z>1.0</z>
  </axis>
 </animation>

 <animation>
  <type>rotate</type>
  <object-name>heading_bug</object-name>
  <object-name>heading_bug_knob</object-name>
  <property alias="../../params/heading-bug-deg"/>
  <factor>1.0</factor>
  <center>
   <x-m>  0.00 </x-m>
   <y-m>  0.00 </y-m>
   <z-m>  0.00 </z-m>
  </center>
  <axis>
   <x>0.0</x>
   <y>0.0</y>
   <z>1.0</z>
  </axis>
 </animation>

 <animation>
  <type>noshadow</type>
 </animation>

</PropertyList>
