Tu-154B2 version 3.1:
[fg:toms-fgdata.git] / Aircraft / tu154b / Instruments-3d / nvu / v-51.xml
1 <?xml version="1.0"?>
2 <!--
3     #############################################################################
4     #    (C) 2007 by Yurik V. Nikiforoff - port for FGFS,  FDM,                 #
5     #   2d & 3d instruments, animations, systems and over.                      #
6     #           yurik@megasignal.com                                            #
7     #############################################################################
8     -->
9
10 <!-- V-51 NVU (navigation system) control
11 3D instrument for Tu-154 -->
12 <PropertyList>
13  <path>v-51.ac</path>
14 <!--External panel lighting-->
15 <animation>
16   <type>material</type>
17   <object-name>base</object-name>
18   <object-name>selector_1</object-name>
19   <object-name>selector_2</object-name>
20   <object-name>power</object-name>
21   <object-name>count</object-name>
22   <object-name>corr</object-name>
23     <emission>
24     <red-prop>tu154/light/panel/ext-red</red-prop>
25     <green-prop>tu154/light/panel/ext-green</green-prop>
26     <blue-prop>tu154/light/panel/ext-blue</blue-prop>
27   </emission>
28 </animation>
29
30 <!-- Internal instruments lighting -->
31 <animation>
32   <type>material</type>
33   <object-name>text</object-name>
34   <object-name>_handle_marker</object-name>
35   <emission>
36     <red-prop>tu154/light/instruments/int-red</red-prop>
37     <green-prop>tu154/light/instruments/int-green</green-prop>
38     <blue-prop>tu154/light/instruments/int-blue</blue-prop>
39   </emission>
40 </animation>
41
42 <animation>
43   <type>material</type>
44   <object-name>lamp_1_on</object-name>
45   <object-name>lamp_2_on</object-name>
46   <emission>
47     <red>1.0</red>
48     <green>1.0</green>
49     <blue>1.0</blue>
50     <factor-prop>tu154/systems/nvu/powered</factor-prop>
51   </emission>
52 </animation>
53
54
55 <!--selectors-->
56 <animation>
57   <type>knob</type>
58   <object-name>selector_1</object-name>
59   <property>tu154/switches/v-51-selector-1</property>
60   <visible>true</visible>
61   <action>
62     <binding>
63       <command>property-adjust</command>
64       <property>tu154/switches/v-51-selector-1</property>
65       <min>-4</min>
66       <max>4</max>
67       <wrap>false</wrap>
68     </binding>
69   </action>
70   <interpolation>
71     <entry><ind>        -4</ind>        <dep>   -130.0</dep></entry>
72     <entry><ind>        -3</ind>        <dep>   -95.0</dep></entry>
73     <entry><ind>        -2</ind>        <dep>   -62.0</dep></entry>
74     <entry><ind>        -1</ind>        <dep>   -31.0</dep></entry>
75     <entry><ind>         0</ind>        <dep>   0.0</dep></entry>
76     <entry><ind>         1</ind>        <dep>   31.0</dep></entry>
77     <entry><ind>         2</ind>        <dep>   62.0</dep></entry>
78     <entry><ind>         3</ind>        <dep>   98.0</dep></entry>
79     <entry><ind>         4</ind>        <dep>   130.0</dep></entry>
80   </interpolation>
81   <center>
82     <x-m>0.0</x-m>
83     <y-m>-0.03017</y-m>
84     <z-m>0.00849</z-m>
85   </center>
86   <axis>
87     <x>-1.0</x>
88     <y>0.0</y>
89     <z>0.0</z>
90   </axis>
91 </animation>
92 <animation>
93   <type>knob</type>
94   <object-name>selector_2</object-name>
95   <property>tu154/switches/v-51-selector-2</property>
96   <visible>true</visible>
97   <action>
98     <binding>
99       <command>property-adjust</command>
100       <property>tu154/switches/v-51-selector-2</property>
101       <min>-1</min>
102       <max>5</max>
103       <wrap>false</wrap>
104     </binding>
105     <binding>
106       <command>nasal</command>
107       <script>
108         var v = getprop("tu154/switches/v-51-selector-2");
109         v = (v > 0 ? v * 5000 + 2000 : 0);
110         setprop("fdm/jsbsim/instrumentation/nvu/LUR-2km", v);
111       </script>
112     </binding>
113   </action>
114   <interpolation>
115     <entry><ind>        -1</ind>        <dep>   -90.0</dep></entry>
116     <entry><ind>         5</ind>        <dep>   90.0</dep></entry>
117   </interpolation>
118   <center>
119     <x-m>0.0</x-m>
120     <y-m>0.02607</y-m>
121     <z-m>0.0133</z-m>
122   </center>
123   <axis>
124     <x>-1.0</x>
125     <y>0.0</y>
126     <z>0.0</z>
127   </axis>
128 </animation>
129 <!--Switches-->
130 <animation>
131   <type>rotate</type>
132   <object-name>power</object-name>
133   <property>tu154/switches/v-51-power</property>
134   <interpolation>
135     <entry><ind>        0.0</ind>       <dep>   -60.0</dep></entry>
136     <entry><ind>        1.0</ind>       <dep>   60.0</dep></entry>
137   </interpolation>
138   <center>
139     <x-m>0.0</x-m>
140     <y-m>0.0</y-m>
141     <z-m>-0.0202</z-m>
142   </center>
143   <axis>
144     <x>0.0</x>
145     <y>-1.0</y>
146     <z>0.0</z>
147   </axis>
148 </animation>
149 <animation>
150   <type>rotate</type>
151   <object-name>count</object-name>
152   <property>tu154/switches/v-51-count</property>
153   <interpolation>
154     <entry><ind>        0.0</ind>       <dep>   -60.0</dep></entry>
155     <entry><ind>        1.0</ind>       <dep>   60.0</dep></entry>
156   </interpolation>
157   <center>
158     <x-m>0.0</x-m>
159     <y-m>0.0</y-m>
160     <z-m>-0.0202</z-m>
161   </center>
162   <axis>
163     <x>0.0</x>
164     <y>-1.0</y>
165     <z>0.0</z>
166   </axis>
167 </animation>
168 <animation>
169   <type>rotate</type>
170   <object-name>corr</object-name>
171   <property>tu154/switches/v-51-corr</property>
172   <interpolation>
173     <entry><ind>        0.0</ind>       <dep>   -60.0</dep></entry>
174     <entry><ind>        1.0</ind>       <dep>   60.0</dep></entry>
175   </interpolation>
176   <center>
177     <x-m>0.0</x-m>
178     <y-m>0.0</y-m>
179     <z-m>-0.0202</z-m>
180   </center>
181   <axis>
182     <x>0.0</x>
183     <y>-1.0</y>
184     <z>0.0</z>
185   </axis>
186 </animation>
187 <!--Lamps-->
188 <animation>
189   <type>select</type>
190   <object-name>lamp_1_on</object-name>
191   <condition>
192     <property>fdm/jsbsim/instrumentation/nvu/active</property>
193     <property>fdm/jsbsim/instrumentation/nvu/mode-out</property>
194   </condition>
195 </animation>
196 <animation>
197   <type>select</type>
198   <object-name>lamp_2_on</object-name>
199   <condition>
200     <property>fdm/jsbsim/instrumentation/nvu/active</property>
201     <property>fdm/jsbsim/instrumentation/nvu/mode-out</property>
202     <property>tu154/switches/v-51-corr</property>
203   </condition>
204 </animation>
205
206 <!--Controls-->
207 <animation>
208   <type>pick</type>
209   <object-name>hs_1</object-name>
210   <visible>false</visible>
211   <action>
212     <button>0</button>
213     <repeatable>false</repeatable>
214     <binding>
215       <command>nasal</command>
216       <script>
217         interpolate("tu154/switches/v-51-power", 1.0, 0.1 );
218       </script>
219     </binding>
220   </action>
221 </animation>
222 <animation>
223   <type>pick</type>
224   <object-name>hs_2</object-name>
225   <visible>false</visible>
226   <action>
227     <button>0</button>
228     <repeatable>false</repeatable>
229     <binding>
230       <command>nasal</command>
231       <script>
232         interpolate("tu154/switches/v-51-power", 0.0, 0.1 );
233       </script>
234     </binding>
235   </action>
236 </animation>
237 <animation>
238   <type>pick</type>
239   <object-name>hs_3</object-name>
240   <visible>false</visible>
241   <action>
242     <button>0</button>
243     <repeatable>false</repeatable>
244     <binding>
245       <command>nasal</command>
246       <script>
247         interpolate("tu154/switches/v-51-count", 1.0, 0.1 );
248         setprop("fdm/jsbsim/instrumentation/nvu/stopped", 0);
249       </script>
250     </binding>
251   </action>
252 </animation>
253 <animation>
254   <type>pick</type>
255   <object-name>hs_4</object-name>
256   <visible>false</visible>
257   <action>
258     <button>0</button>
259     <repeatable>false</repeatable>
260     <binding>
261       <command>nasal</command>
262       <script>
263         interpolate("tu154/switches/v-51-count", 0.0, 0.1 );
264         setprop("fdm/jsbsim/instrumentation/nvu/stopped", 1);
265       </script>
266     </binding>
267     <binding>
268       <command>nasal</command>
269       <script></script>
270     </binding>
271   </action>
272 </animation>
273 <animation>
274   <type>pick</type>
275   <object-name>hs_5</object-name>
276   <visible>false</visible>
277   <action>
278     <button>0</button>
279     <repeatable>false</repeatable>
280     <binding>
281       <command>nasal</command>
282       <script>
283         interpolate("tu154/switches/v-51-corr", 1.0, 0.1 );
284       </script>
285     </binding>
286   </action>
287 </animation>
288 <animation>
289   <type>pick</type>
290   <object-name>hs_6</object-name>
291   <visible>false</visible>
292   <action>
293     <button>0</button>
294     <repeatable>false</repeatable>
295     <binding>
296       <command>nasal</command>
297       <script>
298         interpolate("tu154/switches/v-51-corr", 0.0, 0.1 );
299       </script>
300     </binding>
301   </action>
302 </animation>
303
304 <!--Buttons-->
305 <animation>
306   <type>pick</type>
307   <object-name>hs_7</object-name>
308   <visible>false</visible>
309   <action>
310     <button>0</button>
311     <repeatable>true</repeatable>
312     <interval-sec>600</interval-sec>
313     <binding>
314       <command>nasal</command>
315       <script>instruments.nvu_distance_adjust(-1)</script>
316     </binding>
317     <mod-up>
318       <binding>
319         <command>nasal</command>
320         <script>instruments.nvu_distance_adjust(0)</script>
321       </binding>
322     </mod-up>
323   </action>
324 </animation>
325 <animation>
326   <type>pick</type>
327   <object-name>hs_8</object-name>
328   <visible>false</visible>
329   <action>
330     <button>0</button>
331     <repeatable>false</repeatable>
332     <binding>
333       <command>property-cycle</command>
334       <property>tu154/instrumentation/v-51/adjust-speed</property>
335       <value>1000</value>
336       <value>10000</value>
337     </binding>
338   </action>
339   <hovered>
340     <binding>
341       <command>set-tooltip</command>
342       <tooltip-id>nvu-adjust-speed</tooltip-id>
343       <label>Adjust speed: %s</label>
344       <property>tu154/instrumentation/v-51/adjust-speed</property>
345       <mapping>nasal</mapping>
346       <script> return (arg[0] == 1000 ? "slow" : "fast")</script>
347     </binding>
348   </hovered>
349 </animation>
350 <animation>
351   <type>pick</type>
352   <object-name>hs_9</object-name>
353   <visible>false</visible>
354   <action>
355     <button>0</button>
356     <repeatable>true</repeatable>
357     <interval-sec>600</interval-sec>
358     <binding>
359       <command>nasal</command>
360       <script>instruments.nvu_distance_adjust(1)</script>
361     </binding>
362     <mod-up>
363       <binding>
364         <command>nasal</command>
365         <script>instruments.nvu_distance_adjust(0)</script>
366       </binding>
367     </mod-up>
368   </action>
369 </animation>
370
371 <!--Scale selector-->
372 <animation>
373   <type>pick</type>
374   <object-name>hs_10</object-name>
375   <visible>false</visible>
376   <action>
377     <button>0</button>
378     <repeatable>false</repeatable>
379     <binding>
380       <command>property-cycle</command>
381       <property>tu154/instrumentation/v-51/scale</property>
382       <value>1</value>
383       <value>10</value>
384     </binding>
385   </action>
386   <hovered>
387     <binding>
388       <command>set-tooltip</command>
389       <tooltip-id>nvu-scale</tooltip-id>
390       <label>Distance scale: %s</label>
391       <property>tu154/instrumentation/v-51/scale</property>
392       <mapping>nasal</mapping>
393       <script>
394         return (arg[0] == 1 ? "1 km" : "100 m");
395       </script>
396     </binding>
397   </hovered>
398 </animation>
399
400 </PropertyList>