Howto:Design an autopilot: Difference between revisions

Jump to navigation Jump to search
m
heading-hold
(heading hold added, thanks Torsten!)
m (heading-hold)
Line 169: Line 169:


And a filter, as our autopilot does not move the throttle levers up/down in split seconds (you can imagine how that would be potentially harmful to the flight crew). Depending on the number of engines of your aircraft, you might want to add more or delete some output properties.
And a filter, as our autopilot does not move the throttle levers up/down in split seconds (you can imagine how that would be potentially harmful to the flight crew). Depending on the number of engines of your aircraft, you might want to add more or delete some output properties.
  <filter>
  <filter>
   <name>SERVO-DRIVER:throttle</name>
   <name>SERVO-DRIVER:throttle</name>
Line 298: Line 299:
  </filter>
  </filter>


The second stage computes a bank angle from a heading offset. At least for smaller planes, a rule of thumb says "roll out at half the bank angle". If you fly a right hand turn at a bank angle of, say, 20° and want to end at a heading of 270°, you start your roll out at 20°/2 = 10° before your target heading. So you start rolling out at 280°. We turn this rule around and say our bank angle is twice the heading error but not more that 30° This results in a simple gain filter:
The second stage computes a bank angle from a heading offset. At least for smaller planes, a rule of thumb says "roll out at half the bank angle". If you fly a right hand turn at a bank angle of, say, 20° and want to end at a heading of 270°, you start your roll out at 20°/2 = 10° before your target heading. So you start rolling out at 280°. We turn this rule around and say our bank angle is twice the heading error but not more that 30° This results in a simple gain filter. You might want to make the target roll computer switchable with an enable element, otherwise it will overwrite your target-roll-deg at all times.


  <filter>
  <filter>
Line 315: Line 316:
  </filter>
  </filter>


This filter feeds your wing leveler which is already done. You might want to make the target roll computer switchable with an enable element, otherwise it will overwrite your target-roll-deg. Decreasing the gain of two should help, if your roll-rate is to slow. You can also play with the min/max values to have a nice standard rate turn. The bank angle for the standard turn is a function of your true airspeed; you can build a controller calculating the correct bank angle and feed this value into min/max (which is a commen feature on airliners).
Most aircraft have pilot selectable bank-limits. You can implement these by editing the min and max options to something like this:
 
...
  <min>
  <property>/autopilot/settings/bank-limit</property>
  <scale>-1.0</scale>
  </min>
  <max>/autopilot/settings/bank-limit</max>
...
 
This filter feeds your wing leveler which is already done, but it requires a little edit in the <enable> and <reference> parts in order to obtain a pilot-selectable roll:
 
...
  <enable>
  <prop>/autopilot/locks/heading</prop>
  <value>dg-heading-hold</value>
  </condition>
  </enable>
...
  <reference>
  <prop>/autopilot/internal/target-roll-deg</prop>
  </reference>
...
 
You can also play with the min/max values to have a nice standard rate turn. The bank angle for the standard turn is a function of your true airspeed; you can build a controller calculating the correct bank angle and feed this value into min/max (which is a commen feature on airliners).
 
Decreasing the gain of 2.5 should help, if your roll-rate is too slow.  


[[Category:Aircraft enhancement|Design an autopilot]]
[[Category:Aircraft enhancement|Design an autopilot]]
[[Category:Howto|Design an autopilot]]
[[Category:Howto|Design an autopilot]]

Navigation menu