1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! WGS-84 reference ellipsoid constants.
//!
//! Used by [`super::geodetic`] for Cartesian ↔ geodetic conversions and by
//! downstream crates that need to reason about the Earth's shape directly
//! (e.g. atmosphere models evaluating altitude).
//!
//! Future work: introduce a `ReferenceEllipsoid` trait so that `Geodetic<E>`
//! can be parameterized over WGS84 / GRS80 / IERS2010 ellipsoids, and so
//! that body-specific ellipsoids (MoonSphere, MarsSpheroid) can live
//! alongside as structural data without being stringly-typed.
/// WGS-84 semi-major axis [km].
pub const WGS84_A: f64 = 6378.137;
/// WGS-84 flattening.
pub const WGS84_F: f64 = 1.0 / 298.257223563;
/// WGS-84 semi-minor axis [km].
pub const WGS84_B: f64 = WGS84_A * ;
/// WGS-84 first eccentricity squared.
pub const WGS84_E2: f64 = 1.0 - * ;