sciforge-lib 0.0.4

Scientific computing library — mathematics, physics, chemistry, biology, astronomy, geology, meteorology.
Documentation
pub const AU: f64 = 1.495_978_707e11;
pub const PARSEC: f64 = 3.085_677_581e16;
pub const LIGHT_YEAR: f64 = 9.460_730_472_580_8e15;
pub const SOLAR_MASS: f64 = 1.989_1e30;
pub const SOLAR_RADIUS: f64 = 6.957e8;
pub const SOLAR_LUMINOSITY: f64 = 3.828e26;
pub const EARTH_MASS: f64 = 5.972_37e24;
pub const EARTH_RADIUS: f64 = 6.372_0e6;
pub const HUBBLE_CONSTANT: f64 = 67.4;
pub const CMB_TEMPERATURE: f64 = 2.725;
pub const SOLAR_DENSITY: f64 =
    SOLAR_MASS / (4.0 / 3.0 * std::f64::consts::PI * SOLAR_RADIUS * SOLAR_RADIUS * SOLAR_RADIUS);
pub const SOLAR_GRAVITY: f64 = crate::constants::G * SOLAR_MASS / (SOLAR_RADIUS * SOLAR_RADIUS);
pub const EARTH_GRAVITY: f64 = 9.806_65;
pub const EARTH_SURFACE_GRAVITY: f64 = EARTH_GRAVITY;
pub const EARTH_MEAN_DENSITY: f64 = 5514.0;
pub const EARTH_BOND_ALBEDO: f64 = 0.306;
pub const EARTH_ESCAPE_VELOCITY: f64 = 11_186.0;
pub const EARTH_FLATTENING: f64 = 0.003_353;
pub const EARTH_AXIAL_TILT: f64 = 23.44;
pub const EARTH_SIDEREAL_DAY: f64 = 86_164.1;
pub const EARTH_ORBITAL_PERIOD: f64 = 3.156e7;
pub const EARTH_SEMI_MAJOR_AXIS: f64 = AU;
pub const EARTH_ECCENTRICITY: f64 = 0.016_708_6;
pub const EARTH_INCLINATION: f64 = 0.0;
pub const COSMOLOGICAL_LAMBDA: f64 = 1.105_6e-52;

pub const MERCURY_MASS: f64 = 3.301_1e23;
pub const MERCURY_RADIUS: f64 = 2.439_7e6;
pub const MERCURY_FLATTENING: f64 = 0.000_9;
pub const MERCURY_ORBITAL_PERIOD: f64 = 7.600_5e6;
pub const MERCURY_SEMI_MAJOR_AXIS: f64 = 5.790_9e10;
pub const MERCURY_ECCENTRICITY: f64 = 0.205_6;
pub const MERCURY_INCLINATION: f64 = 7.005;
pub const MERCURY_AXIAL_TILT: f64 = 0.034;
pub const MERCURY_SIDEREAL_DAY: f64 = 5.067_4e6;
pub const MERCURY_SURFACE_GRAVITY: f64 = 3.7;
pub const MERCURY_ESCAPE_VELOCITY: f64 = 4250.0;
pub const MERCURY_MEAN_DENSITY: f64 = 5427.0;
pub const MERCURY_BOND_ALBEDO: f64 = 0.088;

pub const VENUS_MASS: f64 = 4.867_5e24;
pub const VENUS_RADIUS: f64 = 6.051_8e6;
pub const VENUS_FLATTENING: f64 = 0.0;
pub const VENUS_ORBITAL_PERIOD: f64 = 1.941_4e7;
pub const VENUS_SEMI_MAJOR_AXIS: f64 = 1.082_1e11;
pub const VENUS_ECCENTRICITY: f64 = 0.006_8;
pub const VENUS_INCLINATION: f64 = 3.394_6;
pub const VENUS_AXIAL_TILT: f64 = 177.36;
pub const VENUS_SIDEREAL_DAY: f64 = 2.099_7e7;
pub const VENUS_SURFACE_GRAVITY: f64 = 8.87;
pub const VENUS_ESCAPE_VELOCITY: f64 = 10_360.0;
pub const VENUS_MEAN_DENSITY: f64 = 5243.0;
pub const VENUS_BOND_ALBEDO: f64 = 0.76;

pub const MARS_MASS: f64 = 6.417e23;
pub const MARS_RADIUS: f64 = 3.389_5e6;
pub const MARS_FLATTENING: f64 = 0.005_89;
pub const MARS_ORBITAL_PERIOD: f64 = 5.935_5e7;
pub const MARS_SEMI_MAJOR_AXIS: f64 = 2.279_4e11;
pub const MARS_ECCENTRICITY: f64 = 0.093_4;
pub const MARS_INCLINATION: f64 = 1.850;
pub const MARS_AXIAL_TILT: f64 = 25.19;
pub const MARS_SIDEREAL_DAY: f64 = 88_643.0;
pub const MARS_SURFACE_GRAVITY: f64 = 3.72;
pub const MARS_ESCAPE_VELOCITY: f64 = 5030.0;
pub const MARS_MEAN_DENSITY: f64 = 3934.0;
pub const MARS_BOND_ALBEDO: f64 = 0.250;

pub const JUPITER_MASS: f64 = 1.898_2e27;
pub const JUPITER_RADIUS: f64 = 6.991_1e7;
pub const JUPITER_FLATTENING: f64 = 0.064_87;
pub const JUPITER_ORBITAL_PERIOD: f64 = 3.743_5e8;
pub const JUPITER_SEMI_MAJOR_AXIS: f64 = 7.785_7e11;
pub const JUPITER_ECCENTRICITY: f64 = 0.048_9;
pub const JUPITER_INCLINATION: f64 = 1.303;
pub const JUPITER_AXIAL_TILT: f64 = 3.13;
pub const JUPITER_SIDEREAL_DAY: f64 = 35_730.0;
pub const JUPITER_SURFACE_GRAVITY: f64 = 24.79;
pub const JUPITER_ESCAPE_VELOCITY: f64 = 59_500.0;
pub const JUPITER_MEAN_DENSITY: f64 = 1326.0;
pub const JUPITER_BOND_ALBEDO: f64 = 0.343;

pub const SATURN_MASS: f64 = 5.683_4e26;
pub const SATURN_RADIUS: f64 = 5.823_2e7;
pub const SATURN_FLATTENING: f64 = 0.097_96;
pub const SATURN_ORBITAL_PERIOD: f64 = 9.295_6e8;
pub const SATURN_SEMI_MAJOR_AXIS: f64 = 1.433_5e12;
pub const SATURN_ECCENTRICITY: f64 = 0.056_5;
pub const SATURN_INCLINATION: f64 = 2.485;
pub const SATURN_AXIAL_TILT: f64 = 26.73;
pub const SATURN_SIDEREAL_DAY: f64 = 38_362.4;
pub const SATURN_SURFACE_GRAVITY: f64 = 10.44;
pub const SATURN_ESCAPE_VELOCITY: f64 = 35_500.0;
pub const SATURN_MEAN_DENSITY: f64 = 687.0;
pub const SATURN_BOND_ALBEDO: f64 = 0.342;

pub const URANUS_MASS: f64 = 8.681_0e25;
pub const URANUS_RADIUS: f64 = 2.536_2e7;
pub const URANUS_FLATTENING: f64 = 0.022_93;
pub const URANUS_ORBITAL_PERIOD: f64 = 2.651_3e9;
pub const URANUS_SEMI_MAJOR_AXIS: f64 = 2.872_5e12;
pub const URANUS_ECCENTRICITY: f64 = 0.045_7;
pub const URANUS_INCLINATION: f64 = 0.773;
pub const URANUS_AXIAL_TILT: f64 = 97.77;
pub const URANUS_SIDEREAL_DAY: f64 = 62_064.0;
pub const URANUS_SURFACE_GRAVITY: f64 = 8.87;
pub const URANUS_ESCAPE_VELOCITY: f64 = 21_300.0;
pub const URANUS_MEAN_DENSITY: f64 = 1270.0;
pub const URANUS_BOND_ALBEDO: f64 = 0.300;

pub const NEPTUNE_MASS: f64 = 1.024_13e26;
pub const NEPTUNE_RADIUS: f64 = 2.462_2e7;
pub const NEPTUNE_FLATTENING: f64 = 0.017_08;
pub const NEPTUNE_ORBITAL_PERIOD: f64 = 5.200_7e9;
pub const NEPTUNE_SEMI_MAJOR_AXIS: f64 = 4.495_1e12;
pub const NEPTUNE_ECCENTRICITY: f64 = 0.011_3;
pub const NEPTUNE_INCLINATION: f64 = 1.770;
pub const NEPTUNE_AXIAL_TILT: f64 = 28.32;
pub const NEPTUNE_SIDEREAL_DAY: f64 = 57_996.0;
pub const NEPTUNE_SURFACE_GRAVITY: f64 = 11.15;
pub const NEPTUNE_ESCAPE_VELOCITY: f64 = 23_500.0;
pub const NEPTUNE_MEAN_DENSITY: f64 = 1638.0;
pub const NEPTUNE_BOND_ALBEDO: f64 = 0.290;

pub const LUNAR_MASS: f64 = 7.342e22;
pub const LUNAR_RADIUS: f64 = 1.737_4e6;
pub const EARTH_MOON_DISTANCE: f64 = 3.844e8;
pub const LUNAR_ORBITAL_PERIOD: f64 = 2.360_6e6;
pub const IO_MASS: f64 = 8.931_9e22;
pub const IO_RADIUS: f64 = 1.821_6e6;
pub const EUROPA_MASS: f64 = 4.799_8e22;
pub const EUROPA_RADIUS: f64 = 1.560_8e6;
pub const GANYMEDE_MASS: f64 = 1.481_9e23;
pub const GANYMEDE_RADIUS: f64 = 2.634_1e6;
pub const CALLISTO_MASS: f64 = 1.075_9e23;
pub const CALLISTO_RADIUS: f64 = 2.410_3e6;
pub const TITAN_MASS: f64 = 1.345_2e23;
pub const TITAN_RADIUS: f64 = 2.574_7e6;
pub const ENCELADUS_MASS: f64 = 1.080_2e20;
pub const ENCELADUS_RADIUS: f64 = 2.521e5;
pub const TRITON_MASS: f64 = 2.139_0e22;
pub const TRITON_RADIUS: f64 = 1.353_4e6;
pub const PHOBOS_MASS: f64 = 1.065_9e16;
pub const PHOBOS_RADIUS: f64 = 1.126_7e4;
pub const DEIMOS_MASS: f64 = 1.476_2e15;
pub const DEIMOS_RADIUS: f64 = 6.2e3;
pub const OBERON_MASS: f64 = 3.014e21;
pub const OBERON_RADIUS: f64 = 7.614e5;
pub const TITANIA_MASS: f64 = 3.527e21;
pub const TITANIA_RADIUS: f64 = 7.889e5;

pub const TETHYS_MASS: f64 = 6.174_96e20;
pub const TETHYS_RADIUS: f64 = 5.311e5;
pub const DIONE_MASS: f64 = 1.095_452e21;
pub const DIONE_RADIUS: f64 = 5.613e5;
pub const RHEA_MASS: f64 = 2.306_518e21;
pub const RHEA_RADIUS: f64 = 7.638e5;
pub const IAPETUS_MASS: f64 = 1.805_635e21;
pub const IAPETUS_RADIUS: f64 = 7.346e5;
pub const HYPERION_MASS: f64 = 5.584e18;
pub const HYPERION_RADIUS: f64 = 1.35e5;
pub const MIMAS_MASS: f64 = 3.749_4e19;
pub const MIMAS_RADIUS: f64 = 1.982e5;
pub const PROMETHEUS_MASS: f64 = 1.595e17;
pub const PROMETHEUS_RADIUS: f64 = 4.31e4;
pub const PANDORA_MASS: f64 = 1.371e17;
pub const PANDORA_RADIUS: f64 = 4.06e4;
pub const ATLAS_MASS: f64 = 6.6e15;
pub const ATLAS_RADIUS: f64 = 1.53e4;
pub const PAN_MASS: f64 = 4.95e15;
pub const PAN_RADIUS: f64 = 1.42e4;
pub const EPIMETHEUS_MASS: f64 = 5.266e17;
pub const EPIMETHEUS_RADIUS: f64 = 5.83e4;
pub const JANUS_MASS: f64 = 1.898e18;
pub const JANUS_RADIUS: f64 = 8.95e4;

pub const AMALTHEA_MASS: f64 = 2.08e18;
pub const AMALTHEA_RADIUS: f64 = 8.35e4;
pub const THEBE_MASS: f64 = 4.3e17;
pub const THEBE_RADIUS: f64 = 4.93e4;
pub const HIMALIA_MASS: f64 = 4.2e18;
pub const HIMALIA_RADIUS: f64 = 8.5e4;
pub const METIS_MASS: f64 = 3.6e16;
pub const METIS_RADIUS: f64 = 2.15e4;
pub const ADRASTEA_MASS: f64 = 2.0e15;
pub const ADRASTEA_RADIUS: f64 = 8.2e3;

pub const J2_EARTH: f64 = 1.082_63e-3;
pub const J2_JUPITER: f64 = 1.473_6e-2;
pub const J2_SATURN: f64 = 1.629_8e-2;
pub const J2_MARS: f64 = 1.960_45e-3;
pub const J2_SUN: f64 = 2.0e-7;

pub const MERCURY_ORBITAL_VELOCITY: f64 = 47_362.0;
pub const VENUS_ORBITAL_VELOCITY: f64 = 35_020.0;
pub const EARTH_ORBITAL_VELOCITY: f64 = 29_783.0;
pub const MARS_ORBITAL_VELOCITY: f64 = 24_007.0;
pub const JUPITER_ORBITAL_VELOCITY: f64 = 13_070.0;
pub const SATURN_ORBITAL_VELOCITY: f64 = 9680.0;
pub const URANUS_ORBITAL_VELOCITY: f64 = 6810.0;
pub const NEPTUNE_ORBITAL_VELOCITY: f64 = 5430.0;

pub const SUN_CORE_TEMPERATURE: f64 = 1.57e7;
pub const SUN_SURFACE_TEMPERATURE: f64 = 5778.0;
pub const SUN_CORE_DENSITY: f64 = 1.622e5;
pub const SUN_AGE: f64 = 1.44e17;
pub const SUN_ROTATION_PERIOD: f64 = 2.164e6;

pub const YOSHIDA4_W0: f64 = -1.702_414_383_919_315_3;
pub const YOSHIDA4_W1: f64 = 1.351_207_191_959_657_8;
pub const YOSHIDA4_C1: f64 = YOSHIDA4_W1 / 2.0;
pub const YOSHIDA4_C2: f64 = (YOSHIDA4_W0 + YOSHIDA4_W1) / 2.0;
pub const YOSHIDA4_C3: f64 = YOSHIDA4_C2;
pub const YOSHIDA4_C4: f64 = YOSHIDA4_C1;
pub const YOSHIDA4_D1: f64 = YOSHIDA4_W1;
pub const YOSHIDA4_D2: f64 = YOSHIDA4_W0;
pub const YOSHIDA4_D3: f64 = YOSHIDA4_W1;

pub const C_KM_S: f64 = crate::constants::C / 1e3;
pub const MPC_IN_M: f64 = PARSEC * 1e6;
pub const MPC_IN_KM: f64 = PARSEC * 1e3;
pub const SEC_PER_GYR: f64 = crate::constants::JULIAN_GIGAYEAR;