00001 #pragma ident "$Id: EarthBody.cpp 2457 2010-08-18 14:20:12Z coandrei $" 00002 00009 //============================================================================ 00010 // 00011 // This file is part of GPSTk, the GPS Toolkit. 00012 // 00013 // The GPSTk is free software; you can redistribute it and/or modify 00014 // it under the terms of the GNU Lesser General Public License as published 00015 // by the Free Software Foundation; either version 2.1 of the License, or 00016 // any later version. 00017 // 00018 // The GPSTk is distributed in the hope that it will be useful, 00019 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00020 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00021 // GNU Lesser General Public License for more details. 00022 // 00023 // You should have received a copy of the GNU Lesser General Public 00024 // License along with GPSTk; if not, write to the Free Software Foundation, 00025 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00026 // 00027 // Wei Yan - Chinese Academy of Sciences . 2009, 2010 00028 // 00029 //============================================================================ 00030 00031 00032 #include "EarthBody.hpp" 00033 #include "ASConstant.hpp" 00034 00035 namespace gpstk 00036 { 00037 // Earth's rotation rate in rad/s. 00038 const double EarthBody::omegaEarth = 7.292115E-05; 00039 00040 // Equatorial radius of earth in m from WGS-84 00041 const double EarthBody::radiusEarth = 6378.1363e3; 00042 00043 // Flattening factor of earth from WGS-84 00044 const double EarthBody::flatEarth = 0.00335281; 00045 00046 // Earth gravity constant in m^3/s^2 from JGM3 00047 const double EarthBody::gmEarth = 398600.4415e+9; // [m^3/s^2]; JGM3 00048 00049 00050 00051 // Returnts the dynamic Earth rotation rate. 00052 double EarthBody::getSpinRate(UTCTime t) 00053 { 00054 double mjdUT1 = t.mjdUT1(); 00055 00056 double Mjd0 = floor(mjdUT1);; 00057 double Tu = (Mjd0 - ASConstant::MJD_J2000)/36525.0; 00058 00059 return (7292115.8553e-11 + 4.3e-15 * Tu); 00060 00061 } // End of method 'EarthBody::getSpinRate()' 00062 00063 00064 } // End of namespace 'gpstk'
1.3.9.1