![]() |
VR-Link API Documentation for HLA Evolved
|
00001 /******************************************************************************* 00002 ** Copyright (c) 1992-2010 VT MAK 00003 ** All rights reserved. 00004 *******************************************************************************/ 00005 00006 00007 #ifndef DtGeodeticCoord_H_ 00008 #define DtGeodeticCoord_H_ 00009 00010 #include "vlVector.h" 00011 #include "vlMath.h" 00012 #include "refEllipsoid.h" 00013 #include <iosfwd> 00014 00019 00020 00021 #ifdef DtUSE_UTILITIES_NAMESPACE 00022 namespace DtUSE_UTILITIES_NAMESPACE 00023 { 00024 #endif 00025 00029 class DT_DLL_MATRIX DtGeodeticCoord : public DtVector 00030 { 00031 public: 00032 00035 DtGeodeticCoord( const DtReferenceEllipsoid* ellipse = DtGlobalEllipsoid() ); 00036 00039 DtGeodeticCoord( double lat, double lon, double alt, 00040 const DtReferenceEllipsoid* ellipse = DtGlobalEllipsoid() ); 00041 00043 virtual ~DtGeodeticCoord(); 00044 00046 DtGeodeticCoord( const DtGeodeticCoord& src ); 00047 00049 DtGeodeticCoord& operator=( const DtGeodeticCoord& src ); 00050 00054 virtual DtGeodeticCoord& setGeocentric( const DtVector& geocentric ); 00055 00058 virtual void getGeocentric( DtVector& geocentric ) const; 00059 00063 virtual DtVector geocentric() const; 00064 00065 virtual void printDataToStream(std::ostream &str) const; 00066 00069 virtual void setLat( DtFloat64 lat ); 00070 virtual DtFloat64 lat() const; 00071 00074 virtual void setLon( DtFloat64 lon ); 00075 virtual DtFloat64 lon() const; 00076 00079 virtual void setAlt( DtFloat64 alt ); 00080 virtual DtFloat64 alt() const; 00081 00082 virtual const DtMapDatum& mapDatum() const; 00083 00084 protected: 00085 const DtReferenceEllipsoid* myEllipsoid; 00086 }; 00087 00088 inline DtFloat64 DtGeodeticCoord::lat() const 00089 { 00090 return (*this)[0]; 00091 } 00092 00093 inline DtFloat64 DtGeodeticCoord::lon() const 00094 { 00095 return (*this)[1]; 00096 } 00097 00098 inline DtFloat64 DtGeodeticCoord::alt() const 00099 { 00100 return (*this)[2]; 00101 } 00102 00103 inline void DtGeodeticCoord::setLat( DtFloat64 lat ) 00104 { 00105 (*this)[0] = lat; 00106 } 00107 00108 inline void DtGeodeticCoord::setLon( DtFloat64 lon ) 00109 { 00110 (*this)[1] = lon; 00111 } 00112 00113 inline void DtGeodeticCoord::setAlt( DtFloat64 alt ) 00114 { 00115 (*this)[2] = alt; 00116 } 00117 00118 DT_DLL_MATRIX std::ostream & operator << (std::ostream &str, const DtGeodeticCoord &sr); 00119 00121 DT_DLL_MATRIX void DtGeocToGeod( const DtVector& in, DtGeodeticCoord& out ); 00122 00124 DT_DLL_MATRIX void DtGeodToGeoc( const DtGeodeticCoord& in, DtVector& out ); 00125 00126 #ifdef DtUSE_UTILITIES_NAMESPACE 00127 } 00128 #endif 00129 00130 #endif //! DtGeodeticCoord_H_ 00131