constants#

namespace saltro#
namespace constants#

Variables

constexpr double DEG2RAD = M_PI / 180.0#

Conversion factor from degrees to radians.

Defined as \(\frac{\pi}{180}\).

constexpr double SEC_PER_JULIAN_CENTURY = 36525.0 * 86400.0#

Number of seconds in one Julian century.

Defined as \(36525 \times 86400 = 3155760000\). Used for time conversions in ephemeris computations.

constexpr double AU_M = 149597870700.0#

Astronomical Unit in meters.

The mean distance from Earth to Sun: \(1.49597870700 \times 10^{11}\) meters, used in solar ephemeris calculations.

constexpr double C_LIGHT = 299792458.0#

Speed of light in vacuum.

Defined as exactly \(299\,792\,458\) m/s.

constexpr double SOLAR_CONSTANT = 1361.0#

Solar irradiance constant.

Mean solar irradiance at 1 AU, approximately \(1361\) W/m². Used for solar radiation pressure drag calculations.

constexpr double R_SUN = 6.957e8#

Solar radius in meters.

Approximate mean radius of the Sun: \(6.957 \times 10^8\) m.

constexpr double MU_EARTH = 3.986004418e14#

Earth’s gravitational parameter.

Defined as \(\mu = 3.986\,004\,418 \times 10^{14}\) m³/s², where \(\mu = GM\) and \(G\) is the gravitational constant. Used in Kepler orbit propagation.

constexpr double R_EARTH = 6378136.3#

Earth’s mean equatorial radius.

Defined as \(6\,378\,136.3\) meters.

constexpr double J2_EARTH = 1.08263e-3#

Earth’s oblateness parameter (J2).

Dimensionless coefficient describing Earth’s equatorial bulge:

\[J_2 \approx 1.08263 \times 10^{-3}\]
Controls the magnitude of the J2 perturbation in orbit propagation.

constexpr double MU0_OVER_4PI = 1e-7#

Vacuum permeability divided by \(4\pi\).

Defined as \(\mu_0/(4\pi) = 10^{-7}\) N/A².

constexpr double M_EARTH = 7.94e22#

Earth’s magnetic dipole moment magnitude.

Approximately \(7.94 \times 10^{22}\) A·m².

constexpr double K = MU0_OVER_4PI * M_EARTH#

Product of permeability and magnetic moment.

Defined as \(K = \frac{\mu_0}{4\pi} M_{\text{Earth}}\) in units of T·m³. Used in dipole magnetic field calculations.

constexpr double TILT_RAD = 11.0 * DEG2RAD#

Tilt angle of Earth’s magnetic dipole.

Defined as \(11°\) in radians. The dipole is tilted relative to the geographic pole in the dipole model.

constexpr double LON_RAD = 289.0 * DEG2RAD#

Longitude of the magnetic dipole axis.

Defined as \(289°\) in radians (measured from prime meridian). Used to locate the magnetic dipole relative to Earth’s geographic reference frame.