<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- #############################################################################
     #    (C) 2007 by Yurik V. Nikiforoff                                        #
     #    yurik@megasignal.com                                                   #
     #    Jul 2007                                                               #
     #                                                                           #
     #    Updated BARANGER Emmanuel 2015                                         #
     #    Updated BARANGER Emmanuel 09/2022                                      #
     #############################################################################
     Heading indicator PNP 3D instrument for Tu-154
-->
<PropertyList>

  <path>pnp.ac</path>

  <params>
    <mode>instrumentation/pnp[0]/mode</mode>
    <distance>instrumentation/pnp[0]/distance</distance>
    <compass>fdm/jsbsim/instrumentation/pnp-heading-left</compass>
    <plane-dialed>instrumentation/pnp[0]/plane-dialed</plane-dialed>
    <dir-course>instrumentation/pnp[0]/heading-deg</dir-course>
    <dir-plane>instrumentation/pnp[0]/plane-deg</dir-plane>
    <defl-course>instrumentation/pnp[0]/defl-course</defl-course>
    <defl-gs>instrumentation/pnp[0]/defl-gs</defl-gs>
    <serviceable>instrumentation/heading-indicator[0]/serviceable</serviceable>
    <blank-course>instrumentation/pnp[0]/blank-course</blank-course>
    <blank-gs>instrumentation/pnp[0]/blank-gs</blank-gs>
    <blank-dist>instrumentation/pnp[0]/blank-dist</blank-dist>
  </params>

  <animation>
    <object-name>fond</object-name>
    <object-name>compass</object-name>
    <object-name>needle</object-name>
    <object-name>kurs_plan</object-name>
    <object-name>center</object-name>
    <object-name>kurs_planka</object-name>
    <object-name>limb</object-name>
    <object-name>dkm</object-name>
    <object-name>drift</object-name>
    <object-name>plane_sym</object-name>
    <object-name>plane_sym_handle</object-name>
    <object-name>heading_sym_handle</object-name>
    <object-name>dig_plane_ones</object-name>
    <object-name>dig_plane_dec</object-name>
    <object-name>dig_plane_hund</object-name>
    <object-name>dig_heading_ones</object-name>
    <object-name>dig_heading_dec</object-name>
    <object-name>dig_heading_hund</object-name>
    <object-name>blanker_k</object-name>
    <object-name>blanker_g</object-name>
    <object-name>blanker_ks</object-name>

    <object-name>vitre</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>fond</object-name>
    <object-name>compass</object-name>
    <object-name>needle</object-name>
    <object-name>kurs_plan</object-name>
    <object-name>center</object-name>
    <object-name>kurs_planka</object-name>
    <object-name>limb</object-name>
    <object-name>dkm</object-name>
    <object-name>drift</object-name>
    <object-name>plane_sym</object-name>
    <object-name>plane_sym_handle</object-name>
    <object-name>heading_sym_handle</object-name>
    <object-name>dig_plane_ones</object-name>
    <object-name>dig_plane_dec</object-name>
    <object-name>dig_plane_hund</object-name>
    <object-name>dig_heading_ones</object-name>
    <object-name>dig_heading_dec</object-name>
    <object-name>dig_heading_hund</object-name>
    <object-name>blanker_k</object-name>
    <object-name>blanker_g</object-name>
    <object-name>blanker_ks</object-name>
    <object-name>vitre</object-name>
  </animation>

  <!-- working for Compositor -->
  <effect>
    <inherits-from>../../../../Effects/Glass/glass</inherits-from>
    <object-name>vitre</object-name>
  </effect>

  <animation>
    <type>material</type>
    <object-name>compass</object-name>
    <object-name>needle</object-name>
    <object-name>kurs_plan</object-name>
    <object-name>center</object-name>
    <object-name>kurs_planka</object-name>
    <object-name>limb</object-name>
    <object-name>dkm</object-name>
    <object-name>drift</object-name>
    <object-name>plane_sym</object-name>
    <object-name>plane_sym_handle</object-name>
    <object-name>heading_sym_handle</object-name>
    <object-name>dig_plane_ones</object-name>
    <object-name>dig_plane_dec</object-name>
    <object-name>dig_plane_hund</object-name>
    <object-name>dig_heading_ones</object-name>
    <object-name>dig_heading_dec</object-name>
    <object-name>dig_heading_hund</object-name>
    <object-name>blanker_k</object-name>
    <object-name>blanker_g</object-name>
    <object-name>blanker_ks</object-name>
    <emission>
      <factor-prop>controls/switches/gauge-light</factor-prop>
      <red>   0.50 </red>
      <green> 0.25 </green>
      <blue>  0.25 </blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>gliss_planka</object-name>
    <object-name>heading_marker_main</object-name>
    <object-name>heading_marker_90</object-name>
    <object-name>heading_marker_180</object-name>
    <object-name>heading_marker_270</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <factor-prop>controls/lighting/instruments-norm</factor-prop>
      <red>   0.50 </red>
      <green> 0.40 </green>
      <blue>  0.30 </blue>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>blanker_dkm</object-name>
    <object-name>blanker_heading</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <red>   2 </red>
      <green> 0 </green>
      <blue>  0 </blue>
    </emission>
  </animation>

  <!--mode selector-->
  <animation>
    <type>material</type>
    <object-name>sp_on</object-name>
    <object-name>vor_on</object-name>
    <object-name>nv_on</object-name>
    <object-name>rsbn_on</object-name>
    <condition>
      <property>controls/electric/battery-switch</property>
    </condition>
    <emission>
      <red>   2 </red>
      <green> 2 </green>
      <blue>  2 </blue>
    </emission>
  </animation>

  <animation>
    <type>select</type>
    <object-name>sp_on</object-name>
    <condition>
      <equals>
        <property alias="../../../../params/mode"/>
        <value>4</value>
      </equals>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>vor_on</object-name>
    <condition>
      <or>
        <equals>
          <property alias="../../../../../params/mode"/>
          <value>2</value>
        </equals>
        <equals>
          <property alias="../../../../../params/mode"/>
          <value>3</value>
        </equals>
      </or>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>nv_on</object-name>
    <condition>
      <equals>
        <property alias="../../../../params/mode"/>
        <value>1</value>
      </equals>
    </condition>
  </animation>

  <!--Not in use
  <animation>
    <type>select</type>
    <object-name>rsbn_on</object-name>
    <condition>
      <property>rsbn_on</property>
    </condition>
  </animation>
  -->

  <!--Blankers-->
  <animation>
    <type>select</type>
    <object-name>blanker_dkm</object-name>
    <condition>
      <not><property>systems/electrical/outputs/nav</property></not>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>blanker_heading</object-name>
    <condition>
      <not><property>systems/electrical/outputs/nav</property></not>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>blanker_g</object-name>
    <condition>
      <not><property>instrumentation/nav/has-gs</property></not>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>blanker_k</object-name>
    <condition>
      <not><property>instrumentation/nav/in-range</property></not>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>blanker_ks</object-name>
    <condition>
      <not><property>instrumentation/heading-indicator[0]/serviceable</property></not>
    </condition>
  </animation>

  <!--Needles-->
  <animation>
    <type>rotate</type>
    <object-name>needle</object-name>
    <object-name>kurs_plan</object-name>
    <object-name>kurs_planka</object-name>
    <property>instrumentation/nav/radials/selected-deg</property>
    <condition>
      <property>instrumentation/heading-indicator[0]/serviceable</property>
    </condition>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!--Marker-->
  <animation>
    <type>rotate</type>
    <object-name>heading_marker_main</object-name>
    <object-name>heading_marker_90</object-name>
    <object-name>heading_marker_180</object-name>
    <object-name>heading_marker_270</object-name>
    <property>orientation/heading-deg</property>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>heading_marker_main</object-name>
    <object-name>heading_marker_90</object-name>
    <object-name>heading_marker_180</object-name>
    <object-name>heading_marker_270</object-name>
    <property>autopilot/settings/heading-bug-deg</property>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>heading_marker_main</object-name>
    <object-name>heading_marker_90</object-name>
    <object-name>heading_marker_180</object-name>
    <object-name>heading_marker_270</object-name>
    <property>instrumentation/magnetic-compass/pitch-offset-deg</property>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!--Compass-->
  <animation>
    <type>rotate</type>
    <object-name>compass</object-name>
    <object-name>needle</object-name>
    <object-name>kurs_plan</object-name>
    <object-name>kurs_planka</object-name>
    <property>orientation/heading-deg</property>
    <condition>
      <property>instrumentation/heading-indicator[0]/serviceable</property>
    </condition>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!--Drift indicator  -->
  <animation>
    <type>rotate</type>
    <object-name>drift</object-name>
    <property>/instrumentation/drift</property>
    <factor> 1 </factor>
    <max-deg>  20 </max-deg>
    <min-deg> -20 </min-deg>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!--ILS-->
  <animation>
    <type>translate</type>
    <object-name>kurs_planka</object-name>
    <property>instrumentation/nav/heading-needle-deflection</property>
    <interpolation>
      <entry><ind> -5 </ind><dep> -0.0117 </dep></entry>
      <entry><ind>  0 </ind><dep>  0.0000 </dep></entry>
      <entry><ind>  5 </ind><dep>  0.0117 </dep></entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>select</type>
    <object-name>gliss_planka</object-name>
    <condition>
      <property>instrumentation/nav/has-gs</property>
    </condition>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>gliss_planka</object-name>
    <property>instrumentation/nav/gs-needle-deflection</property>
    <interpolation>
      <entry><ind> -2 </ind><dep> -0.0133 </dep></entry>
      <entry><ind>  0 </ind><dep>  0.0000 </dep></entry>
      <entry><ind>  2 </ind><dep>  0.0133 </dep></entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!--Digits-->
  <!--Distance-->
  <animation>
    <type>rotate</type>
    <object-name>dig_heading_ones</object-name>
    <expression>
      <product>
        <abs><property>instrumentation/nav/nav-distance</property></abs>
        <value> 0.036 </value>
      </product>
    </expression>
    <center>
      <x-m> -0.01393 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.05340 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>dig_heading_dec</object-name>
    <expression>
      <table>
        <mod>
          <abs><property>instrumentation/nav/nav-distance</property></abs>
          <value>100000</value>
        </mod>
        <entry><ind>     0 </ind><dep>   0.0 </dep></entry>
        <entry><ind>  9000 </ind><dep>   0.0 </dep></entry>
        <entry><ind> 10000 </ind><dep>  36.0 </dep></entry>
        <entry><ind> 19000 </ind><dep>  36.0 </dep></entry>
        <entry><ind> 20000 </ind><dep>  72.0 </dep></entry>
        <entry><ind> 29000 </ind><dep>  72.0 </dep></entry>
        <entry><ind> 30000 </ind><dep> 108.0 </dep></entry>
        <entry><ind> 39000 </ind><dep> 108.0 </dep></entry>
        <entry><ind> 40000 </ind><dep> 144.0 </dep></entry>
        <entry><ind> 49000 </ind><dep> 144.0 </dep></entry>
        <entry><ind> 50000 </ind><dep> 180.0 </dep></entry>
        <entry><ind> 59000 </ind><dep> 180.0 </dep></entry>
        <entry><ind> 60000 </ind><dep> 216.0 </dep></entry>
        <entry><ind> 69000 </ind><dep> 216.0 </dep></entry>
        <entry><ind> 70000 </ind><dep> 252.0 </dep></entry>
        <entry><ind> 79000 </ind><dep> 252.0 </dep></entry>
        <entry><ind> 80000 </ind><dep> 288.0 </dep></entry>
        <entry><ind> 89000 </ind><dep> 288.0 </dep></entry>
        <entry><ind> 90000 </ind><dep> 324.0 </dep></entry>
        <entry><ind> 99000 </ind><dep> 324.0 </dep></entry>
        <entry><ind> 99900 </ind><dep> 359.9 </dep></entry>
      </table>
    </expression>
    <center>
      <x-m> -0.01393 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.05340 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>dig_heading_hund</object-name>
    <expression>
      <table>
        <mod>
          <abs><property>instrumentation/nav/nav-distance</property></abs>
          <value>1000000</value>
        </mod>
        <entry><ind>      0 </ind><dep>   0.0 </dep></entry>
        <entry><ind>  99000 </ind><dep>   0.0 </dep></entry>
        <entry><ind> 100000 </ind><dep>  36.0 </dep></entry>
        <entry><ind> 199000 </ind><dep>  36.0 </dep></entry>
        <entry><ind> 200000 </ind><dep>  72.0 </dep></entry>
        <entry><ind> 299000 </ind><dep>  72.0 </dep></entry>
        <entry><ind> 300000 </ind><dep> 108.0 </dep></entry>
        <entry><ind> 399000 </ind><dep> 108.0 </dep></entry>
        <entry><ind> 400000 </ind><dep> 144.0 </dep></entry>
        <entry><ind> 499000 </ind><dep> 144.0 </dep></entry>
        <entry><ind> 500000 </ind><dep> 180.0 </dep></entry>
        <entry><ind> 599000 </ind><dep> 180.0 </dep></entry>
        <entry><ind> 600000 </ind><dep> 216.0 </dep></entry>
        <entry><ind> 699000 </ind><dep> 216.0 </dep></entry>
        <entry><ind> 700000 </ind><dep> 252.0 </dep></entry>
        <entry><ind> 799000 </ind><dep> 252.0 </dep></entry>
        <entry><ind> 800000 </ind><dep> 288.0 </dep></entry>
        <entry><ind> 899000 </ind><dep> 288.0 </dep></entry>
        <entry><ind> 900000 </ind><dep> 324.0 </dep></entry>
        <entry><ind> 999000 </ind><dep> 324.0 </dep></entry>
        <entry><ind> 999900 </ind><dep> 359.9 </dep></entry>
      </table>
    </expression>
    <center>
      <x-m> -0.01393 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.05340 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!--Plane deg-->
  <animation>
    <type>rotate</type>
    <object-name>dig_plane_ones</object-name>
    <property>instrumentation/nav/radials/selected-deg</property>
    <factor> 36 </factor>
    <center>
      <x-m> -0.01393 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.05340 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>dig_plane_dec</object-name>
    <expression>
      <product>
        <difference>
          <mod>
            <property>instrumentation/nav/radials/selected-deg</property>
            <value>100</value>
          </mod>
          <mod>
            <property>instrumentation/nav/radials/selected-deg</property>
            <value>10</value>
          </mod>
        </difference>
        <value>3.6</value>
      </product>
    </expression>
    <center>
      <x-m> -0.01393 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.05340 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>dig_plane_hund</object-name>
    <expression>
      <product>
        <difference>
          <mod>
            <property>instrumentation/nav/radials/selected-deg</property>
            <value>1000</value>
          </mod>
          <mod>
            <property>instrumentation/nav/radials/selected-deg</property>
            <value>100</value>
          </mod>
        </difference>
        <value>0.36</value>
      </product>
    </expression>
    <center>
      <x-m> -0.01393 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.05340 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!--Handles-->
  <animation>
    <type>pick</type>
    <object-name>plane_sym_handle</object-name>
    <action>
      <button>0</button>
      <repeatable>true</repeatable>
      <interval-sec>0.2</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/nav/radials/selected-deg</property>
        <step>-1</step>
        <min>0</min>
        <max>360</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>instrumentation/nav/radials/selected-deg</property>
        <step>1</step>
        <min>0</min>
        <max>360</max>
        <wrap>true</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>plane_sym_handle</object-name>
    <action>
      <button>3</button>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/nav/radials/selected-deg</property>
        <step>-10</step>
        <min>0</min>
        <max>360</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <binding>
        <command>property-adjust</command>
        <property>instrumentation/nav/radials/selected-deg</property>
        <step>10</step>
        <min>0</min>
        <max>360</max>
        <wrap>true</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>plane_sym_handle</object-name>
    <property>instrumentation/nav/radials/selected-deg</property>
    <factor>2</factor>
    <center>
      <x-m>  0.00056 </x-m>
      <y-m>  0.05390 </y-m>
      <z-m> -0.05528 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>heading_sym_handle</object-name>
    <action>
      <button>0</button>
      <repeatable>true</repeatable>
      <interval-sec>0.2</interval-sec>
      <binding>
        <command>property-adjust</command>
        <property>autopilot/settings/heading-bug-deg</property>
        <step>-1</step>
        <min>0</min>
        <max>360</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>autopilot/settings/heading-bug-deg</property>
        <step>1</step>
        <min>0</min>
        <max>360</max>
        <wrap>true</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>heading_sym_handle</object-name>
    <action>
      <button>3</button>
      <binding>
        <command>property-adjust</command>
        <property>autopilot/settings/heading-bug-deg</property>
        <step>-10</step>
        <min>0</min>
        <max>360</max>
        <wrap>true</wrap>
      </binding>
    </action>
    <action>
      <button>4</button>
      <binding>
        <command>property-adjust</command>
        <property>autopilot/settings/heading-bug-deg</property>
        <step>10</step>
        <min>0</min>
        <max>360</max>
        <wrap>true</wrap>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>heading_sym_handle</object-name>
    <property>autopilot/settings/heading-bug-deg</property>
    <center>
      <x-m>  0.00056 </x-m>
      <y-m> -0.05390 </y-m>
      <z-m> -0.05528 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

</PropertyList>
