00001 #pragma ident "$Id: Geodetic.hpp 70 2006-08-01 18:36:21Z ehagen $" 00002 00003 00004 00010 #ifndef GPSTK_GEODETIC_HPP 00011 #define GPSTK_GEODETIC_HPP 00012 00013 //============================================================================ 00014 // 00015 // This file is part of GPSTk, the GPS Toolkit. 00016 // 00017 // The GPSTk is free software; you can redistribute it and/or modify 00018 // it under the terms of the GNU Lesser General Public License as published 00019 // by the Free Software Foundation; either version 2.1 of the License, or 00020 // any later version. 00021 // 00022 // The GPSTk is distributed in the hope that it will be useful, 00023 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00024 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00025 // GNU Lesser General Public License for more details. 00026 // 00027 // You should have received a copy of the GNU Lesser General Public 00028 // License along with GPSTk; if not, write to the Free Software Foundation, 00029 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00030 // 00031 // Copyright 2004, The University of Texas at Austin 00032 // 00033 //============================================================================ 00034 00035 //============================================================================ 00036 // 00037 //This software developed by Applied Research Laboratories at the University of 00038 //Texas at Austin, under contract to an agency or agencies within the U.S. 00039 //Department of Defense. The U.S. Government retains all rights to use, 00040 //duplicate, distribute, disclose, or release this software. 00041 // 00042 //Pursuant to DoD Directive 523024 00043 // 00044 // DISTRIBUTION STATEMENT A: This software has been approved for public 00045 // release, distribution is unlimited. 00046 // 00047 //============================================================================= 00048 00049 00050 00051 00052 00053 00054 #include "Triple.hpp" 00055 #include "Exception.hpp" 00056 #include "GeoidModel.hpp" 00057 #include "ECEF.hpp" 00058 00059 namespace gpstk 00060 { 00063 00066 NEW_EXCEPTION_CLASS(NoGeoidException, gpstk::Exception); 00067 00072 class Geodetic : public Triple 00073 { 00074 public: 00076 Geodetic(); 00077 00079 Geodetic(const Geodetic& right); 00080 00089 Geodetic(const double& lat, const double& lon, const double& alt, 00090 GeoidModel* geo = NULL); 00091 00100 Geodetic(const Triple& t, GeoidModel* geo = NULL); 00101 00110 Geodetic(const ECEF& right, GeoidModel* geo) 00111 throw(NoGeoidException); 00112 00114 virtual ~Geodetic() {} 00115 00117 Geodetic& operator=(const Geodetic& right); 00118 00120 gpstk::ECEF asECEF() const throw(NoGeoidException); 00121 00122 double getLatitude() const throw() { return operator[](0); } 00123 double getLongitude() const throw() { return operator[](1); } 00124 double getAltitude() const throw() { return operator[](2); } 00125 00126 protected: 00127 GeoidModel *geoid; 00128 }; // class Geodetic 00129 00131 00132 } // namespace gpstk 00133 00134 #endif
1.3.9.1