Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
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"
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 |
Angle of Attack sensor on ADC Autor: Bruzzlee.
ex: US DIGITAL MA3-A10-236-N
Definition in file aoa_adc.c.
#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 |
#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().
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.
void aoa_adc_update | ( | void | ) |
Definition at line 75 of file aoa_adc.c.
References Aoa_Adc::angle, aoa_adc, adc_buf::av_nb_sample, Aoa_Adc::buf, DefaultChannel, DefaultDevice, Aoa_Adc::filter, Aoa_Adc::offset, Aoa_Adc::raw, Aoa_Adc::sens, stateSetAngleOfAttack_f(), and adc_buf::sum.
struct Aoa_Adc aoa_adc |
Definition at line 64 of file aoa_adc.c.
Referenced by aoa_adc_init(), aoa_adc_update(), and aoa_pwm_update().