Paparazzi UAS  v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
stabilization_rate module

Rate controller for rotorcraft

No detailed description...

Example for airframe file

Add to your firmware section:

1 <module name="stabilization_rate"/>

Module configuration options

Airframe file section

    • name SP_MAX_P value: 300
      Description: max roll rate setpoint
    • name SP_MAX_Q value: 300
      Description: max pitch rate setpoint
    • name SP_MAX_R value: 240
      Description: max yaw rate setpoint
    • name DEADBAND_P value: 20
      Description: deadband on roll rate
    • name DEADBAND_Q value: 20
      Description: deadband on pitch rate
    • name DEADBAND_R value: 200
      Description: deadband on yaw rate
    • name GAIN_P value: 1000
      Description: feedback P roll rate gain
    • name GAIN_Q value: 1000
      Description: feedback P pitch rate gain
    • name GAIN_R value: 800
      Description: feedback P yaw rate gain
    • name IGAIN_P value: 75
      Description: feedback I roll rate gain
    • name IGAIN_Q value: 75
      Description: feedback I pitch rate gain
    • name IGAIN_R value: 50
      Description: feedback I yaw rate gain

Auto-loaded modules

The following modules are automatically loaded (just as if you had added them in the airframe file)

  • module__stabilizationrotorcraft

Module functions

Init Functions

These initialization functions are called once on startup.


Header Files

The following headers are automatically included in modules.h

Source Files

  • /stabilization/stabilization_rate.c

Raw stabilization_rate.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="stabilization_rate" dir="stabilization">
Rate controller for rotorcraft
<define name="SP_MAX_P" value="300" description="max roll rate setpoint" unit="deg/s"/>
<define name="SP_MAX_Q" value="300" description="max pitch rate setpoint" unit="deg/s"/>
<define name="SP_MAX_R" value="240" description="max yaw rate setpoint" unit="deg/s"/>
<define name="DEADBAND_P" value="20" description="deadband on roll rate"/>
<define name="DEADBAND_Q" value="20" description="deadband on pitch rate"/>
<define name="DEADBAND_R" value="200" description="deadband on yaw rate"/>
<define name="GAIN_P" value="1000" description="feedback P roll rate gain"/>
<define name="GAIN_Q" value="1000" description="feedback P pitch rate gain"/>
<define name="GAIN_R" value="800" description="feedback P yaw rate gain"/>
<define name="IGAIN_P" value="75" description="feedback I roll rate gain"/>
<define name="IGAIN_Q" value="75" description="feedback I pitch rate gain"/>
<define name="IGAIN_R" value="50" description="feedback I yaw rate gain"/>
<settings target="ap|nps">
<dl_settings NAME="Rate Loop">
<dl_setting var="stabilization_rate_gain.p" min="1" step="1" max="1000" shortname="pgain p" param="STABILIZATION_RATE_GAIN_P" type="int32" persistent="true" module="stabilization/stabilization_rate"/>
<dl_setting var="stabilization_rate_gain.q" min="1" step="1" max="1000" shortname="pgain q" param="STABILIZATION_RATE_GAIN_Q" type="int32" persistent="true"/>
<dl_setting var="stabilization_rate_gain.r" min="1" step="1" max="1000" shortname="pgain r" param="STABILIZATION_RATE_GAIN_R" type="int32" persistent="true"/>
<dl_setting var="stabilization_rate_igain.p" min="0" step="1" max="500" shortname="igain p" param="STABILIZATION_RATE_IGAIN_P" type="int32" persistent="true"/>
<dl_setting var="stabilization_rate_igain.q" min="0" step="1" max="500" shortname="igain q" param="STABILIZATION_RATE_IGAIN_Q" type="int32" persistent="true"/>
<dl_setting var="stabilization_rate_igain.r" min="0" step="1" max="500" shortname="igain r" param="STABILIZATION_RATE_IGAIN_R" type="int32" persistent="true"/>
<autoload name="stabilization" type="rotorcraft"/>
<file name="stabilization_rate.h"/>
<init fun="stabilization_rate_init()"/>
<makefile target="ap|nps" firmware="rotorcraft">
<file name="stabilization_rate.c" dir="$(SRC_FIRMWARE)/stabilization"/>