Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
guidance_indi_hybrid module

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

Example for airframe file

Add to your firmware section:

<module name="guidance_indi_hybrid"/>

Module configuration options

Airframe file section

  • section name: GUIDANCE_INDI_HYBRID prefix: GUIDANCE_INDI_HYBRID_
    • name USE_WLS value: FALSE|TRUE
      Description: use WLS allocation instead of matrix inversion (default: FALSE)
    • name WLS_PRIORITIES value: {100., 100., 1.}
      Description: WLS priorities on control objectives
    • name WLS_WU value: {1., 1., 1.}
      Description: WLS weighting on outputs

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

  • /guidance/guidance_indi_hybrid.c

Raw guidance_indi_hybrid.xml file:

<!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_HYBRID_">
<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"/>
</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="guidance_indi_max_airspeed" min="12.0" step="1.0" max="30.0" shortname="cruise_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"/>
<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_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>