00001 // CLASSIFICATION: UNCLASSIFIED 00002 00003 #ifndef DatumLibraryImplementation_H 00004 #define DatumLibraryImplementation_H 00005 00006 /***************************************************************************/ 00007 /* RSC IDENTIFIER: Datum Library 00008 * 00009 * ABSTRACT 00010 * 00011 * This component provides datum shifts for a large collection of local 00012 * datums, WGS72, and WGS84. A particular datum can be accessed by using its 00013 * standard 5-letter code to find its index in the datum table. The index 00014 * can then be used to retrieve the name, type, ellipsoid code, and datum 00015 * shift parameters, and to perform shifts to or from that datum. 00016 * 00017 * By sequentially retrieving all of the datum codes and/or names, a menu 00018 * of the available datums can be constructed. The index values resulting 00019 * from selections from this menu can then be used to access the parameters 00020 * of the selected datum, or to perform datum shifts involving that datum. 00021 * 00022 * This component supports both 3-parameter local datums, for which only X, 00023 * Y, and Z translations relative to WGS 84 have been defined, and 00024 * 7-parameter local datums, for which X, Y, and Z rotations, and a scale 00025 * factor, are also defined. It also includes entries for WGS 84 (with an 00026 * index of 0), and WGS 72 (with an index of 1), but no shift parameter 00027 * values are defined for these. 00028 * 00029 * This component provides datum shift functions for both geocentric and 00030 * geodetic coordinates. WGS84 is used as an intermediate state when 00031 * shifting from one local datum to another. When geodetic coordinates are 00032 * given Molodensky's method is used, except near the poles where the 3-step 00033 * step method is used instead. Specific algorithms are used for shifting 00034 * between WGS72 and WGS84. 00035 * 00036 * This component depends on two data files, named 3_param.dat and 00037 * 7_param.dat, which contain the datum parameter values. Copies of these 00038 * files must be located in the directory specified by the value of the 00039 * environment variable "MSPCCS_DATA", if defined, or else in the current 00040 * directory whenever a program containing this component is executed. 00041 * 00042 * Additional datums can be added to these files, either manually or using 00043 * the Create_Datum function. However, if a large number of datums are 00044 * added, the datum table array sizes in this component will have to be 00045 * increased. 00046 * 00047 * This component depends on two other components: the Ellipsoid component 00048 * for access to ellipsoid parameters; and the Geocentric component for 00049 * conversions between geodetic and geocentric coordinates. 00050 * 00051 * ERROR HANDLING 00052 * 00053 * This component checks for input file errors and input parameter errors. 00054 * If an invalid value is found, the error code is combined with the current 00055 * error code using the bitwise or. This combining allows multiple error 00056 * codes to be returned. The possible error codes are: 00057 * 00058 * DATUM_NO_ERROR : No errors occurred in function 00059 * DATUM_NOT_INITIALIZED_ERROR : Datum module has not been initialized 00060 * DATUM_7PARAM_FILE_OPEN_ERROR : 7 parameter file opening error 00061 * DATUM_7PARAM_FILE_PARSING_ERROR : 7 parameter file structure error 00062 * DATUM_7PARAM_OVERFLOW_ERROR : 7 parameter table overflow 00063 * DATUM_3PARAM_FILE_OPEN_ERROR : 3 parameter file opening error 00064 * DATUM_3PARAM_FILE_PARSING_ERROR : 3 parameter file structure error 00065 * DATUM_3PARAM_OVERFLOW_ERROR : 3 parameter table overflow 00066 * DATUM_INVALID_INDEX_ERROR : Index out of valid range (less than one 00067 * or more than Number_of_Datums) 00068 * DATUM_INVALID_SRC_INDEX_ERROR : Source datum index invalid 00069 * DATUM_INVALID_DEST_INDEX_ERROR : Destination datum index invalid 00070 * DATUM_INVALID_CODE_ERROR : Datum code not found in table 00071 * DATUM_LAT_ERROR : Latitude out of valid range (-90 to 90) 00072 * DATUM_LON_ERROR : Longitude out of valid range (-180 to 00073 * 360) 00074 * DATUM_SIGMA_ERROR : Standard error values must be positive 00075 * (or -1 if unknown) 00076 * DATUM_DOMAIN_ERROR : Domain of validity not well defined 00077 * DATUM_ELLIPSE_ERROR : Error in ellipsoid module 00078 * DATUM_NOT_USERDEF_ERROR : Datum code is not user defined - cannot 00079 * be deleted 00080 * 00081 * 00082 * REUSE NOTES 00083 * 00084 * Datum is intended for reuse by any application that needs access to 00085 * datum shift parameters relative to WGS 84. 00086 * 00087 * 00088 * REFERENCES 00089 * 00090 * Further information on Datum can be found in the Reuse Manual. 00091 * 00092 * Datum originated from : U.S. Army Topographic Engineering Center (USATEC) 00093 * Geospatial Information Division (GID) 00094 * 7701 Telegraph Road 00095 * Alexandria, VA 22310-3864 00096 * 00097 * LICENSES 00098 * 00099 * None apply to this component. 00100 * 00101 * RESTRICTIONS 00102 * 00103 * Datum has no restrictions. 00104 * 00105 * ENVIRONMENT 00106 * 00107 * Datum was tested and certified in the following environments: 00108 * 00109 * 1. Solaris 2.5 with GCC 2.8.1 00110 * 2. MS Windows 95 with MS Visual C++ 6 00111 * 00112 * MODIFICATIONS 00113 * 00114 * Date Description 00115 * ---- ----------- 00116 * 03/30/97 Original Code 00117 * 05/28/99 Added user-definable datums (for JMTK) 00118 * Added datum domain of validity checking (for JMTK) 00119 * Added datum shift accuracy calculation (for JMTK) 00120 * 06/27/06 Moved data files to data directory 00121 * 03-14-07 Original C++ Code 00122 * 05/26/10 S. Gillis, BAEts26674, Added Validate Datum to the API 00123 * in MSP Geotrans 3.0 00124 */ 00125 00126 00127 #include <vector> 00128 #include "DatumType.h" 00129 #include "DtccApi.h" 00130 00131 00132 namespace MSP 00133 { 00134 class CCSThreadMutex; 00135 namespace CCS 00136 { 00137 class Accuracy; 00138 class Datum; 00139 class EllipsoidLibraryImplementation; 00140 class CartesianCoordinates; 00141 class GeodeticCoordinates; 00142 00143 00144 class MSP_DTCC_API DatumLibraryImplementation 00145 { 00146 friend class DatumLibraryImplementationCleaner; 00147 00148 public: 00149 00150 /* The function getInstance returns an instance of the DatumLibraryImplementation 00151 */ 00152 00153 static DatumLibraryImplementation* getInstance(); 00154 00155 00156 /* 00157 * The function removeInstance removes this DatumLibraryImplementation instance from the 00158 * total number of instances. 00159 */ 00160 00161 static void removeInstance(); 00162 00163 00164 ~DatumLibraryImplementation( void ); 00165 00166 00167 /* 00168 * The function define3ParamDatum creates a new local (3-parameter) datum with the 00169 * specified code, name, and axes. If the datum table has not been initialized, 00170 * the specified code is already in use, or a new version of the 3-param.dat 00171 * file cannot be created, an exception is thrown. 00172 * Note that the indexes of all datums in the datum table may be 00173 * changed by this function. 00174 * 00175 * code : 5-letter new datum code. (input) 00176 * name : Name of the new datum (input) 00177 * ellipsoidCode : 2-letter code for the associated ellipsoid (input) 00178 * deltaX : X translation to WGS84 in meters (input) 00179 * deltaY : Y translation to WGS84 in meters (input) 00180 * deltaZ : Z translation to WGS84 in meters (input) 00181 * sigmaX : Standard error in X in meters (input) 00182 * sigmaY : Standard error in Y in meters (input) 00183 * sigmaZ : Standard error in Z in meters (input) 00184 * westLongitude : Western edge of validity rectangle in radians (input) 00185 * eastLongitude : Eastern edge of validity rectangle in radians (input) 00186 * southLatitude : Southern edge of validity rectangle in radians(input) 00187 * northLatitude : Northern edge of validity rectangle in radians(input) 00188 */ 00189 00190 void define3ParamDatum( const char *code, const char *name, const char *ellipsoidCode, 00191 double deltaX, double deltaY, double deltaZ, 00192 double sigmaX, double sigmaY, double sigmaZ, 00193 double westLongitude, double eastLongitude, double southLatitude, double northLatitude ); 00194 00195 00196 /* 00197 * The function define7ParamDatum creates a new local (7-parameter) datum with the 00198 * specified code, name, and axes. If the datum table has not been initialized, 00199 * the specified code is already in use, or a new version of the 7-param.dat 00200 * file cannot be created, an exception is thrown. 00201 * Note that the indexes of all datums in the datum table may be 00202 * changed by this function. 00203 * 00204 * code : 5-letter new datum code. (input) 00205 * name : Name of the new datum (input) 00206 * ellipsoidCode : 2-letter code for the associated ellipsoid (input) 00207 * deltaX : X translation to WGS84 in meters (input) 00208 * deltaY : Y translation to WGS84 in meters (input) 00209 * deltaZ : Z translation to WGS84 in meters (input) 00210 * rotationX : X rotation to WGS84 in arc seconds (input) 00211 * rotationY : Y rotation to WGS84 in arc seconds (input) 00212 * rotationZ : Z rotation to WGS84 in arc seconds (input) 00213 * scale : Scale factor (input) 00214 */ 00215 00216 void define7ParamDatum( const char *code, const char *name, const char *ellipsoidCode, 00217 double deltaX, double deltaY, double deltaZ, 00218 double rotationX, double rotationY, double rotationZ, 00219 double scale ); 00220 00221 00222 /* 00223 * The function removeDatum deletes a local (3-parameter) datum with the 00224 * specified code. If the datum table has not been initialized or a new 00225 * version of the 3-param.dat file cannot be created, an exception is thrown. 00226 * Note that the indexes of all datums 00227 * in the datum table may be changed by this function. 00228 * 00229 * code : 5-letter datum code. (input) 00230 * 00231 */ 00232 00233 void removeDatum( const char* code ); 00234 00235 00236 /* 00237 * The function datumCount returns the number of Datums in the table 00238 * if the table was initialized without error. 00239 * 00240 * count : number of datums in the datum table (output) 00241 */ 00242 00243 void datumCount( long *count ); 00244 00245 00246 /* 00247 * The function datumIndex returns the index of the datum with the 00248 * specified code. 00249 * 00250 * code : The datum code being searched for. (input) 00251 * index : The index of the datum in the table with the (output) 00252 * specified code. 00253 */ 00254 00255 void datumIndex( const char *code, long *index ); 00256 00257 00258 /* 00259 * The function datumCode returns the 5-letter code of the datum 00260 * referenced by index. 00261 * 00262 * index : The index of a given datum in the datum table. (input) 00263 * code : The datum Code of the datum referenced by Index. (output) 00264 */ 00265 00266 void datumCode( const long index, char *code ); 00267 00268 00269 /* 00270 * The function datumName returns the name of the datum referenced by 00271 * index. 00272 * 00273 * index : The index of a given datum in the datum table. (input) 00274 * name : The datum Name of the datum referenced by Index. (output) 00275 */ 00276 00277 void datumName( const long index, char *name ); 00278 00279 00280 /* 00281 * The function datumEllipsoidCode returns the 2-letter ellipsoid code 00282 * for the ellipsoid associated with the datum referenced by index. 00283 * 00284 * index : The index of a given datum in the datum table. (input) 00285 * code : The ellipsoid code for the ellipsoid associated with (output) 00286 * the datum referenced by index. 00287 */ 00288 00289 void datumEllipsoidCode( const long index, char *code ); 00290 00291 00292 /* 00293 * The function datumStandardErrors returns the standard errors in X,Y, & Z 00294 * for the datum referenced by index. 00295 * 00296 * index : The index of a given datum in the datum table (input) 00297 * sigma_X : Standard error in X in meters (output) 00298 * sigma_Y : Standard error in Y in meters (output) 00299 * sigma_Z : Standard error in Z in meters (output) 00300 */ 00301 00302 void datumStandardErrors( const long index, double *sigmaX, double *sigmaY, double *sigmaZ ); 00303 00304 00305 /* 00306 * The function datumSevenParameters returns parameter values, 00307 * used only by a seven parameter datum, 00308 * for the datum referenced by index. 00309 * 00310 * index : The index of a given datum in the datum table. (input) 00311 * rotationX : X rotation in radians (output) 00312 * rotationY : Y rotation in radians (output) 00313 * rotationZ : Z rotation in radians (output) 00314 * scaleFactor : Scale factor (output) 00315 */ 00316 00317 void datumSevenParameters( const long index, double *rotationX, double *rotationY, double *rotationZ, double *scaleFactor); 00318 00319 00320 /* 00321 * The function datumTranslationValues returns the translation values 00322 * for the datum referenced by index. 00323 * 00324 * index : The index of a given datum in the datum table. (input) 00325 * deltaX : X translation in meters (output) 00326 * deltaY : Y translation in meters (output) 00327 * deltaZ : Z translation in meters (output) 00328 */ 00329 00330 void datumTranslationValues( const long index, double *deltaX, double *deltaY, double *deltaZ ); 00331 00332 00333 /* 00334 * The function datumShiftError returns the 90% horizontal (circular), vertical (linear), and 00335 * spherical errors for a shift from the specified source datum to the 00336 * specified destination datum at the specified location. 00337 * 00338 * sourceIndex : Index of source datum (input) 00339 * targetIndex : Index of destination datum (input) 00340 * latitude : Latitude of point being converted in radians (input) 00341 * longitude : Longitude of point being converted in radians (input) 00342 * circularError90 : Combined 90% circular horizontal error in meters (output) 00343 * linearError90 : Combined 90% linear vertical error in meters (output) 00344 * sphericalError90 : Combined 90% spherical error in meters (output) 00345 */ 00346 00347 Accuracy* datumShiftError( const long sourceIndex, const long targetIndex, 00348 double longitude, double latitude, Accuracy* sourceAccuracy ); 00349 00350 00351 /* 00352 * The function datumUserDefined checks whether or not the specified datum is 00353 * user defined. It returns 1 if the datum is user defined, and returns 00354 * 0 otherwise. If index is valid DATUM_NO_ERROR is returned, otherwise 00355 * DATUM_INVALID_INDEX_ERROR is returned. 00356 * 00357 * index : Index of a given datum in the datum table (input) 00358 * result : Indicates whether specified datum is user defined (1) 00359 * or not (0) (output) 00360 */ 00361 00362 void datumUserDefined( const long index, long *result ); 00363 00364 00365 /* 00366 * The function datumUsesEllipsoid returns 1 if the ellipsoid is in use by a 00367 * user defined datum. Otherwise, 0 is returned. 00368 * 00369 * ellipsoidCode : The ellipsoid code being searched for. (input) 00370 */ 00371 00372 bool datumUsesEllipsoid( const char *ellipsoidCode ); 00373 00374 00375 /* 00376 * The function datumValidRectangle returns the edges of the validity 00377 * rectangle for the datum referenced by index. 00378 * 00379 * index : The index of a given datum in the datum table (input) 00380 * westLongitude : Western edge of validity rectangle in radians (output) 00381 * eastLongitude : Eastern edge of validity rectangle in radians (output) 00382 * southLatitude : Southern edge of validity rectangle in radians (output) 00383 * northLatitude : Northern edge of validity rectangle in radians (output) 00384 * 00385 */ 00386 00387 void datumValidRectangle( const long index, double *westLongitude, double *eastLongitude, double *southLatitude, double *northLatitude ); 00388 00389 00390 /* 00391 * The function geocentricDatumShift shifts a geocentric coordinate (X, Y, Z in meters) relative 00392 * to the source datum to geocentric coordinate (X, Y, Z in meters) relative 00393 * to the destination datum. 00394 * 00395 * sourceIndex : Index of source datum (input) 00396 * sourceX : X coordinate relative to source datum (input) 00397 * sourceY : Y coordinate relative to source datum (input) 00398 * sourceZ : Z coordinate relative to source datum (input) 00399 * targetIndex : Index of destination datum (input) 00400 * targetX : X coordinate relative to destination datum (output) 00401 * targetY : Y coordinate relative to destination datum (output) 00402 * targetZ : Z coordinate relative to destination datum (output) 00403 * 00404 */ 00405 00406 CartesianCoordinates* geocentricDatumShift( const long sourceIndex, const double sourceX, const double sourceY, const double sourceZ, 00407 const long targetIndex ); 00408 00409 00410 /* 00411 * The function geocentricShiftFromWGS84 shifts a geocentric coordinate (X, Y, Z in meters) relative 00412 * to WGS84 to a geocentric coordinate (X, Y, Z in meters) relative to the 00413 * local datum referenced by index. 00414 * 00415 * WGS84X : X coordinate relative to WGS84 (input) 00416 * WGS84Y : Y coordinate relative to WGS84 (input) 00417 * WGS84Z : Z coordinate relative to WGS84 (input) 00418 * targetIndex : Index of destination datum (input) 00419 * targetX : X coordinate relative to the destination datum (output) 00420 * targetY : Y coordinate relative to the destination datum (output) 00421 * targetZ : Z coordinate relative to the destination datum (output) 00422 */ 00423 00424 CartesianCoordinates* geocentricShiftFromWGS84( const double WGS84X, const double WGS84Y, const double WGS84Z, const long targetIndex ); 00425 00426 00427 /* 00428 * The function geocentricShiftToWGS84 shifts a geocentric coordinate (X, Y, Z in meters) relative 00429 * to the datum referenced by index to a geocentric coordinate (X, Y, Z in 00430 * meters) relative to WGS84. 00431 * 00432 * sourceIndex : Index of source datum (input) 00433 * sourceX : X coordinate relative to the source datum (input) 00434 * sourceY : Y coordinate relative to the source datum (input) 00435 * sourceZ : Z coordinate relative to the source datum (input) 00436 * WGS84X : X coordinate relative to WGS84 (output) 00437 * WGS84Y : Y coordinate relative to WGS84 (output) 00438 * WGS84Z : Z coordinate relative to WGS84 (output) 00439 */ 00440 00441 CartesianCoordinates* geocentricShiftToWGS84( const long sourceIndex, const double sourceX, const double sourceY, const double sourceZ ); 00442 00443 00444 /* 00445 * The function geodeticDatumShift shifts geodetic coordinates (latitude, longitude in radians 00446 * and height in meters) relative to the source datum to geodetic coordinates 00447 * (latitude, longitude in radians and height in meters) relative to the 00448 * destination datum. 00449 * 00450 * sourceIndex : Index of source datum (input) 00451 * sourceLongitude : Longitude in radians relative to source datum (input) 00452 * sourceLatitude : Latitude in radians relative to source datum (input) 00453 * sourceHeight : Height in meters relative to source datum (input) 00454 * targetIndex : Index of destination datum (input) 00455 * targetLongitude : Longitude in radians relative to destination datum (output) 00456 * targetLatitude : Latitude in radians relative to destination datum (output) 00457 * targetHeight : Height in meters relative to destination datum (output) 00458 */ 00459 00460 GeodeticCoordinates* geodeticDatumShift( const long sourceIndex, const GeodeticCoordinates* sourceCoordinates, 00461 const long targetIndex ); 00462 00463 00464 /* 00465 * The function geodeticShiftFromWGS84 shifts geodetic coordinates relative to WGS84 00466 * to geodetic coordinates relative to a given local datum. 00467 * 00468 * WGS84Longitude : Longitude in radians relative to WGS84 (input) 00469 * WGS84Latitude : Latitude in radians relative to WGS84 (input) 00470 * WGS84Height : Height in meters relative to WGS84 (input) 00471 * targetIndex : Index of destination datum (input) 00472 * targetLongitude : Longitude in radians relative to destination datum (output) 00473 * targetLatitude : Latitude in radians relative to destination datum (output) 00474 * targetHeight : Height in meters relative to destination datum (output) 00475 * 00476 */ 00477 00478 GeodeticCoordinates* geodeticShiftFromWGS84( const GeodeticCoordinates* sourceCoordinates, 00479 const long targetIndex ); 00480 00481 00482 /* 00483 * The function geodeticShiftToWGS84 shifts geodetic coordinates relative to a given source datum 00484 * to geodetic coordinates relative to WGS84. 00485 * 00486 * sourceIndex : Index of source datum (input) 00487 * sourceLongitude : Longitude in radians relative to source datum (input) 00488 * sourceLatitude : Latitude in radians relative to source datum (input) 00489 * sourceHeight : Height in meters relative to source datum (input) 00490 * WGS84Longitude : Longitude in radians relative to WGS84 (output) 00491 * WGS84Latitude : Latitude in radians relative to WGS84 (output) 00492 * WGS84Height : Height in meters relative to WGS84 (output) 00493 * 00494 */ 00495 00496 GeodeticCoordinates* geodeticShiftToWGS84( const long sourceIndex, const GeodeticCoordinates* sourceCoordinates ); 00497 00498 00499 /* 00500 * The function retrieveDatumType returns the type of the datum referenced by 00501 * index. 00502 * 00503 * index : The index of a given datum in the datum table. (input) 00504 * datumType : The type of datum referenced by index. (output) 00505 * 00506 */ 00507 00508 void retrieveDatumType( const long index, DatumType::Enum *datumType ); 00509 00510 00511 /* 00512 * The function validDatum checks whether or not the specified location is within the 00513 * validity rectangle for the specified datum. It returns zero if the specified 00514 * location is NOT within the validity rectangle, and returns 1 otherwise. 00515 * 00516 * index : The index of a given datum in the datum table (input) 00517 * latitude : Latitude of the location to be checked in radians (input) 00518 * longitude : Longitude of the location to be checked in radians (input) 00519 * result : Indicates whether location is inside (1) or outside (0) 00520 * of the validity rectangle of the specified datum (output) 00521 */ 00522 00523 void validDatum( const long index, double longitude, double latitude, long *result ); 00524 00525 00526 /* 00527 * The function setEllipsoidLibrary sets the ellipsoid library information 00528 * which is needed to create datums and calculate datum shifts. 00529 * 00530 * __ellipsoidLibrary : Ellipsoid library (input) 00531 * 00532 */ 00533 00534 void setEllipsoidLibraryImplementation( EllipsoidLibraryImplementation* __ellipsoidLibraryImplementation ); 00535 00536 00537 protected: 00538 00539 /* 00540 * The constructor creates an empty list to store the datum information 00541 * contained in two external files, 3_param.dat and 7_param.dat. 00542 */ 00543 00544 DatumLibraryImplementation(); 00545 00546 00547 DatumLibraryImplementation( const DatumLibraryImplementation &d ); 00548 00549 00550 DatumLibraryImplementation& operator=( const DatumLibraryImplementation &d ); 00551 00552 00553 private: 00554 00555 static MSP::CCSThreadMutex mutex; 00556 static DatumLibraryImplementation* instance; 00557 static int instanceCount; 00558 00559 std::vector<Datum*> datumList; 00560 00561 EllipsoidLibraryImplementation* _ellipsoidLibraryImplementation; 00562 00563 long datum3ParamCount; 00564 long datum7ParamCount; 00565 00566 00567 /* 00568 * The function loadDatums creates the datum table from two external 00569 * files. If an error occurs, the initialization stops and an error code is 00570 * returned. This function must be called before any of the other functions 00571 * in this component. 00572 */ 00573 00574 void loadDatums(); 00575 00576 00577 /* 00578 * The function write3ParamFile writes the 3 parameter datums in the datum list 00579 * to the 3_param.dat file. 00580 */ 00581 00582 void write3ParamFile(); 00583 00584 00585 /* 00586 * The function write7ParamFile writes the 7 parameter datums in the datum list 00587 * to the 7_param.dat file. 00588 */ 00589 00590 void write7ParamFile(); 00591 00592 /* 00593 * The function geodeticShiftWGS84ToWGS72 shifts a geodetic coordinate (latitude, longitude in radians 00594 * and height in meters) relative to WGS84 to a geodetic coordinate 00595 * (latitude, longitude in radians and height in meters) relative to WGS72. 00596 * 00597 * WGS84Longitude : Longitude in radians relative to WGS84 (input) 00598 * WGS84Latitude : Latitude in radians relative to WGS84 (input) 00599 * WGS84Height : Height in meters relative to WGS84 (input) 00600 * WGS72Longitude : Longitude in radians relative to WGS72 (output) 00601 * WGS72Latitude : Latitude in radians relative to WGS72 (output) 00602 * WGS72Height : Height in meters relative to WGS72 (output) 00603 */ 00604 00605 GeodeticCoordinates* geodeticShiftWGS84ToWGS72( const double WGS84Longitude, const double WGS84Latitude, const double WGS84Height ); 00606 00607 00608 /* 00609 * The function geodeticShiftWGS72ToWGS84 shifts a geodetic coordinate (latitude, longitude in radians 00610 * and height in meters) relative to WGS72 to a geodetic coordinate 00611 * (latitude, longitude in radians and height in meters) relative to WGS84. 00612 * 00613 * WGS72Longitude : Longitude in radians relative to WGS72 (input) 00614 * WGS72Latitude : Latitude in radians relative to WGS72 (input) 00615 * WGS72Height : Height in meters relative to WGS72 (input) 00616 * WGS84Longitude : Longitude in radians relative to WGS84 (output) 00617 * WGS84Latitude : Latitude in radians relative to WGS84 (output) 00618 * WGS84Height : Height in meters relative to WGS84 (output) 00619 */ 00620 00621 GeodeticCoordinates* geodeticShiftWGS72ToWGS84( const double WGS72Longitude, const double WGS72Latitude, const double WGS72Height ); 00622 00623 00624 /* 00625 * The function geocentricShiftWGS84ToWGS72 shifts a geocentric coordinate (X, Y, Z in meters) relative 00626 * to WGS84 to a geocentric coordinate (X, Y, Z in meters) relative to WGS72. 00627 * 00628 * X_WGS84 : X coordinate relative to WGS84 (input) 00629 * Y_WGS84 : Y coordinate relative to WGS84 (input) 00630 * Z_WGS84 : Z coordinate relative to WGS84 (input) 00631 * X : X coordinate relative to WGS72 (output) 00632 * Y : Y coordinate relative to WGS72 (output) 00633 * Z : Z coordinate relative to WGS72 (output) 00634 */ 00635 00636 CartesianCoordinates* geocentricShiftWGS84ToWGS72( const double X_WGS84, const double Y_WGS84, const double Z_WGS84 ); 00637 00638 00639 /* 00640 * The function geocentricShiftWGS72ToWGS84 shifts a geocentric coordinate (X, Y, Z in meters) relative 00641 * to WGS72 to a geocentric coordinate (X, Y, Z in meters) relative to WGS84. 00642 * 00643 * X : X coordinate relative to WGS72 (input) 00644 * Y : Y coordinate relative to WGS72 (input) 00645 * Z : Z coordinate relative to WGS72 (input) 00646 * X_WGS84 : X coordinate relative to WGS84 (output) 00647 * Y_WGS84 : Y coordinate relative to WGS84 (output) 00648 * Z_WGS84 : Z coordinate relative to WGS84 (output) 00649 */ 00650 00651 CartesianCoordinates* geocentricShiftWGS72ToWGS84( const double X, const double Y, const double Z ); 00652 00653 00654 /* 00655 * Delete the singleton. 00656 */ 00657 00658 static void deleteInstance(); 00659 }; 00660 } 00661 } 00662 00663 #endif 00664 00665 00666 // CLASSIFICATION: UNCLASSIFIED