|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
32 #include "generated/airframe.h"
38 #include "pprzlink/messages.h"
43 #define AOA_OFFSET M_PI
47 #define AOA_FILTER 0.5
51 #define AOA_SENS ((2.0*M_PI)/1024)
57 #ifndef ADC_CHANNEL_AOA
58 #error "ADC_CHANNEL_AOA needs to be defined to use AOA_adc module"
61 #ifndef ADC_CHANNEL_AOA_NB_SAMPLES
62 #define ADC_CHANNEL_AOA_NB_SAMPLES DEFAULT_AV_NB_SAMPLE
78 static float prev_aoa = 0.0;
#define ADC_CHANNEL_AOA_NB_SAMPLES
float sens
sensitiviy, i.e. scale to conver raw to angle
uint32_t raw
raw ADC value
void adc_buf_channel(uint8_t adc_channel, struct adc_buf *s, uint8_t av_nb_sample)
Link between ChibiOS ADC drivers and Paparazzi adc_buffers.
void aoa_adc_update(void)
float filter
Filtering value [0-1] 0: no filtering 1: output is a constant value.
Angle of Attack sensor via ADC.
float angle
Angle of attack in radians.
float offset
Angle of attack offset in radians.
#define AOA_OFFSET
Default offset value (assuming 0 AOA is in the middle of the range)
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
static void stateSetAngleOfAttack_f(float aoa)
Set angle of attack in radians (float).
Common code for AP and FBW telemetry.
#define AOA_SENS
Default sensitivity (2*pi on a 10 bit ADC)
#define AOA_FILTER
Default filter value.