General Purpose Geodetic Library
SgZenithDelay.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 <math.h>
25 
26 
27 #include <SgLogger.h>
28 #include <SgVlbiStationInfo.h>
29 #include <SgZenithDelay.h>
30 
31 
32 
33 /*=======================================================================================================
34 *
35 * METHODS:
36 *
37 *======================================================================================================*/
38 //
39 // static first:
40 const QString SgZenithDelay::className()
41 {
42  return "SgZenithDelay";
43 };
44 
45 
46 
47 //
48 double SgZenithDelay::calc(const SgMeteoData&, const SgVlbiStationInfo* stnInfo)
49 {
51  {
52  QString str;
53  str.sprintf("Zenith delay result(%s): zd=%20.16f(m)",
54  qPrintable(stnInfo->getKey()), 0.0);
56  };
57  return 0.0;
58 };
59 
60 
61 
62 //
64 {
71  double height(stnInfo->getHeight());
72  double rh(meteo.relativeHumidity(height));
73  double t(meteo.temperature(height));
74  // 0<= rh <=1:
75  return 6.11*rh*exp(17.26938819745534263007*t/(237.3 + t));
76 };
77 /*=====================================================================================================*/
78 
79 
80 
81 
82 
83 
84 /*=====================================================================================================*/
85 //
86 // static first:
88 {
89  return "SgDryZD_Saastamoinen";
90 };
91 
92 
93 
94 //
95 double SgDryZD_Saastamoinen::calc(const SgMeteoData& meteo, const SgVlbiStationInfo* stnInfo)
96 {
97  double latitude=stnInfo->getLatitude(), height=stnInfo->getHeight();
98  double zd;
99  double p(meteo.pressure(height));
100 
101  zd = 2.2768e-3*p/(1.0 - 2.66e-3*cos(2.0*latitude) - 2.8e-7*height);
102 
104  {
105  QString str;
106  str.sprintf("Zenith delay input (%s): P=%12.6f(Pa), latitude=%12.6f(d), height=%12.6f(m)",
107  qPrintable(stnInfo->getKey()), p, latitude*RAD2DEG, height);
109  str.sprintf("Zenith delay result(%s): zd=%20.16f(m)",
110  qPrintable(stnInfo->getKey()), zd);
112  };
113  return zd;
114 };
115 /*=====================================================================================================*/
116 
117 
118 
119 
120 
121 
122 /*=====================================================================================================*/
123 //
124 // static first:
126 {
127  return "SgWetZD_Saastamoinen";
128 };
129 
130 
131 
132 //
133 double SgWetZD_Saastamoinen::calc(const SgMeteoData& meteo, const SgVlbiStationInfo* stnInfo)
134 {
135  double height(stnInfo->getHeight());
136  double t(meteo.temperature(height));
137  double zd(0.0), vaporPressure(calcVapourPressure(meteo, stnInfo));
138 
139  zd = 2.2770e-3*(0.05 + 1255.0/(t + 273.15))*vaporPressure;
140 
142  {
143  QString str;
144  str.sprintf("Zenith delay input (%s): t=%12.6f(C), vaporPressure=%12.6f(Pa)",
145  qPrintable(stnInfo->getKey()), t, vaporPressure);
147  str.sprintf("Zenith delay result(%s): zd=%20.16f(m)",
148  qPrintable(stnInfo->getKey()), zd);
150  };
151  return zd;
152 };
153 /*=====================================================================================================*/
154 
155 
156 
157 
158 
159 
160 /*=======================================================================================================
161 *
162 * FRIENDS:
163 *
164 *======================================================================================================*/
165 //
166 
167 
168 
169 /*=====================================================================================================*/
170 //
171 // aux functions:
172 //
173 
174 
175 // i/o:
176 
177 
178 /*=====================================================================================================*/
179 //
180 // constants:
181 //
182 const double SgZenithDelay::k1_ = 77.604; // K/mbar
183 const double SgZenithDelay::k2_ = 64.79; // K/mbar
184 const double SgZenithDelay::k3_ = 3.776e+5; // K/mbar^2
185 /*=====================================================================================================*/
186 
187 
188 
189 
190 
191 
192 
193 
194 /*=====================================================================================================*/
SgLogger * logger
Definition: SgLogger.cpp:231
#define RAD2DEG
< radians to degrees:
Definition: SgMathSupport.h:32
static const QString className()
virtual double calc(const SgMeteoData &meteo, const SgVlbiStationInfo *stnInfo)
virtual void write(LogLevel, quint32, const QString &, bool=false)
Definition: SgLogger.cpp:88
@ REFRACTION
Definition: SgLogger.h:82
bool isEligible(LogLevel lvl, quint32 f) const
Definition: SgLogger.h:151
double pressure(double height=0.0) const
Definition: SgMeteoData.cpp:70
double relativeHumidity(double height=0.0) const
Definition: SgMeteoData.cpp:90
double temperature(double height=0.0) const
Definition: SgMeteoData.cpp:52
const QString & getKey() const
Definition: SgObjectInfo.h:319
double getLatitude() const
double getHeight() const
virtual double calc(const SgMeteoData &meteo, const SgVlbiStationInfo *stnInfo)
static const QString className()
static const double k1_
refraction coeff. #1, K/mbar; Thayer, 1974
virtual double calc(const SgMeteoData &meteo, const SgVlbiStationInfo *stnInfo)
static const QString className()
static const double k3_
refraction coeff. #3, K/mbar^2; Thayer, 1974
static double calcVapourPressure(const SgMeteoData &meteo, const SgVlbiStationInfo *stnInfo)
static const double k2_
refraction coeff. #2, K/mbar; Thayer, 1974