8#ifndef __mx_astro_constants_hpp__
9#define __mx_astro_constants_hpp__
29template <
typename realT>
32 return static_cast<realT
>( 4.8481368111333441675396429478852851658848753880815e-06 );
47template <
typename units>
48constexpr typename units::realT
G()
50 return static_cast<typename units::realT
>( 6.67408e-11 ) * ( units::length * units::length * units::length ) /
51 ( units::mass * units::time * units::time );
57template <
typename units>
58constexpr typename units::realT
c()
60 return static_cast<typename units::realT
>( 299792458 ) * ( units::length / units::time );
68template <
typename units>
69constexpr typename units::realT
k()
71 return static_cast<typename units::realT
>( 1.38064852e-23 ) * units::energy / units::temperature;
79template <
typename units>
80constexpr typename units::realT
sigma()
82 return static_cast<typename units::realT
>( 5.670367e-8 ) * ( units::energy / units::time ) /
83 ( units::length * units::length ) /
84 ( units::temperature * units::temperature * units::temperature * units::temperature );
90template <
typename units>
91constexpr typename units::realT
h()
93 return static_cast<typename units::realT
>( 6.626070040e-34 ) * units::energy * units::time;
99template <
typename units>
100constexpr typename units::realT
day()
102 return static_cast<typename units::realT
>( 86400.0 ) * units::time;
108template <
typename units>
109constexpr typename units::realT
year()
111 return (
static_cast<typename units::realT
>( 365.25 ) *
static_cast<typename units::realT
>( 86400.0 ) ) *
118template <
typename units>
119constexpr typename units::realT
au()
121 return static_cast<typename units::realT
>( 149597870700.0 ) * units::length;
125template <
typename units>
128 return au<units>() / tan_arcsec<typename units::realT>();
137template <
typename units>
140 return static_cast<typename units::realT
>( 6.957e8 ) * units::length;
149template <
typename units>
152 return static_cast<typename units::realT
>( 1361 ) * units::energy / units::time / ( units::length * units::length );
161template <
typename units>
164 return static_cast<typename units::realT
>( 3.828e26 ) * units::energy / units::time;
173template <
typename units>
176 return static_cast<typename units::realT
>( 5772.0 ) * units::temperature;
185template <
typename units>
186constexpr typename units::realT
GMSun()
188 return static_cast<typename units::realT
>( 1.3271244e20 ) * ( units::length * units::length * units::length ) /
189 ( units::time * units::time );
198template <
typename units>
201 return GMSun<units>() / G<units>();
210template <
typename units>
213 return static_cast<typename units::realT
>( 6.3781e6 ) * units::length;
222template <
typename units>
225 return static_cast<typename units::realT
>( 3.986004e14 ) * ( units::length * units::length * units::length ) /
226 ( units::time * units::time );
235template <
typename units>
238 return GMEarth<units>() / G<units>();
247template <
typename units>
250 return static_cast<typename units::realT
>( 7.1492e7 ) * units::length;
259template <
typename units>
262 return static_cast<typename units::realT
>( 1.2668653e17 ) * ( units::length * units::length * units::length ) /
263 ( units::time * units::time );
273template <
typename units>
276 return GMJupiter<units>() / G<units>();
288template <
typename units>
291 return static_cast<typename units::realT
>( 6.023657330e6 );
300template <
typename units>
303 return massSun<units>() / mrMercury<units>();
313template <
typename units>
314constexpr typename units::realT radMercury()
316 return static_cast<typename units::realT
>( 2.4397e6 ) * units::length;
328template <
typename units>
329constexpr typename units::realT mrVenus()
331 return static_cast<typename units::realT
>( 4.08523719e5 );
340template <
typename units>
341constexpr typename units::realT massVenus()
343 return massSun<units>() / mrVenus<units>();
353template <
typename units>
356 return static_cast<typename units::realT
>( 6.0518e6 ) * units::length;
368template <
typename units>
371 return static_cast<typename units::realT
>( 3.09870359e6 );
379template <
typename units>
382 return massSun<units>() / mrMars<units>();
392template <
typename units>
393constexpr typename units::realT radMars()
395 return static_cast<typename units::realT
>( 3.39619e6 ) * units::length;
407template <
typename units>
408constexpr typename units::realT mrSaturn()
410 return static_cast<typename units::realT
>( 3.4979018e3 );
418template <
typename units>
419constexpr typename units::realT massSaturn()
421 return massSun<units>() / mrSaturn<units>();
431template <
typename units>
434 return static_cast<typename units::realT
>( 6.0268e7 ) * units::length;
446template <
typename units>
449 return static_cast<typename units::realT
>( 2.2902951e4 );
457template <
typename units>
460 return massSun<units>() / mrUranus<units>();
470template <
typename units>
471constexpr typename units::realT radUranus()
473 return static_cast<typename units::realT
>( 2.5559e7 ) * units::length;
485template <
typename units>
486constexpr typename units::realT mrNeptune()
488 return static_cast<typename units::realT
>( 1.941226e4 );
496template <
typename units>
497constexpr typename units::realT massNeptune()
499 return massSun<units>() / mrNeptune<units>();
509template <
typename units>
512 return static_cast<typename units::realT
>( 2.4764e7 ) * units::length;
constexpr units::realT G()
Newton's Gravitational Constant.
constexpr units::realT radSaturn()
Radius of Mars.
constexpr units::realT radNeptune()
Radius of Uranus.
constexpr units::realT year()
Length of year.
constexpr units::realT GMJupiter()
Jupiter Mass Parameter.
constexpr units::realT radEarth()
Radius of Earth (nominal equatorial)
constexpr units::realT c()
The speed of light.
constexpr units::realT parsec()
The parsec.
constexpr units::realT massUranus()
Mass of Uranus.
constexpr units::realT radVenus()
Radius of Mercury.
constexpr units::realT mrMercury()
Mass ratio of Mercury to the Sun.
constexpr units::realT radSun()
Radius of the Sun.
constexpr units::realT massMars()
Mass of Mars.
constexpr units::realT GMEarth()
Earth Mass Parameter.
constexpr units::realT mrUranus()
Mass ratio of Uranus to the Sun.
constexpr units::realT massSun()
Solar Mass.
constexpr units::realT radJupiter()
Radius of Jupiter (nominal equatorial)
constexpr units::realT massMercury()
Mass of Mercury.
constexpr units::realT lumSun()
Luminosity of the Sun.
constexpr units::realT h()
Planck Constant.
constexpr units::realT GMSun()
Solar Mass Parameter.
constexpr units::realT sigma()
Stefan-Boltzmann Constant.
constexpr units::realT day()
Length of day.
constexpr units::realT mrMars()
Mass ratio of Mars to the Sun.
constexpr units::realT massEarth()
Earth Mass.
constexpr units::realT au()
Astronomical Unit.
constexpr units::realT TeffSun()
Effective Temperature of the Sun.
constexpr units::realT massJupiter()
Jupiter Mass.
constexpr units::realT solarIrrad()
Solar Irradiance at 1 au.
constexpr units::realT k()
Boltzmann Constant.
constexpr realT tan_arcsec()
Tangent of 1.0 arcsec.