<?xml version="1.0" encoding="UTF-8"?>

<PropertyList>

  <path>dr400.ac</path>

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/DR400/Models/Liveries", 10);
    </load>
    <unload>
      livery_update.stop();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>echappe</object-name>
    <object-name>aile</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>trimprof</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>roueA</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>bol</object-name>
    <object-name>toitverriere</object-name>
    <object-name>helice</object-name>
    <object-name>axeA</object-name>
    <object-name>axeG</object-name>
    <object-name>axeD</object-name>
    <object-name>cacheA</object-name>
    <object-name>cacheG</object-name>
    <object-name>cacheD</object-name>
    <object-name>tourverriere</object-name>
    <object-name>antenne</object-name>
    <object-name>protege</object-name>
    <object-name>tringleG</object-name>
    <object-name>tringleD</object-name>
    <object-name>trous</object-name>

    <!-- Objets transparents -->
    <object-name>verriere</object-name>
    <object-name>verriere2</object-name>
    <object-name>lampe</object-name>
    <object-name>lampetoitOn</object-name>
    <object-name>lampeGOn</object-name>
    <object-name>lampeDOn</object-name>
    <object-name>lampetoitOff</object-name>
    <object-name>lampeGOff</object-name>
    <object-name>lampeDOff</object-name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
  </animation>

  <animation>
    <type>shader</type>
    <shader>chrome</shader>
    <texture>glass_shader.png</texture>
    <object-name>verriere</object-name>
    <object-name>verriere2</object-name>
    <object-name>lampe</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>verriere</object-name>
    <object-name>verriere2</object-name>
    <object-name>lampe</object-name>
    <object-name>lampetoitOn</object-name>
    <object-name>lampeGOn</object-name>
    <object-name>lampeDOn</object-name>
    <object-name>lampetoitOff</object-name>
    <object-name>lampeGOff</object-name>
    <object-name>lampeDOff</object-name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>echappe</object-name>
    <object-name>aile</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
    <object-name>trimprof</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>roueA</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>bol</object-name>
    <object-name>toitverriere</object-name>
    <object-name>helice</object-name>
    <object-name>axeA</object-name>
    <object-name>axeG</object-name>
    <object-name>axeD</object-name>
    <object-name>cacheA</object-name>
    <object-name>cacheG</object-name>
    <object-name>cacheD</object-name>
    <object-name>tourverriere</object-name>
    <object-name>antenne</object-name>
    <object-name>protege</object-name>
    <object-name>tringleG</object-name>
    <object-name>tringleD</object-name>
    <object-name>trous</object-name>

    <property-base>sim/model/livery</property-base>
    <texture-prop>texture</texture-prop>
    <texture>texture.png</texture>
<!--
    <diffuse>
      <red-prop>diffuse/red</red-prop>
      <green-prop>diffuse/green</green-prop>
      <blue-prop>diffuse/blue</blue-prop>
    </diffuse>

    <ambient>
      <red-prop>ambient/red</red-prop>
      <green-prop>ambient/green</green-prop>
      <blue-prop>ambient/blue</blue-prop>
    </ambient>
-->
    <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>
<!--
    <shininess>
      <shininess-prop>shininess</shininess-prop>
    </shininess>
-->
  </animation>

  <!-- Interieur -->
  <model>
    <path>Aircraft/DR400/Models/Interior/interior.xml</path>
    <offsets>
      <x-m> 0.0 </x-m>
      <y-m> 0.0 </y-m>
      <z-m> 0.0 </z-m>
      <roll-deg>    0.0 </roll-deg>
      <pitch-deg>   0.0 </pitch-deg>
      <heading-deg> 0.0 </heading-deg>
    </offsets>
  </model>

  <!-- Immatriculatoin -->
  <model>
    <path>Aircraft/DR400/Models/Immat/immat.xml</path>
    <offsets>
      <x-m> 0.0 </x-m>
      <y-m> 0.0 </y-m>
      <z-m> 0.0 </z-m>
      <roll-deg>    0.0 </roll-deg>
      <pitch-deg>   0.0 </pitch-deg>
      <heading-deg> 0.0 </heading-deg>
    </offsets>
  </model>

  <!-- Une ombre pour OSG -->
  <model>
    <name>shadowOSG</name>
    <path>Aircraft/DR400/Models/shadow.xml</path>
  </model>

  <animation>
    <type>select</type>
    <object-name>shadowOSG</object-name>
    <condition>
      <equals>
        <property>sim[0]/rendering/shadows-ac</property>
        <value>true</value>
      </equals>
    </condition>
  </animation>

  <!-- L'hélice --> 
  <animation>
    <name>HeliceComplete</name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
    <object-name>helice</object-name>
    <object-name>bol</object-name>
  </animation>

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

  <animation>
    <type>select</type>
    <object-name>propblur</object-name>
    <condition>
    <and>
      <greater-than>
        <property>/engines/engine[0]/rpm</property>
        <value>600.000</value>
      </greater-than>
      <less-than>
        <property>/engines/engine[0]/rpm</property>
        <value>1500.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

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

  <animation>
    <type>spin</type>
    <object-name>HeliceComplete</object-name>
    <property>/engines/engine[0]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -3.274 </x-m>
      <y-m>  0.000 </y-m>
      <z-m>  0.029 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Gouverne de profondeur -->
  <animation>
    <name>ProfondeurComplete</name>
    <object-name>profondeur</object-name>
    <object-name>trimprof</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>ProfondeurComplete</object-name>
    <property>/surface-positions/elevator-pos-norm</property>
    <interpolation>
      <entry><ind> -0.75 </ind><dep> -12.0 </dep></entry>
      <entry><ind>  0.00 </ind><dep>   0.0 </dep></entry>
      <entry><ind>  0.75 </ind><dep>   9.5 </dep></entry>
    </interpolation>
    <center>
      <x-m> 2.543 </x-m>
      <y-m> 0.000 </y-m>
      <z-m> 0.154 </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>
    <interpolation>
      <entry><ind> -0.75 </ind><dep> -25.0 </dep></entry>
      <entry><ind>  0.00 </ind><dep>   0.0 </dep></entry>
      <entry><ind>  0.75 </ind><dep>  25.0 </dep></entry>
    </interpolation>
    <axis>
      <x1-m>  2.824 </x1-m>
      <y1-m>  0.000 </y1-m>
      <z1-m> -0.200 </z1-m>
      <x2-m>  3.062 </x2-m>
      <y2-m>  0.000 </y2-m>
      <z2-m>  1.113 </z2-m>
    </axis>
  </animation>

  <!-- Animations des ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <property>/surface-positions/left-aileron-pos-norm</property>
    <interpolation>
      <entry><ind> -0.75 </ind><dep>  15.0 </dep></entry>
      <entry><ind>  0.00 </ind><dep>   0.0 </dep></entry>
      <entry><ind>  0.75 </ind><dep> -10.0 </dep></entry>
    </interpolation>
    <axis>
      <x1-m> -0.457 </x1-m>
      <y1-m> -2.752 </y1-m>
      <z1-m> -0.382 </z1-m>
      <x2-m> -1.058 </x2-m>
      <y2-m> -4.331 </y2-m>
      <z2-m>  0.006 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>aileronD</object-name>
    <property>/surface-positions/right-aileron-pos-norm</property>
    <interpolation>
      <entry><ind> -0.75 </ind><dep> -10.0 </dep></entry>
      <entry><ind>  0.00 </ind><dep>   0.0 </dep></entry>
      <entry><ind>  0.75 </ind><dep>  15.0 </dep></entry>
    </interpolation>
    <axis>
      <x1-m> -0.457 </x1-m>
      <y1-m>  2.752 </y1-m>
      <z1-m> -0.382 </z1-m>
      <x2-m> -1.058 </x2-m>
      <y2-m>  4.331 </y2-m>
      <z2-m>  0.006 </z2-m>
    </axis>
  </animation>

  <!-- Volets -->
  <animation>
    <name>LesVolets</name>
    <object-name>voletG</object-name>
    <object-name>voletD</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>LesVolets</object-name>
    <property>/surface-positions/flap-pos-norm</property>
    <factor> 60 </factor>
    <center>
      <x-m> -0.211 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.396 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Compression -->
  <animation>
    <name>RoueAvant</name>
    <object-name>roueA</object-name>
    <object-name>cacheA</object-name>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>RoueAvant</object-name>
    <property>/gear/gear[0]/compression-norm</property>
    <interpolation>
      <entry><ind> 0.0 </ind><dep>  0.04 </dep></entry>
      <entry><ind> 1.0 </ind><dep> -0.25 </dep></entry>
    </interpolation>
    <axis>
      <x> -0.029387 </x>
      <y>  0.000000 </y>
      <z> -0.155914 </z>
    </axis>
  </animation>

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

  <animation>
    <type>translate</type>
    <object-name>RoueGauche</object-name>
    <property>/gear/gear[1]/compression-norm</property>
    <interpolation>
      <entry><ind> 0.0 </ind><dep>  0.04 </dep></entry>
      <entry><ind> 1.0 </ind><dep> -0.25 </dep></entry>
    </interpolation>
    <axis>
      <x> -0.029387 </x>
      <y>  0.000000 </y>
      <z> -0.155914 </z>
    </axis>
  </animation>

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

  <animation>
    <type>translate</type>
    <object-name>RoueDroite</object-name>
    <property>/gear/gear[2]/compression-norm</property>
    <interpolation>
      <entry><ind> 0.0 </ind><dep>  0.04 </dep></entry>
      <entry><ind> 1.0 </ind><dep> -0.25 </dep></entry>
    </interpolation>
    <axis>
      <x> -0.029387 </x>
      <y>  0.000000 </y>
      <z> -0.155914 </z>
    </axis>
  </animation>

  <!-- Rotation de la roue avant en fonction de la gouverne de direction -->
  <animation>
    <name>TrainAvant</name>
    <object-name>axeA</object-name>
    <object-name>cacheA</object-name>
    <object-name>roueA</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>TrainAvant</object-name>
    <property>/surface-positions/rudder-pos-norm</property>
    <factor> 25 </factor>
    <center>
      <x-m> -2.560 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.980 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

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

  <animation>
    <type>spin</type>
    <object-name>roueG</object-name>
    <property>/gear/gear[1]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -1.020 </x-m>
      <y-m> -1.236 </y-m>
      <z-m> -0.980 </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> -1.020 </x-m>
      <y-m>  1.236 </y-m>
      <z-m> -0.980 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Canopy -->
  <animation>
    <name>LaVerriere</name>
    <object-name>verriere</object-name>
    <object-name>toitverriere</object-name>
    <object-name>tourverriere</object-name>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>LaVerriere</object-name>
    <property>/instrumentation/doors/crew/position-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> 0.0 </dep></entry>
      <entry><ind> 1 </ind><dep> 0.8 </dep></entry>
    </interpolation>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Essais d'ajout des effets lumineux d'après le G115 -->
  <model>
    <path>Aircraft/DR400/Models/light/beacon.xml</path>
    <offsets>
      <x-m> 0.708 </x-m>
      <y-m> 0.000 </y-m>
      <z-m> 0.527 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/DR400/Models/light/RedLight.xml</path>
    <offsets>
      <x-m> -1.297 </x-m>
      <y-m> -4.353 </y-m>
      <z-m>  0.005 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/DR400/Models/light/GreenLight.xml</path>
    <offsets>
      <x-m> -1.297 </x-m>
      <y-m>  4.353 </y-m>
      <z-m>  0.005 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/DR400/Models/light/StrobeWhite.xml</path>
    <offsets>
      <x-m> -1.297 </x-m>
      <y-m> -4.253 </y-m>
      <z-m>  0.005 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/DR400/Models/light/StrobeWhite.xml</path>
    <offsets>
      <x-m> -1.297 </x-m>
      <y-m>  4.253 </y-m>
      <z-m>  0.005 </z-m>
   </offsets>
  </model>

  <model>
    <name>NozeGear</name>
    <path>Aircraft/DR400/Models/light/WhiteLight.xml</path>
    <offsets>
      <x-m> -2.574 </x-m>
      <y-m>  0.074 </y-m>
      <z-m> -0.643 </z-m>
    </offsets>
  </model>

  <!-- Gear light cone -->
  <model>
    <name>Taxi-Light</name>
    <path>Aircraft/DR400/Models/light/light-cone.xml</path>
    <offsets>
      <x-m> -2.574 </x-m>
      <y-m>  0.074 </y-m>
      <z-m> -0.643 </z-m>
      <pitch-deg> -7.500 </pitch-deg>
    </offsets>
  </model>

  <animation>
    <name>AllGearLight</name>
    <object-name>Taxi-Light</object-name>
    <object-name>NozeGear</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>AllGearLight</object-name>
    <property>/surface-positions/rudder-pos-norm</property>
    <factor> 25 </factor>
    <center>
      <x-m> -2.560 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.980 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <model>
    <path>Aircraft/DR400/Models/light/WhiteLight.xml</path>
    <offsets>
      <x-m> -1.749 </x-m>
      <y-m> -2.091 </y-m>
      <z-m> -0.382 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/DR400/Models/light/WhiteLight.xml</path>
    <offsets>
      <x-m> -1.749 </x-m>
      <y-m> -2.192 </y-m>
      <z-m> -0.382 </z-m>
    </offsets>
  </model>

  <!-- Wing light cone -->
  <model>
    <path>Aircraft/DR400/Models/light/light-cone.xml</path>
    <offsets>
      <x-m>       -1.749 </x-m>
      <y-m>       -2.192 </y-m>
      <z-m>       -0.382 </z-m>
      <pitch-deg> -7.500 </pitch-deg>
    </offsets>
  </model>

</PropertyList>

