Paparazzi UAS  v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
aoa_adc.c File Reference

Angle of Attack sensor on ADC Autor: Bruzzlee. More...

#include "modules/sensors/aoa_adc.h"
#include "generated/airframe.h"
#include "state.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for aoa_adc.c:

Go to the source code of this file.

Macros

#define AOA_OFFSET   M_PI
 Default offset value (assuming 0 AOA is in the middle of the range) More...
 
#define AOA_FILTER   0.5
 Default filter value. More...
 
#define AOA_SENS   ((2.0*M_PI)/1024)
 Default sensitivity (2*pi on a 10 bit ADC) More...
 
#define ADC_CHANNEL_AOA_NB_SAMPLES   DEFAULT_AV_NB_SAMPLE
 

Functions

void aoa_adc_init (void)
 
void aoa_adc_update (void)
 

Variables

struct Aoa_Adc aoa_adc
 

Detailed Description

Angle of Attack sensor on ADC Autor: Bruzzlee.

ex: US DIGITAL MA3-A10-236-N

Definition in file aoa_adc.c.

Macro Definition Documentation

#define ADC_CHANNEL_AOA_NB_SAMPLES   DEFAULT_AV_NB_SAMPLE

Definition at line 61 of file aoa_adc.c.

Referenced by aoa_adc_init().

#define AOA_FILTER   0.5

Default filter value.

Definition at line 46 of file aoa_adc.c.

Referenced by aoa_adc_init().

#define AOA_OFFSET   M_PI

Default offset value (assuming 0 AOA is in the middle of the range)

Definition at line 42 of file aoa_adc.c.

Referenced by aoa_adc_init().

#define AOA_SENS   ((2.0*M_PI)/1024)

Default sensitivity (2*pi on a 10 bit ADC)

Definition at line 50 of file aoa_adc.c.

Referenced by aoa_adc_init().

Function Documentation

void aoa_adc_init ( void  )

Definition at line 66 of file aoa_adc.c.

References adc_buf_channel(), ADC_CHANNEL_AOA_NB_SAMPLES, Aoa_Adc::angle, aoa_adc, AOA_FILTER, AOA_OFFSET, AOA_SENS, Aoa_Adc::buf, Aoa_Adc::filter, Aoa_Adc::offset, and Aoa_Adc::sens.

+ Here is the call graph for this function:

void aoa_adc_update ( void  )

Variable Documentation

struct Aoa_Adc aoa_adc

Definition at line 64 of file aoa_adc.c.

Referenced by aoa_adc_init(), and aoa_adc_update().