General Purpose Geodetic Library
VcSetup.cpp
Go to the documentation of this file.
1 /*
2  * This file is a part of vgosDbCalc. vgosDbCalc is a part of CALC/SOLVE
3  * system and is designed to calculate theoretical values and store them
4  * in the vgosDb format.
5  * Copyright (C) 2016-2020 Sergei Bolotin.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #include <iostream>
23 #include <stdlib.h>
24 #include <sys/utsname.h>
25 
26 
27 #include <QtCore/QDir>
28 #include <QtCore/QFileInfo>
29 
30 
31 #include <SgLogger.h>
32 
33 
34 #include "VcSetup.h"
35 #include "vgosDbCalc.h"
36 
37 
38 
39 
40 /*=======================================================================================================
41 *
42 * METHODS:
43 *
44 *======================================================================================================*/
46  path2Home_ (""),
47  path2VgosDbFiles_ ("/500/vgosDb"),
48  path2MasterFiles_ ("/500/oper/master"),
49  path2SolveAprioriFiles_ ("/500/oper/solve_apriori_files"),
50  aPrioriFile4Sites_ ("blokq.c11.dat"),
51  aPrioriFile4Sources_ ("blokq.c11.dat"),
52  aPrioriFile4OceanLd_ ("blokq.c11.dat"),
53  aPrioriFile4Eops_ ("usno_finals.erp"),
54  aPrioriFile4Tilts_ ("tilt.dat"),
55  aPrioriFile4OceanPoleTideLd_("blokq.c11.dat"),
56  path2AuxLogs_ ("Logs"),
57  identities_()
58 {
60  useLocalLocale_ = false;
61  //
62 };
63 
64 
65 
66 //
68 {
69 };
70 
71 
72 
73 //
74 void VcSetup::setUpBinaryIdentities(const QString& argv0)
75 {
76  QFileInfo fi(argv0);
77  identities_.setExecBinaryName(fi.fileName());
78  identities_.setExecDir(fi.canonicalPath());
79  identities_.setCurrentDir(QDir::currentPath());
81 };
82 
83 
84 
85 //
87 {
88  std::cout << "The setup of the software " << qPrintable(vgosDbCalcVersion.name()) << ":\n";
89 
90  std::cout
91  << " The Home Direcory:\t\t\t\"" << qPrintable(path2Home_) << "\"\n"
92  << " Path to SOLVE a priori files:\t\"" << qPrintable(path2SolveAprioriFiles_) << "\"\n"
93  << " Path to VgosDb files:\t\t\"" << qPrintable(path2VgosDbFiles_) << "\"\n"
94  << " Path to Master files:\t\t\"" << qPrintable(path2MasterFiles_) << "\"\n"
95  << " A priori file names:\n"
96 
97  << " Site positions and velociities:\t\"" << qPrintable(aPrioriFile4Sites_) << "\"\n"
98  << " Source coordinates:\t\t\t\"" << qPrintable(aPrioriFile4Sources_) << "\"\n"
99  << " Ocean loading parameters:\t\t\"" << qPrintable(aPrioriFile4OceanLd_) << "\"\n"
100  << " EOP:\t\t\t\t\t\"" << qPrintable(aPrioriFile4Eops_) << "\"\n"
101  << " Antenna tilts:\t\t\t\"" << qPrintable(aPrioriFile4Tilts_) << "\"\n"
102  << " Old ocean loading parameters:\t\"" << qPrintable(aPrioriFile4OceanPoleTideLd_) << "\"\n"
103  << " Save log file for each session:\t" << (have2SavePerSessionLog_?"Yes":"No") << "\n"
104  << " Do not alternate locale set up:\t" << (useLocalLocale_?"Yes":"No") << "\n"
105  ;
107  std::cout
108  << " Path to logs for each session:\t\"" << qPrintable(path2AuxLogs_) << "\"\n"
109  ;
110 
112 };
113 
114 /*=====================================================================================================*/
SgVersion vgosDbCalcVersion("vgosDbCalc", 0, 5, 2, "Fort Windham Rocks (rc2)", SgMJD(2023, 4, 3, 11, 6))
void setCurrentDir(const QString &)
Definition: SgIdentities.h:391
void print2stdOut()
void setExecBinaryName(const QString &)
Definition: SgIdentities.h:399
void setExecDir(const QString &)
Definition: SgIdentities.h:383
void setDriverVersion(const SgVersion &)
QString name(NameFormat fmt=NF_Human) const
Definition: SgVersion.cpp:54
bool have2SavePerSessionLog_
Definition: VcSetup.h:185
QString path2MasterFiles_
Definition: VcSetup.h:176
QString aPrioriFile4Eops_
Definition: VcSetup.h:181
QString aPrioriFile4Sites_
Definition: VcSetup.h:178
QString aPrioriFile4Sources_
Definition: VcSetup.h:179
QString path2Home_
Definition: VcSetup.h:174
VcSetup()
Definition: VcSetup.cpp:45
bool useLocalLocale_
Definition: VcSetup.h:186
SgIdentities identities_
Definition: VcSetup.h:188
QString aPrioriFile4Tilts_
Definition: VcSetup.h:182
QString aPrioriFile4OceanPoleTideLd_
Definition: VcSetup.h:183
QString aPrioriFile4OceanLd_
Definition: VcSetup.h:180
void setUpBinaryIdentities(const QString &)
Definition: VcSetup.cpp:74
QString path2VgosDbFiles_
Definition: VcSetup.h:175
QString path2AuxLogs_
Definition: VcSetup.h:184
virtual ~VcSetup()
Definition: VcSetup.cpp:67
QString path2SolveAprioriFiles_
Definition: VcSetup.h:177
void print2stdOut()
Definition: VcSetup.cpp:86