Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
pprz_trig_int.c
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2008-2009 Antoine Drouin <poinix@gmail.com>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, see
18  * <http://www.gnu.org/licenses/>.
19  */
20 
27 #include "pprz_trig_int.h"
28 #include "pprz_algebra_int.h"
29 #if !defined(PPRZ_TRIG_INT_USE_FLOAT)
30 #if !defined(PPRZ_TRIG_INT_COMPR_FLASH) || defined(PPRZ_TRIG_INT_TEST)
32  3, 7, 11, 15, 19, 23, 27, 31, 35, 39, 43, 47, 51, 55, 59, 63,
33  67, 71, 75, 79, 83, 87, 91, 95, 99, 103, 107, 111, 115, 119, 123, 127,
34  131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, 175, 179, 183, 187, 191,
35  195, 199, 203, 207, 211, 215, 219, 223, 227, 231, 235, 239, 243, 247, 251, 255,
36  259, 263, 267, 271, 275, 279, 283, 287, 291, 295, 299, 303, 307, 311, 315, 319,
37  323, 327, 331, 335, 339, 343, 347, 351, 355, 359, 363, 367, 371, 375, 379, 383,
38  387, 391, 395, 399, 403, 407, 411, 415, 419, 423, 427, 431, 435, 439, 443, 447,
39  451, 455, 459, 463, 467, 471, 475, 479, 483, 487, 491, 495, 499, 503, 507, 511,
40  515, 519, 523, 527, 531, 535, 539, 543, 547, 551, 555, 559, 563, 567, 571, 575,
41  579, 583, 587, 591, 595, 599, 603, 607, 611, 615, 619, 623, 627, 631, 635, 639,
42  643, 647, 651, 655, 659, 663, 667, 671, 675, 679, 683, 687, 691, 695, 699, 703,
43  707, 711, 715, 719, 723, 727, 731, 735, 739, 743, 747, 751, 755, 759, 763, 767,
44  771, 775, 779, 783, 787, 791, 795, 799, 803, 807, 811, 815, 819, 823, 827, 831,
45  835, 839, 843, 847, 851, 855, 859, 863, 867, 871, 875, 879, 883, 887, 891, 895,
46  899, 903, 907, 911, 915, 919, 923, 927, 931, 935, 939, 943, 947, 951, 955, 959,
47  963, 967, 971, 975, 979, 983, 987, 991, 995, 999, 1003, 1007, 1011, 1015, 1019, 1023,
48  1027, 1031, 1035, 1039, 1043, 1047, 1051, 1055, 1059, 1063, 1067, 1071, 1075, 1079, 1083, 1087,
49  1091, 1095, 1099, 1103, 1107, 1111, 1115, 1119, 1123, 1127, 1131, 1135, 1139, 1143, 1147, 1151,
50  1155, 1159, 1163, 1167, 1171, 1174, 1178, 1182, 1186, 1190, 1194, 1198, 1202, 1206, 1210, 1214,
51  1218, 1222, 1226, 1230, 1234, 1238, 1242, 1246, 1250, 1254, 1258, 1262, 1266, 1270, 1274, 1278,
52  1282, 1286, 1290, 1294, 1298, 1302, 1306, 1310, 1314, 1318, 1322, 1326, 1330, 1334, 1338, 1342,
53  1346, 1350, 1354, 1358, 1362, 1366, 1370, 1374, 1378, 1382, 1386, 1390, 1394, 1398, 1402, 1406,
54  1410, 1414, 1418, 1422, 1426, 1430, 1434, 1438, 1442, 1446, 1450, 1454, 1458, 1462, 1466, 1470,
55  1474, 1477, 1481, 1485, 1489, 1493, 1497, 1501, 1505, 1509, 1513, 1517, 1521, 1525, 1529, 1533,
56  1537, 1541, 1545, 1549, 1553, 1557, 1561, 1565, 1569, 1573, 1577, 1581, 1585, 1589, 1593, 1597,
57  1601, 1605, 1609, 1613, 1617, 1621, 1625, 1629, 1633, 1637, 1641, 1645, 1649, 1653, 1657, 1661,
58  1665, 1669, 1673, 1677, 1681, 1685, 1688, 1692, 1696, 1700, 1704, 1708, 1712, 1716, 1720, 1724,
59  1728, 1732, 1736, 1740, 1744, 1748, 1752, 1756, 1760, 1764, 1768, 1772, 1776, 1780, 1784, 1788,
60  1792, 1796, 1800, 1804, 1808, 1812, 1816, 1820, 1824, 1828, 1832, 1836, 1840, 1844, 1848, 1852,
61  1856, 1859, 1863, 1867, 1871, 1875, 1879, 1883, 1887, 1891, 1895, 1899, 1903, 1907, 1911, 1915,
62  1919, 1923, 1927, 1931, 1935, 1939, 1943, 1947, 1951, 1955, 1959, 1963, 1967, 1971, 1975, 1979,
63  1983, 1987, 1991, 1995, 1999, 2002, 2006, 2010, 2014, 2018, 2022, 2026, 2030, 2034, 2038, 2042,
64  2046, 2050, 2054, 2058, 2062, 2066, 2070, 2074, 2078, 2082, 2086, 2090, 2094, 2098, 2102, 2106,
65  2110, 2114, 2118, 2122, 2125, 2129, 2133, 2137, 2141, 2145, 2149, 2153, 2157, 2161, 2165, 2169,
66  2173, 2177, 2181, 2185, 2189, 2193, 2197, 2201, 2205, 2209, 2213, 2217, 2221, 2225, 2229, 2233,
67  2236, 2240, 2244, 2248, 2252, 2256, 2260, 2264, 2268, 2272, 2276, 2280, 2284, 2288, 2292, 2296,
68  2300, 2304, 2308, 2312, 2316, 2320, 2324, 2328, 2332, 2336, 2339, 2343, 2347, 2351, 2355, 2359,
69  2363, 2367, 2371, 2375, 2379, 2383, 2387, 2391, 2395, 2399, 2403, 2407, 2411, 2415, 2419, 2423,
70  2427, 2430, 2434, 2438, 2442, 2446, 2450, 2454, 2458, 2462, 2466, 2470, 2474, 2478, 2482, 2486,
71  2490, 2494, 2498, 2502, 2506, 2510, 2514, 2517, 2521, 2525, 2529, 2533, 2537, 2541, 2545, 2549,
72  2553, 2557, 2561, 2565, 2569, 2573, 2577, 2581, 2585, 2589, 2593, 2597, 2600, 2604, 2608, 2612,
73  2616, 2620, 2624, 2628, 2632, 2636, 2640, 2644, 2648, 2652, 2656, 2660, 2664, 2668, 2672, 2675,
74  2679, 2683, 2687, 2691, 2695, 2699, 2703, 2707, 2711, 2715, 2719, 2723, 2727, 2731, 2735, 2739,
75  2743, 2746, 2750, 2754, 2758, 2762, 2766, 2770, 2774, 2778, 2782, 2786, 2790, 2794, 2798, 2802,
76  2806, 2810, 2813, 2817, 2821, 2825, 2829, 2833, 2837, 2841, 2845, 2849, 2853, 2857, 2861, 2865,
77  2869, 2873, 2877, 2880, 2884, 2888, 2892, 2896, 2900, 2904, 2908, 2912, 2916, 2920, 2924, 2928,
78  2932, 2936, 2939, 2943, 2947, 2951, 2955, 2959, 2963, 2967, 2971, 2975, 2979, 2983, 2987, 2991,
79  2995, 2998, 3002, 3006, 3010, 3014, 3018, 3022, 3026, 3030, 3034, 3038, 3042, 3046, 3050, 3054,
80  3057, 3061, 3065, 3069, 3073, 3077, 3081, 3085, 3089, 3093, 3097, 3101, 3105, 3109, 3112, 3116,
81  3120, 3124, 3128, 3132, 3136, 3140, 3144, 3148, 3152, 3156, 3160, 3163, 3167, 3171, 3175, 3179,
82  3183, 3187, 3191, 3195, 3199, 3203, 3207, 3211, 3215, 3218, 3222, 3226, 3230, 3234, 3238, 3242,
83  3246, 3250, 3254, 3258, 3262, 3265, 3269, 3273, 3277, 3281, 3285, 3289, 3293, 3297, 3301, 3305,
84  3309, 3312, 3316, 3320, 3324, 3328, 3332, 3336, 3340, 3344, 3348, 3352, 3356, 3359, 3363, 3367,
85  3371, 3375, 3379, 3383, 3387, 3391, 3395, 3399, 3403, 3406, 3410, 3414, 3418, 3422, 3426, 3430,
86  3434, 3438, 3442, 3446, 3449, 3453, 3457, 3461, 3465, 3469, 3473, 3477, 3481, 3485, 3489, 3492,
87  3496, 3500, 3504, 3508, 3512, 3516, 3520, 3524, 3528, 3532, 3535, 3539, 3543, 3547, 3551, 3555,
88  3559, 3563, 3567, 3571, 3575, 3578, 3582, 3586, 3590, 3594, 3598, 3602, 3606, 3610, 3614, 3617,
89  3621, 3625, 3629, 3633, 3637, 3641, 3645, 3649, 3653, 3656, 3660, 3664, 3668, 3672, 3676, 3680,
90  3684, 3688, 3692, 3695, 3699, 3703, 3707, 3711, 3715, 3719, 3723, 3727, 3730, 3734, 3738, 3742,
91  3746, 3750, 3754, 3758, 3762, 3766, 3769, 3773, 3777, 3781, 3785, 3789, 3793, 3797, 3801, 3804,
92  3808, 3812, 3816, 3820, 3824, 3828, 3832, 3836, 3839, 3843, 3847, 3851, 3855, 3859, 3863, 3867,
93  3871, 3874, 3878, 3882, 3886, 3890, 3894, 3898, 3902, 3906, 3909, 3913, 3917, 3921, 3925, 3929,
94  3933, 3937, 3940, 3944, 3948, 3952, 3956, 3960, 3964, 3968, 3972, 3975, 3979, 3983, 3987, 3991,
95  3995, 3999, 4003, 4006, 4010, 4014, 4018, 4022, 4026, 4030, 4034, 4037, 4041, 4045, 4049, 4053,
96  4057, 4061, 4065, 4068, 4072, 4076, 4080, 4084, 4088, 4092, 4096, 4099, 4103, 4107, 4111, 4115,
97  4119, 4123, 4127, 4130, 4134, 4138, 4142, 4146, 4150, 4154, 4158, 4161, 4165, 4169, 4173, 4177,
98  4181, 4185, 4188, 4192, 4196, 4200, 4204, 4208, 4212, 4216, 4219, 4223, 4227, 4231, 4235, 4239,
99  4243, 4246, 4250, 4254, 4258, 4262, 4266, 4270, 4273, 4277, 4281, 4285, 4289, 4293, 4297, 4301,
100  4304, 4308, 4312, 4316, 4320, 4324, 4328, 4331, 4335, 4339, 4343, 4347, 4351, 4355, 4358, 4362,
101  4366, 4370, 4374, 4378, 4382, 4385, 4389, 4393, 4397, 4401, 4405, 4408, 4412, 4416, 4420, 4424,
102  4428, 4432, 4435, 4439, 4443, 4447, 4451, 4455, 4459, 4462, 4466, 4470, 4474, 4478, 4482, 4485,
103  4489, 4493, 4497, 4501, 4505, 4509, 4512, 4516, 4520, 4524, 4528, 4532, 4535, 4539, 4543, 4547,
104  4551, 4555, 4559, 4562, 4566, 4570, 4574, 4578, 4582, 4585, 4589, 4593, 4597, 4601, 4605, 4608,
105  4612, 4616, 4620, 4624, 4628, 4631, 4635, 4639, 4643, 4647, 4651, 4654, 4658, 4662, 4666, 4670,
106  4674, 4677, 4681, 4685, 4689, 4693, 4697, 4700, 4704, 4708, 4712, 4716, 4720, 4723, 4727, 4731,
107  4735, 4739, 4743, 4746, 4750, 4754, 4758, 4762, 4766, 4769, 4773, 4777, 4781, 4785, 4789, 4792,
108  4796, 4800, 4804, 4808, 4811, 4815, 4819, 4823, 4827, 4831, 4834, 4838, 4842, 4846, 4850, 4854,
109  4857, 4861, 4865, 4869, 4873, 4876, 4880, 4884, 4888, 4892, 4896, 4899, 4903, 4907, 4911, 4915,
110  4918, 4922, 4926, 4930, 4934, 4938, 4941, 4945, 4949, 4953, 4957, 4960, 4964, 4968, 4972, 4976,
111  4979, 4983, 4987, 4991, 4995, 4998, 5002, 5006, 5010, 5014, 5018, 5021, 5025, 5029, 5033, 5037,
112  5040, 5044, 5048, 5052, 5056, 5059, 5063, 5067, 5071, 5075, 5078, 5082, 5086, 5090, 5094, 5097,
113  5101, 5105, 5109, 5113, 5116, 5120, 5124, 5128, 5132, 5135, 5139, 5143, 5147, 5151, 5154, 5158,
114  5162, 5166, 5170, 5173, 5177, 5181, 5185, 5189, 5192, 5196, 5200, 5204, 5208, 5211, 5215, 5219,
115  5223, 5227, 5230, 5234, 5238, 5242, 5245, 5249, 5253, 5257, 5261, 5264, 5268, 5272, 5276, 5280,
116  5283, 5287, 5291, 5295, 5298, 5302, 5306, 5310, 5314, 5317, 5321, 5325, 5329, 5333, 5336, 5340,
117  5344, 5348, 5351, 5355, 5359, 5363, 5367, 5370, 5374, 5378, 5382, 5385, 5389, 5393, 5397, 5401,
118  5404, 5408, 5412, 5416, 5419, 5423, 5427, 5431, 5435, 5438, 5442, 5446, 5450, 5453, 5457, 5461,
119  5465, 5468, 5472, 5476, 5480, 5484, 5487, 5491, 5495, 5499, 5502, 5506, 5510, 5514, 5517, 5521,
120  5525, 5529, 5533, 5536, 5540, 5544, 5548, 5551, 5555, 5559, 5563, 5566, 5570, 5574, 5578, 5581,
121  5585, 5589, 5593, 5596, 5600, 5604, 5608, 5612, 5615, 5619, 5623, 5627, 5630, 5634, 5638, 5642,
122  5645, 5649, 5653, 5657, 5660, 5664, 5668, 5672, 5675, 5679, 5683, 5687, 5690, 5694, 5698, 5702,
123  5705, 5709, 5713, 5717, 5720, 5724, 5728, 5732, 5735, 5739, 5743, 5747, 5750, 5754, 5758, 5762,
124  5765, 5769, 5773, 5777, 5780, 5784, 5788, 5792, 5795, 5799, 5803, 5806, 5810, 5814, 5818, 5821,
125  5825, 5829, 5833, 5836, 5840, 5844, 5848, 5851, 5855, 5859, 5863, 5866, 5870, 5874, 5877, 5881,
126  5885, 5889, 5892, 5896, 5900, 5904, 5907, 5911, 5915, 5919, 5922, 5926, 5930, 5933, 5937, 5941,
127  5945, 5948, 5952, 5956, 5960, 5963, 5967, 5971, 5974, 5978, 5982, 5986, 5989, 5993, 5997, 6001,
128  6004, 6008, 6012, 6015, 6019, 6023, 6027, 6030, 6034, 6038, 6041, 6045, 6049, 6053, 6056, 6060,
129  6064, 6067, 6071, 6075, 6079, 6082, 6086, 6090, 6093, 6097, 6101, 6105, 6108, 6112, 6116, 6119,
130  6123, 6127, 6131, 6134, 6138, 6142, 6145, 6149, 6153, 6157, 6160, 6164, 6168, 6171, 6175, 6179,
131  6182, 6186, 6190, 6194, 6197, 6201, 6205, 6208, 6212, 6216, 6219, 6223, 6227, 6231, 6234, 6238,
132  6242, 6245, 6249, 6253, 6256, 6260, 6264, 6268, 6271, 6275, 6279, 6282, 6286, 6290, 6293, 6297,
133  6301, 6304, 6308, 6312, 6316, 6319, 6323, 6327, 6330, 6334, 6338, 6341, 6345, 6349, 6352, 6356,
134  6360, 6364, 6367, 6371, 6375, 6378, 6382, 6386, 6389, 6393, 6397, 6400, 6404, 6408, 6411, 6415,
135  6419, 6422, 6426, 6430, 6433, 6437, 6441, 6445, 6448, 6452, 6456, 6459, 6463, 6467, 6470, 6474,
136  6478, 6481, 6485, 6489, 6492, 6496, 6500, 6503, 6507, 6511, 6514, 6518, 6522, 6525, 6529, 6533,
137  6536, 6540, 6544, 6547, 6551, 6555, 6558, 6562, 6566, 6569, 6573, 6577, 6580, 6584, 6588, 6591,
138  6595, 6599, 6602, 6606, 6610, 6613, 6617, 6621, 6624, 6628, 6632, 6635, 6639, 6643, 6646, 6650,
139  6654, 6657, 6661, 6664, 6668, 6672, 6675, 6679, 6683, 6686, 6690, 6694, 6697, 6701, 6705, 6708,
140  6712, 6716, 6719, 6723, 6727, 6730, 6734, 6737, 6741, 6745, 6748, 6752, 6756, 6759, 6763, 6767,
141  6770, 6774, 6778, 6781, 6785, 6788, 6792, 6796, 6799, 6803, 6807, 6810, 6814, 6818, 6821, 6825,
142  6828, 6832, 6836, 6839, 6843, 6847, 6850, 6854, 6858, 6861, 6865, 6868, 6872, 6876, 6879, 6883,
143  6887, 6890, 6894, 6898, 6901, 6905, 6908, 6912, 6916, 6919, 6923, 6927, 6930, 6934, 6937, 6941,
144  6945, 6948, 6952, 6956, 6959, 6963, 6966, 6970, 6974, 6977, 6981, 6984, 6988, 6992, 6995, 6999,
145  7003, 7006, 7010, 7013, 7017, 7021, 7024, 7028, 7031, 7035, 7039, 7042, 7046, 7050, 7053, 7057,
146  7060, 7064, 7068, 7071, 7075, 7078, 7082, 7086, 7089, 7093, 7096, 7100, 7104, 7107, 7111, 7114,
147  7118, 7122, 7125, 7129, 7132, 7136, 7140, 7143, 7147, 7150, 7154, 7158, 7161, 7165, 7168, 7172,
148  7176, 7179, 7183, 7186, 7190, 7194, 7197, 7201, 7204, 7208, 7212, 7215, 7219, 7222, 7226, 7230,
149  7233, 7237, 7240, 7244, 7247, 7251, 7255, 7258, 7262, 7265, 7269, 7273, 7276, 7280, 7283, 7287,
150  7290, 7294, 7298, 7301, 7305, 7308, 7312, 7316, 7319, 7323, 7326, 7330, 7333, 7337, 7341, 7344,
151  7348, 7351, 7355, 7358, 7362, 7366, 7369, 7373, 7376, 7380, 7383, 7387, 7391, 7394, 7398, 7401,
152  7405, 7408, 7412, 7416, 7419, 7423, 7426, 7430, 7433, 7437, 7441, 7444, 7448, 7451, 7455, 7458,
153  7462, 7465, 7469, 7473, 7476, 7480, 7483, 7487, 7490, 7494, 7498, 7501, 7505, 7508, 7512, 7515,
154  7519, 7522, 7526, 7530, 7533, 7537, 7540, 7544, 7547, 7551, 7554, 7558, 7561, 7565, 7569, 7572,
155  7576, 7579, 7583, 7586, 7590, 7593, 7597, 7600, 7604, 7608, 7611, 7615, 7618, 7622, 7625, 7629,
156  7632, 7636, 7639, 7643, 7646, 7650, 7654, 7657, 7661, 7664, 7668, 7671, 7675, 7678, 7682, 7685,
157  7689, 7692, 7696, 7700, 7703, 7707, 7710, 7714, 7717, 7721, 7724, 7728, 7731, 7735, 7738, 7742,
158  7745, 7749, 7752, 7756, 7759, 7763, 7767, 7770, 7774, 7777, 7781, 7784, 7788, 7791, 7795, 7798,
159  7802, 7805, 7809, 7812, 7816, 7819, 7823, 7826, 7830, 7833, 7837, 7840, 7844, 7847, 7851, 7854,
160  7858, 7861, 7865, 7868, 7872, 7875, 7879, 7882, 7886, 7889, 7893, 7896, 7900, 7904, 7907, 7911,
161  7914, 7918, 7921, 7925, 7928, 7932, 7935, 7939, 7942, 7946, 7949, 7953, 7956, 7960, 7963, 7966,
162  7970, 7973, 7977, 7980, 7984, 7987, 7991, 7994, 7998, 8001, 8005, 8008, 8012, 8015, 8019, 8022,
163  8026, 8029, 8033, 8036, 8040, 8043, 8047, 8050, 8054, 8057, 8061, 8064, 8068, 8071, 8075, 8078,
164  8082, 8085, 8089, 8092, 8095, 8099, 8102, 8106, 8109, 8113, 8116, 8120, 8123, 8127, 8130, 8134,
165  8137, 8141, 8144, 8148, 8151, 8155, 8158, 8161, 8165, 8168, 8172, 8175, 8179, 8182, 8186, 8189,
166  8193, 8196, 8200, 8203, 8207, 8210, 8213, 8217, 8220, 8224, 8227, 8231, 8234, 8238, 8241, 8245,
167  8248, 8251, 8255, 8258, 8262, 8265, 8269, 8272, 8276, 8279, 8283, 8286, 8289, 8293, 8296, 8300,
168  8303, 8307, 8310, 8314, 8317, 8321, 8324, 8327, 8331, 8334, 8338, 8341, 8345, 8348, 8351, 8355,
169  8358, 8362, 8365, 8369, 8372, 8376, 8379, 8382, 8386, 8389, 8393, 8396, 8400, 8403, 8406, 8410,
170  8413, 8417, 8420, 8424, 8427, 8431, 8434, 8437, 8441, 8444, 8448, 8451, 8455, 8458, 8461, 8465,
171  8468, 8472, 8475, 8478, 8482, 8485, 8489, 8492, 8496, 8499, 8502, 8506, 8509, 8513, 8516, 8520,
172  8523, 8526, 8530, 8533, 8537, 8540, 8543, 8547, 8550, 8554, 8557, 8560, 8564, 8567, 8571, 8574,
173  8578, 8581, 8584, 8588, 8591, 8595, 8598, 8601, 8605, 8608, 8612, 8615, 8618, 8622, 8625, 8629,
174  8632, 8635, 8639, 8642, 8646, 8649, 8652, 8656, 8659, 8663, 8666, 8669, 8673, 8676, 8680, 8683,
175  8686, 8690, 8693, 8696, 8700, 8703, 8707, 8710, 8713, 8717, 8720, 8724, 8727, 8730, 8734, 8737,
176  8741, 8744, 8747, 8751, 8754, 8757, 8761, 8764, 8768, 8771, 8774, 8778, 8781, 8784, 8788, 8791,
177  8795, 8798, 8801, 8805, 8808, 8811, 8815, 8818, 8822, 8825, 8828, 8832, 8835, 8838, 8842, 8845,
178  8849, 8852, 8855, 8859, 8862, 8865, 8869, 8872, 8875, 8879, 8882, 8886, 8889, 8892, 8896, 8899,
179  8902, 8906, 8909, 8912, 8916, 8919, 8922, 8926, 8929, 8933, 8936, 8939, 8943, 8946, 8949, 8953,
180  8956, 8959, 8963, 8966, 8969, 8973, 8976, 8979, 8983, 8986, 8989, 8993, 8996, 8999, 9003, 9006,
181  9009, 9013, 9016, 9020, 9023, 9026, 9030, 9033, 9036, 9040, 9043, 9046, 9050, 9053, 9056, 9060,
182  9063, 9066, 9070, 9073, 9076, 9080, 9083, 9086, 9090, 9093, 9096, 9099, 9103, 9106, 9109, 9113,
183  9116, 9119, 9123, 9126, 9129, 9133, 9136, 9139, 9143, 9146, 9149, 9153, 9156, 9159, 9163, 9166,
184  9169, 9173, 9176, 9179, 9182, 9186, 9189, 9192, 9196, 9199, 9202, 9206, 9209, 9212, 9216, 9219,
185  9222, 9225, 9229, 9232, 9235, 9239, 9242, 9245, 9249, 9252, 9255, 9259, 9262, 9265, 9268, 9272,
186  9275, 9278, 9282, 9285, 9288, 9291, 9295, 9298, 9301, 9305, 9308, 9311, 9315, 9318, 9321, 9324,
187  9328, 9331, 9334, 9338, 9341, 9344, 9347, 9351, 9354, 9357, 9361, 9364, 9367, 9370, 9374, 9377,
188  9380, 9384, 9387, 9390, 9393, 9397, 9400, 9403, 9406, 9410, 9413, 9416, 9420, 9423, 9426, 9429,
189  9433, 9436, 9439, 9442, 9446, 9449, 9452, 9456, 9459, 9462, 9465, 9469, 9472, 9475, 9478, 9482,
190  9485, 9488, 9491, 9495, 9498, 9501, 9504, 9508, 9511, 9514, 9517, 9521, 9524, 9527, 9531, 9534,
191  9537, 9540, 9544, 9547, 9550, 9553, 9557, 9560, 9563, 9566, 9570, 9573, 9576, 9579, 9582, 9586,
192  9589, 9592, 9595, 9599, 9602, 9605, 9608, 9612, 9615, 9618, 9621, 9625, 9628, 9631, 9634, 9638,
193  9641, 9644, 9647, 9650, 9654, 9657, 9660, 9663, 9667, 9670, 9673, 9676, 9680, 9683, 9686, 9689,
194  9692, 9696, 9699, 9702, 9705, 9709, 9712, 9715, 9718, 9721, 9725, 9728, 9731, 9734, 9738, 9741,
195  9744, 9747, 9750, 9754, 9757, 9760, 9763, 9766, 9770, 9773, 9776, 9779, 9783, 9786, 9789, 9792,
196  9795, 9799, 9802, 9805, 9808, 9811, 9815, 9818, 9821, 9824, 9827, 9831, 9834, 9837, 9840, 9843,
197  9847, 9850, 9853, 9856, 9859, 9863, 9866, 9869, 9872, 9875, 9879, 9882, 9885, 9888, 9891, 9894,
198  9898, 9901, 9904, 9907, 9910, 9914, 9917, 9920, 9923, 9926, 9930, 9933, 9936, 9939, 9942, 9945,
199  9949, 9952, 9955, 9958, 9961, 9964, 9968, 9971, 9974, 9977, 9980, 9984, 9987, 9990, 9993, 9996,
200  9999, 10003, 10006, 10009, 10012, 10015, 10018, 10022, 10025, 10028, 10031, 10034, 10037, 10041, 10044, 10047,
201  10050, 10053, 10056, 10059, 10063, 10066, 10069, 10072, 10075, 10078, 10082, 10085, 10088, 10091, 10094, 10097,
202  10100, 10104, 10107, 10110, 10113, 10116, 10119, 10122, 10126, 10129, 10132, 10135, 10138, 10141, 10144, 10148,
203  10151, 10154, 10157, 10160, 10163, 10166, 10170, 10173, 10176, 10179, 10182, 10185, 10188, 10192, 10195, 10198,
204  10201, 10204, 10207, 10210, 10213, 10217, 10220, 10223, 10226, 10229, 10232, 10235, 10238, 10242, 10245, 10248,
205  10251, 10254, 10257, 10260, 10263, 10267, 10270, 10273, 10276, 10279, 10282, 10285, 10288, 10291, 10295, 10298,
206  10301, 10304, 10307, 10310, 10313, 10316, 10319, 10323, 10326, 10329, 10332, 10335, 10338, 10341, 10344, 10347,
207  10350, 10354, 10357, 10360, 10363, 10366, 10369, 10372, 10375, 10378, 10381, 10385, 10388, 10391, 10394, 10397,
208  10400, 10403, 10406, 10409, 10412, 10415, 10419, 10422, 10425, 10428, 10431, 10434, 10437, 10440, 10443, 10446,
209  10449, 10452, 10456, 10459, 10462, 10465, 10468, 10471, 10474, 10477, 10480, 10483, 10486, 10489, 10492, 10496,
210  10499, 10502, 10505, 10508, 10511, 10514, 10517, 10520, 10523, 10526, 10529, 10532, 10535, 10538, 10542, 10545,
211  10548, 10551, 10554, 10557, 10560, 10563, 10566, 10569, 10572, 10575, 10578, 10581, 10584, 10587, 10590, 10593,
212  10597, 10600, 10603, 10606, 10609, 10612, 10615, 10618, 10621, 10624, 10627, 10630, 10633, 10636, 10639, 10642,
213  10645, 10648, 10651, 10654, 10657, 10660, 10663, 10667, 10670, 10673, 10676, 10679, 10682, 10685, 10688, 10691,
214  10694, 10697, 10700, 10703, 10706, 10709, 10712, 10715, 10718, 10721, 10724, 10727, 10730, 10733, 10736, 10739,
215  10742, 10745, 10748, 10751, 10754, 10757, 10760, 10763, 10766, 10769, 10772, 10775, 10778, 10781, 10784, 10787,
216  10790, 10793, 10796, 10799, 10802, 10806, 10809, 10812, 10815, 10818, 10821, 10824, 10827, 10830, 10833, 10836,
217  10839, 10842, 10845, 10848, 10851, 10854, 10857, 10860, 10863, 10866, 10869, 10871, 10874, 10877, 10880, 10883,
218  10886, 10889, 10892, 10895, 10898, 10901, 10904, 10907, 10910, 10913, 10916, 10919, 10922, 10925, 10928, 10931,
219  10934, 10937, 10940, 10943, 10946, 10949, 10952, 10955, 10958, 10961, 10964, 10967, 10970, 10973, 10976, 10979,
220  10982, 10985, 10988, 10991, 10994, 10997, 11000, 11003, 11005, 11008, 11011, 11014, 11017, 11020, 11023, 11026,
221  11029, 11032, 11035, 11038, 11041, 11044, 11047, 11050, 11053, 11056, 11059, 11062, 11065, 11068, 11071, 11073,
222  11076, 11079, 11082, 11085, 11088, 11091, 11094, 11097, 11100, 11103, 11106, 11109, 11112, 11115, 11118, 11121,
223  11123, 11126, 11129, 11132, 11135, 11138, 11141, 11144, 11147, 11150, 11153, 11156, 11159, 11162, 11165, 11167,
224  11170, 11173, 11176, 11179, 11182, 11185, 11188, 11191, 11194, 11197, 11200, 11203, 11205, 11208, 11211, 11214,
225  11217, 11220, 11223, 11226, 11229, 11232, 11235, 11238, 11240, 11243, 11246, 11249, 11252, 11255, 11258, 11261,
226  11264, 11267, 11269, 11272, 11275, 11278, 11281, 11284, 11287, 11290, 11293, 11296, 11298, 11301, 11304, 11307,
227  11310, 11313, 11316, 11319, 11322, 11325, 11327, 11330, 11333, 11336, 11339, 11342, 11345, 11348, 11351, 11353,
228  11356, 11359, 11362, 11365, 11368, 11371, 11374, 11376, 11379, 11382, 11385, 11388, 11391, 11394, 11397, 11399,
229  11402, 11405, 11408, 11411, 11414, 11417, 11420, 11422, 11425, 11428, 11431, 11434, 11437, 11440, 11442, 11445,
230  11448, 11451, 11454, 11457, 11460, 11463, 11465, 11468, 11471, 11474, 11477, 11480, 11482, 11485, 11488, 11491,
231  11494, 11497, 11500, 11502, 11505, 11508, 11511, 11514, 11517, 11520, 11522, 11525, 11528, 11531, 11534, 11537,
232  11539, 11542, 11545, 11548, 11551, 11554, 11556, 11559, 11562, 11565, 11568, 11571, 11573, 11576, 11579, 11582,
233  11585, 11588, 11590, 11593, 11596, 11599, 11602, 11605, 11607, 11610, 11613, 11616, 11619, 11621, 11624, 11627,
234  11630, 11633, 11636, 11638, 11641, 11644, 11647, 11650, 11652, 11655, 11658, 11661, 11664, 11666, 11669, 11672,
235  11675, 11678, 11681, 11683, 11686, 11689, 11692, 11695, 11697, 11700, 11703, 11706, 11709, 11711, 11714, 11717,
236  11720, 11723, 11725, 11728, 11731, 11734, 11736, 11739, 11742, 11745, 11748, 11750, 11753, 11756, 11759, 11762,
237  11764, 11767, 11770, 11773, 11775, 11778, 11781, 11784, 11787, 11789, 11792, 11795, 11798, 11800, 11803, 11806,
238  11809, 11812, 11814, 11817, 11820, 11823, 11825, 11828, 11831, 11834, 11837, 11839, 11842, 11845, 11848, 11850,
239  11853, 11856, 11859, 11861, 11864, 11867, 11870, 11872, 11875, 11878, 11881, 11883, 11886, 11889, 11892, 11894,
240  11897, 11900, 11903, 11905, 11908, 11911, 11914, 11916, 11919, 11922, 11925, 11927, 11930, 11933, 11936, 11938,
241  11941, 11944, 11947, 11949, 11952, 11955, 11958, 11960, 11963, 11966, 11968, 11971, 11974, 11977, 11979, 11982,
242  11985, 11988, 11990, 11993, 11996, 11998, 12001, 12004, 12007, 12009, 12012, 12015, 12017, 12020, 12023, 12026,
243  12028, 12031, 12034, 12037, 12039, 12042, 12045, 12047, 12050, 12053, 12055, 12058, 12061, 12064, 12066, 12069,
244  12072, 12074, 12077, 12080, 12083, 12085, 12088, 12091, 12093, 12096, 12099, 12101, 12104, 12107, 12110, 12112,
245  12115, 12118, 12120, 12123, 12126, 12128, 12131, 12134, 12136, 12139, 12142, 12144, 12147, 12150, 12153, 12155,
246  12158, 12161, 12163, 12166, 12169, 12171, 12174, 12177, 12179, 12182, 12185, 12187, 12190, 12193, 12195, 12198,
247  12201, 12203, 12206, 12209, 12211, 12214, 12217, 12219, 12222, 12225, 12227, 12230, 12233, 12235, 12238, 12241,
248  12243, 12246, 12249, 12251, 12254, 12257, 12259, 12262, 12265, 12267, 12270, 12273, 12275, 12278, 12280, 12283,
249  12286, 12288, 12291, 12294, 12296, 12299, 12302, 12304, 12307, 12310, 12312, 12315, 12317, 12320, 12323, 12325,
250  12328, 12331, 12333, 12336, 12339, 12341, 12344, 12346, 12349, 12352, 12354, 12357, 12360, 12362, 12365, 12367,
251  12370, 12373, 12375, 12378, 12381, 12383, 12386, 12388, 12391, 12394, 12396, 12399, 12401, 12404, 12407, 12409,
252  12412, 12415, 12417, 12420, 12422, 12425, 12428, 12430, 12433, 12435, 12438, 12441, 12443, 12446, 12448, 12451,
253  12454, 12456, 12459, 12461, 12464, 12467, 12469, 12472, 12474, 12477, 12480, 12482, 12485, 12487, 12490, 12493,
254  12495, 12498, 12500, 12503, 12505, 12508, 12511, 12513, 12516, 12518, 12521, 12524, 12526, 12529, 12531, 12534,
255  12536, 12539, 12542, 12544, 12547, 12549, 12552, 12554, 12557, 12560, 12562, 12565, 12567, 12570, 12572, 12575,
256  12577, 12580, 12583, 12585, 12588, 12590, 12593, 12595, 12598, 12601, 12603, 12606, 12608, 12611, 12613, 12616,
257  12618, 12621, 12624, 12626, 12629, 12631, 12634, 12636, 12639, 12641, 12644, 12646, 12649, 12652, 12654, 12657,
258  12659, 12662, 12664, 12667, 12669, 12672, 12674, 12677, 12679, 12682, 12684, 12687, 12690, 12692, 12695, 12697,
259  12700, 12702, 12705, 12707, 12710, 12712, 12715, 12717, 12720, 12722, 12725, 12727, 12730, 12732, 12735, 12737,
260  12740, 12743, 12745, 12748, 12750, 12753, 12755, 12758, 12760, 12763, 12765, 12768, 12770, 12773, 12775, 12778,
261  12780, 12783, 12785, 12788, 12790, 12793, 12795, 12798, 12800, 12803, 12805, 12808, 12810, 12813, 12815, 12818,
262  12820, 12823, 12825, 12828, 12830, 12833, 12835, 12838, 12840, 12842, 12845, 12847, 12850, 12852, 12855, 12857,
263  12860, 12862, 12865, 12867, 12870, 12872, 12875, 12877, 12880, 12882, 12885, 12887, 12890, 12892, 12894, 12897,
264  12899, 12902, 12904, 12907, 12909, 12912, 12914, 12917, 12919, 12922, 12924, 12926, 12929, 12931, 12934, 12936,
265  12939, 12941, 12944, 12946, 12949, 12951, 12953, 12956, 12958, 12961, 12963, 12966, 12968, 12971, 12973, 12975,
266  12978, 12980, 12983, 12985, 12988, 12990, 12993, 12995, 12997, 13000, 13002, 13005, 13007, 13010, 13012, 13014,
267  13017, 13019, 13022, 13024, 13027, 13029, 13031, 13034, 13036, 13039, 13041, 13044, 13046, 13048, 13051, 13053,
268  13056, 13058, 13060, 13063, 13065, 13068, 13070, 13073, 13075, 13077, 13080, 13082, 13085, 13087, 13089, 13092,
269  13094, 13097, 13099, 13101, 13104, 13106, 13109, 13111, 13113, 13116, 13118, 13121, 13123, 13125, 13128, 13130,
270  13133, 13135, 13137, 13140, 13142, 13145, 13147, 13149, 13152, 13154, 13156, 13159, 13161, 13164, 13166, 13168,
271  13171, 13173, 13175, 13178, 13180, 13183, 13185, 13187, 13190, 13192, 13194, 13197, 13199, 13202, 13204, 13206,
272  13209, 13211, 13213, 13216, 13218, 13221, 13223, 13225, 13228, 13230, 13232, 13235, 13237, 13239, 13242, 13244,
273  13246, 13249, 13251, 13254, 13256, 13258, 13261, 13263, 13265, 13268, 13270, 13272, 13275, 13277, 13279, 13282,
274  13284, 13286, 13289, 13291, 13293, 13296, 13298, 13300, 13303, 13305, 13307, 13310, 13312, 13314, 13317, 13319,
275  13321, 13324, 13326, 13328, 13331, 13333, 13335, 13338, 13340, 13342, 13345, 13347, 13349, 13352, 13354, 13356,
276  13359, 13361, 13363, 13365, 13368, 13370, 13372, 13375, 13377, 13379, 13382, 13384, 13386, 13389, 13391, 13393,
277  13395, 13398, 13400, 13402, 13405, 13407, 13409, 13412, 13414, 13416, 13418, 13421, 13423, 13425, 13428, 13430,
278  13432, 13435, 13437, 13439, 13441, 13444, 13446, 13448, 13451, 13453, 13455, 13457, 13460, 13462, 13464, 13466,
279  13469, 13471, 13473, 13476, 13478, 13480, 13482, 13485, 13487, 13489, 13492, 13494, 13496, 13498, 13501, 13503,
280  13505, 13507, 13510, 13512, 13514, 13516, 13519, 13521, 13523, 13525, 13528, 13530, 13532, 13534, 13537, 13539,
281  13541, 13543, 13546, 13548, 13550, 13552, 13555, 13557, 13559, 13561, 13564, 13566, 13568, 13570, 13573, 13575,
282  13577, 13579, 13582, 13584, 13586, 13588, 13591, 13593, 13595, 13597, 13600, 13602, 13604, 13606, 13608, 13611,
283  13613, 13615, 13617, 13620, 13622, 13624, 13626, 13628, 13631, 13633, 13635, 13637, 13640, 13642, 13644, 13646,
284  13648, 13651, 13653, 13655, 13657, 13659, 13662, 13664, 13666, 13668, 13670, 13673, 13675, 13677, 13679, 13681,
285  13684, 13686, 13688, 13690, 13692, 13695, 13697, 13699, 13701, 13703, 13706, 13708, 13710, 13712, 13714, 13717,
286  13719, 13721, 13723, 13725, 13728, 13730, 13732, 13734, 13736, 13738, 13741, 13743, 13745, 13747, 13749, 13751,
287  13754, 13756, 13758, 13760, 13762, 13765, 13767, 13769, 13771, 13773, 13775, 13778, 13780, 13782, 13784, 13786,
288  13788, 13790, 13793, 13795, 13797, 13799, 13801, 13803, 13806, 13808, 13810, 13812, 13814, 13816, 13818, 13821,
289  13823, 13825, 13827, 13829, 13831, 13834, 13836, 13838, 13840, 13842, 13844, 13846, 13848, 13851, 13853, 13855,
290  13857, 13859, 13861, 13863, 13866, 13868, 13870, 13872, 13874, 13876, 13878, 13880, 13883, 13885, 13887, 13889,
291  13891, 13893, 13895, 13897, 13900, 13902, 13904, 13906, 13908, 13910, 13912, 13914, 13916, 13919, 13921, 13923,
292  13925, 13927, 13929, 13931, 13933, 13935, 13938, 13940, 13942, 13944, 13946, 13948, 13950, 13952, 13954, 13956,
293  13959, 13961, 13963, 13965, 13967, 13969, 13971, 13973, 13975, 13977, 13979, 13981, 13984, 13986, 13988, 13990,
294  13992, 13994, 13996, 13998, 14000, 14002, 14004, 14006, 14009, 14011, 14013, 14015, 14017, 14019, 14021, 14023,
295  14025, 14027, 14029, 14031, 14033, 14035, 14037, 14040, 14042, 14044, 14046, 14048, 14050, 14052, 14054, 14056,
296  14058, 14060, 14062, 14064, 14066, 14068, 14070, 14072, 14074, 14077, 14079, 14081, 14083, 14085, 14087, 14089,
297  14091, 14093, 14095, 14097, 14099, 14101, 14103, 14105, 14107, 14109, 14111, 14113, 14115, 14117, 14119, 14121,
298  14123, 14125, 14127, 14129, 14131, 14134, 14136, 14138, 14140, 14142, 14144, 14146, 14148, 14150, 14152, 14154,
299  14156, 14158, 14160, 14162, 14164, 14166, 14168, 14170, 14172, 14174, 14176, 14178, 14180, 14182, 14184, 14186,
300  14188, 14190, 14192, 14194, 14196, 14198, 14200, 14202, 14204, 14206, 14208, 14210, 14212, 14214, 14216, 14218,
301  14220, 14222, 14224, 14226, 14228, 14230, 14232, 14234, 14236, 14238, 14240, 14242, 14243, 14245, 14247, 14249,
302  14251, 14253, 14255, 14257, 14259, 14261, 14263, 14265, 14267, 14269, 14271, 14273, 14275, 14277, 14279, 14281,
303  14283, 14285, 14287, 14289, 14291, 14293, 14295, 14297, 14299, 14300, 14302, 14304, 14306, 14308, 14310, 14312,
304  14314, 14316, 14318, 14320, 14322, 14324, 14326, 14328, 14330, 14332, 14334, 14335, 14337, 14339, 14341, 14343,
305  14345, 14347, 14349, 14351, 14353, 14355, 14357, 14359, 14361, 14362, 14364, 14366, 14368, 14370, 14372, 14374,
306  14376, 14378, 14380, 14382, 14384, 14386, 14387, 14389, 14391, 14393, 14395, 14397, 14399, 14401, 14403, 14405,
307  14407, 14408, 14410, 14412, 14414, 14416, 14418, 14420, 14422, 14424, 14426, 14427, 14429, 14431, 14433, 14435,
308  14437, 14439, 14441, 14443, 14444, 14446, 14448, 14450, 14452, 14454, 14456, 14458, 14460, 14461, 14463, 14465,
309  14467, 14469, 14471, 14473, 14475, 14476, 14478, 14480, 14482, 14484, 14486, 14488, 14489, 14491, 14493, 14495,
310  14497, 14499, 14501, 14503, 14504, 14506, 14508, 14510, 14512, 14514, 14516, 14517, 14519, 14521, 14523, 14525,
311  14527, 14529, 14530, 14532, 14534, 14536, 14538, 14540, 14541, 14543, 14545, 14547, 14549, 14551, 14552, 14554,
312  14556, 14558, 14560, 14562, 14563, 14565, 14567, 14569, 14571, 14573, 14574, 14576, 14578, 14580, 14582, 14584,
313  14585, 14587, 14589, 14591, 14593, 14595, 14596, 14598, 14600, 14602, 14604, 14605, 14607, 14609, 14611, 14613,
314  14614, 14616, 14618, 14620, 14622, 14623, 14625, 14627, 14629, 14631, 14632, 14634, 14636, 14638, 14640, 14641,
315  14643, 14645, 14647, 14649, 14650, 14652, 14654, 14656, 14658, 14659, 14661, 14663, 14665, 14667, 14668, 14670,
316  14672, 14674, 14675, 14677, 14679, 14681, 14683, 14684, 14686, 14688, 14690, 14691, 14693, 14695, 14697, 14698,
317  14700, 14702, 14704, 14706, 14707, 14709, 14711, 14713, 14714, 14716, 14718, 14720, 14721, 14723, 14725, 14727,
318  14728, 14730, 14732, 14734, 14735, 14737, 14739, 14741, 14742, 14744, 14746, 14748, 14749, 14751, 14753, 14755,
319  14756, 14758, 14760, 14761, 14763, 14765, 14767, 14768, 14770, 14772, 14774, 14775, 14777, 14779, 14781, 14782,
320  14784, 14786, 14787, 14789, 14791, 14793, 14794, 14796, 14798, 14799, 14801, 14803, 14805, 14806, 14808, 14810,
321  14811, 14813, 14815, 14817, 14818, 14820, 14822, 14823, 14825, 14827, 14828, 14830, 14832, 14834, 14835, 14837,
322  14839, 14840, 14842, 14844, 14845, 14847, 14849, 14851, 14852, 14854, 14856, 14857, 14859, 14861, 14862, 14864,
323  14866, 14867, 14869, 14871, 14872, 14874, 14876, 14877, 14879, 14881, 14882, 14884, 14886, 14887, 14889, 14891,
324  14892, 14894, 14896, 14897, 14899, 14901, 14902, 14904, 14906, 14907, 14909, 14911, 14912, 14914, 14916, 14917,
325  14919, 14921, 14922, 14924, 14926, 14927, 14929, 14931, 14932, 14934, 14936, 14937, 14939, 14940, 14942, 14944,
326  14945, 14947, 14949, 14950, 14952, 14954, 14955, 14957, 14958, 14960, 14962, 14963, 14965, 14967, 14968, 14970,
327  14971, 14973, 14975, 14976, 14978, 14980, 14981, 14983, 14984, 14986, 14988, 14989, 14991, 14993, 14994, 14996,
328  14997, 14999, 15001, 15002, 15004, 15005, 15007, 15009, 15010, 15012, 15013, 15015, 15017, 15018, 15020, 15021,
329  15023, 15025, 15026, 15028, 15029, 15031, 15033, 15034, 15036, 15037, 15039, 15041, 15042, 15044, 15045, 15047,
330  15048, 15050, 15052, 15053, 15055, 15056, 15058, 15059, 15061, 15063, 15064, 15066, 15067, 15069, 15070, 15072,
331  15074, 15075, 15077, 15078, 15080, 15081, 15083, 15085, 15086, 15088, 15089, 15091, 15092, 15094, 15095, 15097,
332  15099, 15100, 15102, 15103, 15105, 15106, 15108, 15109, 15111, 15113, 15114, 15116, 15117, 15119, 15120, 15122,
333  15123, 15125, 15126, 15128, 15129, 15131, 15133, 15134, 15136, 15137, 15139, 15140, 15142, 15143, 15145, 15146,
334  15148, 15149, 15151, 15152, 15154, 15155, 15157, 15158, 15160, 15161, 15163, 15165, 15166, 15168, 15169, 15171,
335  15172, 15174, 15175, 15177, 15178, 15180, 15181, 15183, 15184, 15186, 15187, 15189, 15190, 15192, 15193, 15195,
336  15196, 15198, 15199, 15201, 15202, 15204, 15205, 15207, 15208, 15210, 15211, 15213, 15214, 15215, 15217, 15218,
337  15220, 15221, 15223, 15224, 15226, 15227, 15229, 15230, 15232, 15233, 15235, 15236, 15238, 15239, 15241, 15242,
338  15243, 15245, 15246, 15248, 15249, 15251, 15252, 15254, 15255, 15257, 15258, 15260, 15261, 15262, 15264, 15265,
339  15267, 15268, 15270, 15271, 15273, 15274, 15276, 15277, 15278, 15280, 15281, 15283, 15284, 15286, 15287, 15289,
340  15290, 15291, 15293, 15294, 15296, 15297, 15299, 15300, 15301, 15303, 15304, 15306, 15307, 15309, 15310, 15311,
341  15313, 15314, 15316, 15317, 15318, 15320, 15321, 15323, 15324, 15326, 15327, 15328, 15330, 15331, 15333, 15334,
342  15335, 15337, 15338, 15340, 15341, 15342, 15344, 15345, 15347, 15348, 15349, 15351, 15352, 15354, 15355, 15356,
343  15358, 15359, 15361, 15362, 15363, 15365, 15366, 15368, 15369, 15370, 15372, 15373, 15375, 15376, 15377, 15379,
344  15380, 15381, 15383, 15384, 15386, 15387, 15388, 15390, 15391, 15392, 15394, 15395, 15397, 15398, 15399, 15401,
345  15402, 15403, 15405, 15406, 15407, 15409, 15410, 15411, 15413, 15414, 15416, 15417, 15418, 15420, 15421, 15422,
346  15424, 15425, 15426, 15428, 15429, 15430, 15432, 15433, 15434, 15436, 15437, 15438, 15440, 15441, 15442, 15444,
347  15445, 15446, 15448, 15449, 15450, 15452, 15453, 15454, 15456, 15457, 15458, 15460, 15461, 15462, 15464, 15465,
348  15466, 15468, 15469, 15470, 15472, 15473, 15474, 15476, 15477, 15478, 15480, 15481, 15482, 15483, 15485, 15486,
349  15487, 15489, 15490, 15491, 15493, 15494, 15495, 15496, 15498, 15499, 15500, 15502, 15503, 15504, 15506, 15507,
350  15508, 15509, 15511, 15512, 15513, 15515, 15516, 15517, 15518, 15520, 15521, 15522, 15524, 15525, 15526, 15527,
351  15529, 15530, 15531, 15532, 15534, 15535, 15536, 15538, 15539, 15540, 15541, 15543, 15544, 15545, 15546, 15548,
352  15549, 15550, 15551, 15553, 15554, 15555, 15556, 15558, 15559, 15560, 15561, 15563, 15564, 15565, 15566, 15568,
353  15569, 15570, 15571, 15573, 15574, 15575, 15576, 15578, 15579, 15580, 15581, 15583, 15584, 15585, 15586, 15588,
354  15589, 15590, 15591, 15592, 15594, 15595, 15596, 15597, 15599, 15600, 15601, 15602, 15603, 15605, 15606, 15607,
355  15608, 15610, 15611, 15612, 15613, 15614, 15616, 15617, 15618, 15619, 15620, 15622, 15623, 15624, 15625, 15626,
356  15628, 15629, 15630, 15631, 15632, 15634, 15635, 15636, 15637, 15638, 15640, 15641, 15642, 15643, 15644, 15646,
357  15647, 15648, 15649, 15650, 15652, 15653, 15654, 15655, 15656, 15657, 15659, 15660, 15661, 15662, 15663, 15664,
358  15666, 15667, 15668, 15669, 15670, 15671, 15673, 15674, 15675, 15676, 15677, 15678, 15680, 15681, 15682, 15683,
359  15684, 15685, 15687, 15688, 15689, 15690, 15691, 15692, 15693, 15695, 15696, 15697, 15698, 15699, 15700, 15701,
360  15703, 15704, 15705, 15706, 15707, 15708, 15709, 15711, 15712, 15713, 15714, 15715, 15716, 15717, 15719, 15720,
361  15721, 15722, 15723, 15724, 15725, 15726, 15728, 15729, 15730, 15731, 15732, 15733, 15734, 15735, 15736, 15738,
362  15739, 15740, 15741, 15742, 15743, 15744, 15745, 15746, 15748, 15749, 15750, 15751, 15752, 15753, 15754, 15755,
363  15756, 15757, 15759, 15760, 15761, 15762, 15763, 15764, 15765, 15766, 15767, 15768, 15769, 15770, 15772, 15773,
364  15774, 15775, 15776, 15777, 15778, 15779, 15780, 15781, 15782, 15783, 15785, 15786, 15787, 15788, 15789, 15790,
365  15791, 15792, 15793, 15794, 15795, 15796, 15797, 15798, 15799, 15800, 15802, 15803, 15804, 15805, 15806, 15807,
366  15808, 15809, 15810, 15811, 15812, 15813, 15814, 15815, 15816, 15817, 15818, 15819, 15820, 15821, 15822, 15824,
367  15825, 15826, 15827, 15828, 15829, 15830, 15831, 15832, 15833, 15834, 15835, 15836, 15837, 15838, 15839, 15840,
368  15841, 15842, 15843, 15844, 15845, 15846, 15847, 15848, 15849, 15850, 15851, 15852, 15853, 15854, 15855, 15856,
369  15857, 15858, 15859, 15860, 15861, 15862, 15863, 15864, 15865, 15866, 15867, 15868, 15869, 15870, 15871, 15872,
370  15873, 15874, 15875, 15876, 15877, 15878, 15879, 15880, 15881, 15882, 15883, 15884, 15885, 15886, 15887, 15888,
371  15889, 15890, 15891, 15892, 15893, 15894, 15895, 15896, 15897, 15898, 15899, 15900, 15901, 15902, 15902, 15903,
372  15904, 15905, 15906, 15907, 15908, 15909, 15910, 15911, 15912, 15913, 15914, 15915, 15916, 15917, 15918, 15919,
373  15920, 15921, 15922, 15922, 15923, 15924, 15925, 15926, 15927, 15928, 15929, 15930, 15931, 15932, 15933, 15934,
374  15935, 15936, 15937, 15937, 15938, 15939, 15940, 15941, 15942, 15943, 15944, 15945, 15946, 15947, 15948, 15948,
375  15949, 15950, 15951, 15952, 15953, 15954, 15955, 15956, 15957, 15958, 15958, 15959, 15960, 15961, 15962, 15963,
376  15964, 15965, 15966, 15967, 15968, 15968, 15969, 15970, 15971, 15972, 15973, 15974, 15975, 15976, 15976, 15977,
377  15978, 15979, 15980, 15981, 15982, 15983, 15983, 15984, 15985, 15986, 15987, 15988, 15989, 15990, 15990, 15991,
378  15992, 15993, 15994, 15995, 15996, 15997, 15997, 15998, 15999, 16000, 16001, 16002, 16003, 16003, 16004, 16005,
379  16006, 16007, 16008, 16009, 16009, 16010, 16011, 16012, 16013, 16014, 16014, 16015, 16016, 16017, 16018, 16019,
380  16020, 16020, 16021, 16022, 16023, 16024, 16025, 16025, 16026, 16027, 16028, 16029, 16030, 16030, 16031, 16032,
381  16033, 16034, 16034, 16035, 16036, 16037, 16038, 16039, 16039, 16040, 16041, 16042, 16043, 16043, 16044, 16045,
382  16046, 16047, 16047, 16048, 16049, 16050, 16051, 16051, 16052, 16053, 16054, 16055, 16055, 16056, 16057, 16058,
383  16059, 16059, 16060, 16061, 16062, 16063, 16063, 16064, 16065, 16066, 16067, 16067, 16068, 16069, 16070, 16070,
384  16071, 16072, 16073, 16074, 16074, 16075, 16076, 16077, 16077, 16078, 16079, 16080, 16080, 16081, 16082, 16083,
385  16084, 16084, 16085, 16086, 16087, 16087, 16088, 16089, 16090, 16090, 16091, 16092, 16093, 16093, 16094, 16095,
386  16096, 16096, 16097, 16098, 16099, 16099, 16100, 16101, 16102, 16102, 16103, 16104, 16104, 16105, 16106, 16107,
387  16107, 16108, 16109, 16110, 16110, 16111, 16112, 16113, 16113, 16114, 16115, 16115, 16116, 16117, 16118, 16118,
388  16119, 16120, 16120, 16121, 16122, 16123, 16123, 16124, 16125, 16125, 16126, 16127, 16128, 16128, 16129, 16130,
389  16130, 16131, 16132, 16132, 16133, 16134, 16135, 16135, 16136, 16137, 16137, 16138, 16139, 16139, 16140, 16141,
390  16141, 16142, 16143, 16143, 16144, 16145, 16146, 16146, 16147, 16148, 16148, 16149, 16150, 16150, 16151, 16152,
391  16152, 16153, 16154, 16154, 16155, 16156, 16156, 16157, 16158, 16158, 16159, 16160, 16160, 16161, 16162, 16162,
392  16163, 16164, 16164, 16165, 16165, 16166, 16167, 16167, 16168, 16169, 16169, 16170, 16171, 16171, 16172, 16173,
393  16173, 16174, 16174, 16175, 16176, 16176, 16177, 16178, 16178, 16179, 16180, 16180, 16181, 16181, 16182, 16183,
394  16183, 16184, 16185, 16185, 16186, 16186, 16187, 16188, 16188, 16189, 16189, 16190, 16191, 16191, 16192, 16193,
395  16193, 16194, 16194, 16195, 16196, 16196, 16197, 16197, 16198, 16199, 16199, 16200, 16200, 16201, 16202, 16202,
396  16203, 16203, 16204, 16205, 16205, 16206, 16206, 16207, 16207, 16208, 16209, 16209, 16210, 16210, 16211, 16212,
397  16212, 16213, 16213, 16214, 16214, 16215, 16216, 16216, 16217, 16217, 16218, 16218, 16219, 16220, 16220, 16221,
398  16221, 16222, 16222, 16223, 16223, 16224, 16225, 16225, 16226, 16226, 16227, 16227, 16228, 16228, 16229, 16230,
399  16230, 16231, 16231, 16232, 16232, 16233, 16233, 16234, 16234, 16235, 16235, 16236, 16237, 16237, 16238, 16238,
400  16239, 16239, 16240, 16240, 16241, 16241, 16242, 16242, 16243, 16243, 16244, 16244, 16245, 16246, 16246, 16247,
401  16247, 16248, 16248, 16249, 16249, 16250, 16250, 16251, 16251, 16252, 16252, 16253, 16253, 16254, 16254, 16255,
402  16255, 16256, 16256, 16257, 16257, 16258, 16258, 16259, 16259, 16260, 16260, 16261, 16261, 16262, 16262, 16263,
403  16263, 16264, 16264, 16264, 16265, 16265, 16266, 16266, 16267, 16267, 16268, 16268, 16269, 16269, 16270, 16270,
404  16271, 16271, 16272, 16272, 16273, 16273, 16273, 16274, 16274, 16275, 16275, 16276, 16276, 16277, 16277, 16278,
405  16278, 16278, 16279, 16279, 16280, 16280, 16281, 16281, 16282, 16282, 16283, 16283, 16283, 16284, 16284, 16285,
406  16285, 16286, 16286, 16286, 16287, 16287, 16288, 16288, 16289, 16289, 16289, 16290, 16290, 16291, 16291, 16292,
407  16292, 16292, 16293, 16293, 16294, 16294, 16295, 16295, 16295, 16296, 16296, 16297, 16297, 16297, 16298, 16298,
408  16299, 16299, 16299, 16300, 16300, 16301, 16301, 16301, 16302, 16302, 16303, 16303, 16303, 16304, 16304, 16305,
409  16305, 16305, 16306, 16306, 16307, 16307, 16307, 16308, 16308, 16309, 16309, 16309, 16310, 16310, 16310, 16311,
410  16311, 16312, 16312, 16312, 16313, 16313, 16313, 16314, 16314, 16315, 16315, 16315, 16316, 16316, 16316, 16317,
411  16317, 16317, 16318, 16318, 16318, 16319, 16319, 16320, 16320, 16320, 16321, 16321, 16321, 16322, 16322, 16322,
412  16323, 16323, 16323, 16324, 16324, 16324, 16325, 16325, 16325, 16326, 16326, 16326, 16327, 16327, 16327, 16328,
413  16328, 16328, 16329, 16329, 16329, 16330, 16330, 16330, 16331, 16331, 16331, 16332, 16332, 16332, 16333, 16333,
414  16333, 16334, 16334, 16334, 16334, 16335, 16335, 16335, 16336, 16336, 16336, 16337, 16337, 16337, 16338, 16338,
415  16338, 16338, 16339, 16339, 16339, 16340, 16340, 16340, 16340, 16341, 16341, 16341, 16342, 16342, 16342, 16342,
416  16343, 16343, 16343, 16344, 16344, 16344, 16344, 16345, 16345, 16345, 16346, 16346, 16346, 16346, 16347, 16347,
417  16347, 16347, 16348, 16348, 16348, 16348, 16349, 16349, 16349, 16349, 16350, 16350, 16350, 16351, 16351, 16351,
418  16351, 16352, 16352, 16352, 16352, 16353, 16353, 16353, 16353, 16353, 16354, 16354, 16354, 16354, 16355, 16355,
419  16355, 16355, 16356, 16356, 16356, 16356, 16357, 16357, 16357, 16357, 16357, 16358, 16358, 16358, 16358, 16359,
420  16359, 16359, 16359, 16359, 16360, 16360, 16360, 16360, 16361, 16361, 16361, 16361, 16361, 16362, 16362, 16362,
421  16362, 16362, 16363, 16363, 16363, 16363, 16363, 16364, 16364, 16364, 16364, 16364, 16365, 16365, 16365, 16365,
422  16365, 16366, 16366, 16366, 16366, 16366, 16366, 16367, 16367, 16367, 16367, 16367, 16368, 16368, 16368, 16368,
423  16368, 16368, 16369, 16369, 16369, 16369, 16369, 16369, 16370, 16370, 16370, 16370, 16370, 16370, 16371, 16371,
424  16371, 16371, 16371, 16371, 16371, 16372, 16372, 16372, 16372, 16372, 16372, 16373, 16373, 16373, 16373, 16373,
425  16373, 16373, 16374, 16374, 16374, 16374, 16374, 16374, 16374, 16374, 16375, 16375, 16375, 16375, 16375, 16375,
426  16375, 16376, 16376, 16376, 16376, 16376, 16376, 16376, 16376, 16376, 16377, 16377, 16377, 16377, 16377, 16377,
427  16377, 16377, 16377, 16378, 16378, 16378, 16378, 16378, 16378, 16378, 16378, 16378, 16379, 16379, 16379, 16379,
428  16379, 16379, 16379, 16379, 16379, 16379, 16379, 16380, 16380, 16380, 16380, 16380, 16380, 16380, 16380, 16380,
429  16380, 16380, 16380, 16381, 16381, 16381, 16381, 16381, 16381, 16381, 16381, 16381, 16381, 16381, 16381, 16381,
430  16381, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382, 16382,
431  16382, 16382, 16382, 16382, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383,
432  16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383,
433  16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383, 16383,
434  16383
435  };
436 #endif
437 
438 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
439 
440 const uint8_t pprz_trig_int_compr[TRIG_INT_COMPR_LEN] = {
441  0xF3, 0xCF, 0xFF, 0xFC, 0xCF, 0xFF, 0xFC, 0xCF, 0xFF, 0xFC, 0xCF, 0x9E,
442  0xF3, 0xCF, 0x8F, 0x3C, 0xFF, 0xFC, 0x41, 0xF3, 0xCF, 0x34, 0x9F, 0x3C,
443  0x4F, 0x3C, 0x1F, 0x3C, 0xFF, 0x34, 0xCF, 0x34, 0xBF, 0x34, 0xAF, 0x34,
444  0x8F, 0x34, 0x7F, 0x34, 0x6F, 0x34, 0x6F, 0x34, 0x4F, 0x34, 0x4F, 0x34,
445  0x4F, 0x34, 0x3F, 0x34, 0x2F, 0x34, 0x3F, 0x34, 0x1F, 0x34, 0x1F, 0x34,
446  0x1F, 0x34, 0x1F, 0x34, 0x0F, 0x34, 0x0F, 0x34, 0x0F, 0x34, 0x0F, 0x34,
447  0xEE, 0x3E, 0xEE, 0x3E, 0xEE, 0x3E, 0xEE, 0x39, 0xEE, 0x3E, 0xEE, 0x39,
448  0xEE, 0x39, 0xEE, 0x39, 0xEE, 0x39, 0xEE, 0x34, 0xEE, 0x39, 0xEE, 0x34,
449  0xEE, 0x34, 0xEE, 0x34, 0xEE, 0x34, 0xEE, 0x34, 0xEE, 0x34, 0xEE, 0xE3,
450  0x4E, 0xE3, 0x3E, 0xEE, 0xE3, 0x4E, 0xE3, 0x3E, 0xEE, 0xE3, 0x3E, 0x9E,
451  0xE3, 0x3E, 0xEE, 0xE3, 0x39, 0xEE, 0xE3, 0x39, 0xEE, 0xE3, 0x39, 0x9E,
452  0xE3, 0x39, 0x9E, 0xE3, 0x39, 0x9E, 0xE3, 0x39, 0x9E, 0xE3, 0x39, 0x9E,
453  0xE3, 0x34, 0x9E, 0xE3, 0x39, 0x4E, 0xE3, 0x39, 0x4E, 0xE3, 0x39, 0x4E,
454  0xE3, 0x34, 0x4E, 0xE3, 0x39, 0x4E, 0xE3, 0x34, 0x4E, 0xE3, 0x34, 0x4E,
455  0xE3, 0x34, 0x4E, 0xE3, 0x34, 0x4E, 0xE3, 0x34, 0x4E, 0xE3, 0xE3, 0x34,
456  0x4E, 0xE3, 0xE3, 0x34, 0x4E, 0xE3, 0xE3, 0x34, 0x3E, 0x4E, 0xE3, 0xE3,
457  0x34, 0x3E, 0x3E, 0x4E, 0xE3, 0xE3, 0xE3, 0x34, 0x3E, 0x3E, 0x3E, 0x3E,
458  0x4E, 0xE3, 0xE3, 0xE3, 0xE3, 0xE3, 0xE3, 0xE3, 0xE3, 0xE3, 0xE3, 0xE3,
459  0xE3, 0x93, 0xE3, 0xE3, 0xE3, 0xE3, 0x93, 0xE3, 0xE3, 0xE3, 0x93, 0xE3,
460  0xE3, 0x93, 0xE3, 0xE3, 0x93, 0xE3, 0x93, 0xE3, 0x93, 0xE3, 0x93, 0xE3,
461  0x93, 0xE3, 0x93, 0xE3, 0x93, 0x93, 0xE3, 0x93, 0x93, 0xE3, 0x93, 0x93,
462  0xE3, 0x93, 0x93, 0x93, 0xE3, 0x93, 0x93, 0x93, 0xE3, 0x93, 0x93, 0x93,
463  0x93, 0x93, 0x93, 0xE3, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93,
464  0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x43,
465  0x93, 0x93, 0x93, 0x93, 0x93, 0x93, 0x43, 0x93, 0x93, 0x93, 0x93, 0x43,
466  0x93, 0x93, 0x93, 0x43, 0x93, 0x93, 0x93, 0x43, 0x93, 0x93, 0x93, 0x43,
467  0x93, 0x93, 0x43, 0x93, 0x93, 0x43, 0x93, 0x43, 0x93, 0x93, 0x43, 0x93,
468  0x43, 0x93, 0x93, 0x43, 0x93, 0x43, 0x93, 0x43, 0x93, 0x43, 0x93, 0x43,
469  0x93, 0x43, 0x93, 0x43, 0x93, 0x43, 0x93, 0x43, 0x93, 0x43, 0x93, 0x43,
470  0x43, 0x93, 0x43, 0x93, 0x43, 0x43, 0x93, 0x43, 0x93, 0x43, 0x43, 0x93,
471  0x43, 0x43, 0x93, 0x43, 0x43, 0x93, 0x43, 0x43, 0x93, 0x43, 0x43, 0x93,
472  0x43, 0x43, 0x43, 0x93, 0x43, 0x43, 0x93, 0x43, 0x43, 0x43, 0x93, 0x43,
473  0x43, 0x43, 0x43, 0x93, 0x43, 0x43, 0x43, 0x43, 0x93, 0x43, 0x43, 0x43,
474  0x43, 0x43, 0x93, 0x43, 0x43, 0x43, 0x43, 0x43, 0x93, 0x43, 0x43, 0x43,
475  0x43, 0x43, 0x43, 0x43, 0x43, 0x93, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43,
476  0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43,
477  0x93, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x48, 0x43, 0x43,
478  0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43,
479  0x43, 0x43, 0x43, 0x48, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43,
480  0x48, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x48, 0x43, 0x43, 0x43, 0x43,
481  0x48, 0x43, 0x43, 0x43, 0x43, 0x48, 0x43, 0x43, 0x43, 0x43, 0x48, 0x43,
482  0x43, 0x48, 0x43, 0x43, 0x43, 0x48, 0x43, 0x43, 0x48, 0x43, 0x43, 0x43,
483  0x48, 0x43, 0x43, 0x48, 0x43, 0x48, 0x43, 0x43, 0x48, 0x43, 0x43, 0x48,
484  0x43, 0x48, 0x43, 0x48, 0x43, 0x43, 0x48, 0x43, 0x48, 0x43, 0x48, 0x43,
485  0x48, 0x43, 0x48, 0x43, 0x48, 0x43, 0x48, 0x48, 0x43, 0x48, 0x43, 0x48,
486  0x43, 0x48, 0x48, 0x43, 0x48, 0x48, 0x43, 0x48, 0x48, 0x43, 0x48, 0x48,
487  0x43, 0x48, 0x48, 0x48, 0x43, 0x48, 0x48, 0x48, 0x48, 0x43, 0x48, 0x48,
488  0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x43, 0x48, 0x48, 0x48, 0x48, 0x48,
489  0x48, 0x48, 0x4D, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x48, 0x4D, 0x48,
490  0x48, 0x48, 0x4D, 0x48, 0x48, 0x48, 0x4D, 0x48, 0x4D, 0x48, 0x48, 0x4D,
491  0x48, 0x4D, 0x48, 0x4D, 0x48, 0x4D, 0x4D, 0x48, 0x4D, 0x4D, 0x48, 0x4D,
492  0x4D, 0x4D, 0x4D, 0x4D, 0x48, 0x4D, 0x4D, 0x4D, 0x3D, 0xD4, 0xD4, 0xD4,
493  0xD4, 0xD4, 0x43, 0x4D, 0x4D, 0x3D, 0xD4, 0xD4, 0x43, 0x4D, 0x3D, 0xD4,
494  0x43, 0x4D, 0x3D, 0xD4, 0x43, 0x3D, 0xD4, 0x43, 0x3D, 0xD4, 0x43, 0x8D,
495  0xD4, 0x43, 0x3D, 0xD4, 0x48, 0x8D, 0xD4, 0x43, 0x8D, 0xD4, 0x48, 0x8D,
496  0xD4, 0x4D, 0x8D, 0xD4, 0x4D, 0xDD, 0xD4, 0x4D, 0xDD, 0xD4, 0x4D, 0xDD,
497  0x43, 0xDD, 0x43, 0xDD, 0x43, 0xDD, 0x48, 0xDD, 0x48, 0xDD, 0x4D, 0xDD,
498  0x4D, 0x0F, 0x43, 0x1F, 0x43, 0x2F, 0x43, 0x4F, 0x43, 0x7F, 0x43, 0xCF,
499  0x43, 0xFF, 0xDB, 0x43, 0xBF, 0x23, 0xFF, 0xDB, 0xF2, 0x3C, 0xF2, 0x36,
500  0xF2, 0x34, 0xF2, 0x32, 0xF2, 0x31, 0xD2, 0xDD, 0xD2, 0xDD, 0xD2, 0xDD,
501  0xD2, 0x8D, 0xD2, 0x3D, 0xD2, 0x3D, 0xD2, 0x3D, 0xD2, 0x2D, 0xDD, 0x23,
502  0x8D, 0xD2, 0x2D, 0xDD, 0xD2, 0x28, 0x8D, 0xD2, 0x28, 0x8D, 0xD2, 0x28,
503  0x3D, 0xD2, 0x28, 0x3D, 0xD2, 0x23, 0x8D, 0xD2, 0x23, 0x3D, 0xD2, 0x23,
504  0x2D, 0x3D, 0xD2, 0x23, 0x2D, 0x3D, 0xD2, 0xD2, 0x23, 0x2D, 0x3D, 0xD2,
505  0xD2, 0xD2, 0xD2, 0xD2, 0xD2, 0xD2, 0xD2, 0xD2, 0xD2, 0xD2, 0x82, 0xD2,
506  0xD2, 0x82, 0xD2, 0x82, 0xD2, 0xD2, 0x82, 0x82, 0xD2, 0x82, 0xD2, 0x82,
507  0x82, 0xD2, 0x82, 0x82, 0x82, 0x82, 0xD2, 0x82, 0x82, 0x82, 0x82, 0x82,
508  0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x32, 0x82,
509  0x82, 0x82, 0x82, 0x32, 0x82, 0x82, 0x82, 0x32, 0x82, 0x82, 0x32, 0x82,
510  0x82, 0x32, 0x82, 0x32, 0x82, 0x82, 0x32, 0x82, 0x32, 0x82, 0x32, 0x82,
511  0x32, 0x82, 0x32, 0x82, 0x32, 0x82, 0x32, 0x32, 0x82, 0x32, 0x82, 0x32,
512  0x32, 0x82, 0x32, 0x32, 0x82, 0x32, 0x32, 0x32, 0x82, 0x32, 0x32, 0x82,
513  0x32, 0x32, 0x32, 0x82, 0x32, 0x32, 0x32, 0x32, 0x82, 0x32, 0x32, 0x32,
514  0x32, 0x32, 0x32, 0x82, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32,
515  0x32, 0x82, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32,
516  0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x37, 0x32, 0x32,
517  0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x32, 0x37, 0x32, 0x32, 0x32, 0x32,
518  0x32, 0x37, 0x32, 0x32, 0x32, 0x32, 0x37, 0x32, 0x32, 0x32, 0x37, 0x32,
519  0x32, 0x32, 0x37, 0x32, 0x32, 0x37, 0x32, 0x32, 0x37, 0x32, 0x32, 0x37,
520  0x32, 0x37, 0x32, 0x32, 0x37, 0x32, 0x37, 0x32, 0x37, 0x32, 0x37, 0x32,
521  0x37, 0x32, 0x37, 0x32, 0x37, 0x37, 0x32, 0x37, 0x37, 0x32, 0x37, 0x37,
522  0x32, 0x37, 0x37, 0x32, 0x37, 0x37, 0x37, 0x37, 0x32, 0x37, 0x37, 0x37,
523  0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37, 0x37,
524  0x3C, 0x37, 0x37, 0x37, 0x3C, 0x37, 0x37, 0x3C, 0x37, 0x37, 0x3C, 0x37,
525  0x3C, 0x3C, 0x37, 0x3C, 0x37, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x3C,
526  0x3C, 0x3C, 0x3C, 0x3C, 0x3C, 0x2C, 0xC3, 0xC3, 0x32, 0x3C, 0x2C, 0xC3,
527  0x32, 0x2C, 0xC3, 0x32, 0x2C, 0xC3, 0x32, 0x2C, 0xC3, 0x32, 0x7C, 0xC3,
528  0x37, 0x2C, 0xC3, 0x37, 0xCC, 0xC3, 0x37, 0xCC, 0xC3, 0x37, 0xCC, 0x32,
529  0xCC, 0xC3, 0x2C, 0xC3, 0x2C, 0xC3, 0x7C, 0xC3, 0x7C, 0xC3, 0xCC, 0xF3,
530  0x21, 0xF3, 0x21, 0xF3, 0x24, 0xF3, 0x27, 0xF3, 0xA1, 0xF3, 0xAF, 0x3F,
531  0x12, 0x2F, 0x1A, 0x7F, 0x12, 0x3F, 0x12, 0x2F, 0x12, 0x0F, 0x12, 0xCC,
532  0x1C, 0xCC, 0x17, 0xCC, 0x17, 0xCC, 0x12, 0xCC, 0xC1, 0x2C, 0xC1, 0x1C,
533  0xCC, 0xC1, 0x17, 0x7C, 0xC1, 0x17, 0x7C, 0xC1, 0x17, 0x7C, 0xC1, 0x12,
534  0x2C, 0xC1, 0x12, 0x2C, 0xC1, 0x12, 0x2C, 0xC1, 0x12, 0x2C, 0xC1, 0xC1,
535  0x12, 0x1C, 0x1C, 0x2C, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0x71,
536  0xC1, 0xC1, 0xC1, 0x71, 0xC1, 0x71, 0xC1, 0x71, 0xC1, 0x71, 0x71, 0xC1,
537  0x71, 0x71, 0xC1, 0x71, 0x71, 0x71, 0x71, 0x71, 0x71, 0x71, 0x71, 0x71,
538  0x71, 0x71, 0x71, 0x71, 0x71, 0x71, 0x71, 0x71, 0x21, 0x71, 0x71, 0x71,
539  0x21, 0x71, 0x71, 0x21, 0x71, 0x71, 0x21, 0x71, 0x71, 0x21, 0x71, 0x21,
540  0x71, 0x21, 0x71, 0x21, 0x71, 0x21, 0x71, 0x21, 0x71, 0x21, 0x21, 0x71,
541  0x21, 0x21, 0x71, 0x21, 0x21, 0x71, 0x21, 0x21, 0x71, 0x21, 0x21, 0x21,
542  0x71, 0x21, 0x21, 0x21, 0x71, 0x21, 0x21, 0x21, 0x21, 0x21, 0x71, 0x21,
543  0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x71, 0x21, 0x21, 0x21,
544  0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21,
545  0x21, 0x26, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x26, 0x21,
546  0x21, 0x21, 0x21, 0x21, 0x26, 0x21, 0x21, 0x21, 0x21, 0x26, 0x21, 0x21,
547  0x21, 0x26, 0x21, 0x21, 0x26, 0x21, 0x21, 0x26, 0x21, 0x26, 0x21, 0x21,
548  0x26, 0x21, 0x26, 0x21, 0x26, 0x21, 0x26, 0x21, 0x26, 0x21, 0x26, 0x21,
549  0x26, 0x21, 0x26, 0x26, 0x21, 0x26, 0x26, 0x21, 0x26, 0x26, 0x26, 0x26,
550  0x21, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26, 0x26,
551  0x26, 0x26, 0x26, 0x26, 0x26, 0x2B, 0x26, 0x26, 0x2B, 0x26, 0x26, 0x2B,
552  0x26, 0x2B, 0x26, 0x2B, 0x2B, 0x26, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B, 0x2B,
553  0x2B, 0x2B, 0x2B, 0x2B, 0x1B, 0xB2, 0xB2, 0x21, 0x2B, 0x1B, 0xB2, 0x21,
554  0x1B, 0xB2, 0x21, 0x1B, 0xB2, 0x21, 0x1B, 0xB2, 0x26, 0x6B, 0xB2, 0x26,
555  0x6B, 0xB2, 0x26, 0xBB, 0xB2, 0x2B, 0xBB, 0xB2, 0x2B, 0xBB, 0x21, 0xBB,
556  0x26, 0xBB, 0x26, 0xBB, 0x2B, 0x1F, 0x21, 0x1F, 0x21, 0x5F, 0x21, 0xAF,
557  0x21, 0xFF, 0xF9, 0x9B, 0xF0, 0x1A, 0xF0, 0x15, 0xF0, 0x11, 0xF0, 0x10,
558  0xF0, 0x10, 0xB0, 0x6B, 0xB0, 0x1B, 0xB0, 0x1B, 0xB0, 0x1B, 0xB0, 0x0B,
559  0xBB, 0xB0, 0x06, 0xBB, 0xB0, 0x06, 0x6B, 0xB0, 0x01, 0x6B, 0xB0, 0x01,
560  0x1B, 0xB0, 0x01, 0x1B, 0xB0, 0x01, 0x1B, 0xB0, 0x01, 0x0B, 0x1B, 0xB0,
561  0xB0, 0xB0, 0x01, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x0B, 0x06, 0x0B, 0x0B,
562  0x0B, 0x06, 0x0B, 0x06, 0x0B, 0x06, 0x0B, 0x06, 0x06, 0x0B, 0x06, 0x06,
563  0x06, 0x06, 0x0B, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
564  0x01, 0x06, 0x06, 0x06, 0x06, 0x01, 0x06, 0x06, 0x06, 0x01, 0x06, 0x06,
565  0x01, 0x06, 0x01, 0x06, 0x06, 0x01, 0x06, 0x01, 0x06, 0x01, 0x06, 0x01,
566  0x06, 0x01, 0x01, 0x06, 0x01, 0x06, 0x01, 0x01, 0x06, 0x01, 0x01, 0x06,
567  0x01, 0x01, 0x01, 0x06, 0x01, 0x01, 0x01, 0x06, 0x01, 0x01, 0x01, 0x01,
568  0x01, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x01, 0x01,
569  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
570  0x01, 0x01, 0x01, 0x51, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
571  0x51, 0x01, 0x01, 0x01, 0x01, 0x51, 0x01, 0x01, 0x01, 0x01, 0x51, 0x01,
572  0x01, 0x51, 0x01, 0x01, 0x51, 0x01, 0x01, 0x51, 0x01, 0x01, 0x51, 0x01,
573  0x51, 0x01, 0x51, 0x01, 0x51, 0x01, 0x51, 0x01, 0x51, 0x01, 0x51, 0x01,
574  0x51, 0x51, 0x01, 0x51, 0x51, 0x01, 0x51, 0x51, 0x51, 0x51, 0x01, 0x51,
575  0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51, 0x51,
576  0x51, 0xA1, 0x51, 0x51, 0x51, 0xA1, 0x51, 0xA1, 0x51, 0xA1, 0x51, 0xA1,
577  0x51, 0xA1, 0xA1, 0xA1, 0xA1, 0x51, 0xA1, 0xA1, 0xA1, 0x10, 0x1A, 0x1A,
578  0x1A, 0x0A, 0xA1, 0xA1, 0x10, 0x1A, 0x0A, 0xA1, 0x10, 0x0A, 0xA1, 0x10,
579  0x0A, 0xA1, 0x15, 0x0A, 0xA1, 0x15, 0x5A, 0xA1, 0x15, 0xAA, 0xA1, 0x15,
580  0xAA, 0xA1, 0x0A, 0xA1, 0x1A, 0xAA, 0x15, 0xAA, 0x15, 0xAA, 0x15, 0x0F,
581  0x10, 0x1F, 0x10, 0x3F, 0x10, 0x8F, 0x10, 0xFF, 0xA8, 0x00
582 };
583 #endif
584 #endif
585 
586 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
587 
588 #if defined(PPRZ_TRIG_INT_COMPR_HIGHEST)
589 uint8_t data_buf_4[TRIG_INT_SIZE / 2];
590 uint16_t tree_buf_4[(1 << TREE_SIZE_4)];
591 
592 void table_encode_4(int16_t val, int16_t val_prev, int16_t cnt, int16_t *tab)
593 {
594 
595  /* build 4 bit table */
596  if ((cnt % 2) == 0) {
597  data_buf_4[cnt / 2] = val % 0x10;
598  } else {
599  data_buf_4[cnt / 2] |= (val % 0x10) << 4;
600  }
601  /* build 4 bit tree */
602  if (cnt == 0) {
603  tree_buf_4[(*tab)++] = cnt;
604  } else if ((val / 0x10) != (val_prev / 0x10)) {
605  tree_buf_4[(*tab)++] = cnt;
606  }
607 }
608 
609 int16_t pprz_trig_int_4(int16_t val)
610 {
611  int8_t j;
612  int16_t k;
613 
614  /* search tree for the 4 bit data */
615  k = 1 << (TREE_SIZE_4 - 1);
616  for (j = TREE_SIZE_4 - 2; j >= 0; j--) {
617  if (val < tree_buf_4[k]) {
618  k -= (1 << j);
619  } else {
620  k += (1 << j);
621  }
622  }
623  if (val < tree_buf_4[k]) {
624  k -= 1;
625  }
626 
627  return (k << 4) | ((data_buf_4[val / 2] >> ((val % 2) ? 4 : 0)) & 0xF);
628 }
629 #endif
630 
631 #if defined(PPRZ_TRIG_INT_COMPR_HIGH)
632 uint8_t data_buf_8[TRIG_INT_SIZE];
633 uint16_t tree_buf_8[(1 << TREE_SIZE_8)];
634 
635 void table_encode_8(int16_t val, int16_t val_prev, int16_t cnt, int16_t *tab)
636 {
637 
638  /* build 8 bit table */
639  data_buf_8[cnt] = val % 0x100;
640  /* build tree for 8 bit */
641  if (cnt == 0) {
642  tree_buf_8[(*tab)++] = cnt;
643  } else if ((val / 0x100) != (val_prev / 0x100)) {
644  tree_buf_8[(*tab)++] = cnt;
645  }
646 }
647 
648 int16_t pprz_trig_int_8(int16_t val)
649 {
650  int8_t j, k;
651 
652  /* search the tree for 8 bit data */
653  k = 1 << (TREE_SIZE_8 - 1);
654  for (j = TREE_SIZE_8 - 2; j >= 0; j--) {
655  if (val < tree_buf_8[k]) {
656  k -= (1 << j);
657  } else {
658  k += (1 << j);
659  }
660  }
661  if (val < tree_buf_8[k]) {
662  k -= 1;
663  }
664 
665  return (k << 8) | data_buf_8[val];
666 }
667 #endif
668 
669 #if defined(PPRZ_TRIG_INT_COMPR_LOW)
670 uint8_t data_buf_12[(TRIG_INT_SIZE * 3) / 2];
671 #if USE_REAL_TABLE_12_USE
672 uint16_t tree_buf_12[(1 << TREE_SIZE_12)];
673 #endif
674 
675 void table_encode_12(int16_t val, int16_t val_prev, int16_t cnt, int16_t *tab)
676 {
677 
678  /* build 12 bit table */
679  data_buf_12[cnt] = val % 0x100;
680  if ((cnt % 2) == 0) {
681  data_buf_12[TRIG_INT_SIZE + (cnt / 2)] = (val & 0xF00) >> 8 ;
682  } else {
683  data_buf_12[TRIG_INT_SIZE + (cnt / 2)] |= (val & 0xF00) >> 4;
684  }
685 #if USE_REAL_TABLE_12_USE
686  /* USE_REAL_TABLE_12_USE uses the original table instead of unrolled "if".
687  * Unrolling makes it faster but uses slightly more code.
688  * For the higher compressions it is not faster/creates more code.
689  * The option is for debugging/understanding only.
690  */
691  /* build tree for 12 bit */
692  if (cnt == 0) {
693  tree_buf_12[(*tab)++] = cnt;
694  } else if ((val / 0x1000) != (val_prev / 0x1000)) {
695  tree_buf_12[(*tab)++] = cnt;
696  }
697 #else
698  // suppress unused-parameter warning
699  (void)val_prev;
700  (void)tab;
701 #endif
702 }
703 
704 int16_t pprz_trig_int_12(int16_t val)
705 {
706 #if USE_REAL_TABLE_12_USE
707  int8_t k;
708 
709  /* search tree for the 12 bit data */
710  k = 1 << (TREE_SIZE_12 - 1);
711  if (val < tree_buf_12[k]) {
712  k -= 1;
713  } else {
714  k += 1;
715  }
716  if (val < tree_buf_12[k]) {
717  k -= 1;
718  }
719  return (k << 12) | ((data_buf_12[TRIG_INT_SIZE + (val / 2)] << ((val % 2) ? 4 : 8)) & 0xF00) | (data_buf_12[val]);
720 #else
721  int16_t k;
722 
723  /* search tree for the 12 bit data */
724  if (val < TREE_BUF_12_2) {
725  if (val < TREE_BUF_12_1) {
726  k = (0 << 12);
727  } else {
728  k = (1 << 12);
729  }
730  } else {
731  if (val < TREE_BUF_12_3) {
732  k = (2 << 12);
733  } else {
734  k = (3 << 12);
735  }
736  }
737 
738  return k | ((data_buf_12[TRIG_INT_SIZE + (val >> 1)] << ((val % 2) ? 4 : 8)) & 0xF00) | (data_buf_12[val]);
739 #endif
740 }
741 #endif
742 
743 #if defined(PPRZ_TRIG_INT_COMPR_NONE)
744 int16_t data_buf_16[TRIG_INT_SIZE];
745 
746 inline int16_t pprz_trig_int_16(int32_t val)
747 {
748  return data_buf_16[val];
749 }
750 
751 void table_encode_16(int16_t val, int16_t cnt)
752 {
753  data_buf_16[cnt] = val;
754 }
755 #endif
756 
757 uint8_t get_nibble(uint16_t pos)
758 {
759  return (pprz_trig_int_compr[pos / 2] >> (4 * (pos % 2))) & 0xF;
760 }
761 
762 int pprz_trig_int_init(void)
763 {
764  int16_t i, j, k, cnt, temp, val, val_prev;
765 
766 #if defined(PPRZ_TRIG_INT_COMPR_HIGHEST)
767  int16_t tab_4 = 0;
768 #endif
769 #if defined(PPRZ_TRIG_INT_COMPR_HIGH)
770  int16_t tab_8 = 0;
771 #endif
772 #if defined(PPRZ_TRIG_INT_COMPR_LOW)
773  int16_t tab_12 = 0;
774 #endif
775 
776  cnt = 0;
777  val = 0;
778  val_prev = 0;
779  /* decode run length encoding */
780  for (i = 0; i < TRIG_INT_RLE_LEN;) {
781  temp = get_nibble(i++);
782  if (temp < 0xF) {
783  /* single */
784  for (j = 0; j < (temp / 5) + 1; j++) {
785 #if defined(PPRZ_TRIG_INT_COMPR_HIGHEST)
786  table_encode_4(val, val_prev, cnt, &tab_4);
787 #endif
788 #if defined(PPRZ_TRIG_INT_COMPR_HIGH)
789  table_encode_8(val, val_prev, cnt, &tab_8);
790 #endif
791 #if defined(PPRZ_TRIG_INT_COMPR_LOW)
792  table_encode_12(val, val_prev, cnt, &tab_12);
793 #endif
794 #if defined(PPRZ_TRIG_INT_COMPR_NONE)
795  table_encode_16(val, cnt);
796 #endif
797  val_prev = val;
798  cnt++;
799  val += temp % 5;
800  if (cnt > TRIG_INT_SIZE) {
801  return -1;
802  }
803  }
804  } else {
805  /* multi */
806  k = get_nibble(i++);
807  if (i > TRIG_INT_RLE_LEN) {
808  return -1;
809  }
810  temp = get_nibble(i++);
811  if (i > TRIG_INT_RLE_LEN) {
812  return -1;
813  }
814  k |= (temp & 0x8) << 1;
815  for (j = 0; j < k + ONE_MIN; j++) {
816 #if defined(PPRZ_TRIG_INT_COMPR_HIGHEST)
817  table_encode_4(val, val_prev, cnt, &tab_4);
818 #endif
819 #if defined(PPRZ_TRIG_INT_COMPR_HIGH)
820  table_encode_8(val, val_prev, cnt, &tab_8);
821 #endif
822 #if defined(PPRZ_TRIG_INT_COMPR_LOW)
823  table_encode_12(val, val_prev, cnt, &tab_12);
824 #endif
825 #if defined(PPRZ_TRIG_INT_COMPR_NONE)
826  table_encode_16(val, cnt);
827 #endif
828  val_prev = val;
829  cnt++;
830  val += temp & 7;
831  if (cnt > TRIG_INT_SIZE) {
832  return -1;
833  }
834  }
835  }
836  }
837  if (cnt != TRIG_INT_SIZE) {
838  return -1;
839  }
840 
841  return 0;
842 }
843 
844 inline int16_t pprz_trig_int_f(int32_t angle)
845 {
846 #if defined(PPRZ_TRIG_INT_COMPR_HIGHEST)
847  return pprz_trig_int_4(angle);
848 #elif defined(PPRZ_TRIG_INT_COMPR_HIGH)
849  return pprz_trig_int_8(angle);
850 #elif defined(PPRZ_TRIG_INT_COMPR_LOW)
851  return pprz_trig_int_12(angle);
852 #elif defined(PPRZ_TRIG_INT_COMPR_NONE)
853  return pprz_trig_int_16(angle);
854 #endif
855 }
856 
857 #else
858 
859 // dummy init
860 int pprz_trig_int_init(void) { return 0; }
861 
862 #endif // PPRZ_TRIG_INT_COMPR_FLASH
863 
864 
866 {
867 #if defined(PPRZ_TRIG_INT_USE_FLOAT)
868  float tmp;
869  tmp = ANGLE_FLOAT_OF_BFP(angle);
870  tmp = sinf(tmp);
871  angle = ANGLE_BFP_OF_REAL(tmp);
872  return angle;
873 #else
874  INT32_ANGLE_NORMALIZE(angle);
875  if (angle > INT32_ANGLE_PI_2) {
876  angle = INT32_ANGLE_PI - angle;
877  } else if (angle < -INT32_ANGLE_PI_2) {
878  angle = -INT32_ANGLE_PI - angle;
879  }
880  if (angle >= 0) {
881 #if defined(PPRZ_TRIG_INT_COMPR_FLASH)
882  return pprz_trig_int_f(angle);
883  } else {
884  return -pprz_trig_int_f(-angle);
885 #else
886  return pprz_trig_int[angle];
887  } else {
888  return -pprz_trig_int[-angle];
889 #endif
890  }
891 #endif
892 }
893 
895 {
896  return pprz_itrig_sin(angle + INT32_ANGLE_PI_2);
897 }
898 
899 
900 /* http://jet.ro/files/The_neglected_art_of_Fixed_Point_arithmetic_20060913.pdf */
901 /* http://www.dspguru.com/dsp/tricks/fixed-point-atan2-with-self-normalization */
902 
903 #define R_FRAC 14
904 
906 {
907  const int32_t c1 = INT32_ANGLE_PI_4;
908  const int32_t c2 = 3 * INT32_ANGLE_PI_4;
909  const int32_t abs_y = abs(y) + 1;
910  int32_t r;
911  int32_t a;
912  if (x >= 0) {
913  r = ((x - abs_y) << R_FRAC) / (x + abs_y);
914  a = c1 - ((c1 * r) >> R_FRAC);
915  } else {
916  r = ((x + abs_y) << R_FRAC) / (abs_y - x);
917  a = c2 - ((c1 * r) >> R_FRAC);
918  }
919  if (y < 0) {
920  return -a; // negate if in quad III or IV
921  } else {
922  return a;
923  }
924 }
925 
926 
928 {
929  const int32_t c1 = INT32_ANGLE_PI_4;
930  const int32_t c2 = 3 * INT32_ANGLE_PI_4;
931  const int32_t abs_y = abs(y) + 1;
932  int32_t r;
933  int32_t a;
934  if (x >= 0) {
935  r = ((x - abs_y) << R_FRAC) / (x + abs_y);
936  int32_t r2 = (r * r) >> R_FRAC;
937  int32_t tmp1 = ((r2 * (int32_t)ANGLE_BFP_OF_REAL(0.1963)) >> INT32_ANGLE_FRAC) - ANGLE_BFP_OF_REAL(0.9817);
938  a = ((tmp1 * r) >> R_FRAC) + c1;
939  } else {
940  r = ((x + abs_y) << R_FRAC) / (abs_y - x);
941  a = c2 - ((c1 * r) >> R_FRAC);
942  }
943  if (y < 0) {
944  return -a; // negate if in quad III or IV
945  } else {
946  return a;
947  }
948 }
static uint16_t c1
Definition: baro_MS5534A.c:203
static uint16_t c2
Definition: baro_MS5534A.c:203
#define INT32_ANGLE_PI_4
#define ANGLE_BFP_OF_REAL(_af)
#define INT32_ANGLE_PI
#define INT32_ANGLE_PI_2
#define INT32_ANGLE_FRAC
#define ANGLE_FLOAT_OF_BFP(_ai)
#define INT32_ANGLE_NORMALIZE(_a)
Paparazzi fixed point algebra.
PPRZ_TRIG_CONST int16_t pprz_trig_int[6434]
Definition: pprz_trig_int.c:31
int pprz_trig_int_init(void)
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)
#define R_FRAC
Paparazzi fixed point trig functions.
#define TRIG_INT_COMPR_LEN
Definition: pprz_trig_int.h:63
#define TREE_BUF_12_3
Definition: pprz_trig_int.h:70
#define TREE_BUF_12_2
Definition: pprz_trig_int.h:69
#define TREE_SIZE_4
Definition: pprz_trig_int.h:57
#define PPRZ_TRIG_CONST
Allow makefile to define PPRZ_TRIG_CONST in case we want to make the trig tables const and store them...
Definition: pprz_trig_int.h:40
#define TRIG_INT_SIZE
Definition: pprz_trig_int.h:55
#define TREE_SIZE_8
Definition: pprz_trig_int.h:58
#define TRIG_INT_RLE_LEN
Definition: pprz_trig_int.h:62
#define ONE_MIN
Definition: pprz_trig_int.h:66
#define TREE_SIZE_12
Definition: pprz_trig_int.h:59
#define TREE_BUF_12_1
Definition: pprz_trig_int.h:68
uint16_t val[TCOUPLE_NB]
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
Definition: vl53l1_types.h:88
int int32_t
Typedef defining 32 bit int type.
Definition: vl53l1_types.h:83
short int16_t
Typedef defining 16 bit short type.
Definition: vl53l1_types.h:93
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
Definition: vl53l1_types.h:98
signed char int8_t
Typedef defining 8 bit char type.
Definition: vl53l1_types.h:103