celestial_core/
constants.rs1pub const J2000_JD: f64 = 2451545.0;
2
3pub const DAYS_PER_JULIAN_CENTURY: f64 = 36525.0;
4
5pub const DAYS_PER_JULIAN_MILLENNIUM: f64 = 365250.0;
6
7pub const CIRCULAR_ARCSECONDS: f64 = 1296000.0;
8
9pub const WGS84_SEMI_MAJOR_AXIS_KM: f64 = 6378.137;
11
12pub const WGS84_ECCENTRICITY_SQUARED: f64 = 6.6943799901413165e-3;
14
15pub const NANOSECONDS_PER_SECOND: u32 = 1_000_000_000;
16
17pub const NANOSECONDS_PER_SECOND_F64: f64 = 1_000_000_000.0;
18
19pub const SECONDS_PER_DAY: i64 = 86_400;
20
21pub const SECONDS_PER_DAY_F64: f64 = 86_400.0;
22
23pub const HOURS_PER_DAY: f64 = 24.0;
24
25pub const MINUTES_PER_DAY: f64 = 1440.0;
26
27#[allow(clippy::excessive_precision)]
28pub const ARCMIN_TO_RAD: f64 = 2.908882086657215961539535e-4;
29
30#[allow(clippy::excessive_precision)]
31pub const ARCSEC_TO_RAD: f64 = 4.848136811095359935899141e-6;
32
33#[allow(clippy::excessive_precision)]
34pub const MILLIARCSEC_TO_RAD: f64 = 4.848136811095359935899141e-9;
35
36#[allow(clippy::excessive_precision)]
37pub const MICROARCSEC_TO_RAD: f64 = 4.848136811095359935899141e-13;
38
39pub const MJD_ZERO_POINT: f64 = 2_400_000.5;
40
41#[allow(clippy::excessive_precision)]
42#[allow(clippy::approx_constant)]
43pub const PI: f64 = 3.141592653589793238462643;
44
45#[allow(clippy::excessive_precision)]
46#[allow(clippy::approx_constant)]
47pub const HALF_PI: f64 = 1.5707963267948966192313216;
48
49#[allow(clippy::excessive_precision)]
50#[allow(clippy::approx_constant)]
51pub const QUARTER_PI: f64 = 0.7853981633974483096156608;
52
53#[allow(clippy::excessive_precision)]
54#[allow(clippy::approx_constant)]
55pub const TWOPI: f64 = 6.283185307179586476925287;
56
57#[allow(clippy::excessive_precision)]
58pub const DEG_TO_RAD: f64 = 1.745329251994329576923691e-2;
59
60#[allow(clippy::excessive_precision)]
61pub const RAD_TO_DEG: f64 = 57.29577951308232087679815;
62
63#[allow(clippy::excessive_precision)]
64pub const ARCSEC_PER_RAD: f64 = 206264.8062470963551564734;
65
66pub const WGS84_SEMI_MAJOR_AXIS: f64 = 6_378_137.0;
67
68pub const WGS84_FLATTENING: f64 = 0.0033528106647474805;
69
70#[allow(clippy::excessive_precision)]
71#[allow(clippy::approx_constant)]
72pub const SQRT2: f64 = 1.4142135623730950488;
73
74pub const AU_M: f64 = 149_597_870_700.0;
76
77pub const AU_KM: f64 = 149_597_870.7;
79
80pub const DAYS_PER_JULIAN_YEAR: f64 = 365.25;
81
82pub const SPEED_OF_LIGHT_AU_PER_DAY: f64 = 173.1446326846693;
83
84#[allow(clippy::excessive_precision)]
85pub const J2000_OBLIQUITY_RAD: f64 = (23.0 + 26.0 / 60.0 + 21.41136 / 3600.0) * PI / 180.0;
86
87#[allow(clippy::excessive_precision)]
88pub const FRAME_BIAS_PHI_RAD: f64 = -0.05188 / 3600.0 * PI / 180.0;
89
90#[allow(clippy::excessive_precision)]
91pub const GM_EARTH_KM3S2: f64 = 398600.435507;
92
93#[allow(clippy::excessive_precision)]
94pub const GM_MOON_KM3S2: f64 = 4902.800118;
95
96pub const MOON_EARTH_MASS_RATIO: f64 = GM_MOON_KM3S2 / (GM_EARTH_KM3S2 + GM_MOON_KM3S2);