27 #ifndef PPRZ_TRIG_INT_H
28 #define PPRZ_TRIG_INT_H
39 #ifndef PPRZ_TRIG_CONST
40 #define PPRZ_TRIG_CONST
43 #if defined(PPRZ_TRIG_INT_TEST)
44 #define PPRZ_TRIG_INT_COMPR_FLASH
45 #define PPRZ_TRIG_INT_COMPR_HIGHEST
46 #define PPRZ_TRIG_INT_COMPR_HIGH
47 #define PPRZ_TRIG_INT_COMPR_LOW
48 #define PPRZ_TRIG_INT_COMPR_NONE
51 #if defined(PPRZ_TRIG_INT_COMPR_FLASH) && !defined(PPRZ_TRIG_INT_COMPR_HIGHEST) && !defined(PPRZ_TRIG_INT_COMPR_HIGH) && !defined(PPRZ_TRIG_INT_COMPR_LOW)
52 #define PPRZ_TRIG_INT_COMPR_NONE
55 #define TRIG_INT_SIZE 6434
56 #define TRIG_INT_VAL_MAX 14
57 #define TREE_SIZE_4 (TRIG_INT_VAL_MAX - 4)
58 #define TREE_SIZE_8 (TRIG_INT_VAL_MAX - 8)
59 #define TREE_SIZE_12 (TRIG_INT_VAL_MAX - 12)
62 #define TRIG_INT_RLE_LEN 3379
63 #define TRIG_INT_COMPR_LEN ((TRIG_INT_RLE_LEN + 1) / 2)
66 #define ONE_MIN ((3 * 3) + 1)
68 #define TREE_BUF_12_1 1035
69 #define TREE_BUF_12_2 2145
70 #define TREE_BUF_12_3 3474
72 #if !defined(PPRZ_TRIG_INT_COMPR_FLASH) || defined(PPRZ_TRIG_INT_TEST)
81 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
83 int pprz_trig_int_init(
void);
85 #if defined(PPRZ_TRIG_INT_COMPR_HIGHEST)
90 #if defined(PPRZ_TRIG_INT_COMPR_HIGH)
95 #if defined(PPRZ_TRIG_INT_COMPR_LOW)
100 #if defined(PPRZ_TRIG_INT_COMPR_NONE)
106 #endif // PPRZ_TRIG_INT_COMPR_FLASH
109 #define PPRZ_ITRIG_SIN(_s, _a) { _s = pprz_itrig_sin(_a); }
110 #define PPRZ_ITRIG_COS(_c, _a) { _c = pprz_itrig_cos(_a); }
111 #define INT32_ATAN2(_a, _y, _x) { _a = int32_atan2(_y, _x); }
112 #define INT32_ATAN2_2(_a, _y, _x) { _a = int32_atan2_2(_y, _x); }
int32_t int32_atan2(int32_t y, int32_t x)
int32_t int32_atan2_2(int32_t y, int32_t x)
int32_t pprz_itrig_sin(int32_t angle)
PPRZ_TRIG_CONST int16_t pprz_trig_int[]
#define PPRZ_TRIG_CONST
Allow makefile to define PPRZ_TRIG_CONST in case we want to make the trig tables const and store them...
int32_t pprz_itrig_cos(int32_t angle)