<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <path>dh88.ac</path>

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/DH-88/Models/Liveries", 10);

      var self = cmdarg();

      var float_0 = self.getNode("sim/multiplay/generic/float[0]", 1);
      var float_1 = self.getNode("sim/multiplay/generic/float[1]", 1);
      
      var crew_door = self.getNode("instrumentation/doors/crew/position-norm", 1);
      var passenger_door = self.getNode("instrumentation/doors/passenger/position-norm", 1);
    
      crew_door.alias(float_0);
      passenger_door.alias(float_1);
    </load>

    <unload>
      livery_update.stop();
      crew_door.unalias();
      passenger_door.unalias();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>aile2</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>
    <object-name>tourvitre</object-name>
    <object-name>cacheG</object-name>
    <object-name>cacheD</object-name>
    <object-name>moteurs</object-name>
    <object-name>pito</object-name>
    <object-name>lamps</object-name>

    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>heliceG</object-name>
    <object-name>heliceD</object-name>
    <object-name>pate</object-name>
    <object-name>axeG</object-name>
    <object-name>axeD</object-name>
    <object-name>axeG1</object-name>
    <object-name>axeD1</object-name>
    <object-name>axeG2</object-name>
    <object-name>axeD2</object-name>
    <object-name>echapp</object-name>
    <object-name>trous</object-name>

    <!-- Objets transparents -->
    <object-name>vitres</object-name>
    <object-name>nez</object-name>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>propdiscD</object-name>
    <object-name>propblurD</object-name>
    <object-name>lampR</object-name>
    <object-name>lampG</object-name>
    <object-name>lampD</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>aile2</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>
    <object-name>tourvitre</object-name>
    <object-name>cacheG</object-name>
    <object-name>cacheD</object-name>
    <object-name>moteurs</object-name>
    <object-name>pito</object-name>
    <object-name>lamps</object-name>

    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>heliceG</object-name>
    <object-name>heliceD</object-name>
    <object-name>pate</object-name>
    <object-name>axeG</object-name>
    <object-name>axeD</object-name>
    <object-name>axeG1</object-name>
    <object-name>axeD1</object-name>
    <object-name>axeG2</object-name>
    <object-name>axeD2</object-name>
    <object-name>echapp</object-name>
    <object-name>trous</object-name>

    <property-base>sim/model/livery</property-base>
    <texture-prop>texture</texture-prop>
    <texture>texture.png</texture>
    <specular>
      <red-prop>specular/red</red-prop>
      <green-prop>specular/green</green-prop>
      <blue-prop>specular/blue</blue-prop>
    </specular>
    <emission>
      <red-prop>emission/red</red-prop>
      <green-prop>emission/green</green-prop>
      <blue-prop>emission/blue</blue-prop>
    </emission>
  </animation>

  <effect>
    <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
    <condition>
      <not><property>sim/rendering/rembrandt/enabled</property></not>
    </condition>
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>aile2</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>
    <object-name>tourvitre</object-name>
    <object-name>cacheG</object-name>
    <object-name>cacheD</object-name>
    <object-name>moteurs</object-name>
    <object-name>pito</object-name>
    <object-name>lamps</object-name>
  </effect>

  <effect>
    <inherits-from>Effects/model-combined-deferred</inherits-from>
    <condition>
      <property>sim/rendering/rembrandt/enabled</property>
    </condition>
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>aile2</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>
    <object-name>tourvitre</object-name>
    <object-name>cacheG</object-name>
    <object-name>cacheD</object-name>
    <object-name>moteurs</object-name>
    <object-name>pito</object-name>
    <object-name>lamps</object-name>
  </effect>

  <animation>
    <type>noshadow</type>
    <object-name>vitres</object-name>
    <object-name>nez</object-name>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>propdiscD</object-name>
    <object-name>propblurD</object-name>
    <object-name>lampR</object-name>
    <object-name>lampG</object-name>
    <object-name>lampD</object-name>
  </animation>

  <animation>
    <type>shader</type>
    <shader>chrome</shader>
    <texture>Aircraft/Generic/Effects/glass_shader.png</texture>
    <object-name>vitres</object-name>
    <object-name>nez</object-name>
    <object-name>lampR</object-name>
    <object-name>lampG</object-name>
    <object-name>lampD</object-name>
  </animation>

  <!-- working for Rembrandt -->
  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <condition>
      <property>sim/rendering/rembrandt/enabled</property>
    </condition>
    <object-name>vitres</object-name>
    <object-name>nez</object-name>
    <object-name>lampR</object-name>
    <object-name>lampG</object-name>
    <object-name>lampD</object-name>
  </effect>

  <!-- Une ombre pour OSG -->
  <model>
    <path>Aircraft/DH-88/Models/shadow.xml</path>
    <offsets>
      <x-m>  0 </x-m>
      <y-m>  0 </y-m>
      <z-m> -1 </z-m>
    </offsets>
  </model>

  <!-- Interieur -->
  <model>
    <name>Interieur</name>
    <path>Aircraft/DH-88/Models/Interior/interior.xml</path>
  </model>

  <!-- For Rembrandt -->
  <animation>
    <type>noshadow</type>
    <object-name>Interieur</object-name>
  </animation>

  <!-- Immatriculation -->
  <model>
    <path>Aircraft/DH-88/Models/Immat/immat.xml</path>
  </model>

  <!-- Cranking effects -->
  <!-- Left -->
  <model>
    <path>Aircraft/DH-88/Models/Effects/cranking/crankingL.xml</path>
    <offsets>
      <x-m> -2.650 </x-m>
      <y-m> -1.224 </y-m>
      <z-m> -0.953 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/DH-88/Models/Effects/cranking/crankingR.xml</path>
    <offsets>
      <x-m> -2.650 </x-m>
      <y-m>  1.727 </y-m>
      <z-m> -0.953 </z-m>
    </offsets>
  </model>

  <!-- Effets sur le sol -->
  <!-- Roue gauche -->
  <model>
    <path>Aircraft/DH-88/Models/Effects/ground/ground0.xml</path>
    <offsets>
      <x-m> -2.043 </x-m>
      <y-m> -1.468 </y-m>
      <z-m> -1.561 </z-m>
    </offsets>
  </model>

  <!-- Roue droite -->
  <model>
    <path>Aircraft/DH-88/Models/Effects/ground/ground1.xml</path>
    <offsets>
      <x-m> -2.043 </x-m>
      <y-m>  1.468 </y-m>
      <z-m> -1.561 </z-m>
    </offsets>
  </model>

  <!-- Roue de queue -->
  <model>
    <path>Aircraft/DH-88/Models/Effects/ground/ground2.xml</path>   
    <offsets>
      <x-m>  4.068 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.233 </z-m>
    </offsets>
  </model>

  <!-- L'hélice gauche--> 
  <animation>
    <name>CompleteG</name>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>heliceG</object-name>
    <object-name>bolG</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdiscG</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>1200</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblurG</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>400.000</value>
      </greater-than>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1200.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>heliceG</object-name>
    <condition>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1200</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>CompleteG</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value> 5 </value>
      </greater-than>
    </condition>
    <property>engines/engine[0]/rpm</property>
    <factor> 2 </factor>
    <center>
      <x-m> -3.483 </x-m>
      <y-m> -1.468 </y-m>
      <z-m> -0.387 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- L'hélice droite--> 
  <animation>
    <name>CompleteD</name>
    <object-name>propdiscD</object-name>
    <object-name>propblurD</object-name>
    <object-name>heliceD</object-name>
    <object-name>bolD</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdiscD</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[1]/rpm</property>
        <value>1200</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblurD</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[1]/rpm</property>
        <value>400.000</value>
      </greater-than>
      <less-than>
        <property>engines/engine[1]/rpm</property>
        <value>1200.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>heliceD</object-name>
    <condition>
      <less-than>
        <property>engines/engine[1]/rpm</property>
        <value>1200</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>CompleteD</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[1]/rpm</property>
        <value> 5 </value>
      </greater-than>
    </condition>
    <property>engines/engine[1]/rpm</property>
    <factor> 2 </factor>
    <center>
      <x-m> -3.483 </x-m>
      <y-m>  1.468 </y-m>
      <z-m> -0.387 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Gouverne de profondeur -->
  <animation>
    <type>rotate</type>
    <object-name>profondeur</object-name>
    <property>surface-positions/elevator-pos-norm</property>
    <factor> 15 </factor>
    <center>
      <x-m> 3.72318 </x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 0.38970 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Gouverne de direction -->
  <animation>
    <type>rotate</type>
    <object-name>direction</object-name>
    <property>surface-positions/rudder-pos-norm</property>
    <factor> -20 </factor>
    <axis>
      <x1-m> 3.7257 </x1-m>
      <y1-m> 0.0000 </y1-m>
      <z1-m> 0.4310 </z1-m>
      <x2-m> 3.7237 </x2-m>
      <y2-m> 0.0000 </y2-m>
      <z2-m> 1.1073 </z2-m>
    </axis>
  </animation>

  <!-- Animations des ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <property>surface-positions/left-aileron-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> -1.02250 </x1-m>
      <y1-m> -6.27419 </y1-m>
      <z1-m> -0.05951 </z1-m>
      <x2-m> -0.87535 </x2-m>
      <y2-m> -3.81867 </y2-m>
      <z2-m> -0.15501 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>aileronD</object-name>
    <property>surface-positions/right-aileron-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> -0.87535 </x1-m>
      <y1-m>  3.81867 </y1-m>
      <z1-m> -0.15501 </z1-m>
      <x2-m> -1.02250 </x2-m>
      <y2-m>  6.27419 </y2-m>
      <z2-m> -0.05951 </z2-m>
    </axis>
  </animation>

  <!-- volets -->
  <animation>
    <type>rotate</type>
    <object-name>voletG</object-name>
    <property>surface-positions/flap-pos-norm</property>
    <factor> 60 </factor>
    <axis>
      <x1-m> -0.89646 </x1-m>
      <y1-m> -1.22699 </y1-m>
      <z1-m> -0.29333 </z1-m>
      <x2-m> -0.87133 </x2-m>
      <y2-m>  0.00000 </y2-m>
      <z2-m> -0.35732 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>voletD</object-name>
    <property>surface-positions/flap-pos-norm</property>
    <factor> 60 </factor>
    <axis>
      <x1-m> -0.87133 </x1-m>
      <y1-m>  0.00000 </y1-m>
      <z1-m> -0.35732 </z1-m>
      <x2-m> -0.89646 </x2-m>
      <y2-m>  1.22699 </y2-m>
      <z2-m> -0.29333 </z2-m>
    </axis>
  </animation>

  <!-- Rentré des roues -->
  <animation>
    <type>rotate</type>
    <object-name>axeG2</object-name>
    <property>gear/gear[0]/position-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> -35 </dep></entry>
      <entry><ind> 1 </ind><dep>   0 </dep></entry>
    </interpolation>
    <center>
      <x-m> -2.053 </x-m>
      <y-m> -1.468 </y-m>
      <z-m> -1.222 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Train gauche -->
  <animation>
    <name>TrainG</name>
    <object-name>roueG</object-name>
    <object-name>cacheG</object-name>
    <object-name>axeG</object-name>
    <object-name>axeG1</object-name>
    <object-name>axeG2</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>TrainG</object-name>
    <property>gear/gear[0]/position-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> -80 </dep></entry>
      <entry><ind> 1 </ind><dep>   0 </dep></entry>
    </interpolation>
    <center>
      <x-m> -2.205 </x-m>
      <y-m> -1.468 </y-m>
      <z-m> -0.678 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>axeD2</object-name>
    <property>gear/gear[1]/position-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> -35 </dep></entry>
      <entry><ind> 1 </ind><dep>   0 </dep></entry>
    </interpolation>
    <center>
      <x-m> -2.053 </x-m>
      <y-m>  1.468 </y-m>
      <z-m> -1.222 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Train droit -->
  <animation>
    <name>TrainD</name>
    <object-name>roueD</object-name>
    <object-name>cacheD</object-name>
    <object-name>axeD</object-name>
    <object-name>axeD1</object-name>
    <object-name>axeD2</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>TrainD</object-name>
    <property>gear/gear[1]/position-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> -80 </dep></entry>
      <entry><ind> 1 </ind><dep>   0 </dep></entry>
    </interpolation>
    <center>
      <x-m> -2.205 </x-m>
      <y-m> -1.468 </y-m>
      <z-m> -0.678 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <name>RoueGauche</name>
    <object-name>roueG</object-name>
    <object-name>axeG1</object-name>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>RoueGauche</object-name>
    <property>gear/gear[0]/compression-norm</property>
    <factor>0.0950</factor>
    <axis>
      <x> -0.018598 </x>
      <y>  0.000000 </y>
      <z>  0.170862 </z>
    </axis>
  </animation>

  <animation>
    <name>RoueDroite</name>
    <object-name>roueD</object-name>
    <object-name>axeD1</object-name>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>RoueDroite</object-name>
    <property>gear/gear[1]/compression-norm</property>
    <factor>0.0950</factor>
    <axis>
      <x> -0.018598 </x>
      <y>  0.000000 </y>
      <z>  0.170862 </z>
    </axis>
  </animation>

  <!-- Rotation des roues lors du roulage -->
  <animation>
    <type>spin</type>
    <object-name>roueG</object-name>
    <property>gear/gear[0]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.043 </x-m>
      <y-m> -1.468 </y-m>
      <z-m> -1.304 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueD</object-name>
    <property>gear/gear[1]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.043 </x-m>
      <y-m>  1.468 </y-m>
      <z-m> -1.304 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Canopy -->
  <animation>
    <name>Canopy</name>
    <object-name>tourvitre</object-name>
    <object-name>vitres</object-name>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>Canopy</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <command>nasal</command>
        <script>doors.crew.toggle();</script>
      </binding>
    </action>
  </animation>
 
  <animation>
    <type>rotate</type>
    <object-name>Canopy</object-name>
    <property>sim/model/door-positions/crew/position-norm</property>
    <factor> -85 </factor>
    <center>
      <x-m> 0.326 </x-m>
      <y-m> 0.310 </y-m>
      <z-m> 0.440 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Lumière rouge -->
  <model>
    <name>LeftLight</name>
    <path>Aircraft/DH-88/Models/lights/RedLight.xml</path>
    <offsets>
      <x-m> -2.098 </x-m>
      <y-m> -2.782 </y-m>
      <z-m> -0.173 </z-m>
    </offsets>
  </model>

  <!-- Lumière verte -->
  <model>
    <name>RightLight</name>
    <path>Aircraft/DH-88/Models/lights/GreenLight.xml</path>
    <offsets>
      <x-m> -2.098 </x-m>
      <y-m>  2.782 </y-m>
      <z-m> -0.173 </z-m>
    </offsets>
  </model>

  <!-- Beacon -->
  <model>
    <path>Aircraft/DH-88/Models/lights/beacon.xml</path>
    <offsets>
      <x-m> -1.180 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.406 </z-m>
    </offsets>
  </model>

  <!-- Wing light cone -->
  <model>
    <name>Taxi-Light</name>
    <path>Aircraft/DH-88/Models/lights/light-cone.xml</path>
    <offsets>
      <x-m>       -4.250 </x-m>
      <y-m>        0.000 </y-m>
      <z-m>        0.064 </z-m>
      <pitch-deg> -7.500 </pitch-deg>
    </offsets>
  </model>

  <animation>
    <type>select</type>
    <object-name>Taxi-Light</object-name>
    <condition>
      <equals>
        <property>controls/switches/landing-light</property>
        <value> 1 </value>
      </equals>
    </condition>
  </animation>

</PropertyList>
