OmniSciDB  6686921089
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
constants.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016-2017 Uber Technologies, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
20 #ifndef CONSTANTS_H
21 #define CONSTANTS_H
22 
23 #ifndef M_PI
24 
25 #define M_PI 3.14159265358979323846
26 #endif
27 
28 #ifndef M_PI_2
29 
30 #define M_PI_2 1.5707963267948966
31 #endif
32 
34 #define M_2PI 6.28318530717958647692528676655900576839433
35 
37 #define M_PI_180 0.0174532925199432957692369076848861271111
38 
39 #define M_180_PI 57.29577951308232087679815481410517033240547
40 
42 #define EPSILON 0.0000000000000001
43 
44 #define M_SQRT3_2 0.8660254037844386467637231707529361834714
45 
46 #define M_SIN60 M_SQRT3_2
47 
51 #define M_AP7_ROT_RADS 0.333473172251832115336090755351601070065900389
52 
54 #define M_SIN_AP7_ROT 0.3273268353539885718950318
55 
57 #define M_COS_AP7_ROT 0.9449111825230680680167902
58 
60 #define EARTH_RADIUS_KM 6371.007180918475
61 
65 #define RES0_U_GNOMONIC 0.38196601125010500003
66 
68 #define MAX_H3_RES 15
69 
71 #define NUM_ICOSA_FACES 20
72 
73 #define NUM_BASE_CELLS 122
74 
75 #define NUM_HEX_VERTS 6
76 
77 #define NUM_PENT_VERTS 5
78 
79 #define NUM_PENTAGONS 12
80 
82 #define H3_HEXAGON_MODE 1
83 #define H3_UNIEDGE_MODE 2
84 #define H3_EDGE_MODE 3
85 #define H3_VERTEX_MODE 4
86 
87 #endif