Updated Nordstern: Added a variometer.
[fg:toms-fgdata.git] / Aircraft / Nordstern / Nordstern-set.xml
1 <?xml version="1.0"?>
2 <!--
3   Zeppelin LZ 121 "Nordstern" airship for FlightGear.
4
5   Copyright (C) 2010 - 2011  Anders Gidenstam  (anders(at)gidenstam.org)
6   This file is licensed under the GPL license version 2 or later.
7 -->
8 <PropertyList>
9
10  <sim>
11
12   <description>Zeppelin LZ 121 "Nordstern" airship</description>
13   <author>Anders Gidenstam</author>
14   <status>development</status>
15   <aircraft-version>$Id: Nordstern-set.xml,v 1.11 2011-01-16 15:05:32 anders Exp $</aircraft-version>
16
17   <flight-model>jsb</flight-model>
18   <aero>Nordstern</aero>
19   <!-- The added-mass module might be unstable at 120 Hz? -->
20   <model-hz type="double">240.0</model-hz>
21
22   <presets>
23    <onground type="bool">true</onground>
24    <!-- altitude-agl-ft type="double">6.0</altitude-agl-ft -->
25   </presets>
26   <!-- startup>
27    <splash-texture>Aircraft/Nordstern/splash.jpg</splash-texture>
28   </startup -->
29
30   <!-- 3d model -->
31   <model>
32    <path>Aircraft/Nordstern/Models/Nordstern.xml</path>
33    <!-- livery>
34     <file type="string">Nordstern</file>
35    </livery -->
36    <mast-truck>
37     <mast-head-height-m type="double">11.8</mast-head-height-m>
38     <mast-head-heading-deg type="double"/>
39     <mast-head-pitch-deg type="double"/>
40     <mast-fold-norm type="double">0.0</mast-fold-norm>
41     <legs-fold-norm type="double">0.0</legs-fold-norm>
42    </mast-truck>
43   </model>
44
45   <!-- Views -->
46   <view n="0">
47    <!-- Officer of the watch's position. -->
48    <name>Watch Officer View</name>
49    <internal>true</internal>
50    <config>
51     <!-- x/y/z == right/up/back -->
52     <x-offset-m type="double">  0.50 </x-offset-m>
53     <y-offset-m type="double"> -9.00 </y-offset-m>
54     <z-offset-m type="double"> 22.00 </z-offset-m>
55     <pitch-offset-deg type="double"> -10.0 </pitch-offset-deg>
56    </config>
57   </view>
58   <!-- Views -->
59   <view n="100">
60    <!-- Rudder helmsman's position. -->
61    <name>Rudder Man View</name>
62    <internal>true</internal>
63    <config>
64     <!-- x/y/z == right/up/back -->
65     <from-model type="bool">true</from-model>
66     <from-model-idx type="int">0</from-model-idx>
67     <x-offset-m type="double">  0.00 </x-offset-m>
68     <y-offset-m type="double"> -9.00 </y-offset-m>
69     <z-offset-m type="double"> 20.50 </z-offset-m>
70     <pitch-offset-deg type="double"> -20.0 </pitch-offset-deg>
71     <default-field-of-view-deg type="double"> 65 </default-field-of-view-deg>
72    </config>
73   </view>
74   <view n="101">
75    <!-- Elevator helmsman's position. -->
76    <name>Elevator Man View</name>
77    <internal>true</internal>
78    <config>
79     <!-- x/y/z == right/up/back -->
80     <from-model type="bool">true</from-model>
81     <from-model-idx type="int">0</from-model-idx>
82     <x-offset-m type="double"> -0.50 </x-offset-m>
83     <y-offset-m type="double"> -9.00 </y-offset-m>
84     <z-offset-m type="double"> 22.22 </z-offset-m>
85     <pitch-offset-deg type="double"> -20.0 </pitch-offset-deg>
86     <heading-offset-deg type="double"> 90.0 </heading-offset-deg>
87     <default-field-of-view-deg type="double"> 65 </default-field-of-view-deg>
88    </config>
89   </view>
90   <view n="102">
91    <name>Steward View</name>
92    <internal>true</internal>
93    <config>
94     <!-- x/y/z == right/up/back -->
95     <from-model type="bool">true</from-model>
96     <from-model-idx type="int">0</from-model-idx>
97     <x-offset-m type="double">  0.50 </x-offset-m>
98     <y-offset-m type="double"> -9.00 </y-offset-m>
99     <z-offset-m type="double"> 33.00 </z-offset-m>
100     <heading-offset-deg type="double"> 0.0 </heading-offset-deg>
101     <pitch-offset-deg type="double"> 0.0 </pitch-offset-deg>
102     <default-field-of-view-deg type="double"> 65 </default-field-of-view-deg>
103    </config>
104   </view>
105   <view n="103">
106    <name>Rigger View</name>
107    <internal>true</internal>
108    <config>
109     <!-- x/y/z == right/up/back -->
110     <from-model type="bool">true</from-model>
111     <from-model-idx type="int">0</from-model-idx>
112     <x-offset-m type="double">  0.00 </x-offset-m>
113     <y-offset-m type="double"> -7.50 </y-offset-m>
114     <z-offset-m type="double"> 51.00 </z-offset-m>
115     <heading-offset-deg type="double"> 0.0 </heading-offset-deg>
116     <pitch-offset-deg type="double"> 0.0 </pitch-offset-deg>
117     <default-field-of-view-deg type="double"> 65 </default-field-of-view-deg>
118    </config>
119   </view>
120
121   <!-- Move the center of the external views. -->
122   <view n="1">
123    <config>
124     <target-z-offset-m type="double"> 25.0 </target-z-offset-m>
125    </config>
126   </view>
127   <view n="2">
128    <config>
129     <target-z-offset-m type="double"> 25.0 </target-z-offset-m>
130    </config>
131   </view>
132   <view n="3">
133    <config>
134     <target-z-offset-m type="double"> 25.0 </target-z-offset-m>
135    </config>
136   </view>
137   <view n="5">
138    <config>
139     <target-z-offset-m type="double"> 25.0 </target-z-offset-m>
140    </config>
141   </view>
142   <view n="6">
143    <config>
144     <target-z-offset-m type="double"> 25.0 </target-z-offset-m>
145    </config>
146   </view>
147
148   <chase-distance-m type="double">-150.0</chase-distance-m>
149
150   <sound>
151    <audible>true</audible>
152    <path>Aircraft/Nordstern/Sounds/Nordstern-sound.xml</path>
153   </sound>
154
155   <!-- Aircraft specific help. -->
156   <help include="help.xml"/>
157
158   <systems>
159    <electrical>
160     <path/>
161    </electrical>
162    <autopilot>
163     <path/>
164    </autopilot>
165
166    <pitot>
167     <name>pitot</name>
168     <number>0</number>
169    </pitot>
170    <static>
171     <name>static</name>
172     <number>0</number>
173    </static>
174
175    <vacuum>
176     <name>vacuum</name>
177     <number>0</number>
178     <rpm>engines/engine[0]/rpm</rpm>
179     <scale>1.0</scale>
180    </vacuum>
181    <vacuum>
182     <name>vacuum</name>
183     <number>1</number>
184     <rpm>engines/engine[1]/rpm</rpm>
185     <scale>1.0</scale>
186    </vacuum>
187   </systems>
188
189   <instrumentation>
190    <path>Aircraft/Nordstern/Systems/instrumentation.xml</path>
191   </instrumentation>
192
193   <multiplay>
194    <generic>
195     <!-- float n="0" alias="/fdm/jsbsim/propulsion/engine[0]/pitch-angle-rad"/>
196     <float n="1" alias="/fdm/jsbsim/propulsion/engine[1]/pitch-angle-rad"/>
197     <float n="2" alias="/fdm/jsbsim/propulsion/engine[2]/pitch-angle-rad"/>
198     <float n="3"
199            alias="/instrumentation/heading-indicator/indicated-heading-deg"/>
200     <float n="4"
201            alias="/instrumentation/attitude-indicator/indicated-pitch-deg"/>
202     <float n="5"
203            alias="/instrumentation/attitude-indicator/indicated-roll-deg"/ -->
204     <!-- int n="0" type="int">0</int -->         <!-- MP switches 1 -->
205     <!-- string n="0" type="string"></string --> <!-- MP events -->
206     <!-- string n="1" type="string"></string --> <!-- MP TDM1 -->
207     <!-- string n="2" type="string"></string --> <!-- MP TDM2 -->
208     <!-- string n="3" type="string"></string --> <!-- MP TDM3 -->
209    </generic>
210   </multiplay>
211
212   <max-simtime-per-frame n="0" type="double">0.1</max-simtime-per-frame>
213
214   <menubar>
215    <default>
216     <menu n="100">
217      <label>LZ 121 Nordstern</label>
218      <!-- item>
219       <label>Select MP-copilot</label>
220       <binding>
221        <command>nasal</command>
222        <script>
223         dual_control_tools.
224           copilot_dialog.show(aircraft_dual_control.copilot_type);
225        </script>
226       </binding>
227      </item -->
228      <item>
229       <label>About</label>
230       <binding>
231        <command>nasal</command>
232        <script>Nordstern.about();</script>
233       </binding>
234      </item>
235      <!-- item>
236       <label>Select Livery</label>
237       <binding>
238        <command>nasal</command>
239        <script>aircraft.livery.dialog.toggle()</script>
240       </binding>
241      </item -->
242     </menu>
243    </default>
244   </menubar>
245  </sim>
246
247  <instrumentation>
248   <inclinometer n="0">
249    <serviceable type="bool">1</serviceable>
250   </inclinometer>
251   <inclinometer n="1">
252    <serviceable type="bool">1</serviceable>
253   </inclinometer>
254  </instrumentation>
255
256  <controls>
257   <lighting>
258    <nav-lights type="bool">true</nav-lights> <!-- Should be MP enabled. -->
259   </lighting>
260  </controls>
261
262  <payload include="Systems/payload.xml"/>
263  <consumables include="Systems/consumables.xml"/>
264
265  <nasal>
266   <walkview>
267    <file>Aircraft/Generic/WalkView/walkview.nas</file>
268   </walkview>
269   <ZLTNT>
270    <file>Aircraft/Nordstern/Systems/Nordstern.nas</file>
271    <file>Aircraft/Nordstern/Systems/walk-views.nas</file>
272    <file>Aircraft/ZLT-NT/Systems/ground_handling.nas</file>
273    <file>Aircraft/ZLT-NT/Systems/mp-network.nas</file>
274    <script><![CDATA[
275      # Ground handling configuration.
276      MAX_WIRE_LENGTH = 300.0 * FT2M;
277
278      globals["Nordstern"] = globals["ZLTNT"];
279     ]]>
280    </script>
281   </ZLTNT>
282   <limits>
283    <file>Aircraft/Generic/limits.nas</file>
284   </limits>
285   <!--  Instrument drivers. -->
286   <!-- Dual control. -->
287   <dual_control_tools>
288    <file>Aircraft/Generic/DualControl/dual-control-tools.nas</file>
289   </dual_control_tools>
290   <!-- aircraft_dual_control>
291    <file>Aircraft/ZLT-NT/Systems/ZLT-NT-dual-control.nas</file>
292   </aircraft_dual_control>
293   <dual_control>
294    <file>Aircraft/Generic/DualControl/pilot-dual-control.nas</file>
295   </dual_control -->
296  </nasal>
297
298  <input>
299   <keyboard>
300    <!-- Keyboard commands -->
301
302    <!-- Ballast commands ====================================== -->
303    <key n="87">
304     <name>W</name>
305     <desc>Perform on-ground weigh-off.</desc>
306     <binding>
307      <command>nasal</command>
308      <script>
309       if (!walkview.forward(5.0)) {
310           gui.popupTip("Weigh-off in progress.");
311           Nordstern.autoWeighoff();
312       }
313      </script>
314     </binding>
315     <mod-up>
316      <binding>
317       <command>nasal</command>
318       <script>
319        walkview.forward(0);
320       </script>
321      </binding>
322     </mod-up>
323    </key>
324
325    <key n="119">
326     <name>w</name>
327     <desc>Show current on-ground weight.</desc>
328     <binding>
329      <command>nasal</command>
330      <script>
331       if (!walkview.forward(1.0)) {
332           Nordstern.printWOW();
333       }
334      </script>
335     </binding>
336     <mod-up>
337      <binding>
338       <command>nasal</command>
339       <script>
340        walkview.forward(0);
341       </script>
342      </binding>
343     </mod-up>
344    </key>
345
346    <!-- Ballast commands ======================================= -->
347
348    <key n="101">
349     <name>e</name>
350     <desc>Shift 100 lb trim ballast forwards</desc>
351     <repeatable type="bool">false</repeatable>
352     <binding>
353      <command>nasal</command>
354      <script>
355        gui.popupTip("Shifting ballast forward.");
356        Nordstern.shiftTrimBallast(Nordstern.FORWARD, 100);
357      </script>
358     </binding>
359    </key>
360    <key n="100">
361     <name>d</name>
362     <desc>Shift 100 lb trim ballast aftwards</desc>
363     <repeatable type="bool">false</repeatable>
364     <binding>
365      <command>nasal</command>
366      <script>
367        if (!walkview.side_step(0.5)) {
368            gui.popupTip("Shifting ballast aftward.");
369            Nordstern.shiftTrimBallast(Nordstern.AFT, 100);
370        }
371      </script>
372     </binding>
373     <mod-up>
374      <binding>
375       <command>nasal</command>
376       <script>
377        walkview.side_step(0);
378       </script>
379      </binding>
380     </mod-up>
381    </key>
382
383    <key n="69">
384     <name>E</name>
385     <desc>Drop one ballast fore</desc>
386     <repeatable type="bool">false</repeatable>
387     <binding>
388      <command>nasal</command>
389      <script>
390        gui.popupTip("Releasing ballast fore!");
391        Nordstern.releaseBallast(Nordstern.FORE_BALLAST, 1);
392      </script>
393     </binding>
394    </key>
395    <key n="68">
396     <name>D</name>
397     <desc>Drop one ballast aft</desc>
398     <repeatable type="bool">false</repeatable>
399     <binding>
400      <command>nasal</command>
401      <script>
402        if (!walkview.side_step(1.0)) {
403            gui.popupTip("Releasing ballast aft!");
404            Nordstern.releaseBallast(Nordstern.AFT_BALLAST, 1);
405        }
406      </script>
407     </binding>
408     <mod-up>
409      <binding>
410       <command>nasal</command>
411       <script>
412        walkview.side_step(0);
413       </script>
414      </binding>
415     </mod-up>
416    </key>
417    <key n="23">
418     <name>Ctrl-W</name>
419     <desc>Refill quick release ballast bags</desc>
420     <binding>
421      <command>nasal</command>
422      <script>
423        Nordstern.refillQuickReleaseBallast(Nordstern.FORE_BALLAST);
424        Nordstern.refillQuickReleaseBallast(Nordstern.AFT_BALLAST);
425      </script>
426     </binding>
427    </key>
428
429    <!-- Gas cell commands ====================================== -->
430    <key n="70">
431     <name>F</name>
432     <desc>Open fore gas valves.</desc>
433     <binding>
434      <command>nasal</command>
435      <script>
436        gui.popupTip("Fore gas valves open!");
437        Nordstern.setForwardGasValves(1.00);
438      </script>
439     </binding>
440    </key>
441    <key n="102">
442     <name>f</name>
443     <desc>Close fore gas valves.</desc>
444     <binding>
445      <command>nasal</command>
446      <script>
447        gui.popupTip("Fore gas valves closed!");
448        Nordstern.setForwardGasValves(0.00);
449      </script>
450     </binding>
451    </key>
452
453    <key n="71">
454     <name>G</name>
455     <desc>Open aft gas valves.</desc>
456     <binding>
457      <command>nasal</command>
458      <script>
459        gui.popupTip("Aft gas valves open!");
460        Nordstern.setAftGasValves(1.00);
461      </script>
462     </binding>
463    </key>
464    <key n="103">
465     <name>g</name>
466     <desc>Close aft gas valves.</desc>
467     <binding>
468      <command>nasal</command>
469      <script>
470        gui.popupTip("Aft gas valves closed!");
471        Nordstern.setAftGasValves(0.00);
472      </script>
473     </binding>
474    </key>
475
476    <!-- Mooring commands ======================================= -->
477    <key n="85">
478     <name>U</name>
479     <desc>Attach mooring wire.</desc>
480     <binding>
481      <command>nasal</command>
482      <script>
483        Nordstern.mooring.attach_mooring_wire();
484      </script>
485     </binding>
486    </key>
487
488    <key n="89">
489     <name>Y</name>
490     <desc>Release mooring connection or wire.</desc>
491     <binding>
492      <command>nasal</command>
493      <script>
494        Nordstern.mooring.release_mooring();
495      </script>
496     </binding>
497    </key>
498
499    <key n="117">
500     <name>u</name>
501     <desc>Winch in mooring wire.</desc>
502     <binding>
503      <command>nasal</command>
504      <script>
505        var sp = getprop("/fdm/jsbsim/mooring/winch-speed-fps");
506        Nordstern.mooring.set_winch_speed(sp - 0.5);
507      </script>
508     </binding>
509    </key>
510
511    <key n="121">
512     <name>y</name>
513     <desc>Winch out mooring wire.</desc>
514     <binding>
515      <command>nasal</command>
516      <script>
517        var sp = getprop("/fdm/jsbsim/mooring/winch-speed-fps");
518        Nordstern.mooring.set_winch_speed(sp + 0.5);
519      </script>
520     </binding>
521    </key>
522
523    <!-- WalkView commands ======================================== -->
524    <key n="115">
525     <name>s</name>
526     <desc>Walk backwards.</desc>
527     <binding>
528      <command>nasal</command>
529      <script>
530       if (!walkview.forward(-1.0)) {
531           controls.startEngine(1);
532       }
533      </script>
534     </binding>
535     <mod-up>
536      <binding>
537       <command>nasal</command>
538       <script>
539        walkview.forward(0);
540        controls.startEngine(0);
541       </script>
542      </binding>
543     </mod-up>
544    </key>
545
546    <key n="65">
547     <name>A</name>
548     <desc>Side step left</desc>
549     <binding>
550      <command>nasal</command>
551      <script>
552       if (!walkview.side_step(-1.0)) {
553       }
554      </script>
555     </binding>
556     <mod-up>
557      <binding>
558       <command>nasal</command>
559       <script>
560        walkview.side_step(0);
561       </script>
562      </binding>
563     </mod-up>
564    </key>
565    <key n="97">
566     <name>a</name>
567     <desc>Side step left</desc>
568     <binding>
569      <command>nasal</command>
570      <script>
571       if (!walkview.side_step(-0.5)) {
572       }
573      </script>
574     </binding>
575     <mod-up>
576      <binding>
577       <command>nasal</command>
578       <script>
579        walkview.side_step(0);
580       </script>
581      </binding>
582     </mod-up>
583    </key>
584
585   </keyboard>
586  </input>
587
588 </PropertyList>