Tropdump.cpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 //==============================================================================
26 //
27 // This software was developed by Applied Research Laboratories at the
28 // University of Texas at Austin, under contract to an agency or agencies
29 // within the U.S. Department of Defense. The U.S. Government retains all
30 // rights to use, duplicate, distribute, disclose, or release this software.
31 //
32 // Pursuant to DoD Directive 523024
33 //
34 // DISTRIBUTION STATEMENT A: This software has been approved for public
35 // release, distribution is unlimited.
36 //
37 //==============================================================================
38 
40 
41 //------------------------------------------------------------------------------------
42 // system includes
43 #include <ctime>
44 #include <iostream>
45 #include <iomanip>
46 #include <fstream>
47 #include <string>
48 #include <vector>
49 #include <map>
50 // GNSSTk
51 #include "singleton.hpp"
52 #include "Epoch.hpp"
53 #include "TimeString.hpp" // printTime
54 #include "Exception.hpp"
55 #include "CommandLine.hpp"
56 #include "Position.hpp"
57 #include "TropModel.hpp" // includes Zero
58 #include "GGHeightTropModel.hpp"
59 #include "GGTropModel.hpp"
60 #include "NBTropModel.hpp"
61 #include "SaasTropModel.hpp"
62 #include "SimpleTropModel.hpp"
63 #include "NeillTropModel.hpp"
64 #include "GlobalTropModel.hpp"
65 #include "GCATTropModel.hpp"
66 #include "MOPSTropModel.hpp"
67 
68 // gnsstk-geomatics
69 #include "logstream.hpp"
70 
71 // geomatics
72 
73 //------------------------------------------------------------------------------------
74 //------------------------------------------------------------------------------------
75 // TODO
76 
77 //------------------------------------------------------------------------------------
78 using namespace std;
79 using namespace gnsstk;
80 
81 //------------------------------------------------------------------------------------
82 // NB Version below class GlobalData
83 
84 //------------------------------------------------------------------------------------
85 // prototypes in this module
88 int Process(void);
89 
90 //------------------------------------------------------------------------------------
91 //------------------------------------------------------------------------------------
94 class GlobalData : public Singleton<GlobalData> {
95 public:
96 
98  GlobalData() noexcept { SetDefaults(); }
99 
104  int ProcessUserInput(int argc, char **argv);
105 
109  string BuildCommandLine(void);
110 
115  int ExtraProcessing(string& errors, string& extras);
116 
120  int OpenLogFile(void);
121 
124  if(pTrop) delete pTrop;
125  if(oflog.is_open()) oflog.close();
126  }
127 
128 private:
130  void SetDefaults(void) noexcept;
131 
132 public:
133  // member data
135  static const string PrgmName;
136  static const string Version;
137  string Title;
138 
139  // command line input ----------------------------------------------------------
141 
142  // output file
143  string logfile;
144  string logpath;
145 
146  // input paths
147  // input files
148  string dummy;
149 
150  // input strings
151  string refPosstr;
152  string tropName;
153  string tropstr;
154  double Temp,Press,Humid;
155  int doy;
156  //string timestr; ///< time input
157  //CommonTime troptime; ///< time at which to evaluate models
158 
159  double elevmin;
160  double elevmax;
161  double delev;
162 
163  bool trophelp;
164  // end command line input ------------------------------------------------------
165 
166  bool verbose;
167  int debug;
168 
169  ofstream oflog;
170 
173 
174 }; // end class GlobalData
175 
176 //------------------------------------------------------------------------------------
177 // define static constants
178 const string GlobalData::PrgmName = string("Tropdump");
179 const string GlobalData::Version(string("1.0 4/13/17"));
180 
181 //------------------------------------------------------------------------------------
182 // Define defaults for all command line input and global data
183 void GlobalData::SetDefaults(void) noexcept
184 {
185  logfile = string();
186 
187  // trop model and weather
188  tropstr = string("Global,20,1013,50");
189  Temp = 20.0;
190  Press = 1013.;
191  Humid = 50.;
192  elevmin = 3.0;
193  elevmax = 90.0;
194  delev = 1.5;
195  // position
196  refPosstr = string("-740376.5046,-5457019.3545,3207315.7299"); // ARL:UT
197  //timestr = string("2017,103,0.0");
198  doy = 103;
199 
200  trophelp = false;
201  inputIsValid = true;
202 
203 } // end SetDefaults()
204 
205 //------------------------------------------------------------------------------------
206 //------------------------------------------------------------------------------------
207 int main(int argc, char **argv)
208 {
209  string prgmname; // for catch only
210 try {
211  // begin counting time - for CPU run time
212  clock_t totaltime = clock();
213  // begin counting time - for wall clock run time
214  Epoch wallclkbeg;
215  wallclkbeg.setLocalTime();
216 
217  // get (create) the global data object (a singleton);
218  // since this is the first instance, this will also set default values
220  prgmname = GD.PrgmName;
221 
222  // Build title = first line of output
223  GD.Title = GD.PrgmName + ", Ver. "
224  + GD.Version + printTime(wallclkbeg,", Run %04Y/%02m/%02d at %02H:%02M:%02S");
225 
226  // TEMP, for debugging CommandLine; OpenLogFile will set Level from GD.debug
227  //LOGlevel = ConfigureLOG::Level("DEBUG");
228 
229  // process : loop once -----------------------------------------------------
230  int iret;
231  for(bool go=true; go; go=false) {
232 
233  // process the command line ------------------------------------
234  iret = GD.ProcessUserInput(argc,argv);
235  if(iret) break; // if(iret) same as if(iret!=0)
236 
237  // do it -------------------------------------------------------
238  iret = Process();
239  if(iret) break;
240 
241  } // end loop once
242 
243  // error condition ---------------------------------------------------------
244  // return codes: 0 ok
245  // -3 cmd line definition invalid (CommandLine)
246  // 1 help
247  // etc see immediately below
248  if(iret != 0) {
249  if(iret != 1) { // print code -- TEMP
250  string msg;
251  msg = GD.PrgmName + string(" is terminating with code ")
252  + StringUtils::asString(iret);
253  LOG(ERROR) << msg;
254  }
255 
256  if(iret == 1) { ; } // help
257  else if(iret == -3) { LOG(INFO) << "The cmdline definition is invalid"; }
258  else if(iret == 2) { ; }
259  else if(iret == 3) { LOG(INFO) << "The user requested input validation."; }
260  else if(iret == 4) { LOG(INFO) << "The input is invalid."; }
261  else if(iret == 5) { LOG(INFO) << "The log file could not be opened."; }
262  else // fix this
263  LOG(INFO) << "temp - Some other return code... " << iret;
264  }
265 
266  // compute and print run time ----------------------------------------------
267  if(iret != 1) {
268  Epoch wallclkend;
269  wallclkend.setLocalTime();
270  totaltime = clock()-totaltime;
271  ostringstream oss;
272  oss << GD.PrgmName << " CPU timing: " << fixed << setprecision(3)
273  << double(totaltime)/double(CLOCKS_PER_SEC)
274  << " seconds. (Wall Clock Timing: " << (wallclkend - wallclkbeg) << " sec)";
275  if(pLOGstrm != &cout) LOG(INFO) << oss.str();
276  cout << oss.str() << endl;
277  }
278 
279  if(iret == 0) return 0; else return -1;
280 }
281 catch(Exception& e) {
282  cerr << prgmname << " caught Exception:\n" << e.what() << endl;
283  // don't use LOG here - causes hangup - don't know why
284 }
285 catch (...) {
286  cerr << "Unknown error in " << prgmname << ". Abort." << endl;
287 }
288  return -1;
289 } // end main()
290 
291 //------------------------------------------------------------------------------------
292 //------------------------------------------------------------------------------------
293 int GlobalData::ProcessUserInput(int argc, char **argv)
294 {
295 try {
296  string PrgmDesc, cmdlineUsage, cmdlineErrors, cmdlineExtras;
297  vector<string> cmdlineUnrec;
298  ostringstream oss;
299 
300  // build the command line
301  opts.DefineUsageString(PrgmName + " [options]");
302  PrgmDesc = BuildCommandLine();
303  LOG(INFO) << Title;
304 
305  // let CommandLine parse options; write all errors, etc to the passed strings
306  int iret = opts.ProcessCommandLine(argc, argv, PrgmDesc,
307  cmdlineUsage, cmdlineErrors, cmdlineUnrec);
308 
309  // handle return values
310  if(iret == -2) return iret; // bad alloc
311  if(iret == -3) return iret; // invalid command line
312 
313  // help: print syntax page and quit
314  if(opts.hasHelp() || trophelp) {
315  LOG(INFO) << cmdlineUsage;
316  if(trophelp)
317  LOG(INFO) << "\n Valid trop model names (cf. gnsstk/core/lib/GNSSCore):\n"
318  << " GCAT - GPS Code Analysis Tool" << endl
319  << " GG - Goad and Goodman (1974)" << endl
320  << " GGHeight - Goad and Goodman with height" << endl
321  << " Global - the Global (GMF) model" << endl
322  << " MOPS - RTCA Minimum Operational Performance Standards" << endl
323  << " NB - New Brunswick" << endl
324  << " Neill - Neill (Neill 1996)" << endl
325  << " Saas - Saastamoinen" << endl
326  << " Simple - a simple Black model" << endl
327  << " Zero - all zeros";
328 
329  return 1;
330  }
331 
332  // extra parsing (perhaps add to cmdlineErrors, cmdlineExtras)
333  iret = ExtraProcessing(cmdlineErrors, cmdlineExtras);
334  if(iret) return iret;
335 
336  // output warning / error messages
337  if(cmdlineUnrec.size() > 0) {
338  oss << "Warning - unrecognized arguments:";
339  for(size_t i=0; i<cmdlineUnrec.size(); i++)
340  oss << " >" << cmdlineUnrec[i] << "<";
341  LOG(WARNING) << oss.str();
342  }
343 
344  // fatal errors
345  if(!cmdlineErrors.empty()) {
346  StringUtils::stripTrailing(cmdlineErrors,'\n');
347  StringUtils::replaceAll(cmdlineErrors,"\n","\n ");
348  LOG(ERROR) << "Errors found on command line:\n " << cmdlineErrors
349  << "\nEnd of command line errors.";
350  return -3;
351  }
352 
353  // success
354  // open log file
355  iret = OpenLogFile();
356  if(iret < 0) return iret;
357 
358  // dump configuration summary
359  if(verbose) {
360  oss.str("");
361  oss << "------ Summary of " << PrgmName << " command line configuration ------";
362  opts.DumpConfiguration(oss);
363  if(!cmdlineExtras.empty()) oss << "\n# Extra Processing\n" << cmdlineExtras;
364  oss << "------ End configuration summary ------";
365  LOG(VERBOSE) << oss.str() << endl;
366  }
367 
368  return 0;
369 }
370 catch(Exception& e) { GNSSTK_RETHROW(e); }
371 } // end GlobalData::ProcessUserInput()
372 
373 //------------------------------------------------------------------------------------
375 {
376 try {
377  // build the options list == syntax page
378  string prgmdesc;
379  prgmdesc =
380  string(" Program ") + PrgmName + string(" defines a trop model and prints "
381  "a table of values for all elevations.\n"
382  "\n Input is on the command line, or of the same format in a file "
383  "(see --file below);\n lines in that file which begin with '#' are ignored. "
384  "Accepted options are \n shown below, followed by a description, with default "
385  "value, if any, in ().");
386 
387  // opts.Add(char, opt, arg, repeat?, required?, &target, pre-descript, descript.);
388  // required options
389  opts.noArgsRequired();
390 
391  // NB dummy must belong to GD, not local - don't know why
393  opts.Add('f', "file", "name", true, false, &dummy, "\n# File I/O:",
394  "Name of file containing more options");
395  opts.Add(0, "log", "name", false, false, &logfile, "",
396  "Name of output log file");
397  opts.Add(0, "logpath", "path", false, false, &logpath, "",
398  "Path for output log file");
399 
400  opts.Add('t', "trop", "m[,T,P,H]", false, false, &tropstr, "\n# Configuration",
401  "Tropospheric model and optional weather T(C),P(mb),RH(%)");
402  opts.Add(0, "refPos", "X,Y,Z", false, false, &refPosstr, "",
403  "Receiver position (ECEF XYZ)");
404  opts.Add(0, "doy", "d", false, false, &doy, "",
405  "Day of year = time of model");
406  //opts.Add(0, "time", "t", false, false, &timestr, "",
407  // "Time of model <t> = MJD|w,sow|y,doy,sod|y,m,d,h,m,s");
408  opts.Add(0, "elevmin", "deg", false, false, &elevmin, "\n# Output",
409  "Minimum elevation angle (degrees)");
410  opts.Add(0, "elevmax", "deg", false, false, &elevmax, "",
411  "Maximum elevation angle (degrees)");
412  opts.Add(0, "delev", "deg", false, false, &delev, "",
413  "Step in degrees of elevation for the output table");
414  // help
415  opts.Add(0, "trophelp", "", false, false, &trophelp, "\n# Help",
416  "Print a list of available trop model names and quit");
417  // CommandLine will provide help verbose debug
418 
419  return prgmdesc;
420 }
421 catch(Exception& e) { GNSSTK_RETHROW(e); }
422 } // end GlobalData::BuildCommandLine()
423 
424 //------------------------------------------------------------------------------------
425 int GlobalData::ExtraProcessing(string& errors, string& extras)
426 {
427 try {
428  // do extra parsing, define cmdlineExtras, and append errors to cmdlineErrors
429  string str;
430  vector<string> fields;
431  ostringstream oss, ossx;
432 
433  // trop
434  fields = StringUtils::split(tropstr,',');
435  if(fields.size() != 1 && fields.size() != 4) {
436  oss << "Error - invalid field in --Trop input: " << tropstr << endl;
437  inputIsValid = false;
438  }
439  else {
440  tropName = fields[0];
441  if(fields.size() == 4) {
442  Temp = StringUtils::asDouble(fields[1]);
443  Press = StringUtils::asDouble(fields[2]);
444  Humid = StringUtils::asDouble(fields[3]);
445  }
446 
447  // initialize trop (initially it was Simple)
448  // define the final trop model, from the user's input
449  if(tropName == string("Simple")) pTrop = new SimpleTropModel();
450  else if(tropName == string("Zero")) pTrop = new ZeroTropModel();
451  else if(tropName == string("Saas")) pTrop = new SaasTropModel();
452  else if(tropName == string("NB")) pTrop = new NBTropModel();
453  else if(tropName == string("GG")) pTrop = new GGTropModel();
454  else if(tropName == string("GGHeight")) pTrop = new GGHeightTropModel();
455  else if(tropName == string("Neill")) pTrop = new NeillTropModel();
456  else if(tropName == string("Global")) pTrop = new GlobalTropModel();
457  else if(tropName == string("GCAT")) pTrop = new GCATTropModel();
458  else if(tropName == string("MOPS")) pTrop = new MOPSTropModel();
459  else {
460  ossx << " Warning - unknown trop model: " << tropName
461  << "; use Global" << endl;
462  tropName = string("Global");
463  pTrop = new GlobalTropModel();
464  }
465  // else error
466 
467  // set weather here, to the default, in case there is NO met
468  // NB this setWeather() belongs to TropModel
469  pTrop->setWeather(Temp,Press,Humid);
470  ossx << " Trop model " << pTrop->name() << " weather: "
471  << Temp << "degC, " << Press << "mbar, " << Humid << "%RH" << endl;
472 
473  }
474 
475  // reference position
476  if(!refPosstr.empty()) {
477  fields = StringUtils::split(refPosstr,',');
478  if(fields.size() != 3) {
479  oss << " Error - invalid field in --refPos input: " << refPosstr << endl;
480  }
481  else {
482  try {
483  refPos.setECEF(StringUtils::asDouble(fields[0]),
484  StringUtils::asDouble(fields[1]),
485  StringUtils::asDouble(fields[2]));
486 
487  // set position for trop
488  // Q: why is it checking the coordinate system of refPos? I thought that
489  // refPos could provide the position values in multiple coordinate systems?
490  // if it does need to be set to some primary coordinate system somewhere,
491  // where is that done? Set to ECEF by refPos.setECEF above? if so, why
492  // do this check?
493  if(refPos.getCoordinateSystem() != Position::Unknown) {
494  pTrop->setReceiverHeight(refPos.getHeight());
495  pTrop->setReceiverLatitude(refPos.getGeodeticLatitude());
496  pTrop->setReceiverLongitude(refPos.getLongitude());
497  ossx << " Trop model Rx at lat " << refPos.getGeodeticLatitude()
498  << ", long " << refPos.getLongitude()
499  << ", ht " << refPos.getHeight();
500 
501  ossx << endl;
502  }
503  else {
504  oss << " Error - definition of reference position failed." << endl;
505  inputIsValid = false;
506  }
507 
508  }
509  catch(Exception& ) {
510  oss << " Error - invalid position in --refPos : " << refPosstr << endl;
511  inputIsValid = false;
512  }
513  }
514  }
515  else {
516  ossx << " Error - no reference position given" << endl;
517  inputIsValid = false;
518  }
519 
520  // time
521  pTrop->setDayOfYear(doy);
522  ossx << " Trop model on day of year " << doy << endl;
523 
524  //i = StringUtils::numWords(timestr,',');
525  //if(i != 1 && i != 2 && i != 3 && i != 6) {
526  // oss << " Error - invalid time (# fields) in --time : " << timestr << endl;
527  // inputIsValid = false;
528  //}
529  //else {
530  // try {
531  // scanTime(troptime, timestr,
532  // ( i==1 ? "%Q" :
533  // ( i==2 ? "%F,%g" :
534  // ( i==3 ? "%Y,%j,%s" : "%Y,%m,%d,%H,%M,%f"))));
535 
536  // int doy = static_cast<YDSTime>(troptime).doy;
537  // pTrop->setDayOfYear(doy);
538  // ossx << " Trop model on day of year " << doy << endl;
539  // }
540  // catch(Exception& e) {
541  // oss << " Error - invalid time in --time : " << timestr << endl;
542  // inputIsValid = false;
543  // }
544  //}
545 
546  // append to errors, define extras
547  errors += oss.str();
548  extras = ossx.str();
549 
550  return (inputIsValid ? 0 : 4);
551 }
552 catch(Exception& e) { GNSSTK_RETHROW(e); }
553 }
554 
555 //------------------------------------------------------------------------------------
557 {
558 try {
559  // open log file, if it exists
560  if(!logfile.empty()) {
561  oflog.open(logfile.c_str(),ios_base::out);
562  if(!oflog) {
563  cerr << "Failed to open log file " << logfile << endl;
564  return 5;
565  }
566  LOG(INFO) << "Output directed to log file " << logfile;
567  pLOGstrm = &oflog; // ConfigureLOG::Stream() = &oflog;
568  }
569 
570  // configure log stream
571  ConfigureLOG::ReportLevels() = false;
572  ConfigureLOG::ReportTimeTags() = false;
573 
574  // help, debug and verbose handled automatically by CommandLine
575  verbose = (LOGlevel >= VERBOSE);
576  debug = (LOGlevel - DEBUG);
577 
578  if(pLOGstrm != &cout) LOG(INFO) << Title;
579 
580  // dump configuration
581  if(debug > -1) {
582  LOG(INFO) << "Found debug switch at level " << debug;
583  // NB debug turns on verbose
584  }
585 
586  return 0;
587 }
588 catch(Exception& e) { GNSSTK_RETHROW(e); }
589 }
590 
591 //------------------------------------------------------------------------------------
592 //------------------------------------------------------------------------------------
593 int Process(void)
594 {
595 try {
597 
598  LOG(INFO) << setw(8) << GD.pTrop->name() << " Trop model"
599  << fixed << setprecision(4)
600  << " has zenith delays: dry = " << setw(6) << GD.pTrop->dry_zenith_delay()
601  << " wet = " << setw(6) << GD.pTrop->wet_zenith_delay() << " meters";
602 
603  LOG(INFO) << "drytotal = drymap*(dry zenith delay), wettotal = wetmap*(wet zenith delay)";
604 
605  LOG(INFO) << setw(8) << "Name"
606  << " " << setw(5) << "elev"
607  << " " << setw(11) << "drymap"
608  //<< " " << setw(8) << "drydelay"
609  << " " << setw(8) << "drytotal"
610  << " " << setw(8) << "wetmap"
611  //<< " " << setw(8) << "wetdelay"
612  << " " << setw(8) << "wettotal"
613  << " " << setw(8) << "total(m)";
614 
615  double elev(GD.elevmin);
616  while(elev <= GD.elevmax) {
617  LOG(INFO) << setw(8) << GD.pTrop->name() << fixed << setprecision(2)
618  << " " << setw(5) << elev << setprecision(4)
619  << " " << setw(11) << GD.pTrop->dry_mapping_function(elev)
620  //<< " " << setw(8) << GD.pTrop->dry_zenith_delay()
621  << " " << setw(8)
623  << " " << setw(8) << GD.pTrop->wet_mapping_function(elev)
624  //<< " " << setw(8) << GD.pTrop->wet_zenith_delay()
625  << " " << setw(8)
627  << " " << setw(8) << GD.pTrop->correction(elev);
628 
629  elev += GD.delev;
630  }
631 
632  return 0;
633 }
634 catch(Exception& e) { GNSSTK_RETHROW(e); }
635 } // end Process()
636 
637 //------------------------------------------------------------------------------------
638 //------------------------------------------------------------------------------------
639 //------------------------------------------------------------------------------------
640 //------------------------------------------------------------------------------------
gnsstk::StringUtils::replaceAll
std::string & replaceAll(std::string &s, const std::string &oldString, const std::string &newString)
Definition: StringUtils.hpp:1849
gnsstk::TropModel::correction
virtual double correction(double elevation) const
Definition: TropModel.cpp:53
GlobalData::logfile
string logfile
name of output log file
Definition: Tropdump.cpp:143
gnsstk::NBTropModel
Definition: NBTropModel.hpp:86
gnsstk::GCATTropModel
Definition: GCATTropModel.hpp:85
Process
int Process(void)
Definition: Tropdump.cpp:593
gnsstk::Singleton< GlobalData >::Instance
static GlobalData & Instance()
Definition: singleton.hpp:48
PrgmName
string PrgmName
Definition: testSSEph.cpp:85
CommandLine.hpp
GlobalData::tropstr
string tropstr
string for cmdline trop model weather (T,P,RH)
Definition: Tropdump.cpp:153
pLOGstrm
#define pLOGstrm
Definition: logstream.hpp:321
GGTropModel.hpp
gnsstk::TropModel::dry_zenith_delay
virtual double dry_zenith_delay() const =0
gnsstk::Singleton
Definition: singleton.hpp:46
SaasTropModel.hpp
GlobalData::dummy
string dummy
dummy string used for –file option
Definition: Tropdump.cpp:148
gnsstk::GGTropModel
Definition: GGTropModel.hpp:53
gnsstk::Exception::what
std::string what() const
Dump to a string.
Definition: Exception.cpp:193
GlobalData::refPosstr
string refPosstr
string for cmdline ref pos
Definition: Tropdump.cpp:151
gnsstk::TropModel::name
virtual std::string name()
Return the name of the model.
Definition: TropModel.hpp:118
logstream.hpp
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::TropModel
Definition: TropModel.hpp:105
Position.hpp
GlobalData::BuildCommandLine
string BuildCommandLine(void)
Definition: Tropdump.cpp:374
gnsstk::NeillTropModel
Definition: NeillTropModel.hpp:85
GlobalData::PrgmName
static const string PrgmName
program name
Definition: Tropdump.cpp:135
GlobalData::logpath
string logpath
path of output log file
Definition: Tropdump.cpp:144
GCATTropModel.hpp
TropModel.hpp
GlobalData::ExtraProcessing
int ExtraProcessing(string &errors, string &extras)
Definition: Tropdump.cpp:425
gnsstk::WARNING
@ WARNING
Definition: logstream.hpp:57
GlobalData::opts
CommandLine opts
command line options and syntax page
Definition: Tropdump.cpp:134
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
LOGlevel
#define LOGlevel
Definition: logstream.hpp:323
gnsstk::StringUtils::split
std::vector< std::string > split(const std::string &str, const char delimiter=' ')
Definition: StringUtils.hpp:2275
GGHeightTropModel.hpp
gnsstk::Exception
Definition: Exception.hpp:151
gnsstk::StringUtils::stripTrailing
std::string & stripTrailing(std::string &s, const std::string &aString, std::string::size_type num=std::string::npos)
Definition: StringUtils.hpp:1453
main
int main(int argc, char **argv)
Definition: Tropdump.cpp:207
gnsstk::Epoch::setLocalTime
Epoch & setLocalTime()
Definition: Epoch.cpp:404
Title
string Title
Definition: testSSEph.cpp:86
GlobalData::refPos
Position refPos
reference position
Definition: Tropdump.cpp:171
GlobalData::oflog
ofstream oflog
output log file stream
Definition: Tropdump.cpp:169
MOPSTropModel.hpp
GlobalData::trophelp
bool trophelp
if true, print syntax and list of trop models
Definition: Tropdump.cpp:163
GlobalData::Version
static const string Version
version string
Definition: Tropdump.cpp:136
GlobalData::pTrop
TropModel * pTrop
tropospheric delay model (cf. *TropModel)
Definition: Tropdump.cpp:172
gnsstk::GlobalTropModel
Definition: GlobalTropModel.hpp:118
debug
#define debug
Definition: Rinex3ClockHeader.cpp:51
GlobalData::doy
int doy
only time input to TropModel is DOY
Definition: Tropdump.cpp:155
gnsstk::MOPSTropModel
Definition: MOPSTropModel.hpp:81
gnsstk::ERROR
@ ERROR
Definition: logstream.hpp:57
NBTropModel.hpp
GlobalData::~GlobalData
~GlobalData()
destructor, clean up
Definition: Tropdump.cpp:123
GlobalData::elevmax
double elevmax
upper limit on elevation (degrees)
Definition: Tropdump.cpp:160
gnsstk::VERBOSE
@ VERBOSE
Definition: logstream.hpp:57
gnsstk::TropModel::wet_zenith_delay
virtual double wet_zenith_delay() const =0
gnsstk::StringUtils::asDouble
double asDouble(const std::string &s)
Definition: StringUtils.hpp:705
GlobalData::elevmin
double elevmin
lower limit on elevation (degrees)
Definition: Tropdump.cpp:159
GNSSTK_RETHROW
#define GNSSTK_RETHROW(exc)
Definition: Exception.hpp:369
SimpleTropModel.hpp
GlobalData::GlobalData
GlobalData() noexcept
Default and only constructor, sets defaults.
Definition: Tropdump.cpp:98
gnsstk::TropModel::dry_mapping_function
virtual double dry_mapping_function(double elevation) const =0
GlobalData::ProcessUserInput
int ProcessUserInput(int argc, char **argv)
Definition: Tropdump.cpp:293
GlobalData
Definition: Tropdump.cpp:94
GlobalData::verbose
bool verbose
flag handled by CommandLine
Definition: Tropdump.cpp:166
GlobalData::inputIsValid
bool inputIsValid
true finds no problem
Definition: Tropdump.cpp:140
GlobalData::SetDefaults
void SetDefaults(void) noexcept
Define defaults for all command line input and global data.
Definition: Tropdump.cpp:183
LOG
#define LOG(level)
define the macro that is used to write to the log stream
Definition: logstream.hpp:315
gnsstk::printTime
std::string printTime(const CommonTime &t, const std::string &fmt)
Definition: TimeString.cpp:64
GlobalData::delev
double delev
step in elevation (degrees)
Definition: Tropdump.cpp:161
Exception.hpp
NeillTropModel.hpp
std
Definition: Angle.hpp:142
Epoch.hpp
gnsstk::TropModel::wet_mapping_function
virtual double wet_mapping_function(double elevation) const =0
gnsstk::INFO
@ INFO
Definition: logstream.hpp:57
GlobalData::tropName
string tropName
string for cmdline trop model
Definition: Tropdump.cpp:152
gnsstk::Position
Definition: Position.hpp:136
GlobalData::Title
string Title
ID line printed to screen/log: name, ver, run.
Definition: Tropdump.cpp:137
gnsstk::SimpleTropModel
A simple Black model of the troposphere. temp is in Kelvin.
Definition: SimpleTropModel.hpp:48
gnsstk::Epoch
Definition: Epoch.hpp:123
gnsstk::DEBUG
@ DEBUG
Definition: logstream.hpp:57
gnsstk::CommandLine
list of Options
Definition: CommandLine.hpp:63
singleton.hpp
GlobalTropModel.hpp
gnsstk::SaasTropModel
Definition: SaasTropModel.hpp:80
GlobalData::Temp
double Temp
Definition: Tropdump.cpp:154
GlobalData::OpenLogFile
int OpenLogFile(void)
Definition: Tropdump.cpp:556
GlobalData::debug
int debug
int handled by CommandLine
Definition: Tropdump.cpp:167
TimeString.hpp
gnsstk::ZeroTropModel
The 'zero' trop model, meaning it always returns zero.
Definition: TropModel.hpp:289
gnsstk::GGHeightTropModel
Definition: GGHeightTropModel.hpp:77


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:42