General Purpose Geodetic Library
SgConstants.cpp
Go to the documentation of this file.
1 /*
2  *
3  * This file is a part of Space Geodetic Library. The library is used by
4  * nuSolve, a part of CALC/SOLVE system, and designed to make analysis of
5  * geodetic VLBI observations.
6  * Copyright (C) 2010-2020 Sergei Bolotin.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 
24 #include <SgConstants.h>
25 #include <SgMJD.h>
26 
27 
28 /*=====================================================================================================*/
29 //
30 // constants:
31 //
32 
33 const double vLight = 299792458.0; // m/s
34 
35 
36 
37 /*=====================================================================================================*/
38 // this is an unofficial translation on C of the subroutine "DPSIDEPS1980_DXDY2000(dmjd,dX,dY,dpsi,deps)"
39 // coded by Christian Bizouard and available at http://hpiers.obspm.fr/iers/models/uai2000.package
40 //
41 void calcCip2IAU1980(const SgMJD& epoch, double dX, double dY, double dPsi_1980, double dEps_1980,
42  double dPsi_2000, double dEps_2000, double& diffPsi, double& diffEps)
43 {
44  double const sineps0(0.3977771559319137), coseps0(0.9174820620691818);
45  double dPsi_model, dEps_model, dt, dt2, dt3, psi_A, chi_A, f;
46  dPsi_model = (dPsi_2000 - dPsi_1980)*RAD2MAS;
47  dEps_model = (dEps_2000 - dEps_1980)*RAD2MAS;
48  dt = (epoch - tEphem)/36525.0;
49  dt2 = dt*dt;
50  dt3 = dt2*dt;
51 
52  // ! Luni-solar precession
53  psi_A = (5038.47875*dt - 1.07259*dt2 -0.001147*dt3)*SEC2RAD;
54  // ! Planetary precession
55  chi_A = ( 10.5526 *dt - 2.38064*dt2 -0.001125*dt3)*SEC2RAD;
56  f = (psi_A*coseps0 - chi_A)*(psi_A*coseps0 - chi_A);
57 
58  // ! dpsi1980 / deps1980
59  diffPsi = (-dX + (psi_A*coseps0 - chi_A)*dY)/(-f*sineps0 - sineps0) + dPsi_model;
60  diffEps = (-(psi_A*coseps0 - chi_A)*sineps0*dX - sineps0*dY)/(-f*sineps0 - sineps0) + dEps_model;
61 
62  diffPsi+= (-2.9965)*dt*100.0; // values of Herring / UAI 2000
63  diffEps+= (-0.2524)*dt*100.0; // values of Herring / UAI 2000
64 
65  diffPsi+= - 41.7750 + 40.0e-3; // values of Herring / UAI 2000 corrigees
66  diffEps+= - 6.8192 - 40.0e-3; // values of Herring / UAI 2000 corrigees
67  diffPsi/= RAD2MAS;
68  diffEps/= RAD2MAS;
69 };
70 /*=====================================================================================================*/
71 
const double vLight
Definition: SgConstants.cpp:33
void calcCip2IAU1980(const SgMJD &epoch, double dX, double dY, double dPsi_1980, double dEps_1980, double dPsi_2000, double dEps_2000, double &diffPsi, double &diffEps)
Definition: SgConstants.cpp:41
const SgMJD tEphem(51544.5)
#define RAD2MAS
radians to ms:
Definition: SgMathSupport.h:60
#define SEC2RAD
radians to arc seconds:
Definition: SgMathSupport.h:48
Definition: SgMJD.h:59