Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures 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 "messages.h"
#include "subsystems/datalink/downlink.h"
#include "mcu_periph/adc.h"
+ Include dependency graph for AOA_adc.c:

Go to the source code of this file.

Macros

#define AOA_OFFSET   M_PI
 
#define AOA_FILTER   0.5
 
#define AOA_SENS   ((2.0*M_PI)/1024)
 
#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 
#define ADC_CHANNEL_AOA_NB_SAMPLES   DEFAULT_AV_NB_SAMPLE
 

Functions

void AOA_adc_init (void)
 
void AOA_adc_update (void)
 

Variables

uint16_t adc_AOA_val
 Raw ADC value. More...
 
float AOA_offset
 Angle of Attack offset. More...
 
float AOA_filter
 Filtering value [0-1[ 0: no filtering 1: output is a constant value. More...
 
float AOA
 
float AOA_old
 
struct adc_buf buf_AOA
 

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 73 of file AOA_adc.c.

Referenced by AOA_adc_init().

#define AOA_FILTER   0.5

Definition at line 46 of file AOA_adc.c.

Referenced by AOA_adc_init().

#define AOA_OFFSET   M_PI

Definition at line 42 of file AOA_adc.c.

Referenced by AOA_adc_init().

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

Definition at line 50 of file AOA_adc.c.

Referenced by AOA_adc_update().

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 61 of file AOA_adc.c.

Function Documentation

void AOA_adc_init ( void  )

Definition at line 80 of file AOA_adc.c.

References adc_buf_channel(), ADC_CHANNEL_AOA_NB_SAMPLES, AOA, AOA_FILTER, AOA_filter, AOA_OFFSET, AOA_offset, AOA_old, and buf_AOA.

+ Here is the call graph for this function:

void AOA_adc_update ( void  )

Definition at line 90 of file AOA_adc.c.

References adc_AOA_val, AOA, AOA_filter, AOA_offset, AOA_old, AOA_SENS, adc_buf::av_nb_sample, buf_AOA, DefaultChannel, DefaultDevice, stateSetAngleOfAttack_f(), and adc_buf::sum.

+ Here is the call graph for this function:

Variable Documentation

uint16_t adc_AOA_val

Raw ADC value.

Definition at line 53 of file AOA_adc.c.

Referenced by AOA_adc_update().

float AOA

Definition at line 57 of file AOA_adc.c.

Referenced by AOA_adc_init(), and AOA_adc_update().

float AOA_filter

Filtering value [0-1[ 0: no filtering 1: output is a constant value.

Definition at line 54 of file AOA_adc.c.

Referenced by AOA_adc_init(), and AOA_adc_update().

float AOA_offset

Angle of Attack offset.

Definition at line 54 of file AOA_adc.c.

Referenced by AOA_adc_init(), and AOA_adc_update().

float AOA_old

Definition at line 57 of file AOA_adc.c.

Referenced by AOA_adc_init(), and AOA_adc_update().

struct adc_buf buf_AOA

Definition at line 76 of file AOA_adc.c.

Referenced by AOA_adc_init(), and AOA_adc_update().