-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstdInc.h
More file actions
84 lines (75 loc) · 4.2 KB
/
stdInc.h
File metadata and controls
84 lines (75 loc) · 4.2 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include <Servo.h>
#include <math.h>
#ifndef stdinc
#define stdinc
//definations
#define l1 240
#define l2 210
#define angle(val,sign,off) ((180+((sign)*(val))+offset[off])%180)
#define pi 3.14159265
#define toD(a) ((a)*pi/180)
#define s(a) (((a)*(a)))
#define uk 32
#define LEFTT 1
#define RIGHTT 0
const uint16_t offset[8]={-6,0,-1,3,8,-8,0,-30};
const double pta[72][2] ={{0,0},{-4.3,0},{-8.6,0},{-12.9,0},{-21.5,0},{-25.8,0},
{-30.1,0},{-34.4,0},{-38.7,0},{-43,0},{-47.3,0},{-51.6,0},{-55.9,0},
{-60.2,0},{-64.5,0},{-68.8,0},{-73.1,0},{-77.4,0},{-88,1.8},{-96,6.4},
{-102.13,13},{-106,20},{-108,28},{-110,36},{-111,40},{-112,53},{-113,68},
{-112,77},{-111,84},{-108,102},{-106,109},{-100,119},{-91,123},{-87,128},
{-77.5,130},{-55.9,130},{55.6,130},{87,128},{91,123},{100,119},{104,113},
{106,109},{108,102},{111,84},{112,77},{113,68},{112,53},{111,40},
{110,36},{108,28},{106,20},{102.13,13},{102.13,13},{102.13,13},{77.4,0},
{73.1,0},{68.8,0},{64.5,0},{60.2,0},{55.9,0},{51.6,0},{47.3,0},{43,0},
{38.7,0},{34.4,0},{30.1,0},{25.8,0},{21.5,0},{17.2,0},{12.9,0},{8.6,0},
{4.3,0}};
const double pt1[72][2]={{0,0},{-2.87,0},{-5.74,0},{-8.61,0},
{-11.48,0},{-14.35,0},{-17.22,0},{-20.09,0},{-22.96,0},{-25.83,0},
{-28.7,0},{-31.57,0},{-34.44,0},{-37.31,0},{-40.18,0},{-43.05,0},
{-45.92,0},{-48.79,0},{-51.66,0},{-54.53,0},{-57.4,0},{-60.27,0},
{-63.14,0},{-66.01,0},{-68.88,0},{-71.75,0},{74.62,0},{-88,1.8},
{-96,6.4},{-102.13,13},{-106,20},{-111,40},{-113,68},{-100,119},
{-87,128},{-77.5,130},{55.6,130},{77.5,130},{87,128},{100,119},
{111,84},{113,68},{111,40},{108,28},{102.13,13},{77.5,0},{74.62,0},
{71.75,0},{68.88,0},{66.01,0},{63.14,0},{60.27,0},{57.4,0},
{54.53,0},{51.66,0},{48.79,0},{45.92,0},{43.05,0},{40.18,0},
{37.31,0},{34.44,0},{31.57,0},{28.7,0},{25.83,0},{22.96,0},
{20.09,0},{17.22,0},{14.35,0},{11.48,0},{8.61,0},{5.74,0},{2.87,0}};
const int ptz[72][2]={{-1,-10},{-3,-10},{-14,-10},{-24,-9},{-33,-9},{-41,-8},{-52,-6},{-62,-4},{-74,-1},{-84,02},{-93,15},{-99,06},{-104,8},{-108,10},{-114,12},{-118,14},{-127,18},{-130,20},
{-139,25},{-144,29},{-148,34},{-154,43},{-156,55},{-158,65},{-157,75},{-155,83},{-151,90},{-146,97},{-142,102,},{-136,106},
{-127,111},{-112,116},{-81,125},{-58,130},{-35,133},{-10,135},
{10,135},{35,133},{58,130},{81,125},{112,116},{127,111},
{136,106},{142,102,},{146,97},{151,90},{155,83},{157,75},{158,65},{156,55},{154,43},{148,34},{144,29},{139,25},
{130,20},{127,18},{118,14},{114,12},{108,10},{104,8},{99,06},{93,15},{84,02},{74,-1},{62,-4},{52,-6},{41,-8},{33,-9},{24,-9},{14,-10},{3,-10},{1,-10}};
const double Tan[91]={0,0.0174551,0.0349208,0.0524078,0.0699268,
0.0874887,0.105104,0.122785,0.140541,0.158384,0.176327,0.19438,
0.212557,0.230868,0.249328,0.267949,0.286745,0.305731,0.32492,
0.344328,0.36397,0.383864,0.404026,0.424475,0.445229,0.466308,
0.487733,0.509525,0.531709,0.554309,0.57735,0.600861,0.624869,
0.649408,0.674509,0.700208,0.726543,0.753554,0.781286,0.809784,
0.8391,0.869287,0.900404,0.932515,0.965689,1,1.03553,1.07237,
1.11061,1.15037,1.19175,1.2349,1.27994,1.32704,1.37638,1.42815,
1.48256,1.53986,1.60033,1.66428,1.73205,1.80405,1.88073,1.96261,
2.0503,2.14451,2.24604,2.35585,2.47509,2.60509,2.74748,2.90421,
3.07768,3.27085,3.48741,3.73205,4.01078,4.33148,4.70463,5.14455,
5.67128,6.31375,7.11537,8.14435,9.51436,11.4301,14.3007,19.0811,
28.6363,57.29,1000}; //values for tan 0-89 in degrees
const double Cos[92]={1,0.999848,0.999391,0.99863,0.997564,0.996195,
0.994522,0.992546,0.990268,0.987688,0.984808,0.981627,0.978148,
0.97437,0.970296,0.965926,0.961262,0.956305,0.951057,0.945519,
0.939693,0.93358,0.927184,0.920505,0.913545,0.906308,0.898794,
0.891007,0.882948,0.87462,0.866025,0.857167,0.848048,0.838671,
0.829038,0.819152,0.809017,0.798636,0.788011,0.777146,0.766044,
0.75471,0.743145,0.731354,0.71934,0.707107,0.694658,0.681998,
0.669131,0.656059,0.642788,0.62932,0.615661,0.601815,0.587785,
0.573576,0.559193,0.544639,0.529919,0.515038,0.5,0.48481,0.469472,
0.45399,0.438371,0.422618,0.406737,0.390731,0.374607,0.358368,
0.34202,0.325568,0.309017,0.292372,0.275637,0.258819,0.241922,
0.224951,0.207912,0.190809,0.173648,0.156434,0.139173,0.121869,
0.104528,0.0871557,0.0697565,0.052336,0.0348995,0.0174524,0,-1};
double TAN(int);
double COS(int);
int Atan(double);
int Acos(double);
#endif