747-400: Convert reverse thrust system to JSBSim; apply thrust automatically.
[fg:toms-fgdata.git] / Aircraft / 747-400 / Systems / engines.xml
1 <?xml version="1.0"?>
2
3 <!-- # ENGINES system for BOEING 747-400 #
4      # by Gijs de Rooy                   # -->
5
6 <system name="propulsion-system">
7
8     <channel name="propulsion">
9         
10         <switch>
11             <default value="0"/>
12             <test  logic="AND" value="1">
13                 /controls/engines/engine[0]/reverser == 1
14                 /gear/gear[1]/wow == 1
15                 /controls/engines/engine[0]/throttle lt 0.1
16             </test>
17             <output>propulsion/engine[0]/reversed</output>
18         </switch>
19         <switch>
20             <default value="0"/>
21             <test  logic="AND" value="1">
22                 /controls/engines/engine[1]/reverser == 1
23                 /gear/gear[1]/wow == 1
24                 /controls/engines/engine[1]/throttle lt 0.1
25             </test>
26             <output>propulsion/engine[1]/reversed</output>
27         </switch>
28         <switch>
29             <default value="0"/>
30             <test  logic="AND" value="1">
31                 /controls/engines/engine[2]/reverser == 1
32                 /gear/gear[1]/wow == 1
33                 /controls/engines/engine[2]/throttle lt 0.1
34             </test>
35             <output>propulsion/engine[2]/reversed</output>
36         </switch>
37         <switch>
38             <default value="0"/>
39             <test  logic="AND" value="1">
40                 /controls/engines/engine[3]/reverser == 1
41                 /gear/gear[1]/wow == 1
42                 /controls/engines/engine[3]/throttle lt 0.1
43             </test>
44             <output>propulsion/engine[3]/reversed</output>
45         </switch>
46         
47         <switch>
48             <default value="/controls/engines/engine[0]/throttle"/>
49             <test  logic="AND" value="0">
50                 propulsion/engine[0]/reversed == 1
51             </test>
52             <output>/controls/engines/engine[0]/throttle</output>
53         </switch>
54         <switch>
55             <default value="/controls/engines/engine[1]/throttle"/>
56             <test  logic="AND" value="0">
57                 propulsion/engine[1]/reversed == 1
58             </test>
59             <output>/controls/engines/engine[1]/throttle</output>
60         </switch>
61         <switch>
62             <default value="/controls/engines/engine[2]/throttle"/>
63             <test  logic="AND" value="0">
64                 propulsion/engine[2]/reversed == 1
65             </test>
66             <output>/controls/engines/engine[2]/throttle</output>
67         </switch>
68         <switch>
69             <default value="/controls/engines/engine[3]/throttle"/>
70             <test  logic="AND" value="0">
71                 propulsion/engine[3]/reversed == 1
72             </test>
73             <output>/controls/engines/engine[3]/throttle</output>
74         </switch>
75         
76         <!-- full throttle when in reverse -->
77         <switch>
78             <default value="fcs/throttle-cmd-norm[0]"/>
79             <test  logic="AND" value="1">
80                 propulsion/engine[0]/reversed == 1
81             </test>
82             <output>fcs/throttle-cmd-norm[0]</output>
83             <output>fcs/throttle-pos-norm[0]</output>
84         </switch>
85         <switch>
86             <default value="fcs/throttle-cmd-norm[1]"/>
87             <test  logic="AND" value="1">
88                 propulsion/engine[1]/reversed == 1
89             </test>
90             <output>fcs/throttle-cmd-norm[1]</output>
91             <output>fcs/throttle-pos-norm[1]</output>
92         </switch>
93         <switch>
94             <default value="fcs/throttle-cmd-norm[2]"/>
95             <test  logic="AND" value="1">
96                 propulsion/engine[2]/reversed == 1
97             </test>
98             <output>fcs/throttle-cmd-norm[2]</output>
99             <output>fcs/throttle-pos-norm[2]</output>
100         </switch>
101         <switch>
102             <default value="fcs/throttle-cmd-norm[3]"/>
103             <test  logic="AND" value="1">
104                 propulsion/engine[3]/reversed == 1
105             </test>
106             <output>fcs/throttle-cmd-norm[3]</output>
107             <output>fcs/throttle-pos-norm[3]</output>
108         </switch>
109         
110         <!-- reverse force -->
111         
112         <switch>
113             <default value="0"/>
114             <test  logic="AND" value="3.14159265">
115                 propulsion/engine[0]/reversed == 1
116             </test>
117             <output>propulsion/engine[0]/reverser-angle-rad</output>
118         </switch>
119         <switch>
120             <default value="0"/>
121             <test  logic="AND" value="3.14159265">
122                 propulsion/engine[1]/reversed == 1
123             </test>
124             <output>propulsion/engine[1]/reverser-angle-rad</output>
125         </switch>
126         <switch>
127             <default value="0"/>
128             <test  logic="AND" value="3.14159265">
129                 propulsion/engine[2]/reversed == 1
130             </test>
131             <output>propulsion/engine[2]/reverser-angle-rad</output>
132         </switch>
133         <switch>
134             <default value="0"/>
135             <test  logic="AND" value="3.14159265">
136                 propulsion/engine[3]/reversed == 1
137             </test>
138             <output>propulsion/engine[3]/reverser-angle-rad</output>
139         </switch>
140         
141         <!-- animations -->
142         
143         <kinematic>
144             <input>propulsion/engine[0]/reversed</input>
145             <traverse>
146                 <setting>
147                     <position>0.0</position>
148                     <time>0.0</time>
149                 </setting>
150                 <setting>
151                     <position>1.0</position>
152                     <time>1.4</time>
153                 </setting>
154             </traverse>
155             <output>/engines/engine[0]/reverser-pos-norm</output>
156         </kinematic>
157         <kinematic>
158             <input>propulsion/engine[1]/reversed</input>
159             <traverse>
160                 <setting>
161                     <position>0.0</position>
162                     <time>0.0</time>
163                 </setting>
164                 <setting>
165                     <position>1.0</position>
166                     <time>1.4</time>
167                 </setting>
168             </traverse>
169             <output>/engines/engine[1]/reverser-pos-norm</output>
170         </kinematic>
171         <kinematic>
172             <input>propulsion/engine[2]/reversed</input>
173             <traverse>
174                 <setting>
175                     <position>0.0</position>
176                     <time>0.0</time>
177                 </setting>
178                 <setting>
179                     <position>1.0</position>
180                     <time>1.4</time>
181                 </setting>
182             </traverse>
183             <output>/engines/engine[2]/reverser-pos-norm</output>
184         </kinematic>
185         <kinematic>
186             <input>propulsion/engine[3]/reversed</input>
187             <traverse>
188                 <setting>
189                     <position>0.0</position>
190                     <time>0.0</time>
191                 </setting>
192                 <setting>
193                     <position>1.0</position>
194                     <time>1.4</time>
195                 </setting>
196             </traverse>
197             <output>/engines/engine[3]/reverser-pos-norm</output>
198         </kinematic>
199
200     </channel>
201
202 </system>