Paparazzi UAS  v5.18.0_stable-1-g6993852-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
aoa_adc module

Angle of Attack using internal ADC

No detailed description...

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

1 <module name="AOA_adc">
2  <define name="AOA_SENS" value="(2*3.14)/1024" />
3  <define name="AOA_OFFSET" value="3.14" />
4  <define name="AOA_FILTER" value="0.5" />
5  <configure name="ADC_AOA" value="ADC_X" />
6 </module>

Module configuration options

Configure Options

  • name: ADC_AOA value: ADC_X
    Description: select the ADC channel to use

Define Options

  • name: AOA_SENS value: (2*3.14)/1024
    Description: sensor sensitivity
  • name: AOA_OFFSET value: 3.14
    Description: offset in radians
  • name: AOA_FILTER value: 0.5
    Description: filtering parameter between 0 (no filtering) and 1

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.

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


Header Files

The following headers are automatically included in modules.h

Source Files

Raw AOA_adc.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="AOA_adc" dir="sensors">
<description>Angle of Attack using internal ADC</description>
<configure name="ADC_AOA" value="ADC_X" description="select the ADC channel to use"/>
<define name="AOA_SENS" value="(2*3.14)/1024" description="sensor sensitivity"/>
<define name="AOA_OFFSET" value="3.14" description="offset in radians"/>
<define name="AOA_FILTER" value="0.5" description="filtering parameter between 0 (no filtering) and 1"/>
<dl_settings NAME="AOA">
<dl_setting MAX="4" MIN="-4" STEP="0.0001" VAR="aoa_adc.offset" shortname="AOA_offset" module="modules/sensors/aoa_adc" param="AOA_OFFSET"/>
<dl_setting MAX="0.95" MIN="0" STEP="0.001" VAR="aoa_adc.filter" shortname="AOA_filter" module="modules/sensors/aoa_adc" param="AOA_FILTER"/>
<dl_setting MAX="1" MIN="0" STEP="1" VAR="h_ctl_pitch_mode" shortname="PITCH_Mode" module="stabilization/stabilization_attitude" />
<file name="aoa_adc.h"/>
<init fun="aoa_adc_init()"/>
<periodic fun="aoa_adc_update()" freq="60."/>
<makefile target="ap">
<file name="aoa_adc.c"/>
<define name="ADC_CHANNEL_AOA" value="$(ADC_AOA)"/>
<define name="USE_$(ADC_AOA)"/>