|
Paparazzi UAS
v5.12_stable-4-g9b43e9b
Paparazzi is a free software Unmanned Aircraft System.
|
Angle of Attack sensor on PWM. More...
#include "modules/sensors/aoa_pwm.h"#include "mcu_periph/pwm_input.h"#include "pprzlink/messages.h"#include "subsystems/datalink/downlink.h"#include "generated/airframe.h"#include "subsystems/datalink/telemetry.h"
Include dependency graph for aoa_pwm.c:Go to the source code of this file.
Macros | |
| #define | AOA_PWM_PERIOD 4096 |
| Default to a 12 bit PWM sensor. More... | |
| #define | AOA_PWM_OFFSET 1 |
| Some sensor may need an initial PWM offset (1 usec in the case of an MA3 sensor) More... | |
| #define | AOA_ANGLE_OFFSET M_PI |
| Default offset value (assuming 0 AOA is in the middle of the range) More... | |
| #define | AOA_OFFSET 0.0f |
| Default extra offset that can be ajusted from settings. More... | |
| #define | AOA_FILTER 0.0f |
| Default filter value. More... | |
| #define | AOA_SENS ((2.0f*M_PI)/AOA_PWM_PERIOD) |
| Default sensitivity (2*pi on a PWM of period AOA_PWM_PERIOD) More... | |
| #define | AOA_SIGN 1 |
| #define | SEND_SYNC_AOA TRUE |
| #define | LOG_AOA FALSE |
| #define | SSA_OFFSET 0.0f |
| #define | SSA_FILTER 0.0f |
| #define | SSA_SENS ((2.0f*M_PI)/AOA_PWM_PERIOD) |
| #define | SSA_SIGN 1 |
Functions | |
| static void | send_aoa (struct transport_tx *trans, struct link_device *dev) |
| void | aoa_pwm_init (void) |
| void | aoa_pwm_update (void) |
Variables | |
| struct Aoa_Pwm | aoa_pwm |
| struct Aoa_Pwm | ssa_pwm |
| enum Aoa_Type | aoa_send_type |
Angle of Attack sensor on PWM.
SENSOR, exemple : US DIGITAL MA3-P12-125-B
Definition in file aoa_pwm.c.
| #define AOA_ANGLE_OFFSET M_PI |
Default offset value (assuming 0 AOA is in the middle of the range)
Definition at line 62 of file aoa_pwm.c.
Referenced by aoa_pwm_update().
| #define AOA_FILTER 0.0f |
| #define AOA_OFFSET 0.0f |
Default extra offset that can be ajusted from settings.
Definition at line 66 of file aoa_pwm.c.
Referenced by aoa_pwm_init().
| #define AOA_PWM_OFFSET 1 |
Some sensor may need an initial PWM offset (1 usec in the case of an MA3 sensor)
Definition at line 58 of file aoa_pwm.c.
Referenced by aoa_pwm_update().
| #define AOA_PWM_PERIOD 4096 |
| #define AOA_SENS ((2.0f*M_PI)/AOA_PWM_PERIOD) |
Default sensitivity (2*pi on a PWM of period AOA_PWM_PERIOD)
Definition at line 74 of file aoa_pwm.c.
Referenced by aoa_pwm_init().
| #define AOA_SIGN 1 |
Definition at line 80 of file aoa_pwm.c.
Referenced by aoa_pwm_update().
| #define SSA_FILTER 0.0f |
Definition at line 106 of file aoa_pwm.c.
Referenced by aoa_pwm_init().
| #define SSA_OFFSET 0.0f |
Definition at line 102 of file aoa_pwm.c.
Referenced by aoa_pwm_init().
| #define SSA_SENS ((2.0f*M_PI)/AOA_PWM_PERIOD) |
Definition at line 110 of file aoa_pwm.c.
Referenced by aoa_pwm_init().
| #define SSA_SIGN 1 |
Definition at line 116 of file aoa_pwm.c.
Referenced by aoa_pwm_update().
| void aoa_pwm_init | ( | void | ) |
Definition at line 144 of file aoa_pwm.c.
References Aoa_Pwm::angle, AOA_FILTER, AOA_OFFSET, aoa_pwm, aoa_send_type, AOA_SENS, DefaultPeriodic, Aoa_Pwm::filter, log_started, Aoa_Pwm::offset, Aoa_Pwm::raw, register_periodic_telemetry(), send_aoa(), SEND_TYPE_AOA, Aoa_Pwm::sens, SSA_FILTER, SSA_OFFSET, ssa_pwm, and SSA_SENS.
Here is the call graph for this function:| void aoa_pwm_update | ( | void | ) |
Definition at line 166 of file aoa_pwm.c.
References Aoa_Pwm::angle, AOA_ANGLE_OFFSET, aoa_pwm, AOA_PWM_OFFSET, AOA_SIGN, DefaultChannel, DefaultDevice, Aoa_Pwm::filter, get_pwm_input_duty_in_usec(), log_started, Aoa_Pwm::offset, pprzLogFile, Aoa_Pwm::raw, send_aoa(), Aoa_Pwm::sens, ssa_pwm, SSA_SIGN, stateSetAngleOfAttack_f(), and stateSetSideslip_f().
Here is the call graph for this function:
|
static |
Definition at line 127 of file aoa_pwm.c.
References Aoa_Pwm::angle, aoa_pwm, aoa_send_type, Aoa_Pwm::raw, SEND_TYPE_AOA, SEND_TYPE_SIDESLIP, and ssa_pwm.
Referenced by aoa_pwm_init(), and aoa_pwm_update().
Here is the caller graph for this function:| struct Aoa_Pwm aoa_pwm |
Definition at line 91 of file aoa_pwm.c.
Referenced by aoa_pwm_init(), aoa_pwm_update(), and send_aoa().
| enum Aoa_Type aoa_send_type |
Definition at line 122 of file aoa_pwm.c.
Referenced by aoa_pwm_init(), and send_aoa().
| struct Aoa_Pwm ssa_pwm |
Definition at line 118 of file aoa_pwm.c.
Referenced by aoa_pwm_init(), aoa_pwm_update(), and send_aoa().