Debian Codegraph @

Aircraft/Instruments-3d/FG1000/GFC700-lateral-FSM.xml

raw symbols SCIP
1 <?xml version="1.0" ?>
2 <PropertyList>
3
4 <!-- GFC 700 Autopilot Finite State Machine for LATERAL mode-->
5 <branch>/autopilot/GFC700/FSM/lateral</branch>
6
7 <state>
8 <name>OFF</name>
9 <enter>
10 <command>property-assign</command>
11 <property>/autopilot/locks/heading</property>
12 <value></value>
13 </enter>
14 <enter>
15 <command>property-assign</command>
16 <property>/autopilot/annunciator/lateral-mode</property>
17 <value></value>
18 </enter>
19 <enter>
20 <command>property-assign</command>
21 <property>/autopilot/annunciator/lateral-mode-armed</property>
22 <value></value>
23 </enter>
24 <enter>
25 <!-- Reset button to avoid triggering next transition immediately -->
26 <command>property-assign</command>
27 <property>/autopilot/lateral-mode-button</property>
28 <value></value>
29 </enter>
30 </state>
31
32 <state>
33 <!-- Roll mode. Either set wings level (if roll < 6.0), or set to current roll -->
34 <name>ROL</name>
35 <enter>
36 <command>property-assign</command>
37 <property>/autopilot/annunciator/lateral-mode</property>
38 <value>ROL</value>
39 </enter>
40 <enter>
41 <!-- Reset button to avoid triggering next transition immediately -->
42 <command>property-assign</command>
43 <property>/autopilot/lateral-mode-button</property>
44 <value></value>
45 </enter>
46 </state>
47
48 <transition>
49 <!-- Go to wings level mode if roll [-6.0,6.0] -->
50 <name>ROL-ROL-WL</name>
51 <source>ROL</source>
52 <target>ROL-WL</target>
53 <condition>
54 <less-than>
55 <property>/autopilot/internal/filtered-roll-deg</property>
56 <value>6.0</value>
57 </less-than>
58 <greater-than>
59 <property>/autopilot/internal/filtered-roll-deg</property>
60 <value>-6.0</value>
61 </greater-than>
62 </condition>
63 </transition>
64
65 <transition>
66 <!-- Otherwise, just got to ROLL with the set roll value -->
67 <name>ROL-ROL-SET</name>
68 <source>ROL</source>
69 <target>ROL-SET</target>
70 <condition>
71 <or>
72 <greater-than>
73 <property>/autopilot/internal/filtered-roll-deg</property>
74 <value>6.0</value>
75 </greater-than>
76 <less-than>
77 <property>/autopilot/internal/filtered-roll-deg</property>
78 <value>-6.0</value>
79 </less-than>
80 </or>
81 </condition>
82 </transition>
83
84 <state>
85 <name>ROL-SET</name>
86 <!-- Roll hold mode. We assign a filtered value, which limits to to [-22.0, 20.0] -->
87 <enter>
88 <command>property-assign</command>
89 <property n="0">/autopilot/settings/target-roll-deg</property>
90 <property n="1">/autopilot/internal/filtered-roll-deg</property>
91 </enter>
92 <enter>
93 <command>property-assign</command>
94 <property>/autopilot/locks/heading</property>
95 <value>roll-hold</value>
96 </enter>
97 </state>
98
99 <state>
100 <name>ROL-WL</name>
101 <!-- Roll hold mode - wings level. Used if the roll value when enabled is [-6,6]-->
102 <enter>
103 <command>property-assign</command>
104 <property>/autopilot/settings/target-roll-deg</property>
105 <value>0.0</value>
106 </enter>
107 <enter>
108 <command>property-assign</command>
109 <property>/autopilot/locks/heading</property>
110 <value>roll-hold</value>
111 </enter>
112 </state>
113
114 <state>
115 <name>GA</name>
116 <!-- GA mode - Wings level -->
117 <enter>
118 <command>property-assign</command>
119 <property n="0">/autopilot/settings/target-roll-deg</property>
120 <value>0.0</value>
121 </enter>
122 <enter>
123 <command>property-assign</command>
124 <property>/autopilot/locks/heading</property>
125 <value>roll-hold</value>
126 </enter>
127 <enter>
128 <command>property-assign</command>
129 <property>/autopilot/annunciator/lateral-mode</property>
130 <value>GA</value>
131 </enter>
132 <enter>
133 <!-- Reset button to avoid triggering next transition immediately -->
134 <command>property-assign</command>
135 <property>/autopilot/lateral-mode-button</property>
136 <value></value>
137 </enter>
138 </state>
139
140 <state>
141 <name>HDG</name>
142 <enter>
143 <command>property-assign</command>
144 <property>/autopilot/locks/heading</property>
145 <value>dg-heading-hold</value>
146 </enter>
147 <enter>
148 <command>property-assign</command>
149 <property>/autopilot/annunciator/lateral-mode</property>
150 <value>HDG</value>
151 </enter>
152 <enter>
153 <!-- Reset button to avoid triggering next transition immediately -->
154 <command>property-assign</command>
155 <property>/autopilot/lateral-mode-button</property>
156 <value></value>
157 </enter>
158 </state>
159
160 <!-- Common state for NAV from which the NAV source is used to transition to GPS, NAV1 or NAV2 autopilots -->
161 <state>
162 <name>NAV-SRC</name>
163 <enter>
164 <!-- Reset button to avoid triggering next transition immediately -->
165 <command>property-assign</command>
166 <property>/autopilot/lateral-mode-button</property>
167 <value></value>
168 </enter>
169 </state>
170
171 <transition>
172 <name>NAV-GPS</name>
173 <source>NAV-SRC</source>
174 <target>GPS-ARM</target>
175 <condition>
176 <equals>
177 <property>/autopilot/settings/nav-mode-source</property>
178 <value>GPS</value>
179 </equals>
180 </condition>
181 </transition>
182
183 <transition>
184 <name>NAV-LOC</name>
185 <source>NAV-SRC</source>
186 <target>LOC-ARM</target>
187 <condition>
188 <or>
189 <and>
190 <equals>
191 <property>/autopilot/settings/nav-mode-source</property>
192 <value>NAV1</value>
193 </equals>
194 <equals>
195 <property>/instrumentation/nav[0]/nav-loc</property>
196 <value>true</value>
197 </equals>
198 </and>
199 <and>
200 <equals>
201 <property>/autopilot/settings/nav-mode-source</property>
202 <value>NAV2</value>
203 </equals>
204 <equals>
205 <property>/instrumentation/nav[1]/nav-loc</property>
206 <value>true</value>
207 </equals>
208 </and>
209 </or>
210 </condition>
211 </transition>
212
213 <transition>
214 <name>NAV-VOR</name>
215 <source>NAV-SRC</source>
216 <target>VOR-ARM</target>
217 <condition>
218 <or>
219 <and>
220 <equals>
221 <property>/autopilot/settings/nav-mode-source</property>
222 <value>NAV1</value>
223 </equals>
224 <equals>
225 <property>/instrumentation/nav[0]/nav-loc</property>
226 <value>false</value>
227 </equals>
228 </and>
229 <and>
230 <equals>
231 <property>/autopilot/settings/nav-mode-source</property>
232 <value>NAV1</value>
233 </equals>
234 <equals>
235 <property>/instrumentation/nav[1]/nav-loc</property>
236 <value>false</value>
237 </equals>
238 </and>
239 </or>
240 </condition>
241 </transition>
242
243 <state>
244 <name>GPS-ARM</name>
245 <!-- GPS isn't referenced directly. Instead we slave it to Nav1 and use the Nav1 autopilot -->
246 <enter>
247 <command>property-assign</command>
248 <property>/autopilot/annunciator/lateral-mode-armed</property>
249 <value>GPS</value>
250 </enter>
251 </state>
252
253 <transition>
254 <name>GPS-ARM - GPS</name>
255 <source>GPS-ARM</source>
256 <target>GPS</target>
257 <condition>
258 <equals>
259 <property>/autopilot/internal/nav-capture</property>
260 <value>1</value>
261 </equals>
262 </condition>
263 </transition>
264
265 <state>
266 <name>LOC-ARM</name>
267 <enter>
268 <command>property-assign</command>
269 <property>/instrumentation/nav[0]/slaved-to-gps</property>
270 <value>0</value>
271 </enter>
272 <enter>
273 <command>property-assign</command>
274 <property>/autopilot/annunciator/lateral-mode-armed</property>
275 <value>LOC</value>
276 </enter>
277 </state>
278
279 <transition>
280 <name>LOC-ARM - LOC</name>
281 <source>LOC-ARM</source>
282 <target>LOC</target>
283 <condition>
284 <equals>
285 <property>/autopilot/internal/nav-capture</property>
286 <value>1</value>
287 </equals>
288 </condition>
289 </transition>
290
291 <state>
292 <name>VOR-ARM</name>
293 <enter>
294 <command>property-assign</command>
295 <property>/instrumentation/nav[0]/slaved-to-gps</property>
296 <value>0</value>
297 </enter>
298 <enter>
299 <command>property-assign</command>
300 <property>/autopilot/annunciator/lateral-mode-armed</property>
301 <value>VOR</value>
302 </enter>
303 </state>
304
305 <transition>
306 <name>VOR-ARM - VOR</name>
307 <source>VOR-ARM</source>
308 <target>VOR</target>
309 <condition>
310 <equals>
311 <property>/autopilot/internal/nav-capture</property>
312 <value>1</value>
313 </equals>
314 </condition>
315 </transition>
316
317 <state>
318 <name>GPS</name>
319 <enter>
320 <command>property-assign</command>
321 <property>/autopilot/annunciator/lateral-mode</property>
322 <value>GPS</value>
323 </enter>
324 <enter>
325 <command>property-assign</command>
326 <property>/autopilot/annunciator/lateral-mode-armed</property>
327 <value></value>
328 </enter>
329 <enter>
330 <command>property-assign</command>
331 <property>/instrumentation/nav[0]/slaved-to-gps</property>
332 <value>1</value>
333 </enter>
334 <enter>
335 <command>property-assign</command>
336 <property>/autopilot/locks/heading</property>
337 <value>nav-hold</value>
338 </enter>
339 </state>
340
341 <state>
342 <name>LOC</name>
343 <enter>
344 <command>property-assign</command>
345 <property>/autopilot/annunciator/lateral-mode</property>
346 <value>LOC</value>
347 </enter>
348 <enter>
349 <command>property-assign</command>
350 <property>/autopilot/annunciator/lateral-mode-armed</property>
351 <value></value>
352 </enter>
353 <enter>
354 <command>property-assign</command>
355 <property>/autopilot/locks/heading</property>
356 <value>nav-hold</value>
357 </enter>
358 </state>
359
360 <state>
361 <name>VOR</name>
362 <enter>
363 <command>property-assign</command>
364 <property>/autopilot/annunciator/lateral-mode</property>
365 <value>VOR</value>
366 </enter>
367 <enter>
368 <command>property-assign</command>
369 <property>/autopilot/annunciator/lateral-mode-armed</property>
370 <value></value>
371 </enter>
372 <enter>
373 <command>property-assign</command>
374 <property>/autopilot/locks/heading</property>
375 <value>nav-hold</value>
376 </enter>
377 </state>
378
379 <!-- From the OFF state, pressing any of FD, AP, CWS, NAV, BC, APR, changes to ROL mode -->
380 <transition>
381 <name>OFF-ROL</name>
382 <source>OFF</source>
383 <target>ROL</target>
384 <exclude-target>true</exclude-target>
385 <condition>
386 <or>
387 <equals><property>/autopilot/lateral-mode-button</property><value>FD</value></equals>
388 <equals><property>/autopilot/lateral-mode-button</property><value>CWS</value></equals>
389 <equals><property>/autopilot/lateral-mode-button</property><value>NAV</value></equals>
390 <equals><property>/autopilot/lateral-mode-button</property><value>BC</value></equals>
391 <equals><property>/autopilot/lateral-mode-button</property><value>APR</value></equals>
392 <equals><property>/autopilot/lateral-mode-button</property><value>HDG</value></equals>
393 </or>
394 </condition>
395 </transition>
396
397 <transition>
398 <name>OFF-HDG</name>
399 <source>OFF</source>
400 <target>HDG</target>
401 <exclude-target>true</exclude-target>
402 <condition>
403 <or>
404 <equals><property>/autopilot/lateral-mode-button</property><value>HDG</value></equals>
405 </or>
406 </condition>
407 </transition>
408
409 <!-- AP/FD logic is somewhat complex:
410 1) Pressing AP toggles the autopilot on/off
411 a) OFF to ON : OFF-AP-ROL transition below
412 b) ON to OFF : Handled by a separate FSM. We could use a series of transitions
413 to the same states below, but that would result in entry bindings being repeated, which would be bad
414 2) When the AP is enabled, the FD button is disabled. (Easy - no transition!)
415 3) Pressing the FD button when the FD is enabled switches off the FD : Switch-off transition below
416 -->
417
418 <!-- From the OFF state, pressing AP changes to ROL mode, with the AP enabled (e.g. not passive mode) -->
419 <transition>
420 <name>OFF-AP-ROL</name>
421 <source>OFF</source>
422 <target>ROL</target>
423 <exclude-target>true</exclude-target>
424 <condition>
425 <equals><property>/autopilot/lateral-mode-button</property><value>AP</value></equals>
426 </condition>
427 <binding>
428 <command>property-assign</command>
429 <property>/autopilot/locks/passive-mode</property>
430 <value>0</value>
431 </binding>
432 </transition>
433
434 <!-- From any state pressing FD when FD is ON switches off the FD -->
435 <transition>
436 <name>FD-Switch-off</name>
437 <target>OFF</target>
438 <exclude-target>true</exclude-target>
439 <condition>
440 <equals><property>/autopilot/lateral-mode-button</property><value>FD</value></equals>
441 <equals><property>/autopilot/locks/passive-mode</property><value>1</value></equals>
442 </condition>
443 </transition>
444
445 <!-- Series of transitions to handle case where disabling the AP. Need to remain in existing state -->
446
447 <!-- From any state, pressing GA goes to GA mode, and returns to ROL mode when pressed again -->
448 <transition>
449 <name>To GA</name>
450 <target>GA</target>
451 <exclude-target>true</exclude-target>
452 <condition>
453 <equals><property>/autopilot/lateral-mode-button</property><value>GA</value></equals>
454 </condition>
455 </transition>
456
457 <transition>
458 <name>From GA</name>
459 <source>GA</source>
460 <target>ROL</target>
461 <exclude-target>true</exclude-target>
462 <condition>
463 <equals><property>/autopilot/lateral-mode-button</property><value>GA</value></equals>
464 </condition>
465 </transition>
466
467 <!-- From any state, pressing HDG goes to HDG mode, and returns to ROL mode when pressed again -->
468 <transition>
469 <name>To HDG</name>
470 <target>HDG</target>
471 <exclude-target>true</exclude-target>
472 <condition>
473 <equals><property>/autopilot/lateral-mode-button</property><value>HDG</value></equals>
474 </condition>
475 </transition>
476
477 <transition>
478 <name>From HDG</name>
479 <source>HDG</source>
480 <target>ROL</target>
481 <exclude-target>true</exclude-target>
482 <condition>
483 <equals><property>/autopilot/lateral-mode-button</property><value>HDG</value></equals>
484 </condition>
485 </transition>
486
487 <!-- From (just about) any state, pressing NAV or APR goes to NAV mode. APR mode should
488 have a slightly different VOR version (VAPP), but is otherwise identical in lateral,
489 if not vertical modes. So we will just overload the states for simplicity. -->
490 <transition>
491 <name>To NAV</name>
492 <target>NAV-SRC</target>
493 <exclude-target>true</exclude-target>
494 <condition>
495 <and>
496 <or>
497 <equals><property>/autopilot/lateral-mode-button</property><value>NAV</value></equals>
498 <equals><property>/autopilot/lateral-mode-button</property><value>APR</value></equals>
499 </or>
500 <not><equals><property>/autopilot/locks/heading</property><value>nav-hold</value></equals></not>
501 </and>
502 </condition>
503 </transition>
504
505 <!-- Only switch off NAV/APR when NAV is pressed, as user may press APR to enable glideslope while already
506 in NAV mode -->
507 <transition>
508 <name>From NAV</name>
509 <source>GPS-ARM</source>
510 <source>VOR-ARM</source>
511 <source>LOC-ARM</source>
512 <source>GPS</source>
513 <source>VOR</source>
514 <source>LOC</source>
515 <target>ROL</target>
516 <exclude-target>true</exclude-target>
517 <condition>
518 <equals><property>/autopilot/lateral-mode-button</property><value>NAV</value></equals>
519 </condition>
520 </transition>
521
522 </PropertyList>