Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
Paparazzi fixed point trig functions. More...
#include "std.h"
Go to the source code of this file.
Macros | |
#define | PPRZ_TRIG_CONST |
Allow makefile to define PPRZ_TRIG_CONST in case we want to make the trig tables const and store them in flash. More... | |
#define | TRIG_INT_SIZE 6434 |
#define | TRIG_INT_VAL_MAX 14 |
#define | TREE_SIZE_4 (TRIG_INT_VAL_MAX - 4) |
#define | TREE_SIZE_8 (TRIG_INT_VAL_MAX - 8) |
#define | TREE_SIZE_12 (TRIG_INT_VAL_MAX - 12) |
#define | TRIG_INT_RLE_LEN 3379 |
#define | TRIG_INT_COMPR_LEN ((TRIG_INT_RLE_LEN + 1) / 2) |
#define | ONE_MIN ((3 * 3) + 1) |
#define | TREE_BUF_12_1 1035 |
#define | TREE_BUF_12_2 2145 |
#define | TREE_BUF_12_3 3474 |
#define | PPRZ_ITRIG_SIN(_s, _a) { _s = pprz_itrig_sin(_a); } |
#define | PPRZ_ITRIG_COS(_c, _a) { _c = pprz_itrig_cos(_a); } |
#define | INT32_ATAN2(_a, _y, _x) { _a = int32_atan2(_y, _x); } |
#define | INT32_ATAN2_2(_a, _y, _x) { _a = int32_atan2_2(_y, _x); } |
Functions | |
int32_t | pprz_itrig_sin (int32_t angle) |
int32_t | pprz_itrig_cos (int32_t angle) |
int32_t | int32_atan2 (int32_t y, int32_t x) |
int32_t | int32_atan2_2 (int32_t y, int32_t x) |
Variables | |
PPRZ_TRIG_CONST int16_t | pprz_trig_int [] |
Paparazzi fixed point trig functions.
Definition in file pprz_trig_int.h.
#define INT32_ATAN2 | ( | _a, | |
_y, | |||
_x | |||
) | { _a = int32_atan2(_y, _x); } |
Definition at line 111 of file pprz_trig_int.h.
#define INT32_ATAN2_2 | ( | _a, | |
_y, | |||
_x | |||
) | { _a = int32_atan2_2(_y, _x); } |
Definition at line 112 of file pprz_trig_int.h.
#define ONE_MIN ((3 * 3) + 1) |
Definition at line 66 of file pprz_trig_int.h.
#define PPRZ_ITRIG_COS | ( | _c, | |
_a | |||
) | { _c = pprz_itrig_cos(_a); } |
Definition at line 110 of file pprz_trig_int.h.
Referenced by ahrs_icq_realign_heading(), ahrs_icq_update_heading(), ahrs_int_get_euler_from_accel_mag(), get_phi_theta_measurement_fom_accel(), get_psi_measurement_from_mag(), gh_compute_route_ref(), guidance_hybrid_airspeed_to_attitude(), guidance_hybrid_position_to_airspeed(), int32_eulers_dot_321_of_rates(), int32_quat_of_axis_angle(), int32_quat_of_eulers(), int32_rates_of_eulers_dot_321(), int32_rmat_of_eulers_312(), int32_rmat_of_eulers_321(), nav_circle(), navigation_update_wp_from_speed(), read_rc_setpoint_speed_i(), stabilization_attitude_read_rc_setpoint_eulers(), stabilization_attitude_set_earth_cmd_i(), stabilization_attitude_set_failsafe_setpoint(), stabilization_indi_set_earth_cmd_i(), and stabilization_indi_set_failsafe_setpoint().
#define PPRZ_ITRIG_SIN | ( | _s, | |
_a | |||
) | { _s = pprz_itrig_sin(_a); } |
Definition at line 109 of file pprz_trig_int.h.
Referenced by ahrs_icq_realign_heading(), ahrs_icq_update_heading(), ahrs_int_get_euler_from_accel_mag(), get_psi_measurement_from_mag(), gh_compute_route_ref(), guidance_hybrid_airspeed_to_attitude(), guidance_hybrid_position_to_airspeed(), int32_eulers_dot_321_of_rates(), int32_quat_of_axis_angle(), int32_quat_of_eulers(), int32_rates_of_eulers_dot_321(), int32_rmat_of_eulers_312(), int32_rmat_of_eulers_321(), nav_circle(), navigation_update_wp_from_speed(), read_rc_setpoint_speed_i(), stabilization_attitude_get_heading_i(), stabilization_attitude_read_rc_setpoint_eulers(), stabilization_attitude_set_earth_cmd_i(), stabilization_attitude_set_failsafe_setpoint(), stabilization_indi_set_earth_cmd_i(), and stabilization_indi_set_failsafe_setpoint().
#define PPRZ_TRIG_CONST |
Allow makefile to define PPRZ_TRIG_CONST in case we want to make the trig tables const and store them in flash.
Otherwise use the empty string and keep the table in RAM.
Definition at line 40 of file pprz_trig_int.h.
#define TREE_BUF_12_1 1035 |
Definition at line 68 of file pprz_trig_int.h.
#define TREE_BUF_12_2 2145 |
Definition at line 69 of file pprz_trig_int.h.
#define TREE_BUF_12_3 3474 |
Definition at line 70 of file pprz_trig_int.h.
#define TREE_SIZE_12 (TRIG_INT_VAL_MAX - 12) |
Definition at line 59 of file pprz_trig_int.h.
#define TREE_SIZE_4 (TRIG_INT_VAL_MAX - 4) |
Definition at line 57 of file pprz_trig_int.h.
#define TREE_SIZE_8 (TRIG_INT_VAL_MAX - 8) |
Definition at line 58 of file pprz_trig_int.h.
#define TRIG_INT_COMPR_LEN ((TRIG_INT_RLE_LEN + 1) / 2) |
Definition at line 63 of file pprz_trig_int.h.
#define TRIG_INT_RLE_LEN 3379 |
Definition at line 62 of file pprz_trig_int.h.
#define TRIG_INT_SIZE 6434 |
Definition at line 55 of file pprz_trig_int.h.
#define TRIG_INT_VAL_MAX 14 |
Definition at line 56 of file pprz_trig_int.h.
Definition at line 891 of file pprz_trig_int.c.
References c1, c2, INT32_ANGLE_PI_4, and R_FRAC.
Referenced by get_phi_theta_measurement_fom_accel(), nav_circle(), rotorcraft_cam_periodic(), and stateCalcHorizontalSpeedDir_i().
Definition at line 913 of file pprz_trig_int.c.
References ANGLE_BFP_OF_REAL, c1, c2, INT32_ANGLE_FRAC, INT32_ANGLE_PI_4, and R_FRAC.
Referenced by nav_oval().
Definition at line 880 of file pprz_trig_int.c.
References INT32_ANGLE_PI_2, and pprz_itrig_sin().
Referenced by stabilization_attitude_run().
Definition at line 859 of file pprz_trig_int.c.
References INT32_ANGLE_NORMALIZE, INT32_ANGLE_PI, INT32_ANGLE_PI_2, and pprz_trig_int.
Referenced by pprz_itrig_cos(), and stabilization_attitude_run().
PPRZ_TRIG_CONST int16_t pprz_trig_int[] |
Definition at line 31 of file pprz_trig_int.c.
Referenced by pprz_itrig_sin().