![]() |
Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Angle of Attack sensor using T4 Actuators Board and a modified serial bus servo added wind vane. More...
#include "modules/sensors/aoa_t4.h"
#include "generated/airframe.h"
#include "modules/core/abi.h"
#include "state.h"
#include "std.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "filters/low_pass_filter.h"
#include "modules/datalink/telemetry.h"
Go to the source code of this file.
Macros | |
#define | AOA_ANGLE_OFFSET M_PI |
Default offset value (assuming 0 AOA is in the middle of the range) | |
#define | AOA_T4_OFFSET 0.0f |
Small offset value in radians to get the sensor perfectly lined out. | |
#define | AOA_T4_USE_FILTER FALSE |
Use lowpass filter for AOA. | |
#define | AOA_T4_FILTER 0.15f |
Default filter value for reasonable minimum filtering. | |
#define | AOA_T4_SIGN 1 |
To set reverse direction on readings use true. | |
#define | AOA_T4_SYNC_SEND FALSE |
#define | AOA_T4_FILTER_SAMPLING_TIME 0.0005 |
#define | AOA_T4_USE_COMPENSATION FALSE |
Enable A1 A2 to Theta compensation for AOA sensor angle. | |
#define | AOA_T4_COMP_A1 0.0f |
#define | AOA_T4_COMP_B1 0.0f |
#define | AOA_T4_COMP_A2 -0.5457f |
#define | AOA_T4_COMP_B2 0.0f |
#define | SSA_ANGLE_OFFSET M_PI |
Default offset value (assuming 0 SSA is in the middle of the range) | |
#define | SSA_T4_OFFSET 0.0f |
Small offset value in radians to get the sensor perfectly lined out. | |
#define | SSA_T4_USE_FILTER FALSE |
Use lowpass filter for SSA. | |
#define | SSA_T4_FILTER 0.20f |
#define | SSA_T4_SIGN 1 |
Functions | |
static void | send_aoa (struct transport_tx *trans, struct link_device *dev) |
uint32_t | convert_angle_x100_to_raw (int16_t angle) |
static void | actuators_t4_abi_in (uint8_t sender_id, struct ActuatorsT4In *actuators_t4_in_ptr, float *actuators_t4_extra_data_in_ptr) |
void | aoa_t4_init_filters (void) |
void | ssa_t4_init_filters (void) |
void | aoa_t4_init (void) |
void | aoa_t4_update (void) |
Variables | |
Butterworth2LowPass | aoa_t4_lowpass_filter |
Servo ID to use for the modified servo as AOA sensor. | |
struct Aoa_T4 | aoa_t4 |
Butterworth2LowPass | ssa_t4_lowpass_filter |
struct Aoa_T4 | ssa_t4 |
struct ActuatorsT4In | actuators_t4_in_local |
static abi_event | ACTUATORS_T4_IN |
struct FloatEulers | eulers_t4 |
float | aoa_t4_a1 = AOA_T4_COMP_A1 |
float | aoa_t4_b1 = AOA_T4_COMP_B1 |
float | aoa_t4_a2 = AOA_T4_COMP_A2 |
float | aoa_t4_b2 = AOA_T4_COMP_B2 |
enum Aoa_Type | aoa_send_type |
Angle of Attack sensor using T4 Actuators Board and a modified serial bus servo added wind vane.
The SBS must be of hall effect type to minimize friction.
Definition in file aoa_t4.c.
#define AOA_T4_OFFSET 0.0f |
#define AOA_T4_SIGN 1 |
#define SSA_T4_OFFSET 0.0f |
|
static |
Definition at line 192 of file aoa_t4.c.
References actuators_t4_in_local, aoa_t4, convert_angle_x100_to_raw(), foo, Aoa_T4::raw, and ssa_t4.
Referenced by aoa_t4_init().
Definition at line 299 of file aoa_t4.c.
References ABI_BROADCAST, actuators_t4_abi_in(), ACTUATORS_T4_IN, Aoa_T4::angle, aoa_send_type, aoa_t4, AOA_T4_FILTER, aoa_t4_init_filters(), AOA_T4_OFFSET, DefaultPeriodic, Aoa_T4::filter, foo, Aoa_T4::offset, Aoa_T4::raw, register_periodic_telemetry(), send_aoa(), SEND_TYPE_AOA, ssa_t4, SSA_T4_FILTER, ssa_t4_init_filters(), and SSA_T4_OFFSET.
Definition at line 287 of file aoa_t4.c.
References AOA_T4_FILTER, AOA_T4_FILTER_SAMPLING_TIME, aoa_t4_lowpass_filter, and init_butterworth_2_low_pass().
Referenced by aoa_t4_init().
Definition at line 329 of file aoa_t4.c.
References Aoa_T4::angle, AOA_ANGLE_OFFSET, AOA_PWM_ID, aoa_t4, aoa_t4_a1, aoa_t4_a2, aoa_t4_b1, aoa_t4_b2, aoa_t4_lowpass_filter, AOA_T4_SIGN, DefaultChannel, DefaultDevice, eulers_t4, float_eulers_of_quat_zxy(), foo, Aoa_T4::offset, Aoa_T4::raw, send_aoa(), SSA_ANGLE_OFFSET, ssa_t4, SSA_T4_SIGN, stateGetNedToBodyQuat_f(), FloatEulers::theta, and update_butterworth_2_low_pass().
Definition at line 180 of file aoa_t4.c.
References foo.
Referenced by actuators_t4_abi_in().
|
static |
Definition at line 162 of file aoa_t4.c.
References Aoa_T4::angle, aoa_send_type, aoa_t4, dev, foo, Aoa_T4::raw, SEND_TYPE_AOA, SEND_TYPE_SIDESLIP, and ssa_t4.
Referenced by aoa_t4_init(), and aoa_t4_update().
Definition at line 293 of file aoa_t4.c.
References AOA_T4_FILTER_SAMPLING_TIME, init_butterworth_2_low_pass(), SSA_T4_FILTER, and ssa_t4_lowpass_filter.
Referenced by aoa_t4_init().
|
static |
Definition at line 149 of file aoa_t4.c.
Referenced by aoa_t4_init().
struct ActuatorsT4In actuators_t4_in_local |
Definition at line 147 of file aoa_t4.c.
Referenced by actuators_t4_abi_in().
Definition at line 157 of file aoa_t4.c.
Referenced by aoa_t4_init(), and send_aoa().
struct Aoa_T4 aoa_t4 |
Definition at line 87 of file aoa_t4.c.
Referenced by actuators_t4_abi_in(), aoa_t4_init(), aoa_t4_update(), and send_aoa().
float aoa_t4_a1 = AOA_T4_COMP_A1 |
Definition at line 152 of file aoa_t4.c.
Referenced by aoa_t4_update().
float aoa_t4_a2 = AOA_T4_COMP_A2 |
Definition at line 154 of file aoa_t4.c.
Referenced by aoa_t4_update().
float aoa_t4_b1 = AOA_T4_COMP_B1 |
Definition at line 153 of file aoa_t4.c.
Referenced by aoa_t4_update().
float aoa_t4_b2 = AOA_T4_COMP_B2 |
Definition at line 155 of file aoa_t4.c.
Referenced by aoa_t4_update().
Butterworth2LowPass aoa_t4_lowpass_filter |
Servo ID to use for the modified servo as AOA sensor.
Definition at line 81 of file aoa_t4.c.
Referenced by aoa_t4_init_filters(), and aoa_t4_update().
struct FloatEulers eulers_t4 |
Definition at line 151 of file aoa_t4.c.
Referenced by aoa_t4_update().
struct Aoa_T4 ssa_t4 |
Definition at line 145 of file aoa_t4.c.
Referenced by actuators_t4_abi_in(), aoa_t4_init(), aoa_t4_update(), and send_aoa().
Butterworth2LowPass ssa_t4_lowpass_filter |
Definition at line 141 of file aoa_t4.c.
Referenced by ssa_t4_init_filters().