|
Paparazzi UAS v7.1_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_ANGLE_OFFSET M_PI |
| #define AOA_T4_FILTER 0.15f |
Default filter value for reasonable minimum filtering.
Time constant for second order Butterworth low pass filter Default of 0.15 should give cut-off freq of 1/(2*pi*tau) ~= 1Hz (0.01->15.9 / 0.05->3.2 / 0.1->1.59 / 0.2->0.79 / 0.3->0.53)
Definition at line 60 of file aoa_t4.c.
Referenced by aoa_t4_init(), and aoa_t4_init_filters().
| #define AOA_T4_FILTER_SAMPLING_TIME 0.0005 |
Definition at line 83 of file aoa_t4.c.
Referenced by aoa_t4_init_filters(), and ssa_t4_init_filters().
| #define AOA_T4_OFFSET 0.0f |
Small offset value in radians to get the sensor perfectly lined out.
Definition at line 46 of file aoa_t4.c.
Referenced by aoa_t4_init().
| #define AOA_T4_SIGN 1 |
To set reverse direction on readings use true.
Definition at line 67 of file aoa_t4.c.
Referenced by aoa_t4_update().
| #define AOA_T4_USE_COMPENSATION FALSE |
| #define SSA_ANGLE_OFFSET M_PI |
Default offset value (assuming 0 SSA is in the middle of the range).
Definition at line 117 of file aoa_t4.c.
Referenced by aoa_t4_update().
| #define SSA_T4_FILTER 0.20f |
Definition at line 131 of file aoa_t4.c.
Referenced by aoa_t4_init(), and ssa_t4_init_filters().
| #define SSA_T4_OFFSET 0.0f |
Small offset value in radians to get the sensor perfectly lined out.
Definition at line 122 of file aoa_t4.c.
Referenced by aoa_t4_init().
| #define SSA_T4_SIGN 1 |
Definition at line 137 of file aoa_t4.c.
Referenced by aoa_t4_update().
| #define SSA_T4_USE_FILTER FALSE |
|
static |
Definition at line 192 of file aoa_t4.c.
References actuators_t4_in_local, aoa_t4, convert_angle_x100_to_raw(), ActuatorsT4In::servo_10_angle, ActuatorsT4In::servo_1_angle, ActuatorsT4In::servo_2_angle, ActuatorsT4In::servo_3_angle, ActuatorsT4In::servo_4_angle, ActuatorsT4In::servo_5_angle, ActuatorsT4In::servo_6_angle, ActuatorsT4In::servo_7_angle, ActuatorsT4In::servo_8_angle, ActuatorsT4In::servo_9_angle, and ssa_t4.
Referenced by aoa_t4_init().
| void aoa_t4_init | ( | void | ) |
Definition at line 299 of file aoa_t4.c.
References ABI_BROADCAST, actuators_t4_abi_in(), ACTUATORS_T4_IN, aoa_send_type, aoa_t4, AOA_T4_FILTER, aoa_t4_init_filters(), AOA_T4_OFFSET, DefaultPeriodic, register_periodic_telemetry(), send_aoa(), SEND_TYPE_AOA, ssa_t4, SSA_T4_FILTER, ssa_t4_init_filters(), and SSA_T4_OFFSET.
| void aoa_t4_init_filters | ( | void | ) |
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().
| void aoa_t4_update | ( | void | ) |
Definition at line 329 of file aoa_t4.c.
References 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, send_aoa(), SSA_ANGLE_OFFSET, ssa_t4, SSA_T4_SIGN, stateGetNedToBodyEulersZxy_f(), and update_butterworth_2_low_pass().
Definition at line 180 of file aoa_t4.c.
Referenced by actuators_t4_abi_in().
|
static |
Definition at line 162 of file aoa_t4.c.
References aoa_send_type, aoa_t4, dev, SEND_TYPE_AOA, SEND_TYPE_SIDESLIP, and ssa_t4.
Referenced by aoa_t4_update().
| void ssa_t4_init_filters | ( | void | ) |
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().
| 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().