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;
Main include for ABI (AirBorneInterface).
void aoa_adc_update(void)
#define ADC_CHANNEL_AOA_NB_SAMPLES
#define AOA_OFFSET
Default offset value (assuming 0 AOA is in the middle of the range)
#define AOA_SENS
Default sensitivity (2*pi on a 10 bit ADC)
#define AOA_FILTER
Default filter value.
uint32_t raw
raw ADC value
float filter
Filtering value [0-1] 0: no filtering 1: output is a constant value.
float offset
Angle of attack offset in radians.
float angle
Angle of attack in radians.
float sens
sensitiviy, i.e. scale to conver raw to angle
Angle of Attack sensor via ADC.
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.
Common code for AP and FBW telemetry.
static void stateSetAngleOfAttack_f(float aoa)
Set angle of attack in radians (float).
API to get/set the generic vehicle states.
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.