Skip to main content

Crate use_earth_constants

Crate use_earth_constants 

Source
Expand description

§use-earth-constants

Reusable Earth, WGS84, geodesy-adjacent, and standard-environment constants for RustUse.

This crate provides plain exported constants for Earth size, Earth mass, standard gravity, standard sea-level pressure, and WGS84 reference ellipsoid values.

It does not include geodesy algorithms, coordinate transforms, or unit conversion logic.

§Usage

use use_earth_constants::{EARTH_RADIUS_MEAN, STANDARD_GRAVITY, WGS84_A};

assert!(EARTH_RADIUS_MEAN > 0.0);
assert!(STANDARD_GRAVITY > 9.8);
assert_eq!(WGS84_A, 6_378_137.0);

Constants§

EARTH_MASS
Approximate Earth mass, in kilograms.
EARTH_RADIUS_EQUATORIAL
WGS84-defined equatorial Earth radius, in meters.
EARTH_RADIUS_MEAN
Approximate mean Earth radius, in meters.
EARTH_RADIUS_POLAR
WGS84-defined polar Earth radius, in meters.
SEA_LEVEL_STANDARD_PRESSURE
Conventional standard sea-level atmospheric pressure, in pascals.
STANDARD_GRAVITY
Conventional standard gravity, in meters per second squared.
WGS84_A
WGS84-defined semi-major axis, in meters.
WGS84_B
WGS84-defined semi-minor axis, in meters.
WGS84_FLATTENING
WGS84-defined flattening, dimensionless.