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