OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
Vcst_earth_radius.h
Go to the documentation of this file.
1 /*******************************************************************************
2  *
3  * NAME: Vcst_earth_radius
4  *
5  * DESCRIPTION: Computes the radius of the earth, in kilometers, from the
6  * geodetic latitude.
7  *
8  * USAGE: radius = earth_radius_D(rlat);
9  *
10  * PARAMETER TYPE I/O DESCRIPTION
11  * ----------- ----------- --- --------------------------------
12  * radius double O radius of earth in kilometers
13  * rlat double I geodetic latitude, radians, positive north
14  * ----------- ----------- --- --------------------------------
15  *
16  *
17  * DESCRIPTION: Computes the radius of the earth, in kilometers, from the
18  * geocentric latitude.
19  *
20  * USAGE: radius = Vcst_earth_radius_C(clat);
21  *
22  * PARAMETER TYPE I/O DESCRIPTION
23  * ----------- ----------- --- --------------------------------
24  * radius double O radius of earth in kilometers
25  * clat double I geocentric latitude, radians, positive north
26  * ----------- ----------- --- --------------------------------
27  *
28  * REFERENCES: USAF, Orbit Analyst Manuals, 1978
29  * The main reference for the WGS84 geoid is NIMA Physical Geodesy
30  * web page: 164.214.2.59/GandG/wgs-84/egm96.htm
31  *
32  * LIMITATIONS: Because this function is called millions of times, there is no
33  * error checking. Therefore, it is the responsibility of the calling program
34  * to ensure legal input values: -pio2 < rlat < pio2
35  *
36  * NOTES (MISCELLANEOUS) SECTION:
37  *
38  *******************************************************************************/
39 
40 #ifndef _EARTH_RADIUS_H
41 #define _EARTH_RADIUS_H
42 
43 
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
47 
48 double earth_radius_D(double rlat);
49 
50 double earth_radius_C(double clat);
51 
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 #endif
57 
double earth_radius_C(double clat)
double earth_radius_D(double rlat)