145-autopilot.xml 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769
  1. <?xml version="1.0"?>
  2. <!-- Generic Autopilot Configuration -->
  3. <!-- Each component is evaluated in the order specified. You can make up -->
  4. <!-- property names to pass the result of one component on to a subsequent -->
  5. <!-- component. -->
  6. <PropertyList>
  7. <!-- =============================================================== -->
  8. <!-- Roll Axis Modes -->
  9. <!-- =============================================================== -->
  10. <!-- Wing leveler -->
  11. <pid-controller>
  12. <name>Wing Leveler (Turn Coordinator based)</name>
  13. <debug>false</debug>
  14. <enable>
  15. <prop>/autopilot/locks/heading</prop>
  16. <value>wing-leveler</value>
  17. </enable>
  18. <input>
  19. <prop>/instrumentation/turn-indicator/indicated-turn-rate</prop>
  20. </input>
  21. <reference>
  22. <value>0.0</value>
  23. </reference>
  24. <output>
  25. <prop>/controls/flight/fcs/roll</prop>
  26. </output>
  27. <config>
  28. <Kp>-1.0</Kp> <!-- proportional gain -->
  29. <beta>1.0</beta> <!-- input value weighing factor -->
  30. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  31. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  32. <!-- unfiltered derivative error -->
  33. <Ti>5.0</Ti> <!-- integrator time -->
  34. <Td>0.00001</Td> <!-- derivator time -->
  35. <u_min>-1.0</u_min> <!-- minimum output clamp -->
  36. <u_max>1.0</u_max> <!-- maximum output clamp -->
  37. </config>
  38. </pid-controller>
  39. <pid-controller>
  40. <name>Wing Leveler (Turn Coordinator based)</name>
  41. <debug>false</debug>
  42. <enable>
  43. <prop>/autopilot/locks/heading</prop>
  44. <value>wing-leveler</value>
  45. </enable>
  46. <input>
  47. <prop>/instrumentation/turn-indicator/indicated-turn-rate</prop>
  48. </input>
  49. <reference>
  50. <value>0.0</value>
  51. </reference>
  52. <output>
  53. <prop>/controls/flight/fcs/yaw</prop>
  54. </output>
  55. <config>
  56. <Kp>-1.0</Kp> <!-- proportional gain -->
  57. <beta>1.0</beta> <!-- input value weighing factor -->
  58. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  59. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  60. <!-- unfiltered derivative error -->
  61. <Ti>5.0</Ti> <!-- integrator time -->
  62. <Td>0.00001</Td> <!-- derivator time -->
  63. <u_min>-1.0</u_min> <!-- minimum output clamp -->
  64. <u_max>1.0</u_max> <!-- maximum output clamp -->
  65. </config>
  66. </pid-controller>
  67. <!-- Heading Bug Hold. 2 stage cascade controller. -->
  68. <!-- Stage #1 sets target roll based on diff between current heading -->
  69. <!-- and heading bug. -->
  70. <pid-controller>
  71. <name>Heading Bug Hold (DG based) Stage 1</name>
  72. <debug>false</debug>
  73. <enable>
  74. <prop>/autopilot/locks/heading</prop>
  75. <value>dg-heading-hold</value>
  76. </enable>
  77. <input>
  78. <prop>/autopilot/internal/heading-bug-error-deg</prop>
  79. </input>
  80. <reference>
  81. <value>0.0</value>
  82. </reference>
  83. <output>
  84. <prop>/autopilot/internal/target-roll-deg</prop>
  85. </output>
  86. <config>
  87. <Kp>-1.0</Kp> <!-- proportional gain -->
  88. <beta>1.0</beta> <!-- input value weighing factor -->
  89. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  90. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  91. <!-- unfiltered derivative error -->
  92. <Ti>5.0</Ti> <!-- integrator time -->
  93. <Td>0.00001</Td> <!-- derivator time -->
  94. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  95. <u_max>20.0</u_max> <!-- maximum output clamp -->
  96. </config>
  97. </pid-controller>
  98. <pid-controller>
  99. <name>Heading Bug Hold (DG based) Stage 1</name>
  100. <debug>false</debug>
  101. <enable>
  102. <prop>/autopilot/locks/heading</prop>
  103. <value>dg-heading-hold</value>
  104. </enable>
  105. <input>
  106. <prop>/autopilot/internal/heading-bug-error-deg</prop>
  107. </input>
  108. <reference>
  109. <value>0.0</value>
  110. </reference>
  111. <output>
  112. <prop>/autopilot/internal/target-yaw-deg</prop>
  113. </output>
  114. <config>
  115. <Kp>-1.0</Kp> <!-- proportional gain -->
  116. <beta>1.0</beta> <!-- input value weighing factor -->
  117. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  118. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  119. <!-- unfiltered derivative error -->
  120. <Ti>5.0</Ti> <!-- integrator time -->
  121. <Td>0.00001</Td> <!-- derivator time -->
  122. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  123. <u_max>20.0</u_max> <!-- maximum output clamp -->
  124. </config>
  125. </pid-controller>
  126. <!-- Stage #2 drives the ailerons to achieve the desired roll deg. -->
  127. <pid-controller>
  128. <name>Heading Bug Hold (DG based) Stage 2</name>
  129. <debug>false</debug>
  130. <enable>
  131. <prop>/autopilot/locks/heading</prop>
  132. <value>dg-heading-hold</value>
  133. </enable>
  134. <input>
  135. <prop>/orientation/roll-deg</prop>
  136. </input>
  137. <reference>
  138. <prop>/autopilot/internal/target-roll-deg</prop>
  139. </reference>
  140. <output>
  141. <prop>/controls/flight/fcs/roll</prop>
  142. </output>
  143. <config>
  144. <Kp>0.1</Kp> <!-- proportional gain -->
  145. <beta>1.0</beta> <!-- input value weighing factor -->
  146. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  147. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  148. <!-- unfiltered derivative error -->
  149. <Ti>5.0</Ti> <!-- integrator time -->
  150. <Td>0.00001</Td> <!-- derivator time -->
  151. <u_min>-1.0</u_min> <!-- minimum output clamp -->
  152. <u_max>1.0</u_max> <!-- maximum output clamp -->
  153. </config>
  154. </pid-controller>
  155. <pid-controller>
  156. <name>Heading Bug Hold (DG based) Stage 2</name>
  157. <debug>false</debug>
  158. <enable>
  159. <prop>/autopilot/locks/heading</prop>
  160. <value>dg-heading-hold</value>
  161. </enable>
  162. <input>
  163. <prop>/orientation/yaw-deg</prop>
  164. </input>
  165. <reference>
  166. <prop>/autopilot/internal/target-yaw-deg</prop>
  167. </reference>
  168. <output>
  169. <prop>/controls/flight/fcs/yaw</prop>
  170. </output>
  171. <config>
  172. <Kp>0.1</Kp> <!-- proportional gain -->
  173. <beta>1.0</beta> <!-- input value weighing factor -->
  174. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  175. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  176. <!-- unfiltered derivative error -->
  177. <Ti>5.0</Ti> <!-- integrator time -->
  178. <Td>0.00001</Td> <!-- derivator time -->
  179. <u_min>-1.0</u_min> <!-- minimum output clamp -->
  180. <u_max>1.0</u_max> <!-- maximum output clamp -->
  181. </config>
  182. </pid-controller>
  183. <!-- True Heading hold. 2 stage cascade controller. -->
  184. <!-- Stage #1 sets target roll based on diff between current heading -->
  185. <!-- and target heading. -->
  186. <pid-controller>
  187. <name>True Heading Hold (DG based) Stage 1</name>
  188. <debug>false</debug>
  189. <enable>
  190. <prop>/autopilot/locks/heading</prop>
  191. <value>true-heading-hold</value>
  192. </enable>
  193. <input>
  194. <prop>/autopilot/internal/true-heading-error-deg</prop>
  195. </input>
  196. <reference>
  197. <value>0.0</value>
  198. </reference>
  199. <output>
  200. <prop>/autopilot/internal/target-roll-deg</prop>
  201. </output>
  202. <config>
  203. <Kp>-1.0</Kp> <!-- proportional gain -->
  204. <beta>1.0</beta> <!-- input value weighing factor -->
  205. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  206. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  207. <!-- unfiltered derivative error -->
  208. <Ti>5.0</Ti> <!-- integrator time -->
  209. <Td>0.00001</Td> <!-- derivator time -->
  210. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  211. <u_max>20.0</u_max> <!-- maximum output clamp -->
  212. </config>
  213. </pid-controller>
  214. <pid-controller>
  215. <name>True Heading Hold (DG based) Stage 1</name>
  216. <debug>false</debug>
  217. <enable>
  218. <prop>/autopilot/locks/heading</prop>
  219. <value>true-heading-hold</value>
  220. </enable>
  221. <input>
  222. <prop>/autopilot/internal/true-heading-error-deg</prop>
  223. </input>
  224. <reference>
  225. <value>0.0</value>
  226. </reference>
  227. <output>
  228. <prop>/autopilot/internal/target-yaw-deg</prop>
  229. </output>
  230. <config>
  231. <Kp>-1.0</Kp> <!-- proportional gain -->
  232. <beta>1.0</beta> <!-- input value weighing factor -->
  233. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  234. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  235. <!-- unfiltered derivative error -->
  236. <Ti>5.0</Ti> <!-- integrator time -->
  237. <Td>0.00001</Td> <!-- derivator time -->
  238. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  239. <u_max>20.0</u_max> <!-- maximum output clamp -->
  240. </config>
  241. </pid-controller>
  242. <!-- Stage #2 drives the ailerons to achieve the desired roll deg. -->
  243. <pid-controller>
  244. <name>True Heading Hold (DG based) Stage 2</name>
  245. <debug>false</debug>
  246. <enable>
  247. <prop>/autopilot/locks/heading</prop>
  248. <value>true-heading-hold</value>
  249. </enable>
  250. <input>
  251. <prop>/orientation/roll-deg</prop>
  252. </input>
  253. <reference>
  254. <prop>/autopilot/internal/target-roll-deg</prop>
  255. </reference>
  256. <output>
  257. <prop>/controls/flight/fcs/roll</prop>
  258. </output>
  259. <config>
  260. <Kp>0.1</Kp> <!-- proportional gain -->
  261. <beta>1.0</beta> <!-- input value weighing factor -->
  262. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  263. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  264. <!-- unfiltered derivative error -->
  265. <Ti>5.0</Ti> <!-- integrator time -->
  266. <Td>0.00001</Td> <!-- derivator time -->
  267. <u_min>-1.0</u_min> <!-- minimum output clamp -->
  268. <u_max>1.0</u_max> <!-- maximum output clamp -->
  269. </config>
  270. </pid-controller>
  271. <pid-controller>
  272. <name>True Heading Hold (DG based) Stage 2</name>
  273. <debug>false</debug>
  274. <enable>
  275. <prop>/autopilot/locks/heading</prop>
  276. <value>true-heading-hold</value>
  277. </enable>
  278. <input>
  279. <prop>/orientation/yaw-deg</prop>
  280. </input>
  281. <reference>
  282. <prop>/autopilot/internal/target-yaw-deg</prop>
  283. </reference>
  284. <output>
  285. <prop>/controls/flight/fcs/yaw</prop>
  286. </output>
  287. <config>
  288. <Kp>0.1</Kp> <!-- proportional gain -->
  289. <beta>1.0</beta> <!-- input value weighing factor -->
  290. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  291. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  292. <!-- unfiltered derivative error -->
  293. <Ti>5.0</Ti> <!-- integrator time -->
  294. <Td>0.00001</Td> <!-- derivator time -->
  295. <u_min>-1.0</u_min> <!-- minimum output clamp -->
  296. <u_max>1.0</u_max> <!-- maximum output clamp -->
  297. </config>
  298. </pid-controller>
  299. <!-- Nav1 hold. 2 stage cascade controller. -->
  300. <!-- Stage #1 sets target roll based on diff between current heading -->
  301. <!-- and target heading. -->
  302. <pid-controller>
  303. <name>Nav1 Hold Stage 1</name>
  304. <debug>false</debug>
  305. <enable>
  306. <prop>/autopilot/locks/heading</prop>
  307. <value>nav1-hold</value>
  308. </enable>
  309. <input>
  310. <prop>/autopilot/internal/nav1-heading-error-deg</prop>
  311. </input>
  312. <reference>
  313. <value>0.0</value>
  314. </reference>
  315. <output>
  316. <prop>/autopilot/internal/target-roll-deg</prop>
  317. </output>
  318. <config>
  319. <Kp>-1.0</Kp> <!-- proportional gain -->
  320. <beta>1.0</beta> <!-- input value weighing factor -->
  321. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  322. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  323. <!-- unfiltered derivative error -->
  324. <Ti>5.0</Ti> <!-- integrator time -->
  325. <Td>0.00001</Td> <!-- derivator time -->
  326. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  327. <u_max>20.0</u_max> <!-- maximum output clamp -->
  328. </config>
  329. </pid-controller>
  330. <!-- Stage #2 drives the ailerons to achieve the desired roll deg. -->
  331. <pid-controller>
  332. <name>Nav1 Hold Stage 2</name>
  333. <debug>false</debug>
  334. <enable>
  335. <prop>/autopilot/locks/heading</prop>
  336. <value>nav1-hold</value>
  337. </enable>
  338. <input>
  339. <prop>/orientation/roll-deg</prop>
  340. </input>
  341. <reference>
  342. <prop>/autopilot/internal/target-roll-deg</prop>
  343. </reference>
  344. <output>
  345. <prop>/controls/flight/fcs/roll</prop>
  346. </output>
  347. <config>
  348. <Kp>0.1</Kp> <!-- proportional gain -->
  349. <beta>1.0</beta> <!-- input value weighing factor -->
  350. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  351. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  352. <!-- unfiltered derivative error -->
  353. <Ti>5.0</Ti> <!-- integrator time -->
  354. <Td>0.00001</Td> <!-- derivator time -->
  355. <u_min>-1.0</u_min> <!-- minimum output clamp -->
  356. <u_max>1.0</u_max> <!-- maximum output clamp -->
  357. </config>
  358. </pid-controller>
  359. <pid-controller>
  360. <name>Nav1 Hold Stage 2</name>
  361. <debug>false</debug>
  362. <enable>
  363. <prop>/autopilot/locks/heading</prop>
  364. <value>nav1-hold</value>
  365. </enable>
  366. <input>
  367. <prop>/orientation/yaw-deg</prop>
  368. </input>
  369. <reference>
  370. <prop>/autopilot/internal/target-yaw-deg</prop>
  371. </reference>
  372. <output>
  373. <prop>/controls/flight/fcs/yaw</prop>
  374. </output>
  375. <config>
  376. <Kp>0.1</Kp> <!-- proportional gain -->
  377. <beta>1.0</beta> <!-- input value weighing factor -->
  378. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  379. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  380. <!-- unfiltered derivative error -->
  381. <Ti>5.0</Ti> <!-- integrator time -->
  382. <Td>0.00001</Td> <!-- derivator time -->
  383. <u_min>-1.0</u_min> <!-- minimum output clamp -->
  384. <u_max>1.0</u_max> <!-- maximum output clamp -->
  385. </config>
  386. </pid-controller>
  387. <!-- =============================================================== -->
  388. <!-- Pitch Axis Modes -->
  389. <!-- =============================================================== -->
  390. <!-- Simple pitch hold -->
  391. <!-- <pid-controller>
  392. <name>Pitch hold</name>
  393. <debug>false</debug>
  394. <enable>
  395. <prop>/autopilot/locks/altitude</prop>
  396. <value>pitch-hold</value>
  397. </enable>
  398. <input>
  399. <prop>/orientation/pitch-deg</prop>
  400. </input>
  401. <reference>
  402. <prop>/autopilot/settings/target-pitch-deg</prop>
  403. </reference>
  404. <output>
  405. <prop>/controls/engines/engine[0]/throttle</prop>
  406. </output>
  407. <config>
  408. <Kp>-1.0</Kp> proportional gain -->
  409. <!-- <beta>1.0</beta> input value weighing factor -->
  410. <!-- <alpha>0.1</alpha> low pass filter weighing factor -->
  411. <!-- <gamma>0.0</gamma> input value weighing factor for -->
  412. <!-- unfiltered derivative error -->
  413. <!-- <Ti>5.0</Ti> integrator time -->
  414. <!-- <Td>0.00001</Td> derivator time -->
  415. <!-- <u_min>-20.0</u_min>minimum output clamp -->
  416. <!-- <u_max>20.0</u_max> maximum output clamp
  417. </config>
  418. </pid-controller> -->
  419. <!-- Simple angle of attack hold -->
  420. <pid-controller>
  421. <name>AOA hold</name>
  422. <debug>false</debug>
  423. <enable>
  424. <prop>/autopilot/locks/altitude</prop>
  425. <value>aoa-hold</value>
  426. </enable>
  427. <input>
  428. <prop>/orientation/alpha-deg</prop>
  429. </input>
  430. <reference>
  431. <prop>/autopilot/settings/target-aoa-deg</prop>
  432. </reference>
  433. <output>
  434. <prop>/controls/engines/engine[0]/throttle</prop>
  435. </output>
  436. <config>
  437. <Kp>-1.0</Kp> <!-- proportional gain -->
  438. <beta>1.0</beta> <!-- input value weighing factor -->
  439. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  440. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  441. <!-- unfiltered derivative error -->
  442. <Ti>5.0</Ti> <!-- integrator time -->
  443. <Td>0.00001</Td> <!-- derivator time -->
  444. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  445. <u_max>20.0</u_max> <!-- maximum output clamp -->
  446. </config>
  447. </pid-controller>
  448. <!-- Altitude hold. 2 stage cascade controller. -->
  449. <!-- Stage #1 sets target rate of climb based on diff between current alt -->
  450. <!-- and target altitude. -->
  451. <pi-simple-controller>
  452. <name>Altitude Hold (Altimeter based) Stage 1</name>
  453. <debug>false</debug>
  454. <enable>
  455. <prop>/autopilot/locks/altitude</prop>
  456. <value>altitude-hold</value>
  457. </enable>
  458. <input>
  459. <prop>/position/altitude-ft</prop>
  460. </input>
  461. <reference>
  462. <prop>/autopilot/settings/target-altitude-ft</prop>
  463. </reference>
  464. <output>
  465. <prop>/autopilot/internal/target-climb-rate-fps</prop>
  466. </output>
  467. <config>
  468. <Kp>1</Kp> <!-- proportional gain -->
  469. <Ki>0.0</Ki> <!-- integral gain -->
  470. <u_min>-16.67</u_min> <!-- minimum output clamp -->
  471. <u_max>8.33</u_max> <!-- maximum output clamp -->
  472. </config>
  473. </pi-simple-controller>
  474. <!-- Stage #2 drives the elevator-trim to achieve the desired climb rate. -->
  475. <pid-controller>
  476. <name>Altitude Hold (Altimeter based) Stage 2</name>
  477. <debug>false</debug>
  478. <enable>
  479. <prop>/autopilot/locks/altitude</prop>
  480. <value>altitude-hold</value>
  481. </enable>
  482. <input>
  483. <prop>/velocities/vertical-speed-fps</prop>
  484. </input>
  485. <reference>
  486. <prop>/autopilot/internal/target-climb-rate-fps</prop>
  487. </reference>
  488. <output>
  489. <prop>/controls/engines/engine[0]/throttle</prop>
  490. </output>
  491. <config>
  492. <Kp>-1.0</Kp> <!-- proportional gain -->
  493. <beta>1.0</beta> <!-- input value weighing factor -->
  494. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  495. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  496. <!-- unfiltered derivative error -->
  497. <Ti>5.0</Ti> <!-- integrator time -->
  498. <Td>0.00001</Td> <!-- derivator time -->
  499. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  500. <u_max>20.0</u_max> <!-- maximum output clamp -->
  501. </config>
  502. </pid-controller>
  503. <!-- AGL hold. 2 stage cascade controller. -->
  504. <!-- Stage #1 sets target rate of climb based on diff between current agl -->
  505. <!-- and target agl. -->
  506. <pi-simple-controller>
  507. <name>AGL Hold (Altimeter based) Stage 1</name>
  508. <debug>false</debug>
  509. <enable>
  510. <prop>/autopilot/locks/altitude</prop>
  511. <value>agl-hold</value>
  512. </enable>
  513. <input>
  514. <prop>/position/altitude-agl-ft</prop>
  515. </input>
  516. <reference>
  517. <prop>/autopilot/settings/target-agl-ft</prop>
  518. </reference>
  519. <output>
  520. <prop>/autopilot/internal/target-climb-rate-fps</prop>
  521. </output>
  522. <config>
  523. <Kp>1</Kp> <!-- proportional gain -->
  524. <Ki>0.0</Ki> <!-- integral gain -->
  525. <u_min>-16.67</u_min> <!-- minimum output clamp -->
  526. <u_max>8.33</u_max> <!-- maximum output clamp -->
  527. </config>
  528. </pi-simple-controller>
  529. <!-- Stage #2 drives the elevator-trim to achieve the desired climb rate. -->
  530. <pid-controller>
  531. <name>AGL Hold (Altimeter based) Stage 2</name>
  532. <debug>false</debug>
  533. <enable>
  534. <prop>/autopilot/locks/altitude</prop>
  535. <value>agl-hold</value>
  536. </enable>
  537. <input>
  538. <prop>/velocities/vertical-speed-fps</prop>
  539. </input>
  540. <reference>
  541. <prop>/autopilot/internal/target-climb-rate-fps</prop>
  542. </reference>
  543. <output>
  544. <prop>/controls/engines/engine[0]/throttle</prop>
  545. </output>
  546. <config>
  547. <Kp>-1.0</Kp> <!-- proportional gain -->
  548. <beta>1.0</beta> <!-- input value weighing factor -->
  549. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  550. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  551. <!-- unfiltered derivative error -->
  552. <Ti>5.0</Ti> <!-- integrator time -->
  553. <Td>0.00001</Td> <!-- derivator time -->
  554. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  555. <u_max>20.0</u_max> <!-- maximum output clamp -->
  556. </config>
  557. </pid-controller>
  558. <!-- Glideslope hold. -->
  559. <!-- Stage #2 drives the elevator-trim to achieve the desired climb rate. -->
  560. <pid-controller>
  561. <name>Glideslop Hold</name>
  562. <debug>false</debug>
  563. <enable>
  564. <prop>/autopilot/locks/altitude</prop>
  565. <value>gs1-hold</value>
  566. </enable>
  567. <input>
  568. <prop>/velocities/vertical-speed-fps</prop>
  569. </input>
  570. <reference>
  571. <prop>/instrumentation/nav[0]/gs-rate-of-climb</prop>
  572. </reference>
  573. <output>
  574. <prop>/controls/engines/engine[0]/throttle</prop>
  575. </output>
  576. <config>
  577. <Kp>-1.0</Kp> <!-- proportional gain -->
  578. <beta>1.0</beta> <!-- input value weighing factor -->
  579. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  580. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  581. <!-- unfiltered derivative error -->
  582. <Ti>5.0</Ti> <!-- integrator time -->
  583. <Td>0.00001</Td> <!-- derivator time -->
  584. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  585. <u_max>20.0</u_max> <!-- maximum output clamp -->
  586. </config>
  587. </pid-controller>
  588. <!-- vertical speed hold -->
  589. <pid-controller>
  590. <name>Vertical Speed Hold</name>
  591. <debug>false</debug>
  592. <enable>
  593. <prop>/autopilot/locks/altitude</prop>
  594. <value>vertical-speed-hold</value>
  595. </enable>
  596. <input>
  597. <prop>/velocities/vertical-speed-fps</prop>
  598. </input>
  599. <reference>
  600. <prop>/autopilot/settings/vertical-speed-fpm</prop>
  601. <scale>0.01667</scale>
  602. </reference>
  603. <output>
  604. <prop>/controls/engines/engine[0]/throttle</prop>
  605. </output>
  606. <config>
  607. <Kp>-1.0</Kp> <!-- proportional gain -->
  608. <beta>1.0</beta> <!-- input value weighing factor -->
  609. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  610. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  611. <!-- unfiltered derivative error -->
  612. <Ti>5.0</Ti> <!-- integrator time -->
  613. <Td>0.00001</Td> <!-- derivator time -->
  614. <u_min>-20.0</u_min> <!-- minimum output clamp -->
  615. <u_max>20.0</u_max> <!-- maximum output clamp -->
  616. </config>
  617. </pid-controller>
  618. <!-- =============================================================== -->
  619. <!-- Velocity Modes -->
  620. <!-- =============================================================== -->
  621. <!-- Auto throttle -->
  622. <pid-controller>
  623. <name>Auto Throttle (5 sec lookahead)</name>
  624. <debug>false</debug>
  625. <enable>
  626. <prop>/autopilot/locks/speed</prop>
  627. <value>speed-with-throttle</value>
  628. </enable>
  629. <input>
  630. <!-- <prop>/autopilot/internal/lookahead-5-sec-airspeed-kt</prop> -->
  631. <prop>/velocities/airspeed-kt</prop>
  632. </input>
  633. <reference>
  634. <prop>/autopilot/settings/target-speed-kt</prop>
  635. </reference>
  636. <output>
  637. <prop>/controls/flight/fcs/pitch</prop>
  638. <!-- <prop>/controls/engines/engine[1]/throttle</prop>
  639. <prop>/controls/engines/engine[2]/throttle</prop>
  640. <prop>/controls/engines/engine[3]/throttle</prop>
  641. <prop>/controls/engines/engine[4]/throttle</prop>
  642. <prop>/controls/engines/engine[5]/throttle</prop>
  643. <prop>/controls/engines/engine[6]/throttle</prop>
  644. <prop>/controls/engines/engine[7]/throttle</prop>-->
  645. </output>
  646. <config>
  647. <Kp>0.1</Kp> <!-- proportional gain -->
  648. <beta>1.0</beta> <!-- input value weighing factor -->
  649. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  650. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  651. <!-- unfiltered derivative error -->
  652. <Ti>10.0</Ti> <!-- integrator time -->
  653. <Td>0.00001</Td> <!-- derivator time -->
  654. <u_min>0.0</u_min> <!-- minimum output clamp -->
  655. <u_max>1.0</u_max> <!-- maximum output clamp -->
  656. </config>
  657. </pid-controller>
  658. <!-- Hold speed by varying pitch trim (Two stage cascading controller) -->
  659. <pid-controller>
  660. <name>Speed hold (vary pitch trim) Stage #1</name>
  661. <debug>false</debug>
  662. <enable>
  663. <prop>/autopilot/locks/speed</prop>
  664. <value>speed-with-pitch-trim</value>
  665. </enable>
  666. <input>
  667. <prop>/autopilot/internal/lookahead-5-sec-airspeed-kt</prop>
  668. </input>
  669. <reference>
  670. <prop>/autopilot/settings/target-speed-kt</prop>
  671. </reference>
  672. <output>
  673. <prop>/autopilot/settings/target-pitch-deg</prop>
  674. </output>
  675. <config>
  676. <Kp>0.5</Kp> <!-- proportional gain -->
  677. <beta>1.0</beta> <!-- input value weighing factor -->
  678. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  679. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  680. <!-- unfiltered derivative error -->
  681. <Ti>0.1</Ti> <!-- integrator time -->
  682. <Td>0.00001</Td> <!-- derivator time -->
  683. <u_min>-5.0</u_min> <!-- minimum output clamp -->
  684. <u_max>5.0</u_max> <!-- maximum output clamp -->
  685. </config>
  686. </pid-controller>
  687. <pid-controller>
  688. <name>Speed hold (vary pitch trim) Stage #2</name>
  689. <debug>false</debug>
  690. <enable>
  691. <prop>/autopilot/locks/speed</prop>
  692. <value>speed-with-pitch-trim</value>
  693. </enable>
  694. <input>
  695. <prop>/orientation/pitch-deg</prop>
  696. </input>
  697. <reference>
  698. <prop>/autopilot/settings/target-pitch-deg</prop>
  699. </reference>
  700. <output>
  701. <prop>/controls/flight/elevator-trim</prop>
  702. </output>
  703. <config>
  704. <Kp>-10.0</Kp> <!-- proportional gain -->
  705. <beta>1.0</beta> <!-- input value weighing factor -->
  706. <alpha>0.1</alpha> <!-- low pass filter weighing factor -->
  707. <gamma>0.0</gamma> <!-- input value weighing factor for -->
  708. <!-- unfiltered derivative error -->
  709. <Ti>0.5</Ti> <!-- integrator time -->
  710. <Td>0.00001</Td> <!-- derivator time -->
  711. <u_min>-5.0</u_min> <!-- minimum output clamp -->
  712. <u_max>5.0</u_max> <!-- maximum output clamp -->
  713. </config>
  714. </pid-controller>
  715. </PropertyList>