-
Notifications
You must be signed in to change notification settings - Fork 0
/
sine_table.c
30 lines (29 loc) · 1.89 KB
/
sine_table.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*******************************************************************************
* File: main.c
* Author: Vladimir Pasashnikov, [email protected]
*
* Created on 31 August 2017
******************************************************************************/
#include "sine_table.h"
#include <libq.h>
//Micro-Step table = 0 to 90 degrees of a cosine in Q16
const _Q16 sine_table[TABLE_SIZE] = {
32767,32765,32761,32757,32752,32745,32737,32728,32717,32705,32692,32678,32663,
32646,32628,32609,32589,32567,32545,32521,32495,32469,32441,32412,32382,32351,32318,
32285,32250,32213,32176,32137,32098,32057,32014,31971,31926,31880,31833,31785,31736,
31685,31633,31580,31526,31470,31414,31356,31297,31237,31176,31113,31050,30985,30919,
30852,30783,30714,30643,30571,30498,30424,30349,30273,30195,30117,30037,29956,29874,
29791,29706,29621,29534,29447,29358,29268,29177,29085,28992,28898,28803,28706,28609,
28510,28411,28310,28208,28105,28001,27896,27790,27683,27575,27466,27356,27245,27133,
27019,26905,26790,26674,26556,26438,26319,26198,26077,25955,25832,25708,25582,25456,
25329,25201,25072,24942,24811,24680,24547,24413,24279,24143,24007,23870,23731,23592,
23452,23311,23170,23027,22884,22739,22594,22448,22301,22154,22005,21856,21705,21554,
21403,21250,21096,20942,20787,20631,20475,20317,20159,20000,19841,19680,19519,19357,
19195,19032,18868,18703,18537,18371,18204,18037,17869,17700,17530,17360,17189,17018,
16846,16673,16499,16325,16151,15976,15800,15623,15446,15269,15090,14912,14732,14553,
14372,14191,14010,13828,13645,13462,13279,13094,12910,12725,12539,12353,12167,11980,
11793,11605,11417,11228,11039,10849,10659,10469,10278,10087,9896,9704,9512,9319,9126,
8933,8739,8545,8351,8157,7962,7767,7571,7375,7179,6983,6786,6590,6393,6195,5998,5800,
5602,5404,5205,5007,4808,4609,4410,4210,4011,3811,3612,3412,3212,3012,2811,2611,2410,
2210,2009,1809,1608,1407,1206,1005,804,603,402,201,0
};