OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGeocent.h
Go to the documentation of this file.
1 #ifndef GEOCENT_H
2 #define GEOCENT_H 1
3 
4 /***************************************************************************/
5 /* RSC IDENTIFIER: GEOCENTRIC
6  *
7  * ABSTRACT
8  *
9  * This component provides conversions between Geodetic coordinates (latitude,
10  * longitude in radians and height in meters) and Geocentric coordinates
11  * (X, Y, Z) in meters.
12  *
13  * ERROR HANDLING
14  *
15  * This component checks parameters for valid values. If an invalid value
16  * is found, the error code is combined with the current error code using
17  * the bitwise or. This combining allows multiple error codes to be
18  * returned. The possible error codes are:
19  *
20  * GEOCENT_NO_ERROR : No errors occurred in function
21  * GEOCENT_LAT_ERROR : Latitude out of valid range
22  * (-90 to 90 degrees)
23  * GEOCENT_LON_ERROR : Longitude out of valid range
24  * (-180 to 360 degrees)
25  * GEOCENT_A_ERROR : Semi-major axis less than or equal to zero
26  * GEOCENT_INV_F_ERROR : Inverse flattening outside of valid range
27  * (250 to 350)
28  *
29  *
30  * REUSE NOTES
31  *
32  * GEOCENTRIC is intended for reuse by any application that performs
33  * coordinate conversions between geodetic coordinates and geocentric
34  * coordinates.
35  *
36  *
37  * REFERENCES
38  *
39  * An Improved Algorithm for Geocentric to Geodetic Coordinate Conversion,
40  * Ralph Toms, February 1996 UCRL-JC-123138.
41  *
42  * Further information on GEOCENTRIC can be found in the Reuse Manual.
43  *
44  * GEOCENTRIC originated from : U.S. Army Topographic Engineering Center
45  * Geospatial Information Division
46  * 7701 Telegraph Road
47  * Alexandria, VA 22310-3864
48  *
49  * LICENSES
50  *
51  * None apply to this component.
52  *
53  * RESTRICTIONS
54  *
55  * GEOCENTRIC has no restrictions.
56  *
57  * ENVIRONMENT
58  *
59  * GEOCENTRIC was tested and certified in the following environments:
60  *
61  * 1. Solaris 2.5 with GCC version 2.8.1
62  * 2. Windows 95 with MS Visual C++ version 6
63  *
64  * MODIFICATIONS
65  *
66  * Date Description
67  * ---- -----------
68  *
69  *
70  */
71 
73 
74 
75 /***************************************************************************/
76 /*
77  * DEFINES
78  */
79  #define GEOCENT_NO_ERROR 0x0000
80  #define GEOCENT_LAT_ERROR 0x0001
81  #define GEOCENT_LON_ERROR 0x0002
82  #define GEOCENT_A_ERROR 0x0004
83  #define GEOCENT_INV_F_ERROR 0x0008
84 
85 
86 /***************************************************************************/
87 /*
88  * FUNCTION PROTOTYPES
89  */
90 
91 /* ensure proper linkage to c++ programs */
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95 
96 
97  OSSIM_DLL long Set_Geocentric_Parameters (double a, double f);
98 /*
99  * The function Set_Geocentric_Parameters receives the ellipsoid parameters
100  * as inputs and sets the corresponding state variables.
101  *
102  * a : Semi-major axis of ellipsoid, in meters. (input)
103  * f : Flattening of ellipsoid. (input)
104  */
105 
106 
107  OSSIM_DLL void Get_Geocentric_Parameters (double *a, double *f);
108 /*
109  * The function Get_Geocentric_Parameters returns the ellipsoid parameters
110  * to be used in geocentric coordinate conversions.
111  *
112  * a : Semi-major axis of ellipsoid, in meters. (output)
113  * f : Flattening of ellipsoid. (output)
114  */
115 
116 
117  OSSIM_DLL long Convert_Geodetic_To_Geocentric (double Latitude,
118  double Longitude,
119  double Height,
120  double *X,
121  double *Y,
122  double *Z);
123 /*
124  * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
125  * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
126  * according to the current ellipsoid parameters.
127  *
128  * Latitude : Geodetic latitude in radians (input)
129  * Longitude : Geodetic longitude in radians (input)
130  * Height : Geodetic height, in meters (input)
131  * X : Calculated Geocentric X coordinate, in meters. (output)
132  * Y : Calculated Geocentric Y coordinate, in meters. (output)
133  * Z : Calculated Geocentric Z coordinate, in meters. (output)
134  *
135  */
136 
137 
139  double Y,
140  double Z,
141  double *Latitude,
142  double *Longitude,
143  double *Height);
144 /*
145  * The function Convert_Geocentric_To_Geodetic converts geocentric
146  * coordinates (X, Y, Z) to geodetic coordinates (latitude, longitude,
147  * and height), according to the current ellipsoid parameters.
148  *
149  * X : Geocentric X coordinate, in meters. (input)
150  * Y : Geocentric Y coordinate, in meters. (input)
151  * Z : Geocentric Z coordinate, in meters. (input)
152  * Latitude : Calculated latitude value in radians. (output)
153  * Longitude : Calculated longitude value in radians. (output)
154  * Height : Calculated height value, in meters. (output)
155  */
156 
157 
158 #ifdef __cplusplus
159 }
160 #endif
161 
162 #endif /* GEOCENT_H */
OSSIM_DLL void Convert_Geocentric_To_Geodetic(double X, double Y, double Z, double *Latitude, double *Longitude, double *Height)
OSSIM_DLL long Set_Geocentric_Parameters(double a, double f)
OSSIM_DLL void Get_Geocentric_Parameters(double *a, double *f)
#define OSSIM_DLL
OSSIM_DLL long Convert_Geodetic_To_Geocentric(double Latitude, double Longitude, double Height, double *X, double *Y, double *Z)