src/data/constants.js
// ————————————————————————————————————————————————
// Physical and astronomical constants.
// All values in SI where possible. Sources: NASA factsheets, IAU 2015.
// ————————————————————————————————————————————————
export const C_KMS = 299792.458; // Speed of light, km/s
export const KM_PER_AU = 149597870.7; // Astronomical unit, km
export const KM_PER_LY = 9.4607304725808e12; // Light-year, km
export const AU_PER_LY = 63241.077; // AU per light-year
export const SECONDS_PER_DAY = 86400;
export const DAYS_PER_YEAR = 365.25;
export const SECONDS_PER_YEAR = SECONDS_PER_DAY * DAYS_PER_YEAR;
// Sun
export const SUN_RADIUS_KM = 696340;
export const SUN_MASS_KG = 1.98892e30;
export const G_SI = 6.6743e-11; // m^3 kg^-1 s^-2
// Earth
export const EARTH_RADIUS_KM = 6371.0; // mean (volumetric) radius
export const EARTH_EQUATORIAL_RADIUS_KM = 6378.137; // WGS-84
export const GM_EARTH_KM3_S2 = 398600.4418; // standard gravitational parameter
export const J2_EARTH = 1.08262668e-3; // second zonal harmonic
export const EARTH_OBLIQUITY_RAD = (23.4392811 * Math.PI) / 180; // J2000 mean obliquity
// Moon
export const MOON_MASS_KG = 7.342e22;
export const MOON_MEAN_DISTANCE_KM = 384400; // semi-major axis of the lunar orbit (canonical)
// Galactic
export const SUN_DIST_FROM_GALACTIC_CENTER_LY = 26000;
export const MILKY_WAY_DISK_RADIUS_LY = 50000;
export const GALACTIC_YEAR_EARTH_YEARS = 225e6; // Sun's orbit period around galactic center
// Milky Way → Andromeda
export const ANDROMEDA_DISTANCE_LY = 2_537_000;
export const ANDROMEDA_APPROACH_KMS = 110; // radial velocity toward Milky Way
// Proxima Centauri b
export const PROXIMA_B_DISTANCE_LY = 4.2465;
// Observable universe
export const OBSERVABLE_UNIVERSE_RADIUS_LY = 46.5e9;
// ————————————————————————————————————————————————
// Simulation conventions.
// These are the arbitrary "1× speed" choices shared across views.
// ————————————————————————————————————————————————
// At 1× simulation speed, Earth completes its orbit in this many real-time
// seconds. All other orbital periods scale proportionally.
export const EARTH_SIM_PERIOD_SEC = 20;
← Astrarium