; docformat = 'rst' ;+ ;Retrieve constants associated with the WGS-84 ellipsoid, the project's ;official model of the shape of the Earth. ; ;Notes: In the World Geodetic System of 1984 (WGS-84): ; ;'a' is the semi-major axis (distance from the center of the Earth to the ;equator) = 6378.1370 km. ; ;'b' is the semi-minor axis (distance from the center of the Earth to the ;pole) = 6356.7523142 km. ; ;'f' is the flattening factor = (a - b) / a. ; ;'mu' is the gravitational standard parameter for the Earth. ; ;'omega' is the angular speed of the Earth. ; ; :Examples: ; get_wgs84_const(re=re, a=a, f=f, rp=rp, mu=mu, omega=omega) ;- ;+ ; :Keywords: ; re : in, optional, type=boolean ; Return the equatorial radius, km. ; a : in, optional, type=boolean ; Return the equatorial radius, km. ; f : in, optional, type=boolean ; Return the flattening factor 1-(b/a). ; rp : in, optional, type=boolean ; Return the polar radius, km. ; mu : in, optional, type=boolean ; Return the gravitational parameter mu=G*M_earth, in km^3/s^2. ; omega : in, optional, type=boolean ; Return the inertial rotation rate of the Earth in rad/s. ; ; :Returns: ; The selected constant, in the units specified above. ;- function get_wgs84_const,re=re,a=a,f=f,rp=rp,mu=mu,omega=omega ;WGS-84 constants wgs84_a = 6378.137d ;km ;f_=1/298.257223563d; unitless wgs84_f = 0.0033528106647474805d ;computed constant, unitless wgs84_b = 6356.7523142d ;km wgs84_mu = 398600.4418d ;km^3/s^2 wgs84_omega = 7.292115d-5 ;rad/sec if keyword_set(re) or keyword_set(a) then return, wgs84_a if keyword_set(f) then return, wgs84_f if keyword_set(rp) then return, wgs84_b if keyword_set(mu) then return, wgs84_mu if keyword_set(omega) then return, wgs84_omega end