Go to the documentation of this file.
58 using namespace StringUtils;
75 int AtmLoadTides::initializeSites(vector<string>& sites,
string filename)
79 bool allsites =
false;
80 if (sites.size() == 0)
86 ifstream infile(filename.c_str());
87 if (!infile || !infile.is_open())
89 Exception e(
"File " + filename +
" could not be opened.");
105 getline(infile, line);
118 while (!line.empty())
121 if (
word ==
string(
"station"))
126 if (
word ==
string(
"coord.(long,lat)"))
137 else if (looking && line.length() <= 40)
146 sites.push_back(site);
150 for (i = 0; i < sites.size(); i++)
153 if (site == sites[i])
171 " is corrupted for site " + site +
172 " - offending line follows\n" + line);
176 for (i = 0; i < 4; i++)
183 for (i = 0; i <
coeff.size(); i++)
185 oss <<
" " << setprecision(4) << setw(7) <<
coeff[i];
186 if ((i + 1) % 4 == 0)
195 coefficientMap[site] =
coeff;
199 coeff.push_back(lat);
200 coeff.push_back(lon);
201 positionMap[site] =
coeff;
209 vector<string>::iterator
pos;
210 pos = find(sites.begin(), sites.end(), site);
211 if (
pos != sites.end())
222 if (!allsites && nfound >= nwant)
227 if (infile.eof() || !infile.good())
242 Exception E(
"std except: " +
string(e.what()));
272 if (coefficientMap.find(site) == coefficientMap.end())
275 Exception(
"Site not found in atmospheric loading store"));
277 vector<double>
coeff = coefficientMap[site];
284 double dayfr(ttag.
secOfDay() / 86400.0);
285 static const double w1(2 *
PI), w2(4 *
PI);
286 const double cos1(::
cos(w1 * dayfr));
287 const double sin1(::
sin(w1 * dayfr));
288 const double cos2(::
cos(w2 * dayfr));
289 const double sin2(::
sin(w2 * dayfr));
323 Exception E(
"std except: " +
string(e.what()));
void convertSystemTo(const TimeSystem &ts)
static const struct @1 coeff[]
Constants used in the nutation models, adapted from SOFA nut80.c.
std::string word(const std::string &s, const std::string::size_type wordNum=0, const char delimiter=' ')
const double PI
GPS value of PI; also specified by GAL.
std::string & stripLeading(std::string &s, const std::string &aString, std::string::size_type num=std::string::npos)
double sin(gnsstk::Angle x)
std::string & stripTrailing(std::string &s, const std::string &aString, std::string::size_type num=std::string::npos)
int numWords(const std::string &s, const char delimiter=' ')
std::string stripFirstWord(std::string &s, const char delimiter=' ')
double cos(gnsstk::Angle x)
double asDouble(const std::string &s)
#define GNSSTK_RETHROW(exc)
std::string firstWord(const std::string &s, const char delimiter=' ')
#define GNSSTK_THROW(exc)
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:38