Base stabilization code for rotorcraft
Also provide the direct mode 'stabilization_none' As a durty hack, it also provides navigation and guidance: this should be done in the airframe at some point
Example for airframe file
Add to your firmware section:
1 <module name="stabilization_rotorcraft"/>
Module configuration options
Airframe file section
- section name:
STABILIZATION_FILTER_CMD
prefix: STABILIZATION_FILTER_CMD_
- name
ROLL_PITCH
value: 0
Description: roll and pitch command filter toggle
- name
YAW
value: 0
Description: yaw command filter toggle
- name
ROLL_CUTOFF
value: 20.0
Description: roll command filter cut-off
- name
PITCH_CUTOFF
value: 20.0
Description: pitch command filter cut-off
- name
YAW_CUTOFF
value: 20.0
Description: yaw command filter cut-off
Auto-loaded modules
The following modules are automatically loaded (just as if you had added them in the airframe file)
Module functions
Init Functions
These initialization functions are called once on startup.
Files
Header Files
The following headers are automatically included in modules.h
Source Files
- /stabilization.c
- /stabilization/stabilization_none.c
Raw stabilization_rotorcraft.xml file:
<!DOCTYPE module SYSTEM "module.dtd">
<module name="stabilization_rotorcraft" dir="stabilization">
<doc>
<description>
Base stabilization code for rotorcraft
Also provide the direct mode 'stabilization_none'
As a durty hack, it also provides navigation and guidance: this should be done in the airframe at some point
</description>
<section name="STABILIZATION_FILTER_CMD" prefix="STABILIZATION_FILTER_CMD_">
<define name="ROLL_PITCH" value="0" description="roll and pitch command filter toggle" unit="bool"/>
<define name="YAW" value="0" description="yaw command filter toggle" unit="bool"/>
<define name="ROLL_CUTOFF" value="20.0" description="roll command filter cut-off" unit="Hz"/>
<define name="PITCH_CUTOFF" value="20.0" description="pitch command filter cut-off" unit="Hz"/>
<define name="YAW_CUTOFF" value="20.0" description="yaw command filter cut-off" unit="Hz"/>
</section>
</doc>
<autoload name="nav_basic_rotorcraft"/>
<header>
<file name="stabilization.h" dir="firmwares/rotorcraft"/>
<file name="stabilization_none.h"/>
</header>
<init fun="stabilization_init()"/>
<init fun="stabilization_none_init()"/>
<makefile target="ap|nps|hitl" firmware="rotorcraft">
<file name="stabilization.c" dir="$(SRC_FIRMWARE)"/>
<file name="stabilization_none.c" dir="$(SRC_FIRMWARE)/stabilization"/>
</makefile>
</module>