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
gain_scheduling module

Gain set interpolation.

Interpolate between different gain sets for rotorcrafts.

Example for airframe file

Add to your firmware section:

1 <module name="gain_scheduling"/>

Module functions

Init Functions

These initialization functions are called once on startup.

Periodic Functions

These functions are called periodically at the specified frequency from the module periodic loop.

  • gain_scheduling_periodic()
    • Frequency in Hz: 20
    • Autorun: LOCK
      Periodic function automatically starts after init and can't be stopped.

Files

Header Files

The following headers are automatically included in modules.h

Source Files

Raw gain_scheduling.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="gain_scheduling" dir="ctrl">
<doc>
<description>
Gain set interpolation.
Interpolate between different gain sets for rotorcrafts.
</description>
</doc>
<settings>
<dl_settings NAME="Gain scheduling">
<dl_settings NAME="gain_set_2">
<dl_setting var="gainlibrary[1].p.x" min="0" step="1" max="3000" module="modules/ctrl/gain_scheduling" shortname="phi_p"/>
<dl_setting var="gainlibrary[1].i.x" min="0" step="1" max="1000" module="modules/ctrl/gain_scheduling" shortname="phi_i"/>
<dl_setting var="gainlibrary[1].d.x" min="0" step="1" max="3000" module="modules/ctrl/gain_scheduling" shortname="phi_d"/>
<dl_setting var="gainlibrary[1].p.y" min="0" step="1" max="3000" module="modules/ctrl/gain_scheduling" shortname="theta_p"/>
<dl_setting var="gainlibrary[1].i.y" min="0" step="1" max="1000" module="modules/ctrl/gain_scheduling" shortname="theta_i"/>
<dl_setting var="gainlibrary[1].d.y" min="0" step="1" max="3000" module="modules/ctrl/gain_scheduling" shortname="theta_d"/>
<dl_setting var="gainlibrary[1].p.z" min="0" step="1" max="3000" module="modules/ctrl/gain_scheduling" shortname="psi_p"/>
<dl_setting var="gainlibrary[1].i.z" min="0" step="1" max="1000" module="modules/ctrl/gain_scheduling" shortname="psi_i"/>
<dl_setting var="gainlibrary[1].d.z" min="0" step="1" max="3000" module="modules/ctrl/gain_scheduling" shortname="psi_d"/>
</dl_settings>
</dl_settings>
</settings>
<header>
<file name="gain_scheduling.h"/>
</header>
<init fun="gain_scheduling_init()"/>
<periodic fun="gain_scheduling_periodic()" freq="20"/>
<makefile>
<file name="gain_scheduling.c"/>
</makefile>
</module>