![]() |
VR-Link API Documentation for DIS
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 00006 00007 #ifndef GeodeticEllipsoid_H_ 00008 #define GeodeticEllipsoid_H_ 00009 00010 #include <vlutil/vlNetTypes.h> 00011 #include "vlVector.h" 00012 #include <vlutil/vlMachineTypes.h> 00013 #include "mapDatum.h" 00014 00019 00020 #ifdef DtUSE_UTILITIES_NAMESPACE 00021 namespace DtUSE_UTILITIES_NAMESPACE 00022 { 00023 #endif 00024 00025 00041 class DT_DLL_MATRIX DtReferenceEllipsoid 00042 { 00043 public: 00044 DtReferenceEllipsoid( const DtMapDatum& datum ); 00045 virtual ~DtReferenceEllipsoid(); 00046 00047 void useMapDatum( const DtMapDatum& datum ); 00048 const DtMapDatum& mapDatum() const; 00049 00050 void geocentricToGeodetic( const DtVector& gc, DtVector& gd ) const; 00051 void geodeticToGeocentric( const DtVector& gd, DtVector& gc ) const; 00052 00053 protected: 00054 00055 void initialize_ellipsoid( double a, double f ); 00056 void geo_to_rad( double deg, double min, double sec, double* radian ) const; 00057 void rad_to_geo( double radian, double* deg, double* min, double* sec ) const; 00058 00059 00060 00061 void geodetic_to_geocentric( double lat, double lon, double height, 00062 double* x, double* y, double* z ) const; 00063 00073 void geocentric_to_geodetic( double xp, double yp, double zp, 00074 double* lat, double* lon, double* height ) const; 00075 00076 public: 00077 00081 static void setMaxIterationsForConvergence(unsigned int maxItr); 00082 00084 static unsigned int maxIterationsForConvergence(); 00085 protected: 00086 00087 static unsigned int theMaxIterationsForConvergence; 00088 00089 DtMapDatum myMapDatum; 00090 int myInited; 00091 00092 double ellipse_a; 00093 double ellipse_a_sq; 00094 double ellipse_f; 00095 double ellipse_b; 00096 double ellipse_b_sq; 00097 double ellipse_a_sq_over_b; 00098 double ellipse_e; 00099 double ellipse_c1; 00100 }; 00101 00104 DT_DLL_MATRIX DtReferenceEllipsoid* DtGlobalEllipsoid(); 00105 00106 #ifdef DtUSE_UTILITIES_NAMESPACE 00107 } 00108 #endif 00109 00110 #endif //! GeodeticEllipsoid_H_ 00111