These initialization functions are called once on startup.
<!DOCTYPE module SYSTEM "module.dtd">
<module name="guidance_indi_hybrid" dir="guidance" task="control">
<doc>
<description>
Common guidance controller code for hybrids using INDI: in your airframe file include one of the options:
- guidance_indi_hybid_tailsitter
- guidance_indi_hybid_quadplane
</description>
<section name="GUIDANCE_INDI_HYBRID" prefix="GUIDANCE_INDI_">
<define name="USE_WLS" value="FALSE|TRUE" description="use WLS allocation instead of matrix inversion (default: FALSE)"/>
<define name="WLS_PRIORITIES" value="{100., 100., 1.}" description="WLS priorities on control objectives"/>
<define name="WLS_WU" value="{1., 1., 1.}" description="WLS weighting on outputs"/>
<define name="MAX_LAT_ACCEL" value="9.81" description="Maximal Lateral Acceleration (in the Body-y Direction)"/>
<define name="COORDINATED_TURN_MIN_AIRSPEED" value="10.0" description="Yaw-rate computations based on airspeed are dividing by the airspeed, so a lower bound is important"/>
<define name="COORDINATED_TURN_MAX_AIRSPEED" value="30.0" description="Maximum airspeed in yaw-rate computations"/>
<define name="COORDINATED_TURN_AIRSPEED_MARGIN" value="0.0" description="Margin above maximum speed where we are sure the sensor reading is false"/>
</section>
</doc>
<settings>
<dl_settings>
<dl_settings NAME="guidance_indi_hybrid">
<dl_setting var="gih_params.liftd_p50" min="0.1" step="0.1" max="10.0" shortname="liftd_p50" param="GUIDANCE_INDI_LIFTD_P50" persistent="true" module="guidance/guidance_indi_hybrid"/>
<dl_setting var="gih_params.liftd_p80" min="1.0" step="0.1" max="20.0" shortname="liftd_p80" param="GUIDANCE_INDI_LIFTD_P50" persistent="true"/>
<dl_setting var="gih_params.liftd_asq" min="0.01" step="0.01" max="1.0" shortname="liftd_asq" param="GUIDANCE_INDI_LIFTD_ASQ" persistent="true"/>
<dl_setting var="gih_params.pos_gain" min="0" step="0.1" max="10.0" shortname="kp" param="GUIDANCE_INDI_POS_GAIN" persistent="true"/>
<dl_setting var="gih_params.pos_gainz" min="0" step="0.1" max="10.0" shortname="kp_z" param="GUIDANCE_INDI_POS_GAINZ" persistent="true"/>
<dl_setting var="gih_params.speed_gain" min="0" step="0.1" max="10.0" shortname="kd" param="GUIDANCE_INDI_SPEED_GAIN" persistent="true"/>
<dl_setting var="gih_params.speed_gainz" min="0" step="0.1" max="10.0" shortname="kd_z" param="GUIDANCE_INDI_SPEED_GAINZ" persistent="true"/>
<dl_setting var="gih_params.heading_bank_gain" min="0" step="0.1" max="30.0" shortname="bank gain" param="GUIDANCE_INDI_HEADING_BANK_GAIN" persistent="true"/>
<dl_setting var="gih_params.max_airspeed" min="12.0" step="1.0" max="30.0" shortname="max_airspeed" param="GUIDANCE_INDI_MAX_AIRSPEED"/>
<dl_setting var="guidance_indi_max_bank" min="10.0" step="1.0" max="50.0" shortname="max_bank" param="GUIDANCE_H_MAX_BANK" unit="rad" alt_unit="deg"/>
<dl_setting var="guidance_indi_min_pitch" min="-130.0" step="1.0" max="-30.0" shortname="min_pitch" param="GUIDANCE_INDI_MIN_PITCH"/>
<dl_setting var="take_heading_control" min="0" step="1" max="1" values="OFF|ON" shortname="take_heading"/>
<dl_setting var="guidance_indi_airspeed_filtering" min="0" step="1" max="1" values="OFF|ON" shortname="as_filt"/>
<dl_setting var="gih_params.climb_vspeed_fwd" min="0" step="0.1" max="20.0" shortname="fwd_vspeed_climb"/>
<dl_setting var="gih_params.descend_vspeed_fwd" min="-20.0" step="0.1" max="0" shortname="fwd_vspeed_descend"/>
<dl_setting var="gih_params.climb_vspeed_quad" min="0" step="0.1" max="20.0" shortname="quad_vspeed_climb"/>
<dl_setting var="gih_params.descend_vspeed_quad" min="-20.0" step="0.1" max="0" shortname="quad_vspeed_descend"/>
<dl_setting var="gih_params.stall_protect_gain" min="0" step="0.1" max="20.0" shortname="stall_gain"/>
<dl_setting var="coordinated_turn_use_accel" min="0" step="1" max="1" values="FALSE|TRUE" shortname="coordinated_turn_use_accel"/>
</dl_settings>
</dl_settings>
</settings>
<dep>
<depends>@navigation,guidance_rotorcraft,wls</depends>
<suggests>guidance_indi_hybrid_tailsitter</suggests>
</dep>
<header>
<file name="guidance_indi_hybrid.h"/>
</header>
<init fun="guidance_indi_init()"/>
<init fun="guidance_indi_enter()"/>
<makefile target="ap|nps" firmware="rotorcraft">
<file name="guidance_indi_hybrid.c" dir="$(SRC_FIRMWARE)/guidance"/>
<define name="GUIDANCE_INDI_HYBRID" value="TRUE"/>
<define name="GUIDANCE_PID_USE_AS_DEFAULT" value="FALSE"/>
<define name="GUIDANCE_INDI_HYBRID_USE_AS_DEFAULT" value="TRUE"/>
</makefile>
</module>