1 //============================================================================== 2 // 3 // This file is part of GPSTk, the GPS Toolkit. 4 // 5 // The GPSTk is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU Lesser General Public License as published 7 // by the Free Software Foundation; either version 3.0 of the License, or 8 // any later version. 9 // 10 // The GPSTk is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU Lesser General Public License for more details. 14 // 15 // You should have received a copy of the GNU Lesser General Public 16 // License along with GPSTk; if not, write to the Free Software Foundation, 17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA 18 // 19 // This software was developed by Applied Research Laboratories at the 20 // University of Texas at Austin. 21 // Copyright 2004-2020, The Board of Regents of The University of Texas System 22 // 23 //============================================================================== 24 25 //============================================================================== 26 // 27 // This software was developed by Applied Research Laboratories at the 28 // University of Texas at Austin, under contract to an agency or agencies 29 // within the U.S. Department of Defense. The U.S. Government retains all 30 // rights to use, duplicate, distribute, disclose, or release this software. 31 // 32 // Pursuant to DoD Directive 523024 33 // 34 // DISTRIBUTION STATEMENT A: This software has been approved for public 35 // release, distribution is unlimited. 36 // 37 //============================================================================== 38 39 /** 40 * @file GPSEllipsoid.hpp 41 * The GPS Ellipsoid defined in ICD-GPS-200 42 */ 43 44 #ifndef GPSTK_GPSELLIPSOID_HPP 45 #define GPSTK_GPSELLIPSOID_HPP 46 47 #include "WGS84Ellipsoid.hpp" 48 #include "GNSSconstants.hpp" 49 50 namespace gpstk 51 { 52 /// @ingroup Geodetic 53 //@{ 54 55 /** 56 * This class represents the ellipsoidal model defined in 57 * ICD-GPS-200. This ellipsoid model was based on the WGS 84 58 * model, which has changed since the ICD-GPS-200 was written. 59 * To save the cost of having to update all of the fielded 60 * receivers, these constants were kept for GPS purposes. 61 * 62 * Only some of the WGS 84 ellipsoid model parameters are defined 63 * as part of the 200. These parameters are explicitly defined 64 * here. Other parameters are inherited from the WGS84Ellipsoid 65 * definition. 66 */ 67 class GPSEllipsoid : public WGS84Ellipsoid 68 { 69 public: 70 /// defined in ICD-GPS-200C, 20.3.3.4.3.3 and Table 20-IV 71 /// @return angular velocity of Earth in radians/sec. angVelocity() const72 virtual double angVelocity() const throw() 73 { return 7.2921151467e-5; } 74 75 /// defined in ICD-GPS-200C, 20.3.3.4.3.3 and Table 20-IV 76 /// @return geocentric gravitational constant in m**3 / s**2 gm() const77 virtual double gm() const throw() 78 { return 3.986005e14; } 79 80 /// derived from ICD-GPS-200C, 20.3.3.4.3.3 and Table 20-IV 81 /// @return geocentric gravitational constant in km**3 / s**2 gm_km() const82 virtual double gm_km() const throw() 83 { return 3.9860034e5; } 84 85 /// defined in ICD-GPS-200C, 20.3.4.3 86 /// @return Speed of light in m/s. c() const87 virtual double c() const throw() 88 { return C_MPS; } 89 90 /// derived from ICD-GPS-200C, 20.3.4.3 91 /// @return Speed of light in km/s c_km() const92 virtual double c_km() const throw() 93 { return (C_MPS / 1000); } 94 95 }; // class GPSEllipsoid 96 97 //@} 98 99 } // namespace 100 101 #endif 102