1 //==============================================================================
2 //
3 //  This file is part of GPSTk, the GPS Toolkit.
4 //
5 //  The GPSTk 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 GPSTk 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 GPSTk; 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-2020, 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 
39 /**
40  * @file CommandInput.hpp
41  * Include file for command line input, including defaults and
42  * validation for program DDBase.
43  */
44 
45 //------------------------------------------------------------------------------------
46 #ifndef CLASS_DDBASE_COMMANDINPUT_INCLUDE
47 #define CLASS_DDBASE_COMMANDINPUT_INCLUDE
48 
49 //------------------------------------------------------------------------------------
50 // includes
51 // system
52 // GPSTk
53 // DDBase
54 // put '#include this file' at bottom of DDBase.hpp #include "DDBase.hpp"
55 
56 //------------------------------------------------------------------------------------
57 /// Class CommandInput encapsulates all the data input from command line.
58 class CommandInput {
59 public:
60    // functions
61    /**
62     * @throw Exception
63     */
64    int GetCmdInput(int argc, char **argv);
65    /**
66     * @throw Exception
67     */
68    int ValidateCmdInput(void);
69    /**
70     * @throw Exception
71     */
72    void Dump(std::ostream& s=std::cout) const;
73 
74    // member data
75    bool Debug;
76    bool Verbose;
77    bool Screen;
78    bool Validate;
79    std::string LogFile;
80    std::string InputPath;
81    std::string NavPath;
82    std::string EOPPath;
83    std::string OutPath;
84    std::vector<std::string> NavFileNames;
85    std::vector<std::string> EOPFileNames;
86    std::string TimeTableFile;
87    gpstk::CommonTime BegTime;
88    gpstk::CommonTime EndTime;
89    int Frequency;
90       // stochastic models
91    std::string StochasticModel;
92       // for configuration of pseudorange solution
93    double PRSrmsLimit;
94    double PRSslopeLimit;
95    //bool PRSresidCrit;      // no
96    //bool PRSreturnatonce    // no
97    int PRSnIter;
98    double PRSconverge;
99       // for use by pseudorange solution only
100    double PRSMinElevation;
101    gpstk::TropModel *pTropModel;          // Station has another for Estimation
102    bool noRAIM;                           // not implemented right now
103       // for modeling the residual zenith delay (RZD) of the troposphere
104    int NRZDintervals;                     // 0 for no RZD estimation
105    double RZDtimeconst;                   // hours
106    double RZDsigma;                       // meters
107       //
108    double DataInterval;
109       // editing
110    double MinElevation;
111    double RotatedAntennaElevation;
112    double RotatedAntennaAzimuth;
113    int MaxGap;
114    int MinDDSeg;
115    int PhaseBiasReset;
116    std::vector<gpstk::GSatID> ExSV;
117       // timetable
118    gpstk::GSatID RefSat;
119       // Estimation
120    bool noEstimate;
121    int nIter;
122    double convergence;
123    bool FixBiases;
124    double TightConstraint,LooseConstraint;// in ppm (of baseline)
125    double DefaultTemp,DefaultPress,DefaultRHumid;
126       // output
127    std::vector<std::string> OutputBaselines;
128    std::vector<gpstk::Triple> OutputBaselineOffsets;
129    std::string OutputClkFile;
130    std::string OutputRawDDFile;
131    std::string OutputDDDFile;
132    std::string OutputTDDFile;
133    std::string OutputRawFile;
134    std::string OutputPRSFile;
135    std::string OutputDDRFile;
136 
137 private:
138    bool help;
139       /**
140        * @throw Exception
141        */
142    void SetDefaults();
143       /**
144        * @throw Exception
145        */
146    void PreProcessArgs(const char *arg, std::vector<std::string>& Args);
147 };    // end class CommandInput
148 
149 //------------------------------------------------------------------------------------
150 extern CommandInput CI;
151 
152 #endif
153 // nothing below this
154 //------------------------------------------------------------------------------------
155