Fix issue #975: Impose bank limit on LOC approach
[fg:toms-fgdata.git] / Aircraft / CitationX / Systems / Citation-autopilot.xml
1 <?xml version="1.0"?>
2 <PropertyList>
3
4 <!-- ======  Lateral Modes  ====== -->
5
6     <pid-controller>
7         <name>ROLL hold</name>
8         <debug>false</debug>
9         <enable>
10             <property>autopilot/locks/heading</property>
11             <value>ROLL</value>
12         </enable>
13         <input>
14             <property>orientation/roll-deg</property>
15         </input>
16         <reference>
17             <property>autopilot/settings/target-roll-deg</property>
18         </reference>
19         <output>
20             <prop>autopilot/internal/roll-filter</prop>
21         </output>
22         <config>
23             <Kp>0.5</Kp>
24             <beta>1.0</beta>
25             <alpha>0.1</alpha>
26             <gamma>0.0</gamma>
27             <Ti>1.0</Ti>
28             <Td>0.00001</Td>
29             <min>-27</min>
30             <max>27</max>
31         </config>
32     </pid-controller>
33
34     <pi-simple-controller>
35         <name>Heading Bug Hold</name>
36         <debug>false</debug>
37         <enable>
38             <condition>
39                 <equals>
40                     <property>autopilot/locks/heading</property>
41                     <value>HDG</value>
42                 </equals>
43             </condition>
44         </enable>
45         <input>
46             <prop>autopilot/internal/heading-bug-error-deg</prop>
47         </input>
48         <reference>
49             <value>0.0</value>
50         </reference>
51         <output>
52             <prop>autopilot/internal/roll-filter</prop>
53         </output>
54         <config>
55             <Kp>-1.5</Kp>
56             <Ki>0.0</Ki>
57             <min>
58                 <property>autopilot/settings/bank-limit</property>
59                 <scale>-1</scale>
60             </min>
61             <max>
62                 <property>autopilot/settings/bank-limit</property>
63             </max>
64         </config>
65     </pi-simple-controller>
66
67     <pid-controller>
68         <name>Nav1</name>
69         <debug>false</debug>
70         <enable>
71             <prop>autopilot/locks/heading</prop>
72             <value>VOR</value>
73         </enable>
74         <input>
75             <prop>autopilot/internal/ap_crs</prop>
76         </input>
77         <reference>
78             <value>0.0</value>
79         </reference>
80         <output>
81             <prop>autopilot/internal/roll-filter</prop>
82         </output>
83         <config>
84             <Kp>-1.5</Kp>
85             <beta>1.0</beta>
86             <alpha>0.1</alpha>
87             <gamma>0.0</gamma>
88             <Ti>10</Ti>
89             <Td>0.0</Td>
90             <min>
91                 <value>-27</value>
92             </min>
93             <max>
94                 <value>27</value>
95             </max>
96         </config>
97     </pid-controller>
98
99     <pi-simple-controller>
100         <name>Loc</name>
101         <debug>false</debug>
102         <enable>
103             <prop>autopilot/locks/heading</prop>
104             <value>LOC</value>
105         </enable>
106         <input>
107             <prop>autopilot/internal/ap_crs</prop>
108         </input>
109         <reference>
110             <value>0.0</value>
111         </reference>
112         <output>
113             <prop>autopilot/internal/roll-filter</prop>
114         </output>
115         <config>
116             <Kp>-1.5</Kp>
117             <Ki>0.0</Ki>
118             <min>
119                 <value>-30</value>
120             </min>
121             <max>
122                 <value>30</value>
123             </max>
124         </config>
125     </pi-simple-controller>
126
127     <pi-simple-controller>
128         <name>Lnav</name>
129         <debug>false</debug>
130         <enable>
131             <prop>autopilot/locks/heading</prop>
132             <value>LNAV</value>
133         </enable>
134         <input>
135             <prop>autopilot/internal/ap_crs</prop>
136         </input>
137         <reference>
138             <value>0.0</value>
139         </reference>
140         <output>
141             <prop>autopilot/internal/roll-filter</prop>
142         </output>
143         <config>
144             <Kp>-2.0</Kp>
145             <Ki>0.0</Ki>
146             <min>-30</min>
147             <max>30</max>
148         </config>
149     </pi-simple-controller>
150
151
152     <filter>
153         <name>roll command</name>
154         <debug>false</debug>
155         <feedback-if-disabled>true</feedback-if-disabled>
156         <initialize-to>output</initialize-to>
157         <enable>
158             <condition>
159                 <property>autopilot/locks/FD-status</property>
160             </condition>
161         </enable>
162         <input>
163             <property>autopilot/internal/roll-filter</property>
164         </input>
165         <output>autopilot/internal/roll-bars</output>
166         <type>noise-spike</type>
167         <max-rate-of-change>7</max-rate-of-change>
168     </filter>
169
170     <pid-controller>
171         <name>Aileron Control</name>
172         <debug>false</debug>
173         <enable>
174             <prop>autopilot/locks/AP-status</prop>
175             <value>AP1</value>
176         </enable>
177         <input>
178             <prop>/orientation/roll-deg</prop>
179         </input>
180         <reference>
181             <prop>autopilot/internal/roll-bars</prop>
182         </reference>
183         <output>
184             <prop>/controls/flight/aileron</prop>
185         </output>
186         <config>
187             <Kp>0.15</Kp>
188             <beta>1.0</beta>
189             <alpha>0.1</alpha>
190             <gamma>0.0</gamma>
191             <Ti>10.0</Ti>
192             <Td>0.00001</Td>
193             <min>-1</min>
194             <max>1</max>
195         </config>
196     </pid-controller>
197
198
199 <!-- ======= Vertical Modes ======= -->
200
201     <filter>
202         <name>pitch control</name>
203         <debug>false</debug>
204         <feedback-if-disabled>true</feedback-if-disabled>
205         <initialize-to>output</initialize-to>
206         <enable>
207             <condition>
208                 <equals>
209                     <property>autopilot/locks/altitude</property>
210                     <value>PTCH</value>
211                 </equals>
212             </condition>
213         </enable>
214         <input>
215             <property>autopilot/settings/target-pitch-deg</property>
216         </input>
217         <output>autopilot/internal/pitch-filter</output>
218         <type>noise-spike</type>
219         <max-rate-of-change>10.0</max-rate-of-change>
220     </filter>
221
222     <pi-simple-controller>
223         <name>Altitude Hold 1</name>
224         <debug>false</debug>
225         <enable>
226             <prop>/autopilot/locks/altitude</prop>
227             <value>ALT</value>
228         </enable>
229         <input>
230             <prop>instrumentation/altimeter/indicated-altitude-ft</prop>
231         </input>
232         <reference>
233             <prop>/autopilot/settings/asel</prop>
234             <scale>100</scale>
235         </reference>
236         <output>
237             <prop>/autopilot/internal/target-climb-rate-fps</prop>
238         </output>
239         <config>
240             <Kp>0.5</Kp>
241             <Ki>0.0</Ki>
242             <min>-15.0</min>
243             <max>66.0</max>
244         </config>
245     </pi-simple-controller>
246
247     <pid-controller>
248         <name>Altitude 2</name>
249         <debug>false</debug>
250         <enable>
251             <prop>/autopilot/locks/altitude</prop>
252             <value>ALT</value>
253         </enable>
254         <input>
255             <prop>velocities/vertical-speed-fps</prop>
256         </input>
257         <reference>
258             <prop>autopilot/internal/target-climb-rate-fps</prop>
259         </reference>
260         <output>
261             <prop>/autopilot/internal/pitch-filter</prop>
262         </output>
263         <config>
264             <Kp>0.20</Kp>
265             <beta>1.0</beta>
266             <alpha>0.1</alpha>
267             <gamma>0.0</gamma>
268             <Ti>10.0</Ti>
269             <Td>0.00001</Td>
270             <min>-5</min>
271             <max>5</max>
272         </config>
273     </pid-controller>
274
275     <pi-simple-controller>
276         <name>GS</name>
277         <debug>false</debug>
278         <enable>
279             <condition>
280                 <equals>
281                     <property>/autopilot/locks/altitude</property>
282                     <value>GS</value>
283                 </equals>
284             </condition>
285         </enable>
286         <input>
287             <prop>velocities/vertical-speed-fps</prop>
288         </input>
289         <reference>
290             <prop>autopilot/internal/gs-rate-fps</prop>
291         </reference>
292         <output>
293             <prop>autopilot/internal/pitch-filter</prop>
294         </output>
295         <config>
296             <Kp>0.5</Kp>
297             <Ki>0.0</Ki>
298             <min>-30.0</min>
299             <max>15.0</max>
300         </config>
301     </pi-simple-controller>
302
303     <pid-controller>
304         <name>Vertical Speed Hold</name>
305         <debug>false</debug>
306         <enable>
307             <prop>/autopilot/locks/altitude</prop>
308             <value>VS</value>
309         </enable>
310         <input>
311             <prop>/autopilot/internal/vert-speed-fpm</prop>
312         </input>
313         <reference>
314             <prop>/autopilot/settings/vertical-speed-fpm</prop>
315         </reference>
316         <output>
317             <prop>autopilot/internal/pitch-filter</prop>
318         </output>
319         <config>
320             <Kp>0.015</Kp>
321             <beta>1.0</beta>
322             <alpha>0.1</alpha>
323             <gamma>0.0</gamma>
324             <Ti>10.0</Ti>
325             <Td>0.1</Td>
326             <min>-5</min>
327             <max>20</max>
328         </config>
329     </pid-controller>
330
331     <pid-controller>
332         <name>Vnav Hold 1</name>
333         <debug>false</debug>
334         <enable>
335             <prop>/autopilot/locks/altitude</prop>
336             <value>VALT</value>
337         </enable>
338         <input>
339             <prop>instrumentation/altimeter/indicated-altitude-ft</prop>
340         </input>
341         <reference>
342             <prop>instrumentation/gps/wp/wp[1]/altitude-ft</prop>
343         </reference>
344         <output>
345             <prop>/autopilot/internal/target-climb-rate-fps</prop>
346         </output>
347         <config>
348             <Kp>0.25</Kp>
349             <beta>1.0</beta>
350             <alpha>0.1</alpha>
351             <gamma>0.0</gamma>
352             <Ti>10.0</Ti>
353             <Td>0.000001</Td>
354             <min>-30</min>
355             <max>66</max>
356         </config>
357     </pid-controller>
358
359     <pi-simple-controller>
360         <name>Vnav 2</name>
361         <debug>false</debug>
362         <enable>
363             <prop>/autopilot/locks/altitude</prop>
364             <value>VALT</value>
365         </enable>
366         <input>
367             <prop>velocities/vertical-speed-fps</prop>
368         </input>
369         <reference>
370             <prop>autopilot/internal/target-climb-rate-fps</prop>
371         </reference>
372         <output>
373             <prop>autopilot/internal/pitch-filter</prop>
374         </output>
375         <config>
376             <Kp>0.15</Kp>
377             <Ki>0.0</Ki>
378             <min>-20</min>
379             <max>20</max>
380         </config>
381     </pi-simple-controller>
382
383     <pi-simple-controller>
384         <name>flc</name>
385         <debug>false</debug>
386         <enable>
387             <condition>
388                 <or>
389                     <equals>
390                         <property>/autopilot/locks/altitude</property>
391                         <value>FLC</value>
392                     </equals>
393                     <equals>
394                         <property>/autopilot/locks/altitude</property>
395                         <value>VFLC</value>
396                     </equals>
397                 </or>
398             </condition>
399         </enable>
400         <input>
401             <prop>instrumentation/airspeed-indicator/indicated-speed-kt</prop>
402         </input>
403         <reference>
404             <prop>autopilot/settings/target-speed-kt</prop>
405         </reference>
406         <output>
407             <prop>autopilot/internal/pitch-filter</prop>
408         </output>
409         <config>
410             <Kp>-0.5</Kp>
411             <Ki>0.0</Ki>
412             <min>-15</min>
413             <max>15</max>
414         </config>
415     </pi-simple-controller>
416
417     <filter>
418         <name>pitch command</name>
419         <debug>false</debug>
420         <feedback-if-disabled>true</feedback-if-disabled>
421         <initialize-to>output</initialize-to>
422         <enable>
423             <condition>
424                 <property>autopilot/locks/FD-status</property>
425             </condition>
426         </enable>
427         <input>
428             <property>autopilot/internal/pitch-filter</property>
429         </input>
430         <output>autopilot/internal/pitch-bars</output>
431         <type>noise-spike</type>
432         <max-rate-of-change>5.0</max-rate-of-change>
433     </filter>
434
435     <pid-controller>
436         <name>Elevator Trim Control</name>
437         <debug>false</debug>
438         <enable>
439             <prop>autopilot/locks/AP-status</prop>
440             <value>AP1</value>
441         </enable>
442         <input>
443             <prop>orientation/pitch-deg</prop>
444         </input>
445         <reference>
446             <prop>autopilot/internal/pitch-bars</prop>
447         </reference>
448         <output>
449             <prop>controls/flight/elevator-trim</prop>
450         </output>
451         <config>
452             <Kp>-0.015</Kp>
453             <beta>1.0</beta>
454             <alpha>0.1</alpha>
455             <gamma>0.0</gamma>
456             <Ti>10.0</Ti>
457             <Td>0.01</Td>
458             <min>-1</min>
459             <max>1</max>
460         </config>
461     </pid-controller>
462
463
464 <!-- Internal Tests  -->
465
466
467     <filter>
468         <name>nav1 heading deflection</name>
469         <debug>false</debug>
470         <feedback-if-disabled>true</feedback-if-disabled>
471         <initialize-to>output</initialize-to>
472         <enable>
473             <condition>
474                 <equals>
475                     <property>autopilot/settings/nav-source</property>
476                     <value>NAV1</value>
477                 </equals>
478             </condition>
479         </enable>
480         <input>
481             <property>instrumentation/nav/heading-needle-deflection</property>
482             <scale>4.5</scale>
483         </input>
484         <output>autopilot/internal/cdi</output>
485         <type>noise-spike</type>
486         <max-rate-of-change>10</max-rate-of-change>
487     </filter>
488
489     <filter>
490         <name>nav1 gs deflection</name>
491         <debug>false</debug>
492         <feedback-if-disabled>true</feedback-if-disabled>
493         <initialize-to>output</initialize-to>
494         <enable>
495             <condition>
496                 <equals>
497                     <property>autopilot/settings/nav-source</property>
498                     <value>NAV1</value>
499                 </equals>
500             </condition>
501         </enable>
502         <input>
503             <property>instrumentation/nav/gs-needle-deflection-norm</property>
504         </input>
505         <output>autopilot/internal/gs-deflection</output>
506         <type>noise-spike</type>
507         <max-rate-of-change>1</max-rate-of-change>
508     </filter>
509
510     <filter>
511         <name>nav1 gs drate</name>
512         <debug>false</debug>
513         <feedback-if-disabled>true</feedback-if-disabled>
514         <initialize-to>output</initialize-to>
515         <enable>
516             <condition>
517                 <equals>
518                     <property>autopilot/settings/nav-source</property>
519                     <value>NAV1</value>
520                 </equals>
521             </condition>
522         </enable>
523         <input>
524             <property>instrumentation/nav/gs-rate-of-climb</property>
525         </input>
526         <output>autopilot/internal/gs-rate-fps</output>
527         <type>noise-spike</type>
528         <max-rate-of-change>10</max-rate-of-change>
529     </filter>
530
531     <filter>
532         <name>nav2 heading deflection</name>
533         <debug>false</debug>
534         <feedback-if-disabled>true</feedback-if-disabled>
535         <initialize-to>output</initialize-to>
536         <enable>
537             <condition>
538                 <equals>
539                     <property>autopilot/settings/nav-source</property>
540                     <value>NAV2</value>
541                 </equals>
542             </condition>
543         </enable>
544         <input>
545             <property>instrumentation/nav[1]/heading-needle-deflection</property>
546             <scale>4.5</scale>
547         </input>
548         <output>autopilot/internal/cdi</output>
549         <type>noise-spike</type>
550         <max-rate-of-change>10</max-rate-of-change>
551     </filter>
552
553     <filter>
554         <name>nav2 gs deflection</name>
555         <debug>false</debug>
556         <feedback-if-disabled>true</feedback-if-disabled>
557         <initialize-to>output</initialize-to>
558         <enable>
559             <condition>
560                 <equals>
561                     <property>autopilot/settings/nav-source</property>
562                     <value>NAV2</value>
563                 </equals>
564             </condition>
565         </enable>
566         <input>
567             <property>instrumentation/nav[1]/gs-needle-deflection-norm</property>
568         </input>
569         <output>autopilot/internal/gs-deflection</output>
570         <type>noise-spike</type>
571         <max-rate-of-change>1</max-rate-of-change>
572     </filter>
573
574     <filter>
575         <name>nav2 gs rate</name>
576         <debug>false</debug>
577         <feedback-if-disabled>true</feedback-if-disabled>
578         <initialize-to>output</initialize-to>
579         <enable>
580             <condition>
581                 <equals>
582                     <property>autopilot/settings/nav-source</property>
583                     <value>NAV2</value>
584                 </equals>
585             </condition>
586         </enable>
587         <input>
588             <property>instrumentation/nav[1]/gs-rate-of-climb</property>
589         </input>
590         <output>autopilot/internal/gs-rate-fps</output>
591         <type>noise-spike</type>
592         <max-rate-of-change>10</max-rate-of-change>
593     </filter>
594
595     <filter>
596         <name>fms heading deflection</name>
597         <debug>false</debug>
598         <feedback-if-disabled>true</feedback-if-disabled>
599         <initialize-to>output</initialize-to>
600         <enable>
601             <condition>
602                 <equals>
603                     <property>autopilot/settings/nav-source</property>
604                     <value>FMS</value>
605                 </equals>
606             </condition>
607         </enable>
608         <input>
609             <property>instrumentation/gps/wp/wp[1]/course-error-nm</property>
610             <scale>9.0</scale>
611         </input>
612         <output>autopilot/internal/cdi</output>
613         <type>noise-spike</type>
614         <max-rate-of-change>10</max-rate-of-change>
615     </filter>
616
617     <filter>
618         <name>fms gs deflection</name>
619         <debug>false</debug>
620         <feedback-if-disabled>true</feedback-if-disabled>
621         <initialize-to>output</initialize-to>
622         <enable>
623             <condition>
624                 <equals>
625                     <property>autopilot/settings/nav-source</property>
626                     <value>FMS</value>
627                 </equals>
628             </condition>
629         </enable>
630         <input>
631             <value>0</value>
632         </input>
633         <output>autopilot/internal/gs-rate-fps</output>
634         <type>noise-spike</type>
635         <max-rate-of-change>1</max-rate-of-change>
636     </filter>
637
638     <filter>
639         <name>vnav alt</name>
640         <debug>false</debug>
641         <feedback-if-disabled>true</feedback-if-disabled>
642         <initialize-to>output</initialize-to>
643         <enable>
644             <condition>
645                 <equals>
646                     <property>autopilot/settings/nav-source</property>
647                     <value>FMS</value>
648                 </equals>
649             </condition>
650         </enable>
651         <input>instrumentation/gps/wp/wp[1]/altitude-ft</input>
652         <output>autopilot/settings/vnav-alt</output>
653         <type>noise-spike</type>
654         <max-rate-of-change>500</max-rate-of-change>
655     </filter>
656
657     <pi-simple-controller>
658         <name>NAV1 bearing </name>
659         <debug>false</debug>
660         <enable>
661             <prop>/instrumentation/primus2000/sc840/nav1ptr</prop>
662             <value>1</value>
663         </enable>
664         <input>
665             <prop>orientation/heading-deg</prop>
666     </input>
667     <reference>
668       <prop>instrumentation/nav/heading-deg</prop>
669     </reference>
670     <output>
671       <prop>/autopilot/internal/nav1-pointer</prop>
672     </output>
673     <config>
674       <Kp>1</Kp>
675       <Ki>0.0</Ki>
676       <min>-360</min>
677       <max>360.0</max>
678     </config>
679   </pi-simple-controller>
680
681     <filter>
682         <name>ADF1 pointer</name>
683         <debug>false</debug>
684         <feedback-if-disabled>false</feedback-if-disabled>
685         <initialize-to>input</initialize-to>
686         <enable>
687             <condition>
688                 <equals>
689                     <property>/instrumentation/primus2000/sc840/nav1ptr</property>
690                     <value>2</value>
691                 </equals>
692             </condition>
693         </enable>
694         <input>instrumentation/adf/indicated-bearing-deg</input>
695         <output>/autopilot/internal/nav1-pointer</output>
696         <type>noise-spike</type>
697         <max-rate-of-change>90</max-rate-of-change>
698     </filter>
699
700     <pi-simple-controller>
701         <name>FMS1 bearing </name>
702         <debug>false</debug>
703         <enable>
704             <prop>/instrumentation/primus2000/sc840/nav1ptr</prop>
705             <value>3</value>
706         </enable>
707         <input>
708             <prop>orientation/heading-magnetic-deg</prop>
709         </input>
710         <reference>
711             <prop>instrumentation/gps/wp/wp[1]/bearing-mag-deg</prop>
712         </reference>
713         <output>
714             <prop>/autopilot/internal/nav1-pointer</prop>
715         </output>
716         <config>
717             <Kp>1</Kp>
718             <Ki>0.01</Ki>
719             <min>-360</min>
720             <max>360.0</max>
721         </config>
722     </pi-simple-controller>
723
724     <pi-simple-controller>
725         <name>NAV2 bearing </name>
726         <debug>false</debug>
727         <enable>
728             <prop>/instrumentation/primus2000/sc840/nav2ptr</prop>
729             <value>1</value>
730         </enable>
731         <input>
732             <prop>orientation/heading-deg</prop>
733     </input>
734     <reference>
735       <prop>instrumentation/nav[1]/heading-deg</prop>
736     </reference>
737     <output>
738       <prop>/autopilot/internal/nav2-pointer</prop>
739     </output>
740     <config>
741       <Kp>1</Kp>
742       <Ki>0.0</Ki>
743       <min>-360</min>
744       <max>360.0</max>
745     </config>
746   </pi-simple-controller>
747
748     <filter>
749         <name>ADF2 pointer</name>
750         <debug>false</debug>
751         <feedback-if-disabled>false</feedback-if-disabled>
752         <initialize-to>input</initialize-to>
753         <enable>
754             <condition>
755                 <equals>
756                     <property>/instrumentation/primus2000/sc840/nav2ptr</property>
757                     <value>2</value>
758                 </equals>
759             </condition>
760         </enable>
761         <input>instrumentation/adf[1]/indicated-bearing-deg</input>
762         <output>/autopilot/internal/nav2-pointer</output>
763         <type>noise-spike</type>
764         <max-rate-of-change>90</max-rate-of-change>
765     </filter>
766
767     <pi-simple-controller>
768         <name>FMS2 bearing </name>
769         <debug>false</debug>
770         <enable>
771             <prop>/instrumentation/primus2000/sc840/nav2ptr</prop>
772             <value>3</value>
773         </enable>
774         <input>
775             <prop>orientation/heading-magnetic-deg</prop>
776         </input>
777         <reference>
778             <prop>instrumentation/gps/wp/wp[1]/bearing-mag-deg</prop>
779         </reference>
780         <output>
781             <prop>/autopilot/internal/nav2-pointer</prop>
782         </output>
783         <config>
784             <Kp>1</Kp>
785             <Ki>0.01</Ki>
786             <min>-360</min>
787             <max>360.0</max>
788         </config>
789     </pi-simple-controller>
790
791 </PropertyList>
792