[280] | 1 | // Part of BNC, a utility for retrieving decoding and
|
---|
[464] | 2 | // converting GNSS data streams from NTRIP broadcasters.
|
---|
[280] | 3 | //
|
---|
[464] | 4 | // Copyright (C) 2007
|
---|
[280] | 5 | // German Federal Agency for Cartography and Geodesy (BKG)
|
---|
| 6 | // http://www.bkg.bund.de
|
---|
[464] | 7 | // Czech Technical University Prague, Department of Geodesy
|
---|
[280] | 8 | // http://www.fsv.cvut.cz
|
---|
| 9 | //
|
---|
| 10 | // Email: euref-ip@bkg.bund.de
|
---|
| 11 | //
|
---|
| 12 | // This program is free software; you can redistribute it and/or
|
---|
| 13 | // modify it under the terms of the GNU General Public License
|
---|
| 14 | // as published by the Free Software Foundation, version 2.
|
---|
| 15 | //
|
---|
| 16 | // This program is distributed in the hope that it will be useful,
|
---|
| 17 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 18 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 19 | // GNU General Public License for more details.
|
---|
| 20 | //
|
---|
| 21 | // You should have received a copy of the GNU General Public License
|
---|
| 22 | // along with this program; if not, write to the Free Software
|
---|
| 23 | // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
---|
[35] | 24 |
|
---|
| 25 | /* -------------------------------------------------------------------------
|
---|
[93] | 26 | * BKG NTRIP Client
|
---|
[35] | 27 | * -------------------------------------------------------------------------
|
---|
| 28 | *
|
---|
| 29 | * Class: main
|
---|
| 30 | *
|
---|
| 31 | * Purpose: Application starts here
|
---|
| 32 | *
|
---|
| 33 | * Author: L. Mervart
|
---|
| 34 | *
|
---|
| 35 | * Created: 24-Dec-2005
|
---|
| 36 | *
|
---|
[7268] | 37 | * Changes:
|
---|
[35] | 38 | *
|
---|
| 39 | * -----------------------------------------------------------------------*/
|
---|
| 40 |
|
---|
[9952] | 41 | #ifndef WIN32
|
---|
[274] | 42 | #include <unistd.h>
|
---|
[9954] | 43 | #else
|
---|
[9958] | 44 | #include <windows.h>
|
---|
[9952] | 45 | #endif
|
---|
[603] | 46 | #include <signal.h>
|
---|
[35] | 47 | #include <QApplication>
|
---|
| 48 | #include <QFile>
|
---|
[8354] | 49 | #include <iostream>
|
---|
[9151] | 50 | #include <QNetworkProxyFactory>
|
---|
[35] | 51 |
|
---|
[5066] | 52 | #include "app.h"
|
---|
[5070] | 53 | #include "bnccore.h"
|
---|
[35] | 54 | #include "bncwindow.h"
|
---|
[1535] | 55 | #include "bncsettings.h"
|
---|
[2012] | 56 | #include "bncversion.h"
|
---|
[3251] | 57 | #include "upload/bncephuploadcaster.h"
|
---|
[5887] | 58 | #include "rinex/reqcedit.h"
|
---|
| 59 | #include "rinex/reqcanalyze.h"
|
---|
[6343] | 60 | #include "orbComp/sp3Comp.h"
|
---|
[35] | 61 |
|
---|
| 62 | using namespace std;
|
---|
| 63 |
|
---|
[9822] | 64 |
|
---|
[9154] | 65 | void catch_SIGINT(int) {
|
---|
[10465] | 66 | cout << "BNC Interrupted by Ctrl-C" << endl;
|
---|
[7976] | 67 | BNC_CORE->sigintReceived = 1;
|
---|
[9822] | 68 | BNC_CORE->stopPPP();
|
---|
[8772] | 69 | BNC_CORE->stopCombination();
|
---|
[9958] | 70 | #ifndef WIN32
|
---|
[9191] | 71 | sleep(2);
|
---|
[9958] | 72 | #else
|
---|
| 73 | Sleep(2000);
|
---|
| 74 | #endif
|
---|
[10280] | 75 | ::exit(0);
|
---|
[603] | 76 | }
|
---|
| 77 |
|
---|
[10465] | 78 | void catch_SIGTERM(int) {
|
---|
| 79 | cout << "BNC Terminated" << endl;
|
---|
| 80 | BNC_CORE->sigintReceived = 1;
|
---|
| 81 | BNC_CORE->stopPPP();
|
---|
| 82 | BNC_CORE->stopCombination();
|
---|
| 83 | #ifndef WIN32
|
---|
| 84 | sleep(2);
|
---|
| 85 | #else
|
---|
| 86 | Sleep(2000);
|
---|
| 87 | #endif
|
---|
| 88 | ::exit(0);
|
---|
[9154] | 89 | }
|
---|
| 90 |
|
---|
[10465] | 91 | void catch_SIGHUP(int) {
|
---|
| 92 | cout << "BNC received SIGHUP signal: reload configuration" << endl;
|
---|
| 93 | bncSettings settings;
|
---|
| 94 | settings.reRead();
|
---|
| 95 | BNC_CORE->caster()->readMountPoints();
|
---|
| 96 | }
|
---|
| 97 |
|
---|
[82] | 98 | // Main Program
|
---|
| 99 | /////////////////////////////////////////////////////////////////////////////
|
---|
[4490] | 100 | int main(int argc, char* argv[]) {
|
---|
[35] | 101 |
|
---|
[4446] | 102 | bool interactive = true;
|
---|
[4716] | 103 | #ifdef WIN32
|
---|
| 104 | bool displaySet = true;
|
---|
| 105 | #else
|
---|
[4490] | 106 | bool displaySet = false;
|
---|
[4716] | 107 | #endif
|
---|
[9822] | 108 | QByteArray rawFileName;
|
---|
| 109 | QString confFileName;
|
---|
[1146] | 110 |
|
---|
[9822] | 111 | bncWindow* bncWin = 0;
|
---|
| 112 | t_reqcEdit* reqcEdit = 0;
|
---|
| 113 | t_reqcAnalyze* reqcAnalyze = 0;
|
---|
| 114 | t_sp3Comp* sp3Comp = 0;
|
---|
| 115 | bncEphUploadCaster* casterEph = 0;
|
---|
| 116 | bncCaster* caster = 0;
|
---|
| 117 | bncRawFile* rawFile = 0;
|
---|
| 118 | bncGetThread* getThread = 0;
|
---|
| 119 |
|
---|
[7293] | 120 | QByteArray printHelp =
|
---|
[7510] | 121 | "Usage:\n"
|
---|
[7826] | 122 | " bnc --help (MS Windows: bnc.exe --help | more)\n"
|
---|
[7510] | 123 | " --nw\n"
|
---|
[7827] | 124 | " --version (MS Windows: bnc.exe --version | more)\n"
|
---|
[7510] | 125 | " --display {name}\n"
|
---|
| 126 | " --conf {confFileName}\n"
|
---|
| 127 | " --file {rawFileName}\n"
|
---|
| 128 | " --key {keyName} {keyValue}\n"
|
---|
[7273] | 129 | "\n"
|
---|
| 130 | "Network Panel keys:\n"
|
---|
[9795] | 131 | " proxyHost {Proxy host, name or IP address [character string]}\n"
|
---|
| 132 | " proxyPort {Proxy port [integer number]}\n"
|
---|
| 133 | " sslCaCertPath {Full path to SSL certificates [character string]}\n"
|
---|
[9940] | 134 | " sslClientCertPath {Full path to client SSL certificates [character string]}\n"
|
---|
[9795] | 135 | " sslIgnoreErrors {Ignore SSL authorization errors [integer number: 0=no,2=yes]}\n"
|
---|
[7273] | 136 | "\n"
|
---|
| 137 | "General Panel keys:\n"
|
---|
[7512] | 138 | " logFile {Logfile, full path [character string]}\n"
|
---|
| 139 | " rnxAppend {Append files [integer number: 0=no,2=yes]}\n"
|
---|
[8119] | 140 | " onTheFlyInterval {Configuration reload interval [character string: no|1 day|1 hour|5 min|1 min]}\n"
|
---|
[7512] | 141 | " autoStart {Auto start [integer number: 0=no,2=yes]}\n"
|
---|
| 142 | " rawOutFile {Raw output file, full path [character string]}\n"
|
---|
[7273] | 143 | "\n"
|
---|
| 144 | "RINEX Observations Panel keys:\n"
|
---|
[9184] | 145 | " rnxPath {Directory for RINEX files [character string]}\n"
|
---|
[7510] | 146 | " rnxIntr {File interval [character string: 1 min|2 min|5 min|10 min|15 min|30 min|1 hour|1 day]}\n"
|
---|
[8397] | 147 | " rnxSampl {File sampling rate [character string: 0.1 sec|1 sec|5 sec|10 sec|15 sec|30 sec|60 sec]}\n"
|
---|
[9940] | 148 | " rnxSkel {RINEX skeleton file extension [character string: skl|SKL]}\n"
|
---|
[9184] | 149 | " rnxSkelPath {Directory for local skeleton files [character string]}\n"
|
---|
[7510] | 150 | " rnxOnlyWithSKL {Using RINEX skeleton file is mandatory [integer number: 0=no,2=yes]}\n"
|
---|
| 151 | " rnxScript {File upload script, full path [character string]}\n"
|
---|
[9940] | 152 | " rnxVersion {Specifies the RINEX version of the file contents [integer number: 2|3|4]}\n"
|
---|
| 153 | " rnxV2Priority {Priority of signal attributes for RINEX version 2 [character string, list separated by blank character,\n"
|
---|
| 154 | " example: G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX]}\n"
|
---|
[7273] | 155 | "\n"
|
---|
| 156 | "RINEX Ephemeris Panel keys:\n"
|
---|
[7510] | 157 | " ephPath {Directory [character string]}\n"
|
---|
| 158 | " ephIntr {File interval [character string: 1 min|2 min|5 min|10 min|15 min|30 min|1 hour|1 day]}\n"
|
---|
| 159 | " ephOutPort {Output port [integer number]}\n"
|
---|
[9760] | 160 | " ephVersion {Specifies the RINEX version of the file contents [integer number: 2|3|4]}\n"
|
---|
[7273] | 161 | "\n"
|
---|
| 162 | "RINEX Editing and QC Panel keys:\n"
|
---|
[7510] | 163 | " reqcAction {Action specification [character string: Blank|Edit/Concatenate|Analyze]}\n"
|
---|
| 164 | " reqcObsFile {Input observations file(s), full path [character string, comma separated list in quotation marks]}\n"
|
---|
| 165 | " reqcNavFile {Input navigation file(s), full path [character string, comma separated list in quotation marks]}\n"
|
---|
| 166 | " reqcOutObsFile {Output observations file, full path [character string]}\n"
|
---|
| 167 | " reqcOutNavFile {Output navigation file, full path [character string]}\n"
|
---|
| 168 | " reqcOutLogFile {Output logfile, full path [character string]}\n"
|
---|
| 169 | " reqcLogSummaryOnly {Output only summary of logfile [integer number: 0=no,2=yes]}\n"
|
---|
[9940] | 170 | " reqcSkyPlotSignals {Observation signals [character string, list separated by blank character,\n"
|
---|
| 171 | " example: G:1&2&5 R:1&2&3 E:1&7 C:2&6 J:1&2 I:5&9 S:1&5]}\n"
|
---|
[7510] | 172 | " reqcPlotDir {QC plots directory [character string]}\n"
|
---|
[9940] | 173 | " reqcRnxVersion {RINEX version [integer number: 2|3|4]}\n"
|
---|
[8397] | 174 | " reqcSampling {RINEX output file sampling rate [character string: 0.1 sec|1 sec|5 sec|10 sec|15 sec|30 sec|60 sec]}\n"
|
---|
[9940] | 175 | " reqcV2Priority {Version 2 priority of signal attributes [character string, list separated by blank character,\n"
|
---|
| 176 | " example: G:12&PWCSLX G:5&IQX R:12&PC R:3&IQX R:46&ABX E:16&BCXZ E:578&IQX J:1&SLXCZ J:26&SLX J:5&IQX C:267&IQX C:18&DPX I:ABCX S:1&C S:5&IQX]}\n"
|
---|
[7510] | 177 | " reqcStartDateTime {Start time [character string, example: 1967-11-02T00:00:00]}\n"
|
---|
[9942] | 178 | " reqcEndDateTime {Stop time [character string, example: 2099-01-01T00:00:00]}\n"
|
---|
[7510] | 179 | " reqcRunBy {Operators name [character string]}\n"
|
---|
| 180 | " reqcUseObsTypes {Use observation types [character string, list separated by blank character, example: G:C1C G:L1C R:C1C RC1P]}\n"
|
---|
| 181 | " reqcComment {Additional comments [character string]}\n"
|
---|
| 182 | " reqcOldMarkerName {Old marker name [character string]}\n"
|
---|
| 183 | " reqcNewMarkerName {New marker name [character string]}\n"
|
---|
| 184 | " reqcOldAntennaName {Old antenna name [character string]}\n"
|
---|
| 185 | " reqcNewAntennaName {New antenna name [character string]}\n"
|
---|
| 186 | " reqcOldAntennaNumber {Old antenna number [character string]}\n"
|
---|
| 187 | " reqcNewAntennaNumber {New antenna number [character string]}\n"
|
---|
[9783] | 188 | " reqcOldAntennadN {Old north eccentricity [character string]}\n"
|
---|
[7510] | 189 | " reqcNewAntennadN {New north eccentricity [character string]}\n"
|
---|
| 190 | " reqcOldAntennadE {Old east eccentricity [character string]}\n"
|
---|
| 191 | " reqcNewAntennadE {New east eccentricity [character string]}\n"
|
---|
| 192 | " reqcOldAntennadU {Old up eccentricity [character string]}\n"
|
---|
| 193 | " reqcNewAntennadU {New up eccentricity [character string]}\n"
|
---|
| 194 | " reqcOldReceiverName {Old receiver name [character string]}\n"
|
---|
| 195 | " reqcNewReceiverName {New receiver name [character string]}\n"
|
---|
| 196 | " reqcOldReceiverNumber {Old receiver number [character string]}\n"
|
---|
| 197 | " reqcNewReceiverNumber {New receiver number [character string]}\n"
|
---|
[7273] | 198 | "\n"
|
---|
| 199 | "SP3 Comparison Panel keys:\n"
|
---|
[10102] | 200 | " sp3CompFile {SP3 input files, full path [character string, comma separated list in quotation marks]}\n"
|
---|
| 201 | " sp3CompExclude {Satellite exclusion list [character string, comma separated list in quotation marks, example: G04,G31,R]}\n"
|
---|
| 202 | " sp3CompOutLogFile {Output logfile, full path [character string]}\n"
|
---|
| 203 | " sp3CompSummaryOnly {Output only summary of logfile [integer number: 0=no,2=yes]}\n"
|
---|
[7273] | 204 | "\n"
|
---|
| 205 | "Broadcast Corrections Panel keys:\n"
|
---|
[7510] | 206 | " corrPath {Directory for saving files in ASCII format [character string]}\n"
|
---|
| 207 | " corrIntr {File interval [character string: 1 min|2 min|5 min|10 min|15 min|30 min|1 hour|1 day]}\n"
|
---|
| 208 | " corrPort {Output port [integer number]}\n"
|
---|
[7273] | 209 | "\n"
|
---|
| 210 | "Feed Engine Panel keys:\n"
|
---|
[7510] | 211 | " outPort {Output port, synchronized [integer number]}\n"
|
---|
| 212 | " outWait {Wait for full observation epoch [integer number of seconds: 1-30]}\n"
|
---|
[8397] | 213 | " outSampl {Sampling rate [character string: 0.1 sec|1 sec|5 sec|10 sec|15 sec|30 sec|60 sec]}\n"
|
---|
[7510] | 214 | " outFile {Output file, full path [character string]}\n"
|
---|
| 215 | " outUPort {Output port, unsynchronized [integer number]}\n"
|
---|
[7273] | 216 | "\n"
|
---|
| 217 | "Serial Output Panel:\n"
|
---|
[7510] | 218 | " serialMountPoint {Mountpoint [character string]}\n"
|
---|
| 219 | " serialPortName {Port name [character string]}\n"
|
---|
| 220 | " serialBaudRate {Baud rate [integer number: 110|300|600|1200|2400|4800|9600|19200|38400|57600|115200]}\n"
|
---|
| 221 | " serialFlowControl {Flow control [character string: OFF|XONXOFF|HARDWARE}\n"
|
---|
| 222 | " serialDataBits {Data bits [integer number: 5|6|7|8]}\n"
|
---|
| 223 | " serialParity {Parity [character string: NONE|ODD|EVEN|SPACE]}\n"
|
---|
| 224 | " serialStopBits {Stop bits [integer number: 1|2]}\n"
|
---|
| 225 | " serialAutoNMEA {NMEA specification [character string: no|Auto|Manual GPGGA|Manual GNGGA]}\n"
|
---|
| 226 | " serialFileNMEA {NMEA filename, full path [character string]}\n"
|
---|
| 227 | " serialHeightNMEA {Height [floating-point number]}\n"
|
---|
| 228 | " serialHeightNMEASampling {Sampling rate [integer number of seconds: 0|10|20|30|...|280|290|300]}\n"
|
---|
[7273] | 229 | "\n"
|
---|
| 230 | "Outages Panel keys:\n"
|
---|
[7510] | 231 | " adviseObsRate {Stream observation rate [character string: 0.1 Hz|0.2 Hz|0.5 Hz|1 Hz|5 Hz]} \n"
|
---|
| 232 | " adviseFail {Failure threshold [integer number of minutes: 0-60]}\n"
|
---|
| 233 | " adviseReco {Recovery threshold [integer number of minutes: 0-60]}\n"
|
---|
| 234 | " adviseScript {Advisory script, full path [character string]}\n"
|
---|
[7273] | 235 | "\n"
|
---|
| 236 | "Miscellaneous Panel keys:\n"
|
---|
[7510] | 237 | " miscMount {Mountpoint [character string]}\n"
|
---|
| 238 | " miscIntr {Interval for logging latency [character string: Blank|2 sec|10 sec|1 min|5 min|15 min|1 hour|6 hours|1 day]}\n"
|
---|
| 239 | " miscScanRTCM {Scan for RTCM message numbers [integer number: 0=no,2=yes]}\n"
|
---|
| 240 | " miscPort {Output port [integer number]}\n"
|
---|
[7273] | 241 | "\n"
|
---|
| 242 | "PPP Client Panel 1 keys:\n"
|
---|
[7510] | 243 | " PPP/dataSource {Data source [character string: Blank|Real-Time Streams|RINEX Files]}\n"
|
---|
| 244 | " PPP/rinexObs {RINEX observation file, full path [character string]}\n"
|
---|
| 245 | " PPP/rinexNav {RINEX navigation file, full path [character string]}\n"
|
---|
| 246 | " PPP/corrMount {Corrections mountpoint [character string]}\n"
|
---|
| 247 | " PPP/corrFile {Corrections file, full path [character string]}\n"
|
---|
| 248 | " PPP/crdFile {Coordinates file, full path [character string]}\n"
|
---|
| 249 | " PPP/logPath {Directory for PPP log files [character string]}\n"
|
---|
| 250 | " PPP/antexFile {ANTEX file, full path [character string]}\n"
|
---|
[10275] | 251 | #ifdef USE_PPP
|
---|
[9783] | 252 | " PPP/blqFile {BLQ file, full path [character string]}\n"
|
---|
| 253 | " PPP/ionoMount {VTEC mountpoint, [char string]}\n"
|
---|
| 254 | " PPP/ionoFile {VTEC file, full path [char string]}\n"
|
---|
[10275] | 255 | #endif
|
---|
[10127] | 256 | " PPP/nmeaPath {Directory for NMEA output files [character string]}\n"
|
---|
| 257 | " PPP/snxtroPath {Directory for SINEX troposphere output files [character string]}\n"
|
---|
| 258 | " PPP/snxtroIntr {SINEX troposphere file interval [character string: 1 min|2 min|5 min|10 min|15 min|30 min|1 hour|1 day]}\n"
|
---|
| 259 | " PPP/snxtroSampl {SINEX troposphere file sampling rate [character string: 1 sec|5 sec|10 sec|30 sec|60 sec|300 sec]}\n"
|
---|
| 260 | " PPP/snxtroAc {SINEX troposphere Analysis Center [3-char string]}\n"
|
---|
| 261 | " PPP/snxtroSolId {SINEX troposphere solution ID [1-char]}\n"
|
---|
| 262 | " PPP/snxtroSolType {SINEX troposphere solution type, e.g. RTS, UNK, .. [3-char]}\n"
|
---|
| 263 | " PPP/snxtroCampId {SINEX troposphere campaign ID, e.g. DEM, TST, OPS, .. [3-char]}\n"
|
---|
[7273] | 264 | "\n"
|
---|
| 265 | "PPP Client Panel 2 keys:\n"
|
---|
[10327] | 266 | " PPP/lcGPS {Select the kind of linear combination from GPS code and/or phase data [character string: Pi&Li|Pi|P1&L1|P1|P3&L3|P3|L3|no]}\n"
|
---|
| 267 | " PPP/lcGLONASS {Select the kind of linear combination from GLONASS code and/or phase data [character string: Pi&Li|Pi|P1&L1|P1|P3&L3|P3|L3|no]}\n"
|
---|
| 268 | " PPP/lcGalileo {Select the kind of linear combination from Galileo code and/or phase data [character string: Pi&Li|Pi|P1&L1|P1|P3&L3|P3|L3|no]}\n"
|
---|
| 269 | " PPP/lcBDS {Select the kind of linear combination from BDS code and/or phase data [character string: Pi&Li|Pi|P1&L1|P1|P3&L3|P3|L3|no]}\n"
|
---|
[7510] | 270 | " PPP/sigmaC1 {Sigma for code observations in meters [floating-point number]}\n"
|
---|
| 271 | " PPP/sigmaL1 {Sigma for phase observations in meters [floating-point number]}\n"
|
---|
| 272 | " PPP/maxResC1 {Maximal residuum for code observations in meters [floating-point number]}\n"
|
---|
| 273 | " PPP/maxResL1 {Maximal residuum for phase observations in meters [floating-point number]}\n"
|
---|
| 274 | " PPP/eleWgtCode {Elevation dependent waiting of code observations [integer number: 0=no,2=yes]}\n"
|
---|
| 275 | " PPP/eleWgtPhase {Elevation dependent waiting of phase observations [integer number: 0=no,2=yes]}\n"
|
---|
| 276 | " PPP/minObs {Minimum number of observations [integer number: 4|5|6]}\n"
|
---|
| 277 | " PPP/minEle {Minimum satellite elevation in degrees [integer number: 0-20]}\n"
|
---|
[7944] | 278 | " PPP/corrWaitTime {Wait for clock corrections [integer number of seconds: 0-20]}\n"
|
---|
[7510] | 279 | " PPP/seedingTime {Seeding time span for Quick Start [integer number of seconds]}\n"
|
---|
[9940] | 280 | #ifdef USE_PPP
|
---|
[10251] | 281 | " PPP/constraints {Specify, whether ionospheric constraints in form of pseudo-observations shall be added [character string: no|Ionosphere: pseudo-obs]}\n"
|
---|
[9940] | 282 | " PPP/sigmaGIM {Sigma for GIM pseudo observations in meters [floating-point number]}\n"
|
---|
| 283 | " PPP/maxResGIM {Maximal residuum for GIM pseudo observations in meters [floating-point number]}\n"
|
---|
| 284 | #endif
|
---|
[7273] | 285 | "\n"
|
---|
[9938] | 286 | "PPP Client Panel 3 keys:\n"
|
---|
| 287 | " PPP/staTable {Station specifications table [character string, semicolon separated list, each element in quotaion marks, example:\n"
|
---|
[10062] | 288 | " \"WTZR00DEU0,100.0,100.0,100.0,100.0,100.0,100.0,0.1,3e-6,0,G:1&C G:2&W R:1&C R:2&P E:1&C E:5&Q C:26&I;\n"
|
---|
| 289 | " FFMJ00DEU0,100.0,100.0,100.0,100.0,100.0,100.0,0.1,3e-6,0,G:12&W R:12&P E:15&X C:26&I\"]}\n"
|
---|
[9938] | 290 | "\n"
|
---|
[7273] | 291 | "PPP Client Panel 4 keys:\n"
|
---|
[7510] | 292 | " PPP/plotCoordinates {Mountpoint for time series plot [character string]}\n"
|
---|
| 293 | " PPP/audioResponse {Audio response threshold in meters [floating-point number]}\n"
|
---|
| 294 | " PPP/mapWinDotSize {Size of dots on map [integer number: 0-10]}\n"
|
---|
| 295 | " PPP/mapWinDotColor {Color of dots and cross hair on map [character string: red|yellow]}\n"
|
---|
[8869] | 296 | " PPP/mapSpeedSlider {Off-line processing speed for mapping [integer number: 1-100]}\n"
|
---|
[7273] | 297 | "\n"
|
---|
| 298 | "Combine Corrections Panel keys:\n"
|
---|
[10451] | 299 | " cmbStreams {Correction streams table [character string, semicolon separated list, each element in quotation marks, example:\n"
|
---|
| 300 | " \"SSRA00ESA0 ESA 1.0;SSRA00BKG BKG 1.0\"]}\n"
|
---|
| 301 | " cmbMethodFilter {Combination approach [character string: Single-Epoch|Filter]}\n"
|
---|
| 302 | " cmbBsxFile {SINEX Bias file, full path [char string]}\n"
|
---|
| 303 | " cmbMaxres {Clock outlier residuum threshold in meters [floating-point number]}\n"
|
---|
| 304 | " cmbMaxdisplacement {Maximal orbit displacement from the mean of corrections for a satellite [floating-point number]}\n"
|
---|
| 305 | " cmbSampl {Clock sampling rate [integer number of seconds: 0|10|20|30|40|50|60]}\n"
|
---|
[10479] | 306 | " cmbLogpath {Directory for Combination log files [character string]}\n"
|
---|
[10451] | 307 | " cmbGps {GPS correction usage [integer number: 0=no,2=yes]}\n"
|
---|
| 308 | " cmbGlo {GLONASS correction usage [integer number: 0=no,2=yes]}\n"
|
---|
| 309 | " cmbGal {Galileo correction usage [integer number: 0=no,2=yes]}\n"
|
---|
| 310 | " cmbBds {Beidou correction usage [integer number: 0=no,2=yes]}\n"
|
---|
| 311 | " cmbQzss {QZSS correction usage [integer number: 0=no,2=yes]}\n"
|
---|
| 312 | " cmbSbas {SBAS correction usage [integer number: 0=no,2=yes]}\n"
|
---|
| 313 | " cmbIrnss {IRNSS correction usage [integer number: 0=no,2=yes]}\n"
|
---|
[7273] | 314 | "\n"
|
---|
| 315 | "Upload Corrections Panel keys:\n"
|
---|
[7510] | 316 | " uploadMountpointsOut {Upload corrections table [character string, semicolon separated list, each element in quotation marks, example:\n"
|
---|
[9942] | 317 | " \"products.igs-ip.net,2101,SSRA02IGS1,2,usr,pass,IGS20,IGS-SSR,0,/home/user/BKG0MGXRTS${V3PROD}.SP3,/home/user/BKG0MGXRTS${V3PROD}.CLK,/home/user/BKG0MGXRTS${V3PROD}.BIA,258,1,0;\n"
|
---|
[9940] | 318 | " euref-ip.net,2101,SSRA02IGS1_EUREF,2,usr,pass,ETRF2000,RTCM-SSR,0,,,,258,2,0\"]}\n"
|
---|
[9652] | 319 | " uploadIntr {Length of SP3, Clock RINEX and Bias SINEX file interval [character string: 1 min|2 min|5 min|10 min|15 min|30 min|1 hour|1 day]}\n"
|
---|
[7510] | 320 | " uploadSamplRtcmEphCorr {Orbit corrections stream sampling rate [integer number of seconds: 0|5|10|15|20|25|30|35|40|45|50|55|60]}\n"
|
---|
[10095] | 321 | " uploadSamplSp3 {SP3 file sampling rate [integer number of seconds: 0 sec|30 sec|60 sec|300 sec|900 sec]}\n"
|
---|
[7510] | 322 | " uploadSamplClkRnx {Clock RINEX file sampling rate [integer number of seconds: 0|5|10|15|20|25|30|35|40|45|50|55|60]}\n"
|
---|
[10542] | 323 | " uploadSamplBiaSnx {SINEX Bias file sampling rate [integer number of seconds: 0|5|10|15|20|25|30|35|40|45|50|55|60]}\n"
|
---|
[7273] | 324 | "\n"
|
---|
| 325 | "Custom Trafo keys:\n"
|
---|
[7510] | 326 | " trafo_dx {Translation X in meters [floating-point number]\n"
|
---|
| 327 | " trafo_dy {Translation Y in meters [floating-point number]\n"
|
---|
| 328 | " trafo_dz {Translation Z in meters [floating-point number]\n"
|
---|
| 329 | " trafo_dxr {Translation change X in meters per year [floating-point number]\n"
|
---|
| 330 | " trafo_dyr {Translation change Y in meters per year [floating-point number]\n"
|
---|
| 331 | " trafo_dzr {Translation change Z in meters per year [floating-point number]\n"
|
---|
| 332 | " trafo_ox {Rotation X in arcsec [floating-point number]}\n"
|
---|
| 333 | " trafo_oy {Rotation Y in arcsec [floating-point number]}\n"
|
---|
| 334 | " trafo_oz {Rotation Z in arcsec [floating-point number]}\n"
|
---|
| 335 | " trafo_oxr {Rotation change X in arcsec per year [floating-point number]}\n"
|
---|
| 336 | " trafo_oyr {Rotation change Y in arcsec per year [floating-point number]}\n"
|
---|
| 337 | " trafo_ozr {Rotation change Z in arcsec per year [floating-point number]}\n"
|
---|
| 338 | " trafo_sc {Scale [10^-9, floating-point number]}\n"
|
---|
| 339 | " trafo_scr {Scale change [10^-9 per year, floating-point number]}\n"
|
---|
| 340 | " trafo_t0 {Reference year [integer number]}\n"
|
---|
[7273] | 341 | "\n"
|
---|
| 342 | "Upload Ephemeris Panel keys:\n"
|
---|
[7889] | 343 | " uploadEphMountpointsOut {Upload corrections table [character string, semicolon separated list, each element in quotation marks, example:\n"
|
---|
[9940] | 344 | " \"products.igs-ip.net,443,BCEP00BKG0,2s,usr,pass,ALL;products.igs-ip.net,443,BCEP01BKG0,2s,usr,pass,G\"]}\n"
|
---|
[7889] | 345 | " uploadSamplRtcmEph {Stream upload sampling rate [integer number of seconds: 0|5|10|15|20|25|30|35|40|45|50|55|60]}\n"
|
---|
[7273] | 346 | "\n"
|
---|
| 347 | "Add Stream keys:\n"
|
---|
[7510] | 348 | " mountPoints {Mountpoints [character string, semicolon separated list, example:\n"
|
---|
[9940] | 349 | " \"//user:pass@igs-ip.net:2101/FFMJ00DEU0 RTCM_3.3 DEU 50.09 8.66 no 2;//user:pass@mgex.igs-ip.net:2101/CUT000AUS0 RTCM_3.0 ETH 9.03 38.74 no 2\"}\n"
|
---|
[7510] | 350 | " ntripVersion {Ntrip Version [character string: 1|2|2s|R|U]}\n"
|
---|
| 351 | " casterUrlList {Visited Broadcasters [character string, comma separated list]}\n"
|
---|
[7283] | 352 | "\n"
|
---|
[7541] | 353 | "Appearance keys:\n"
|
---|
| 354 | " startTab {Index of top panel to be presented at start time [integer number: 0-17]}\n"
|
---|
| 355 | " statusTab {Index of bottom panel to be presented at start time [integer number: 0-3]}\n"
|
---|
| 356 | " font {Font specification [character string in quotation marks, example: \"Helvetica,14,-1,5,50,0,0,0,0,0\"]}\n"
|
---|
| 357 | "\n"
|
---|
[7477] | 358 | "Note:\n"
|
---|
[7841] | 359 | "The syntax of some command line configuration options slightly differs from that\n"
|
---|
| 360 | "used in configuration files: Configuration file options which contain one or more blank\n"
|
---|
| 361 | "characters or contain a semicolon separated parameter list must be enclosed by quotation\n"
|
---|
| 362 | "marks when specified on command line.\n"
|
---|
[7477] | 363 | "\n"
|
---|
| 364 | "Examples command lines:\n"
|
---|
[7284] | 365 | "(1) /home/weber/bin/bnc\n"
|
---|
| 366 | "(2) /Applications/bnc.app/Contents/MacOS/bnc\n"
|
---|
[9940] | 367 | "(3) /home/userName/bin/bnc --conf /home/userName/MyConfigFile.bnc\n"
|
---|
| 368 | "(4) bnc --conf /Users/userName/.config/BKG/BNC.bnc -nw\n"
|
---|
[7284] | 369 | "(5) bnc --conf /dev/null --key startTab 4 --key reqcAction Edit/Concatenate"
|
---|
[9940] | 370 | " --key reqcObsFile BRUX00BEL_S_20211251100_15M_01S_MO.rnx --key reqcOutObsFile BRUX00BEL_S_20211251100_15M_01S_MO_OUT.rnx"
|
---|
| 371 | " --key reqcRnxVersion 2 --key reqcSampling \"30 sec\" --key reqcV2Priority \"G:12&PWCSLX G:5&IQX\"\n"
|
---|
| 372 | "(6) bnc --conf /dev/null --key mountPoints \"//user:pass@mgex.igs-ip.net:2101/CUT000AUS0 RTCM_3.0 ETH 9.03 38.74 no 2;"
|
---|
[9404] | 373 | "//user:pass@igs-ip.net:2101/FFMJ00DEU1 RTCM_3.1 DEU 50.09 8.66 no 2\"\n"
|
---|
[9940] | 374 | "(7) bnc --conf /dev/null --key startTab 15 --key cmbStreams \"SSRA00BKG1 BKG 1.0;SSRA00CNE1 CNES 1.0\"\n"
|
---|
[9942] | 375 | "(8) bnc --conf /dev/null --key startTab 16 --key uploadMountpointsOut \"products.igs-ip.net,2101,SSRC00BKG1,2,usr,pass,IGS20,RTCM-SSR,2,/Users/userName/BKG0MGXRTS${V3PROD}.SP3,,,33,3,2;"
|
---|
[9940] | 376 | "euref-ip.net,443,SSRA00BKG1_EUREF,2s,usr,pass,ETRF2000,IGS-SSR,0,,,,33,5,5\"\n"
|
---|
[10062] | 377 | "(9) bnc --conf /dev/null --key startTab 13 --key PPP/dataSource \"Real-Time Streams\" --key PPP/staTable \"FFMJ00DEU1,100.0,100.0,100.0,100.0,100.0,100.0,0.1,3e-6,7777,G:12&W R:12&P E:1&C E:5&Q C:26&I;"
|
---|
| 378 | "CUT000AUS0,100.0,100.0,100.0,100.0,100.0,100.0,0.1,3e-6,7778,G:1&C G:2&W R:12&P E:15&X C:26&I\"\n";
|
---|
[3977] | 379 |
|
---|
[8869] | 380 |
|
---|
[100] | 381 | for (int ii = 1; ii < argc; ii++) {
|
---|
[3977] | 382 | if (QRegExp("--?help").exactMatch(argv[ii])) {
|
---|
| 383 | cout << printHelp.data();
|
---|
[10280] | 384 | exit(0);
|
---|
[3977] | 385 | }
|
---|
| 386 | if (QRegExp("--?nw").exactMatch(argv[ii])) {
|
---|
[4446] | 387 | interactive = false;
|
---|
[100] | 388 | }
|
---|
[7268] | 389 | if (QRegExp("--?version").exactMatch(argv[ii])) {
|
---|
| 390 | cout << BNCPGMNAME << endl;
|
---|
[10280] | 391 | exit(0);
|
---|
[7268] | 392 | }
|
---|
[4490] | 393 | if (QRegExp("--?display").exactMatch(argv[ii])) {
|
---|
| 394 | displaySet = true;
|
---|
[4492] | 395 | strcpy(argv[ii], "-display"); // make it "-display" not "--display"
|
---|
[4490] | 396 | }
|
---|
[1552] | 397 | if (ii + 1 < argc) {
|
---|
[3977] | 398 | if (QRegExp("--?conf").exactMatch(argv[ii])) {
|
---|
[1552] | 399 | confFileName = QString(argv[ii+1]);
|
---|
[1146] | 400 | }
|
---|
[3977] | 401 | if (QRegExp("--?file").exactMatch(argv[ii])) {
|
---|
[4446] | 402 | interactive = false;
|
---|
[1553] | 403 | rawFileName = QByteArray(argv[ii+1]);
|
---|
[1552] | 404 | }
|
---|
[1156] | 405 | }
|
---|
[1146] | 406 | }
|
---|
| 407 |
|
---|
[4162] | 408 | #ifdef Q_OS_MAC
|
---|
[4446] | 409 | if (argc== 3 && interactive) {
|
---|
[4162] | 410 | confFileName = QString(argv[2]);
|
---|
| 411 | }
|
---|
| 412 | #else
|
---|
[4446] | 413 | if (argc == 2 && interactive) {
|
---|
[1585] | 414 | confFileName = QString(argv[1]);
|
---|
| 415 | }
|
---|
[4162] | 416 | #endif
|
---|
[1585] | 417 |
|
---|
[6548] | 418 | #ifdef Q_OS_MACX
|
---|
| 419 | if ( QSysInfo::MacintoshVersion > QSysInfo::MV_10_8 )
|
---|
| 420 | {
|
---|
| 421 | // fix Mac OS X 10.9 (mavericks) font issue
|
---|
| 422 | // https://bugreports.qt-project.org/browse/QTBUG-32789
|
---|
| 423 | QFont::insertSubstitution(".Lucida Grande UI", "Lucida Grande");
|
---|
| 424 | }
|
---|
| 425 | #endif
|
---|
| 426 |
|
---|
[4491] | 427 | bool GUIenabled = interactive || displaySet;
|
---|
[8897] | 428 | QScopedPointer<QCoreApplication> app(createApplication(argc, argv, GUIenabled));
|
---|
[1516] | 429 |
|
---|
[8897] | 430 | if (qobject_cast<QApplication *>(app.data())) { // start GUI version
|
---|
| 431 | app->setApplicationName("BNC");
|
---|
| 432 | app->setOrganizationName("BKG");
|
---|
[10073] | 433 | app->setOrganizationDomain("www.bkg.bund.de"); //app->setWindowIcon(QPixmap(":ntrip-logo.png"));
|
---|
[8897] | 434 | BNC_CORE->setGUIenabled(GUIenabled);
|
---|
| 435 | }
|
---|
[5068] | 436 | BNC_CORE->setConfFileName( confFileName );
|
---|
[1538] | 437 |
|
---|
[1535] | 438 | bncSettings settings;
|
---|
[1503] | 439 |
|
---|
[8909] | 440 | // Proxy Settings
|
---|
| 441 | // --------------
|
---|
| 442 | QString proxyHost = settings.value("proxyHost").toString();
|
---|
| 443 | int proxyPort = settings.value("proxyPort").toInt();
|
---|
| 444 | if (!proxyHost.isEmpty()) {
|
---|
| 445 | QNetworkProxy proxy;
|
---|
| 446 | proxy.setType(QNetworkProxy::HttpProxy);
|
---|
| 447 | proxy.setHostName(proxyHost);
|
---|
| 448 | proxy.setPort(proxyPort);
|
---|
| 449 | QNetworkProxy::setApplicationProxy(proxy);
|
---|
| 450 | }
|
---|
[9151] | 451 | else {
|
---|
| 452 | QNetworkProxyFactory::setUseSystemConfiguration(true);
|
---|
| 453 | }
|
---|
[8909] | 454 |
|
---|
[3976] | 455 | for (int ii = 1; ii < argc - 2; ii++) {
|
---|
[3978] | 456 | if (QRegExp("--?key").exactMatch(argv[ii])) {
|
---|
[3976] | 457 | QString key(argv[ii+1]);
|
---|
| 458 | QString val(argv[ii+2]);
|
---|
[7476] | 459 | if (val.indexOf(";") != -1) {
|
---|
[10548] | 460 | settings.setValue(key, val.split(";", Qt::SkipEmptyParts));
|
---|
[7293] | 461 | }
|
---|
| 462 | else {
|
---|
| 463 | settings.setValue(key, val);
|
---|
| 464 | }
|
---|
[3976] | 465 | }
|
---|
| 466 | }
|
---|
| 467 |
|
---|
[10465] | 468 | // Interactive Mode - open the main window
|
---|
[8909] | 469 | // -----------------------------------------
|
---|
[4446] | 470 | if (interactive) {
|
---|
[113] | 471 |
|
---|
[5072] | 472 | BNC_CORE->setMode(t_bncCore::interactive);
|
---|
[3280] | 473 |
|
---|
[113] | 474 | QString fontString = settings.value("font").toString();
|
---|
| 475 | if ( !fontString.isEmpty() ) {
|
---|
| 476 | QFont newFont;
|
---|
| 477 | if (newFont.fromString(fontString)) {
|
---|
| 478 | QApplication::setFont(newFont);
|
---|
| 479 | }
|
---|
| 480 | }
|
---|
[7268] | 481 |
|
---|
[7640] | 482 | bncWin = new bncWindow();
|
---|
[5068] | 483 | BNC_CORE->setMainWindow(bncWin);
|
---|
[35] | 484 | bncWin->show();
|
---|
| 485 | }
|
---|
[180] | 486 |
|
---|
[7268] | 487 | // Post-Processing PPP
|
---|
[6343] | 488 | // -------------------
|
---|
| 489 | else if (settings.value("PPP/dataSource").toString() == "RINEX Files") {
|
---|
[7640] | 490 | caster = new bncCaster();
|
---|
[6343] | 491 | BNC_CORE->setCaster(caster);
|
---|
| 492 | BNC_CORE->setMode(t_bncCore::batchPostProcessing);
|
---|
| 493 | BNC_CORE->startPPP();
|
---|
| 494 | }
|
---|
| 495 |
|
---|
[3974] | 496 | // Post-Processing reqc edit
|
---|
| 497 | // -------------------------
|
---|
[5864] | 498 | else if (settings.value("reqcAction").toString() == "Edit/Concatenate") {
|
---|
[5072] | 499 | BNC_CORE->setMode(t_bncCore::batchPostProcessing);
|
---|
[7640] | 500 | reqcEdit = new t_reqcEdit(0);
|
---|
[3974] | 501 | reqcEdit->start();
|
---|
| 502 | }
|
---|
| 503 |
|
---|
[3975] | 504 | // Post-Processing reqc analyze
|
---|
| 505 | // ----------------------------
|
---|
| 506 | else if (settings.value("reqcAction").toString() == "Analyze") {
|
---|
[5072] | 507 | BNC_CORE->setMode(t_bncCore::batchPostProcessing);
|
---|
[7640] | 508 | reqcAnalyze = new t_reqcAnalyze(0);
|
---|
[3975] | 509 | reqcAnalyze->start();
|
---|
| 510 | }
|
---|
| 511 |
|
---|
[6343] | 512 | // SP3 Files Comparison
|
---|
| 513 | // --------------------
|
---|
| 514 | else if (!settings.value("sp3CompFile").toString().isEmpty()) {
|
---|
[5926] | 515 | BNC_CORE->setMode(t_bncCore::batchPostProcessing);
|
---|
[7640] | 516 | sp3Comp = new t_sp3Comp(0);
|
---|
[6343] | 517 | sp3Comp->start();
|
---|
[5926] | 518 | }
|
---|
| 519 |
|
---|
[3974] | 520 | // Non-Interactive (data gathering)
|
---|
| 521 | // --------------------------------
|
---|
[35] | 522 | else {
|
---|
[621] | 523 |
|
---|
[9154] | 524 | signal(SIGINT, catch_SIGINT);
|
---|
[10465] | 525 | signal(SIGTERM, catch_SIGTERM);
|
---|
[10470] | 526 | BNC_CORE->sigintReceived = 0;
|
---|
| 527 | #ifndef WIN32
|
---|
[10465] | 528 | signal(SIGHUP, catch_SIGHUP);
|
---|
[10470] | 529 | #endif
|
---|
[1138] | 530 |
|
---|
[7640] | 531 | casterEph = new bncEphUploadCaster(); (void) casterEph;
|
---|
[7268] | 532 |
|
---|
[7640] | 533 | caster = new bncCaster();
|
---|
[7268] | 534 |
|
---|
[5068] | 535 | BNC_CORE->setCaster(caster);
|
---|
[7327] | 536 | BNC_CORE->setPortEph(settings.value("ephOutPort").toInt());
|
---|
[5068] | 537 | BNC_CORE->setPortCorr(settings.value("corrPort").toInt());
|
---|
| 538 | BNC_CORE->initCombination();
|
---|
[7268] | 539 |
|
---|
[8897] | 540 | BNC_CORE->connect(caster, SIGNAL(getThreadsFinished()), app->instance(), SLOT(quit()));
|
---|
[9822] | 541 |
|
---|
[8231] | 542 | BNC_CORE->slotMessage("========== Start BNC v" BNCVERSION " (" BNC_OS ") ==========", true);
|
---|
[5845] | 543 |
|
---|
[8870] | 544 |
|
---|
[1170] | 545 | // Normal case - data from Internet
|
---|
| 546 | // --------------------------------
|
---|
[3974] | 547 | if ( rawFileName.isEmpty() ) {
|
---|
[5072] | 548 | BNC_CORE->setMode(t_bncCore::nonInteractive);
|
---|
[5946] | 549 | BNC_CORE->startPPP();
|
---|
[5905] | 550 |
|
---|
[4250] | 551 | caster->readMountPoints();
|
---|
[1170] | 552 | if (caster->numStations() == 0) {
|
---|
[9852] | 553 | BNC_CORE->slotMessage("bncMain: number of caster stations: 0 => exit" , true);
|
---|
[9854] | 554 | exit(3);
|
---|
[1170] | 555 | }
|
---|
| 556 | }
|
---|
[7268] | 557 |
|
---|
[1170] | 558 | // Special case - data from file
|
---|
| 559 | // -----------------------------
|
---|
| 560 | else {
|
---|
[5072] | 561 | BNC_CORE->setMode(t_bncCore::batchPostProcessing);
|
---|
[5946] | 562 | BNC_CORE->startPPP();
|
---|
[5905] | 563 |
|
---|
[7640] | 564 | rawFile = new bncRawFile(rawFileName, "", bncRawFile::input);
|
---|
| 565 | getThread = new bncGetThread(rawFile);
|
---|
[2528] | 566 | caster->addGetThread(getThread, true);
|
---|
[35] | 567 | }
|
---|
[10465] | 568 |
|
---|
[35] | 569 | }
|
---|
[180] | 570 |
|
---|
| 571 | // Start the application
|
---|
| 572 | // ---------------------
|
---|
[8897] | 573 | app->exec();
|
---|
[9822] | 574 |
|
---|
| 575 | // End of application
|
---|
| 576 | // ------------------
|
---|
[7640] | 577 | if (interactive) {
|
---|
| 578 | delete bncWin;
|
---|
| 579 | }
|
---|
[7854] | 580 | else {
|
---|
| 581 | BNC_CORE->stopPPP();
|
---|
| 582 | BNC_CORE->stopCombination();
|
---|
[10275] | 583 | #ifndef WIN32
|
---|
| 584 | sleep(2);
|
---|
| 585 | #else
|
---|
| 586 | Sleep(2000);
|
---|
| 587 | #endif
|
---|
[7854] | 588 | }
|
---|
[7640] | 589 | if (caster) {
|
---|
[7854] | 590 | delete caster; caster = 0; BNC_CORE->setCaster(0);
|
---|
[7640] | 591 | }
|
---|
| 592 | if (casterEph) {
|
---|
[7854] | 593 | delete casterEph; casterEph = 0;
|
---|
[7640] | 594 | }
|
---|
| 595 | if (rawFile) {
|
---|
| 596 | delete rawFile;
|
---|
| 597 | }
|
---|
[8897] | 598 |
|
---|
[7640] | 599 | return 0;
|
---|
[35] | 600 | }
|
---|