EarthPoleTide.cpp

Go to the documentation of this file.
00001 #pragma ident "$Id: EarthPoleTide.cpp 2457 2010-08-18 14:20:12Z coandrei $"
00002 
00008 //============================================================================
00009 //
00010 //  This file is part of GPSTk, the GPS Toolkit.
00011 //
00012 //  The GPSTk is free software; you can redistribute it and/or modify
00013 //  it under the terms of the GNU Lesser General Public License as published
00014 //  by the Free Software Foundation; either version 2.1 of the License, or
00015 //  any later version.
00016 //
00017 //  The GPSTk is distributed in the hope that it will be useful,
00018 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //  GNU Lesser General Public License for more details.
00021 //
00022 //  You should have received a copy of the GNU Lesser General Public
00023 //  License along with GPSTk; if not, write to the Free Software Foundation,
00024 //  Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 //
00026 //  Wei Yan - Chinese Academy of Sciences . 2009, 2010
00027 //
00028 //============================================================================
00029 
00030 
00031 #include "EarthPoleTide.hpp"
00032 #include "ASConstant.hpp"
00033 #include "IERS.hpp"
00034 
00035 namespace gpstk
00036 {
00037 
00038       /* Solid pole tide to normalized earth potential coefficients
00039        *
00040        * @param mjdUtc   UTC in MJD
00041        * @param dC21     correction to normalized coefficients dC21
00042        * @param dS21     correction to normalized coefficients dS21
00043        */
00044    void EarthPoleTide::getPoleTide(double mjdUtc, double& dC21, double& dS21 )
00045    {
00046       // See IERS Conventions 2003 section 7.1.4, P84
00047 
00048       // x offset and it's rate in 2000
00049       const double xp0 = 0.054;      // in arcsec
00050       const double dxp0 = 0.00083;   // in arcsec/year
00051 
00052       // y offset and it's rate in 2000
00053       const double yp0 = 0.357;      // in arcsec
00054       const double dyp0 = 0.00395;   // in arcsec/year
00055 
00056       // UTC time
00057       double leapYear = (mjdUtc-ASConstant::MJD_J2000)/365.25;
00058       
00059       double xpm = xp0 + leapYear * dxp0;
00060       double ypm = yp0 + leapYear * dyp0;
00061       
00062       double xp = IERS::xPole(mjdUtc);   // in arcsec
00063       double yp = IERS::yPole(mjdUtc);    // in arcsec
00064       
00065       double m1 =  xp - xpm;
00066       double m2 = -yp + ypm;
00067       
00068       // See IERS Conventions 2003 section 6.2, P65
00069       // Correction to normalized earth potential coefficients
00070       // C21 and S21
00071       dC21 = -1.333e-9 * ( m1 - 0.0115 * m2 );
00072       dS21 = -1.333e-9 * ( m2 + 0.0115 * m1 );
00073 
00074    }  // End of method 'EarthPoleTide::getPoleTide()'
00075 
00076 }  // End of namespace 'gpstk'
00077 

Generated on Tue May 22 03:30:57 2012 for GPS ToolKit Software Library by  doxygen 1.3.9.1