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)
84 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
87 #if defined(PPRZ_TRIG_INT_COMPR_HIGHEST)
92 #if defined(PPRZ_TRIG_INT_COMPR_HIGH)
97 #if defined(PPRZ_TRIG_INT_COMPR_LOW)
102 #if defined(PPRZ_TRIG_INT_COMPR_NONE)
111 #define PPRZ_ITRIG_SIN(_s, _a) { _s = pprz_itrig_sin(_a); }
112 #define PPRZ_ITRIG_COS(_c, _a) { _c = pprz_itrig_cos(_a); }
113 #define INT32_ATAN2(_a, _y, _x) { _a = int32_atan2(_y, _x); }
114 #define INT32_ATAN2_2(_a, _y, _x) { _a = int32_atan2_2(_y, _x); }
int pprz_trig_int_init(void)
#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 int32_atan2(int32_t y, int32_t x)
int32_t pprz_itrig_cos(int32_t angle)
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[]
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
int int32_t
Typedef defining 32 bit int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.