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 #############################################################################
10 <!-- PU-46 & PN-5 ABSU (autopilot) control
11 3D instrument for Tu-154 -->
13 <path>pu-46+pn-5.ac</path>
14 <!--External panel lighting-->
17 <object-name>base</object-name>
18 <object-name>pnp_selector</object-name>
19 <object-name>pitch_wheel</object-name>
20 <object-name>kurs_handle</object-name>
21 <object-name>cover_1</object-name>
22 <object-name>cover_2</object-name>
23 <object-name>tang</object-name>
24 <object-name>kren</object-name>
25 <object-name>boltanka</object-name>
26 <object-name>strelki</object-name>
27 <object-name>navigac</object-name>
28 <object-name>posadk</object-name>
30 <red-prop>tu154/light/panel/ext-red</red-prop>
31 <green-prop>tu154/light/panel/ext-green</green-prop>
32 <blue-prop>tu154/light/panel/ext-blue</blue-prop>
36 <!-- Internal instruments lighting -->
39 <object-name>text</object-name>
40 <object-name>otkl_heading</object-name>
41 <object-name>yoke_heading</object-name>
42 <object-name>auto_heading</object-name>
43 <object-name>otkl_pitch</object-name>
44 <object-name>yoke_pitch</object-name>
45 <object-name>auto_pitch</object-name>
46 <object-name>_handle_marker</object-name>
48 <red-prop>tu154/light/instruments/int-red</red-prop>
49 <green-prop>tu154/light/instruments/int-green</green-prop>
50 <blue-prop>tu154/light/instruments/int-blue</blue-prop>
58 <object-name>otkl_heading</object-name>
61 <property>tu154/instrumentation/pn-5/heading-state</property>
68 <object-name>yoke_heading</object-name>
71 <property>tu154/instrumentation/pn-5/heading-state</property>
78 <object-name>auto_heading</object-name>
81 <property>tu154/instrumentation/pn-5/heading-state</property>
89 <object-name>otkl_pitch</object-name>
92 <property>tu154/instrumentation/pn-5/pitch-state</property>
99 <object-name>yoke_pitch</object-name>
102 <property>tu154/instrumentation/pn-5/pitch-state</property>
109 <object-name>auto_pitch</object-name>
112 <property>tu154/instrumentation/pn-5/pitch-state</property>
120 <type>translate</type>
121 <object-name>sogl_but</object-name>
122 <property>tu154/switches/pu-46-button</property>
123 <factor>0.01</factor>
132 <type>material</type>
133 <object-name>zk</object-name>
138 <factor-prop>tu154/instrumentation/pn-5/zk</factor-prop>
142 <type>material</type>
143 <object-name>sbros</object-name>
148 <factor-prop>tu154/instrumentation/pn-5/sbros</factor-prop>
152 <type>material</type>
153 <object-name>nvu</object-name>
158 <factor-prop>tu154/instrumentation/pn-5/nvu</factor-prop>
162 <type>material</type>
163 <object-name>az-1</object-name>
168 <factor-prop>tu154/instrumentation/pn-5/az-1</factor-prop>
172 <type>material</type>
173 <object-name>az-2</object-name>
178 <factor-prop>tu154/instrumentation/pn-5/az-2</factor-prop>
182 <type>material</type>
183 <object-name>gliss</object-name>
188 <factor-prop>tu154/instrumentation/pn-5/gliss</factor-prop>
192 <type>material</type>
193 <object-name>zahod</object-name>
198 <factor-prop>tu154/instrumentation/pn-5/zahod</factor-prop>
202 <type>material</type>
203 <object-name>m</object-name>
208 <factor-prop>tu154/instrumentation/pu-46/m</factor-prop>
212 <type>material</type>
213 <object-name>v</object-name>
218 <factor-prop>tu154/instrumentation/pu-46/v</factor-prop>
222 <type>material</type>
223 <object-name>h</object-name>
228 <factor-prop>tu154/instrumentation/pu-46/h</factor-prop>
232 <type>material</type>
233 <object-name>stab</object-name>
238 <factor-prop>tu154/instrumentation/pu-46/stab</factor-prop>
245 <object-name>pnp_selector</object-name>
246 <property>tu154/switches/pn-5-pnp-selector</property>
248 <entry><ind> 0.0</ind> <dep> -30.0</dep></entry>
249 <entry><ind> 1.0</ind> <dep> 30.0</dep></entry>
263 <!--Autopilot wheels-->
266 <object-name>pitch_wheel</object-name>
267 <property>tu154/switches/pu-46-pitch-wheel</property>
281 <object-name>kurs_handle</object-name>
282 <property>tu154/switches/pu-46-heading-wheel</property>
298 <object-name>cover_1</object-name>
299 <property>tu154/switches/pu-46-cover-1</property>
301 <entry><ind> 0.0</ind> <dep> 10.0</dep></entry>
302 <entry><ind> 1.0</ind> <dep> 120.0</dep></entry>
318 <object-name>cover_2</object-name>
319 <property>tu154/switches/pu-46-cover-2</property>
321 <entry><ind> 0.0</ind> <dep> 10.0</dep></entry>
322 <entry><ind> 1.0</ind> <dep> 120.0</dep></entry>
340 <object-name>kren</object-name>
341 <property>tu154/switches/pu-46-kren</property>
343 <entry><ind> 0.0</ind> <dep> -60.0</dep></entry>
344 <entry><ind> 1.0</ind> <dep> 60.0</dep></entry>
360 <object-name>tang</object-name>
361 <property>tu154/switches/pu-46-tang</property>
363 <entry><ind> 0.0</ind> <dep> -60.0</dep></entry>
364 <entry><ind> 1.0</ind> <dep> 60.0</dep></entry>
380 <object-name>boltanka</object-name>
381 <property>tu154/switches/pu-46-boltanka</property>
383 <entry><ind> 0.0</ind> <dep> -60.0</dep></entry>
384 <entry><ind> 1.0</ind> <dep> 60.0</dep></entry>
402 <object-name>strelki</object-name>
403 <property>tu154/switches/pn-5-strelki</property>
405 <entry><ind> 0.0</ind> <dep> -60.0</dep></entry>
406 <entry><ind> 1.0</ind> <dep> 60.0</dep></entry>
422 <object-name>navigac</object-name>
423 <property>tu154/switches/pn-5-navigac</property>
425 <entry><ind> 0.0</ind> <dep> -60.0</dep></entry>
426 <entry><ind> 1.0</ind> <dep> 60.0</dep></entry>
442 <object-name>posadk</object-name>
443 <property>tu154/switches/pn-5-posadk</property>
445 <entry><ind> 0.0</ind> <dep> -60.0</dep></entry>
446 <entry><ind> 1.0</ind> <dep> 60.0</dep></entry>
461 <!--*************** Controls ***************-->
464 <!--"Soglasovanie" knobs-->
467 <object-name>sogl_but</object-name>
468 <visible>true</visible>
471 <repeatable>true</repeatable>
472 <interval-sec>0.15</interval-sec>
474 <!-- <repeatable>false</repeatable>-->
476 <command>nasal</command>
478 interpolate("tu154/switches/pu-46-button", 1.0, 0.1 );
479 instruments.bkk_adjust();
484 <command>nasal</command>
486 interpolate("tu154/switches/pu-46-button", 0.0, 0.1 );
487 <!-- instruments.bkk_adjust(0);-->
497 <object-name>zk</object-name>
498 <visible>true</visible>
501 <repeatable>false</repeatable>
503 <command>nasal</command>
504 <script>absu.absu_zk()</script>
512 <object-name>sbros</object-name>
513 <visible>true</visible>
516 <repeatable>false</repeatable>
518 <command>nasal</command>
519 <script>absu.absu_reset()</script>
527 <object-name>nvu</object-name>
528 <visible>true</visible>
531 <repeatable>false</repeatable>
533 <command>nasal</command>
534 <script>absu.absu_nvu()</script>
543 <object-name>az-1</object-name>
544 <visible>true</visible>
547 <repeatable>false</repeatable>
549 <command>nasal</command>
550 <script>absu.absu_az1()</script>
556 <object-name>az-2</object-name>
557 <visible>true</visible>
560 <repeatable>false</repeatable>
562 <command>nasal</command>
563 <script>absu.absu_az2()</script>
569 <object-name>gliss</object-name>
570 <visible>true</visible>
573 <repeatable>false</repeatable>
575 <command>nasal</command>
576 <script>absu.absu_glideslope()</script>
583 <object-name>zahod</object-name>
584 <visible>true</visible>
587 <repeatable>false</repeatable>
589 <command>nasal</command>
590 <script>absu.absu_approach()</script>
597 <object-name>m</object-name>
598 <visible>true</visible>
601 <repeatable>false</repeatable>
603 <command>nasal</command>
604 <script>absu.absu_m()</script>
611 <object-name>v</object-name>
612 <visible>true</visible>
615 <repeatable>false</repeatable>
617 <command>nasal</command>
618 <script>absu.absu_v()</script>
625 <object-name>h</object-name>
626 <visible>true</visible>
629 <repeatable>false</repeatable>
631 <command>nasal</command>
632 <script>absu.absu_h()</script>
638 <object-name>stab</object-name>
639 <visible>true</visible>
642 <repeatable>false</repeatable>
644 <command>nasal</command>
645 <script>absu.absu_stab_on()</script>
654 <object-name>cover_1</object-name>
655 <visible>true</visible>
658 <repeatable>false</repeatable>
660 <command>nasal</command>
662 if( getprop("tu154/switches/pu-46-cover-1") == 0.0 ){
663 interpolate("tu154/switches/pu-46-cover-1", 1.0, 0.1 );}
665 interpolate("tu154/switches/pu-46-cover-1", 0.0, 0.1 );
666 interpolate("tu154/switches/pu-46-boltanka", 0.0, 0.1 );
667 setprop("fdm/jsbsim/ap/turbulence", 0.0 );
675 <object-name>cover_2</object-name>
676 <visible>true</visible>
679 <repeatable>false</repeatable>
681 <command>nasal</command>
683 if( getprop("tu154/switches/pu-46-cover-2") == 0.0 ){
684 interpolate("tu154/switches/pu-46-cover-2", 1.0, 0.1 );}
685 else {interpolate("tu154/switches/pu-46-cover-2", 0.0, 0.1 );}
695 <object-name>hs_1</object-name>
696 <visible>false</visible>
699 <repeatable>false</repeatable>
701 <command>nasal</command>
703 interpolate("tu154/switches/pu-46-boltanka", 1.0, 0.1 );
704 setprop("fdm/jsbsim/ap/turbulence", 1.0 );
711 <object-name>hs_2</object-name>
712 <visible>false</visible>
715 <repeatable>false</repeatable>
717 <command>nasal</command>
719 interpolate("tu154/switches/pu-46-boltanka", 0.0, 0.1 );
720 setprop("fdm/jsbsim/ap/turbulence", 0.0 );
727 <object-name>hs_3</object-name>
728 <visible>false</visible>
731 <repeatable>false</repeatable>
733 <command>nasal</command>
735 interpolate("tu154/switches/pu-46-kren", 1.0, 0.1 );
736 absu.absu_stab_kren(1);
743 <object-name>hs_4</object-name>
744 <visible>false</visible>
747 <repeatable>false</repeatable>
749 <command>nasal</command>
751 interpolate("tu154/switches/pu-46-kren", 0.0, 0.1 );
752 absu.absu_stab_kren(0);
760 <object-name>hs_5</object-name>
761 <visible>false</visible>
764 <repeatable>false</repeatable>
766 <command>nasal</command>
768 interpolate("tu154/switches/pu-46-tang", 1.0, 0.1 );
769 absu.absu_stab_tang(1);
776 <object-name>hs_6</object-name>
777 <visible>false</visible>
780 <repeatable>false</repeatable>
782 <command>nasal</command>
784 interpolate("tu154/switches/pu-46-tang", 0.0, 0.1 );
785 absu.absu_stab_tang(0);
793 <object-name>hs_7</object-name>
794 <visible>false</visible>
797 <repeatable>false</repeatable>
799 <command>nasal</command>
801 interpolate("tu154/switches/pn-5-navigac", 1.0, 0.1 );
808 <object-name>hs_8</object-name>
809 <visible>false</visible>
812 <repeatable>false</repeatable>
814 <command>nasal</command>
816 interpolate("tu154/switches/pn-5-navigac", 0.0, 0.1 );
824 <object-name>hs_9</object-name>
825 <visible>false</visible>
828 <repeatable>false</repeatable>
830 <command>nasal</command>
832 interpolate("tu154/switches/pn-5-posadk", 1.0, 0.1 );
839 <object-name>hs_10</object-name>
840 <visible>false</visible>
843 <repeatable>false</repeatable>
845 <command>nasal</command>
847 interpolate("tu154/switches/pn-5-posadk", 0.0, 0.1 );
855 <object-name>hs_11</object-name>
856 <visible>false</visible>
859 <repeatable>false</repeatable>
861 <command>nasal</command>
863 interpolate("tu154/switches/pn-5-strelki", 1.0, 0.1 );
867 <command>property-assign</command>
868 <property>fdm/jsbsim/ap/ena-needles</property>
875 <object-name>hs_12</object-name>
876 <visible>false</visible>
879 <repeatable>false</repeatable>
881 <command>nasal</command>
883 interpolate("tu154/switches/pn-5-strelki", 0.0, 0.1 );
887 <command>property-assign</command>
888 <property>fdm/jsbsim/ap/ena-needles</property>
897 <object-name>pnp_selector</object-name>
898 <visible>true</visible>
901 <repeatable>false</repeatable>
903 <command>nasal</command>
905 if( getprop("tu154/switches/pn-5-pnp-selector" ) == 1.0 ){
906 interpolate("tu154/switches/pn-5-pnp-selector", 0.0, 0.1 );
907 setprop("fdm/jsbsim/instrumentation/pnp-selector", 0.0);
910 interpolate("tu154/switches/pn-5-pnp-selector", 1.0, 0.1 );
911 setprop("fdm/jsbsim/instrumentation/pnp-selector", 1.0);
919 <!--+++++++++++++++++ pitch ++++++++++++++++++-->
921 <!--Modified by Yurik dec 2013 for new AP code-->
924 <object-name>pitch_wheel</object-name>
925 <visible>true</visible>
929 <command>property-assign</command>
930 <property>fdm/jsbsim/ap/stab-input-pitch-rad</property>
934 <command>property-assign</command>
935 <property>tu154/switches/pu-46-pitch-wheel</property>
939 <command>nasal</command>
940 <script>absu.absu_drop_mvh()</script>
949 <object-name>pitch_wheel</object-name>
950 <visible>true</visible>
953 <repeatable>false</repeatable>
955 <command>property-adjust</command>
956 <property>tu154/switches/pu-46-pitch-wheel</property>
961 <command>property-adjust</command>
962 <property>fdm/jsbsim/ap/stab-input-pitch-rad</property>
967 <command>nasal</command>
968 <script>absu.absu_drop_mvh()</script>
974 <object-name>pitch_wheel</object-name>
975 <visible>true</visible>
978 <repeatable>false</repeatable>
980 <command>property-adjust</command>
981 <property>tu154/switches/pu-46-pitch-wheel</property>
986 <command>property-adjust</command>
987 <property>fdm/jsbsim/ap/stab-input-pitch-rad</property>
992 <command>nasal</command>
993 <script>absu.absu_drop_mvh()</script>
998 <!--+++++++++++++++++heading++++++++++++++++++-->
1001 <object-name>hs_14</object-name>
1002 <visible>false</visible>
1005 <repeatable>true</repeatable>
1006 <interval-sec>0.15</interval-sec>
1008 <command>property-adjust</command>
1009 <property>tu154/switches/pu-46-heading-wheel</property>
1016 <command>property-adjust</command>
1017 <property>fdm/jsbsim/ap/stab-input-roll-rad</property>
1022 <command>nasal</command>
1023 <script>absu.absu_reset()</script>
1029 <object-name>hs_13</object-name>
1030 <visible>false</visible>
1033 <repeatable>true</repeatable>
1034 <interval-sec>0.15</interval-sec>
1036 <command>property-adjust</command>
1037 <property>tu154/switches/pu-46-heading-wheel</property>
1044 <command>property-adjust</command>
1045 <property>fdm/jsbsim/ap/stab-input-roll-rad</property>
1046 <step>-0.0056</step>
1050 <command>nasal</command>
1051 <script>absu.absu_reset()</script>
1058 <object-name>kurs_handle</object-name>
1059 <visible>true</visible>
1062 <repeatable>false</repeatable>
1064 <command>property-assign</command>
1065 <property>tu154/switches/pu-46-heading-wheel</property>
1069 <command>property-assign</command>
1070 <property>fdm/jsbsim/ap/stab-input-roll-rad</property>
1074 <command>nasal</command>
1075 <script>absu.absu_reset()</script>
1082 <object-name>kurs_handle</object-name>
1083 <visible>true</visible>
1086 <repeatable>false</repeatable>
1088 <command>property-adjust</command>
1089 <property>tu154/switches/pu-46-heading-wheel</property>
1096 <command>property-adjust</command>
1097 <property>fdm/jsbsim/ap/stab-input-roll-rad</property>
1102 <command>nasal</command>
1103 <script>absu.absu_reset()</script>
1110 <object-name>kurs_handle</object-name>
1111 <visible>true</visible>
1114 <repeatable>false</repeatable>
1116 <command>property-adjust</command>
1117 <property>tu154/switches/pu-46-heading-wheel</property>
1124 <command>property-adjust</command>
1125 <property>fdm/jsbsim/ap/stab-input-roll-rad</property>
1130 <command>nasal</command>
1131 <script>absu.absu_reset()</script>