-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.h
51 lines (45 loc) · 5.94 KB
/
main.h
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
* libwebsockets-test-server - libwebsockets test implementation
*
* Copyright (C) 2010-2016 Andy Green <andy@warmcat.com>
*
* This file is made available under the Creative Commons CC0 1.0
* Universal Public Domain Dedication.
*
* The person who associated a work with this deed has dedicated
* the work to the public domain by waiving all of his or her rights
* to the work worldwide under copyright law, including all related
* and neighboring rights, to the extent allowed by law. You can copy,
* modify, distribute and perform the work, even for commercial purposes,
* all without asking permission.
*
* The test apps are intended to be adapted for use in your code, which
* may be proprietary. So unlike the library itself, they are licensed
* Public Domain.
*/
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <signal.h>
#include <string.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <assert.h>
#include <syslog.h>
#include <sys/time.h>
#include <unistd.h>
#include <inttypes.h>
#include <errno.h>
#include <libwebsockets.h>
#include <pthread.h>
#include <math.h>
#include <fftw3.h>
#include "ad9363.h"
//#include "libairspy/libairspy/src/airspy.h"
const int32_t fft_line_compensation[1024] = {
1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,
1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,1700,
1694,1776,1642,1742,1673,1742,1717,1680,1563,1609,1622,1662,1713,1694,1732,1702,1733,1672,1698,1714,1698,1707,1743,1749,1860,1892,1908,2008,2049,1906,1811,2078,2113,2129,2144,2181,2196,2223,2250,2297,2323,2369,2362,2383,2385,2411,2381,2389,2403,2439,2454,2458,2491,2502,2497,2508,2518,2538,2541,2575,2603,2632,2648,2633,2636,2637,2683,2676,2680,2704,2710,2728,2742,2785,2766,2764,2746,2731,2779,2777,2797,2765,2787,2803,2830,2876,2892,2909,2900,2924,2938,2985,3028,3018,3032,3049,3086,3101,3124,3110,3080,3078,3058,3053,3052,3066,3073,3102,3115,3121,3113,3108,3114,3110,3122,3144,3145,3141,3161,3184,3206,3210,3182,3168,3172,3207,3215,3197,3197,3194,3211,3220,3234,3239,3247,3238,3224,3225,3228,3241,3216,3242,3269,3297,3307,3316,3343,3382,3403,3403,3400,3436,3449,3472,3473,3519,3515,3487,3480,3483,3479,3471,3454,3480,3478,3486,3464,3474,3475,3483,3443,3451,3522,3520,3517,3504,3529,3527,3511,3512,3506,3523,3521,3534,3545,3576,3613,3590,3613,3647,3664,3666,3712,3702,3763,3789,3810,3844,3891,3904,3924,3900,3917,3920,3884,3904,3908,3923,3937,3895,3937,3954,3977,3967,3980,3991,4017,4047,4065,4117,4134,4143,4132,4171,4188,4175,4181,4176,4193,4207,4215,4207,4199,4195,4194,4216,4239,4248,4241,4280,4269,4275,4291,4306,4301,4301,4358,4388,4421,4440,4441,4446,4478,4481,4496,4525,4525,4516,4512,4555,4584,4561,4555,4536,4564,4530,4523,4529,4565,4548,4555,4582,4596,4619,4598,4610,4683,4767,4656,4535,4528,4565,4567,4648,4744,4841,4845,4712,4736,4730,4733,4853,4836,4841,4809,4823,4782,4786,4848,4712,4784,4755,4836,4733,4781,4734,4731,4681,4774,4647,4677,4847,4822,4848,5039,4944,4875,4822,4976,4943,4976,4978,4898,4918,4876,4846,4876,4855,4853,4824,4798,4917,4830,4846,4744,4775,4807,4747,4736,4738,4794,4794,4767,4759,4730,4705,4862,4892,4870,4925,4819,4793,4694,4760,4789,4725,4827,4749,4646,4673,4679,4713,4608,4491,4505,4583,4580,4450,4561,4555,4404,4498,4452,4389,4442,4413,4428,4515,4500,4515,4451,4427,4504,4491,4518,4473,4438,4441,4435,4445,4352,4294,4323,4354,4347,4389,4327,4157,4245,4254,4160,4111,4075,4112,4076,3956,3985,4053,3989,4021,3956,4023,3955,4031,3983,4025,4026,4058,4010,4069,4063,3931,3891,3881,3878,3858,3805,3844,3714,3709,3595,3536,3423,3448,3408,3602,3666,3736,3743,3689,3765,3736,3690,3753,3769,3828,3791,3733,3779,3755,3769,3736,3661,3702,3638,3565,3609,3546,3484,3484,3392,3444,3434,3414,3389,3366,3387,3307,3415,3407,3410,3483,3452,3532,3589,3500,3458,3499,3538,3603,3546,3519,3531,3461,3463,3530,3412,3422,3320,3308,3335,3248,3237,3246,3214,3129,3142,3097,3174,3185,3106,3039,3075,3115,3073,3059,3087,3101,3099,3037,3135,3102,3148,3068,3005,3090,2973,2945,2923,2846,2819,2787,2639,2655,2606,2477,2488,2430,2351,2297,2319,2272,2216,2236,2201,2183,2091,2091,2169,2174,2055,2055,2139,2088,2101,1961,2009,1947,1971,2004,1973,1799,1791,1730,1605,1597,1504,1362,1270,1109,1104,1104,952,1035,1075,1068,1135,1063,1083,1212,1173,1225,1200,1154,1181,1190,1188,1162,1115,1173,1175,1128,1132,1019,1035,947,921,863,858,843,762,847,701,744,693,705,697,687,644,622,716,696,642,665,706,638,570,607,651,787,706,680,685,682,641,742,654,565,583,493,484,494,375,430,395,292,389,394,350,235,229,304,355,364,330,186,269,283,347,341,423,461,395,514,350,326,396,303,320,396,321,335,190,227,199,220,292,239,210,63,133,115,125,87,14,69,163,138,180,153,101,202,185,179,177,194,175,169,146,181,129,114,146,96,0,45,56,100,46,100,72,68,41,83,109,101,61,164,312,319,328,445,390,342,407,535,452,416,371,447,421,421,489,518,383,472,528,458,446,470,472,455,535,479,482,523,559,559,624,649,623,659,645,673,672,794,765,853,794,708,737,762,771,877,851,804,789,763,845,821,808,743,745,836,885,899,891,910,973,989,973,1038,1012,1088,1021,991,1095,1085,930,1066,1055,1025,1084,1039,1079,1102,1135,1040,1140,1077,1058,963,978,984,1035,942,941,1024,1098,1111,1143,1141,1140,1240,1172,1234,1284,1348,1399,1380,1317,1261,1284,1286,1308,1159,1194,1314,1190,1121,1015,920,867,919,885,868,856,810,767,693,
700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,
700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,700,
};