c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
Loading...
Searching...
No Matches
sofa_constants.h
1/** \addtogroup sofa_constants
2 * In general, these constants are provided through boost or mxlib with templatized functions/types.
3 *
4 * \note You should include SOFA via \ref sofa.hpp, rather than the SOFA headers. In particular, this will remove the constant DC which collides with the Eigen library.
5 *
6 *
7 *
8 * @{
9 *
10 */
11/// Pi (defined in the \ref astro_sofa "SOFA" library sofam.h)
12#define DPI (3.141592653589793238462643)
13
14/// 2Pi (defined in the \ref astro_sofa "SOFA" library sofam.h)
15#define D2PI (6.283185307179586476925287)
16
17/// Radians to degrees (defined in the \ref astro_sofa "SOFA" library sofam.h)
18#define DR2D (57.29577951308232087679815)
19
20/// Degrees to radians (defined in the \ref astro_sofa "SOFA" library sofam.h)
21#define DD2R (1.745329251994329576923691e-2)
22
23/// Radians to arcseconds (defined in the \ref astro_sofa "SOFA" library sofam.h)
24#define DR2AS (206264.8062470963551564734)
25
26/// Arcseconds to radians (defined in the \ref astro_sofa "SOFA" library sofam.h)
27#define DAS2R (4.848136811095359935899141e-6)
28
29/// Seconds of time to radians (defined in the \ref astro_sofa "SOFA" library sofam.h)
30#define DS2R (7.272205216643039903848712e-5)
31
32/// Arcseconds in a full circle (defined in the \ref astro_sofa "SOFA" library sofam.h)
33#define TURNAS (1296000.0)
34
35/// Milliarcseconds to radians (defined in the \ref astro_sofa "SOFA" library sofam.h)
36#define DMAS2R (DAS2R / 1e3)
37
38/// Length of tropical year B1900 (days) (defined in the \ref astro_sofa "SOFA" library sofam.h)
39#define DTY (365.242198781)
40
41/// Seconds per day. (defined in the \ref astro_sofa "SOFA" library sofam.h)
42#define DAYSEC (86400.0)
43
44/// Days per Julian year (defined in the \ref astro_sofa "SOFA" library sofam.h)
45#define DJY (365.25)
46
47/// Days per Julian century (defined in the \ref astro_sofa "SOFA" library sofam.h)
48#define DJC (36525.0)
49
50/// Days per Julian millennium (defined in the \ref astro_sofa "SOFA" library sofam.h)
51#define DJM (365250.0)
52
53/// Reference epoch (J2000.0), Julian Date (defined in the \ref astro_sofa "SOFA" library sofam.h)
54#define DJ00 (2451545.0)
55
56/// Julian Date of Modified Julian Date zero (defined in the \ref astro_sofa "SOFA" library sofam.h)
57#define DJM0 (2400000.5)
58
59/// Reference epoch (J2000.0), Modified Julian Date (defined in the \ref astro_sofa "SOFA" library sofam.h)
60#define DJM00 (51544.5)
61
62/// 1977 Jan 1.0 as MJD (defined in the \ref astro_sofa "SOFA" library sofam.h)
63#define DJM77 (43144.0)
64
65/// TT minus TAI (s) (defined in the \ref astro_sofa "SOFA" library sofam.h)
66#define TTMTAI (32.184)
67
68/// Astronomical unit (m) (defined in the \ref astro_sofa "SOFA" library sofam.h)
69#define DAU (149597870e3)
70
71/// Speed of light (m/s) (defined in the \ref astro_sofa "SOFA" library sofam.h)
72#define CMPS 299792458.0
73
74/// Light time for 1 au (s) (defined in the \ref astro_sofa "SOFA" library sofam.h)
75#define AULT 499.004782
76
77/// Speed of light (AU per day) SEE BELOW
78/** Though defined in the \ref astro_sofa "SOFA" library sofam.h, this is undefined by \ref sofa.hpp to avoid a collision with Eigen. You can use \ref mx::astro::c() instead.
79 */
80#define DC (DAYSEC / AULT)
81
82/// L_G = 1 - d(TT)/d(TCG) (defined in the \ref astro_sofa "SOFA" library sofam.h)
83#define ELG (6.969290134e-10)
84
85/// L_B = 1 - d(TDB)/d(TCB) (defined in the \ref astro_sofa "SOFA" library sofam.h)
86#define ELB (1.550519768e-8)
87
88/// TDB (s) at TAI 1977/1/1.0 (defined in the \ref astro_sofa "SOFA" library sofam.h)
89#define TDB0 (-6.55e-5)
90
91/// Schwarzschild radius of the Sun (au)
92/** = 2 * 1.32712440041e20 / (2.99792458e8)^2 / 1.49597870700e11 (defined in the \ref astro_sofa "SOFA" library sofam.h)
93 */
94#define SRS 1.97412574336e-8
95
96/// dint(A) - truncate to nearest whole number towards zero (double) (defined in the \ref astro_sofa "SOFA" library sofam.h)
97#define dint(A) ((A)<0.0?ceil(A):floor(A))
98
99/// dnint(A) - round to nearest whole number (double) (defined in the \ref astro_sofa "SOFA" library sofam.h)