constants¶

This module contains constants that are used in the tudatpy library or commonly used in astrodynamic calculations.

Physical Constants¶

Fundamental physical constants used in physics and astronomy.

SEA_LEVEL_GRAVITATIONAL_ACCELERATION = 9.80665¶
Type:

float

Standard gravitational acceleration at Earth’s sea level in \(\mathrm{m}/\mathrm{s}^2\).

SPEED_OF_LIGHT = 299792458.0¶
Type:

float

Speed of light in vacuum in \(\mathrm{m}/\mathrm{s}\) [23].

SPEED_OF_LIGHT_LONG = 299792458.0¶
Type:

float

Speed of light in vacuum, high-precision (long double) variant in \(\mathrm{m}/\mathrm{s}\) [23].

GRAVITATIONAL_CONSTANT = 6.67259e-11¶
Type:

float

Newtonian gravitational constant in \(\mathrm{m}^3/(\mathrm{kg} \, \mathrm{s}^2)\) [23].

ASTRONOMICAL_UNIT = 149597870700.0¶
Type:

float

Astronomical Unit - mean Earth-Sun distance in \(\mathrm{m}\) [33].

SPECIFIC_GAS_CONSTANT_AIR = 287.0¶
Type:

float

Specific gas constant for air in \(\mathrm{J}/(\mathrm{kg} \, \mathrm{K})\) [3].

MOLAR_GAS_CONSTANT = 8.3144598¶
Type:

float

Universal molar gas constant in \(\mathrm{J}/(\mathrm{mol} \, \mathrm{K})\) [1]. Also known as universal gas constant.

PLANCK_CONSTANT = 6.62606957e-34¶
Type:

float

Planck constant in \(\mathrm{J} \, \mathrm{s}\) [1].

BOLTZMANN_CONSTANT = 1.3806488e-23¶
Type:

float

Boltzmann constant - gas constant per particle in \(\mathrm{m}^{2} \, \mathrm{kg} / ( \mathrm{s}^{2} \, \mathrm{K} )\) [1].

STEFAN_BOLTZMANN_CONSTANT = 5.6703726225913323e-08¶
Type:

float

Stefan-Boltzmann constant for black body radiation in \(\mathrm{W}/(\mathrm{m}^{2} \, \mathrm{K}^{4})\) [35].

INVERSE_SQUARE_SPEED_OF_LIGHT = 1.1126500560536185e-17¶
Type:

float

Precomputed \(1/c^2\) in \(\mathrm{s}^2/\mathrm{m}^2\).

INVERSE_CUBIC_SPEED_OF_LIGHT = 3.711401092196984e-26¶
Type:

float

Precomputed \(1/c^3\) in \(\mathrm{s}^3/\mathrm{m}^3\).

INVERSE_QUARTIC_SPEED_OF_LIGHT = 1.2379901472361205e-34¶
Type:

float

Precomputed \(1/c^4\) in \(\mathrm{s}^4/\mathrm{m}^4\).

INVERSE_QUINTIC_SPEED_OF_LIGHT = 4.129490633270435e-43¶
Type:

float

Precomputed \(1/c^5\) in \(\mathrm{s}^5/\mathrm{m}^5\).

VACUUM_PERMEABILITY = 1.2566370614359173e-06¶
Type:

float

Magnetic permeability of free space \(\mu_0\) in \(\mathrm{H}/\mathrm{m}\). Defined as \(\mu_0 = 4\pi \times 10^{-7}\) \(\mathrm{H}/\mathrm{m}\).

VACUUM_PERMITTIVITY = 8.85418781762039e-12¶
Type:

float

Electric permittivity of free space \(\varepsilon_0\) in \(\mathrm{F}/\mathrm{m}\). Computed as \(\varepsilon_0 = 1/(\mu_0 c^2)\).

Time Constants¶

Time conversion factors and relativistic time scale parameters.

JULIAN_DAY = 86400.0¶
Type:

float

Number of seconds in a Julian day in \(\mathrm{s}\) [34].

JULIAN_DAY_LONG = 86400.0¶
Type:

float

Number of seconds in a Julian day, high-precision (long double) variant in \(\mathrm{s}\) [34].

JULIAN_YEAR_IN_DAYS = 365.25¶
Type:

float

Number of days in a Julian year [34].

JULIAN_YEAR_IN_DAYS_LONG = 365.25¶
Type:

float

Number of days in a Julian year, high-precision (long double) variant [34].

JULIAN_YEAR = 31557600.0¶
Type:

float

Number of seconds in a Julian year in \(\mathrm{s}\). Result of JULIAN_YEAR_IN_DAYS * JULIAN_DAY.

SIDEREAL_DAY = 86164.09054¶
Type:

float

Number of seconds in a sidereal day in \(\mathrm{s}\) [34].

SIDEREAL_YEAR_IN_DAYS = 365.25636¶
Type:

float

Number of days in a sidereal year in quasar reference frame [34].

SIDEREAL_YEAR = 31558149.504¶
Type:

float

Number of seconds in a sidereal year in quasar reference frame in \(\mathrm{s}\). Result of SIDEREAL_YEAR_IN_DAYS * JULIAN_DAY.

LG_TIME_RATE_TERM = 6.969290134e-10¶
Type:

float

Relative time rate difference between Geocentric Coordinate Time (TCG) and Terrestrial Time (TT). Defines the linear drift rate: TCG progresses faster than TT by approximately 0.7 parts per billion. Over one year, TCG gains about 22 milliseconds relative to TT.

LG_TIME_RATE_TERM_LONG = 6.969290134e-10¶
Type:

float

Relative time rate difference between TCG and TT, high-precision (long double) variant.

Epoch Constants¶

JULIAN_DAY_ON_J2000 = 2451545.0¶
Type:

float

Julian Day Number at the J2000.0 epoch (2000-01-01 12:00:00 TT).

JULIAN_DAY_AT_0_MJD = 2400000.5¶
Type:

float

Julian Day Number at Modified Julian Date zero (1858-11-17 00:00:00).

Mathematical Constants¶

Fundamental mathematical constants.

E = 2.718281828459045¶
Type:

float

Euler’s number, base of natural logarithm. Also known as Napier’s constant.

GOLDEN_RATIO = 1.618033988749895¶
Type:

float

The golden ratio, also known as the divine proportion, golden mean, or golden section. A number often encountered when taking the ratios of distances in simple geometric figures such as the pentagon, pentagram, decagon and dodecahedron.

COMPLEX_I = 1j¶
Type:

complex

Imaginary unit \(i = \sqrt{-1}\). Independent root of -1.

PI = 3.141592653589793¶
Type:

float

The constant \(\pi\), ratio of circle’s circumference \(C\) to its diameter \(d = 2r\).

TUDAT_NAN = nan¶
Type:

float

Tudat Not-a-Number (NaN) value indicating undefined/invalid results.

High-Precision Constants¶

The following constants have high-precision _LONG variants using long double precision instead of standard double precision. These provide extended precision for calculations requiring high accuracy over long time spans (the high-accuracy may only be realized in C++, on architectures/compilers where long double will map to 80-bit precision).

When to use high-precision variants:

  • Long-duration orbital propagations (decades to centuries)

  • High-accuracy ephemeris calculations

  • Relativistic corrections in precise orbit determination

  • Time scale transformations requiring sub-nanosecond accuracy

Available high-precision variants: