CARMA C++
szaconst.h
1 /* C include file containing commonly used constants */
2 
3 /* The speed of light */
4 
5 #define cvel 2.99792458e8
6 
7 /* pi */
8 
9 #define pi 3.1415926535897932384626433832795028841971693993751
10 
11 /* 2*pi */
12 
13 #define twopi 6.2831853071795864769252867665590057683943387987502
14 
15 /* pi/2 */
16 
17 #define halfpi 1.5707963267948966192313216916397514420985846996875
18 
19 /* Scale radians to degrees */
20 
21 #define rtod 57.29577951308232087679815481410517033240547246656458
22 
23 /* Scale milliarcseconds to radians */
24 
25 #define mastor 4.8481368110953599358991410235794797595635e-9
26 
27 /* Scale radians to milliarcsec */
28 
29 #define rtomas 2.062648062470963551564733573307786131966597008796332528822e+8
30 
31 /* Scale radians to arcseconds */
32 
33 #define rtoas 2.062648062470963551564733573307786131966597008796332528822e+5
34 
35 /* Scale radians to arcminutes */
36 
37 #define rtoam 3.437746770784939252607889288846310219944328347993887548e+3
38 
39 /* Scale degrees to radians */
40 
41 #define dtor 0.0174532925199432957692369076848861271344287188854
42 
43 /* Scale degrees to milliarcsec */
44 
45 #define dtomas 3.6e6
46 
47 /* Scale radians to hours */
48 
49 #define rtoh 3.819718634205488058453210320940344688827031497771
50 
51 /* Scale hours to radians */
52 
53 #define htor 0.2617993877991494365385536152732919070164307832813
54 
55 /* The number of seconds in a day */
56 
57 #define daysec 86400.0
58 
59 /* The number of minutes in a day */
60 
61 #define daymin 1440.0
62 
63 /* Mean sidereal seconds per UT1 second */
64 
65 #define ut_to_mst 0.997269566329084
66 
67 /* UT1 seconds per mean sidereal second */
68 
69 #define mst_to_ut 1.002737909350795
70 
71 /*
72  * UT1 days per sidereal earth rotation. This differs from ut_to_mst
73  * because it includes the rate of precession of right ascension.
74  */
75 #define ut_to_rot 0.9972696632424
76 
77 /*
78  * Sidereal earth rotations per UT1 day. This differs from mst_to_ut
79  * because it includes the rate of precession of right ascension.
80  */
81 #define rot_to_ut 1.002737811906
82 
83 /* Scale Astronomical Units to meters */
84 
85 #define au_to_m 1.496e11
86 
87 /* Scale meters to Astronomical units */
88 
89 #define m_to_au (1.0/1.496e11)
90