Changeset 7506 in ntrip
- Timestamp:
- Oct 13, 2015, 3:19:43 PM (9 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncmain.cpp
r7504 r7506 203 203 " PPP/corrFile <Corrections file>\n" 204 204 " PPP/crdFile <Coordinates file>\n" 205 " PPP/pppPath <Directory for PPP log file>\n"206 205 " PPP/antexFile <ANTEX file>\n" 206 " PPP/logPath <Directory for PPP log file>\n" 207 207 " PPP/nmeaPath <Directory for NMEA output file>\n" 208 208 " PPP/snxtroPath <Directory for SINEX troposphere output file>\n" 209 " PPP/v3filenames <Produce version 3 filenames, 0=no, 2=yes>\n" 209 210 " 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" 210 211 " PPP/snxtroSampl <SINEX troposphere file sampling rate [integer number of seconds: 0,30,60,90,120,150,180,210,240,270,300]>\n" -
trunk/BNC/src/bncoutf.cpp
r6607 r7506 12 12 * Created: 25-Apr-2008 13 13 * 14 * Changes: 14 * Changes: 15 15 * 16 16 * -----------------------------------------------------------------------*/ … … 39 39 _path = fileInfo.absolutePath() + QDir::separator(); 40 40 _sklBaseName = fileInfo.baseName(); 41 _extension = fileInfo.completeSuffix(); 42 41 _extension = fileInfo.completeSuffix(); 42 43 43 expandEnvVar(_path); 44 44 if (!_extension.isEmpty()) { … … 48 48 49 49 _append = Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked; 50 _v3filenames = settings.value("PPP/v3filenames").toBool(); 50 51 } 51 52 … … 64 65 // Epoch String 65 66 //////////////////////////////////////////////////////////////////////////// 66 QString bncoutf::epochStr(const QDateTime& datTim, const QString& intStr) { 67 68 QString epoStr; 67 QString bncoutf::epochStr(const QDateTime& datTim, const QString& intStr, 68 int sampl) { 69 70 QString epoStr = ""; 69 71 70 72 int indHlp = intStr.indexOf("min"); 73 if (!sampl) { 74 sampl++; 75 } 71 76 72 77 if ( indHlp != -1) { 73 78 int step = intStr.left(indHlp-1).toInt(); 74 char ch = 'A' + datTim.time().hour(); 75 epoStr = QString("_") + ch; 79 if (_v3filenames) { 80 epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H 81 } else { 82 epoStr += 'A' + datTim.time().hour(); 83 } 84 76 85 if (datTim.time().minute() >= 60-step) { 77 epoStr += QString("%1").arg(60-step, 2, 10, QChar('0')); 86 epoStr += QString("%1").arg(60-step, 2, 10, QChar('0')); // M 78 87 } 79 88 else { 80 89 for (int limit = step; limit <= 60-step; limit += step) { 81 90 if (datTim.time().minute() < limit) { 82 epoStr += QString("%1").arg(limit-step, 2, 10, QChar('0')); 91 epoStr += QString("%1").arg(limit-step, 2, 10, QChar('0')); // M 83 92 break; 84 93 } 85 94 } 86 95 } 96 97 if (_v3filenames) { 98 epoStr += QString("_%1M").arg(step, 2, 10, QChar('0')); // period 99 } 100 87 101 _numSec = 60 * step; 88 102 } 89 103 else if (intStr == "1 hour") { 90 char ch = 'A' + datTim.time().hour(); 91 epoStr = QString("_") + ch; 104 int step = intStr.left(indHlp-1).toInt(); 105 if (_v3filenames) { 106 epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H 107 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // M 108 epoStr += QString("_%1H").arg(step+1, 2, 10, QChar('0')); // period 109 } else { 110 epoStr += 'A' + datTim.time().hour(); 111 } 92 112 _numSec = 3600; 93 113 } 94 114 else { 95 epoStr = ""; 115 int step = intStr.left(indHlp-1).toInt(); 116 if (_v3filenames) { 117 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // H 118 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // M 119 epoStr += QString("_%1D").arg(step+1, 2, 10, QChar('0')); // period 120 } else { 121 epoStr = "0"; 122 } 96 123 _numSec = 86400; 124 } 125 126 if (_v3filenames) { 127 if (sampl < 60) { 128 epoStr += QString("_%1S").arg(sampl, 2, 10, QChar('0')); 129 } 130 else { 131 sampl /= 60; 132 epoStr += QString("_%1M").arg(sampl, 2, 10, QChar('0')); 133 } 97 134 } 98 135 … … 111 148 112 149 QString yyyy = QString::number(datTim.date().year()); 113 QString doy = QString("%1 %2").arg(dayOfYear,3,10, QLatin1Char('0')).arg(0);150 QString doy = QString("%1").arg(dayOfYear,3,10, QLatin1Char('0')); 114 151 QString gpswd = QString("%1%2").arg(GPSweek).arg(dayOfWeek); 115 QString epoStr = epochStr(datTim, _intr );116 QString baseName = _sklBaseName; 152 QString epoStr = epochStr(datTim, _intr, _sampl); 153 QString baseName = _sklBaseName; 117 154 baseName.replace("${GPSWD}", gpswd); 118 baseName.replace("${DATE}" , datTim.date().toString(Qt::ISODate)); 119 baseName.replace("${DOY}" , doy); 120 _extension.replace("${YY}" , yyyy.right(2)); 155 baseName.replace("${V3}" , QString("_U_%1%2").arg(yyyy).arg(doy)); 156 121 157 return _path + baseName + epoStr + _extension; 122 158 } -
trunk/BNC/src/bncoutf.h
r4380 r7506 23 23 24 24 private: 25 QString epochStr(const QDateTime& datTim, const QString& intStr); 25 QString epochStr(const QDateTime& datTim, const QString& intStr, 26 int sampl); 26 27 QString resolveFileName(int GPSweek, const QDateTime& datTim); 27 28 … … 33 34 QString _fName; 34 35 bool _append; 36 bool _v3filenames; 35 37 }; 36 38 -
trunk/BNC/src/bncwindow.cpp
r7497 r7506 865 865 _pppWidgets._crdFile->setMaximumWidth(35*ww); 866 866 _pppWidgets._antexFile->setMaximumWidth(35*ww); 867 _pppWidgets._snxtro File->setMaximumWidth(35*ww);867 _pppWidgets._snxtroPath->setMaximumWidth(35*ww); 868 868 _pppWidgets._snxtroIntr->setMaximumWidth(15*ww); 869 869 … … 887 887 pppLayout1->addWidget(new QLabel("Coordinates"), ir, 0); 888 888 pppLayout1->addWidget(_pppWidgets._crdFile, ir, 1); 889 pppLayout1->addWidget(new QLabel(" Logfile "),ir, 3);890 pppLayout1->addWidget(_pppWidgets._log File, ir, 4, 1, 3);889 pppLayout1->addWidget(new QLabel(" Logfile Directory"), ir, 3); 890 pppLayout1->addWidget(_pppWidgets._logPath, ir, 4, 1, 3); 891 891 ++ir; 892 892 pppLayout1->addWidget(new QLabel("ANTEX file"), ir, 0); 893 893 pppLayout1->addWidget(_pppWidgets._antexFile, ir, 1); 894 894 895 pppLayout1->addWidget(new QLabel(" NMEA file"),ir, 3);896 pppLayout1->addWidget(_pppWidgets._nmea File, ir, 4, 1, 3);897 898 ++ir; 899 pppLayout1->addWidget(new QLabel("SNX TRO file"),ir, 0);900 pppLayout1->addWidget(_pppWidgets._snxtro File, ir, 1);895 pppLayout1->addWidget(new QLabel(" NMEA Directory"), ir, 3); 896 pppLayout1->addWidget(_pppWidgets._nmeaPath, ir, 4, 1, 3); 897 898 ++ir; 899 pppLayout1->addWidget(new QLabel("SNX TRO directory"), ir, 0); 900 pppLayout1->addWidget(_pppWidgets._snxtroPath, ir, 1); 901 901 pppLayout1->addWidget(new QLabel(" SNX TRO interval"), ir, 3); 902 902 pppLayout1->addWidget(_pppWidgets._snxtroIntr, ir, 4); 903 903 pppLayout1->addWidget(new QLabel(" SNX TRO sampling"), ir, 5, Qt::AlignRight); 904 904 pppLayout1->addWidget(_pppWidgets._snxtroSampl, ir, 6, Qt::AlignRight); 905 ++ir; 906 pppLayout1->addWidget(new QLabel("Version 3 filenames"), ir, 0); 907 pppLayout1->addWidget(_pppWidgets._v3filenames, ir, 1); 905 908 906 909 ++ir; … … 924 927 _pppWidgets._corrFile->setWhatsThis(tr("<p>Specify the Broadcast Ephemeris Corrections file as saved beforehand using BNC.</p><p>If you don't specify corrections through this option, BNC will fall back to Single Point Positioning (SPP, positioning from RINEX Obs and RINEX Nav files only) instead of doing PPP.</p>")); 925 928 926 _pppWidgets._log File->setWhatsThis(tr("<p>Specify the path to daily PPP logfiles using e.g. the following syntax (example):</p><p> ./PPP_${STATION}_${DATE}.log</p><p>BNC will produce one daily PPP logfile per station. Variable ${STATION} stands for the affected station and ${DATE} stands for the date.</p>"));927 928 _pppWidgets._nmea File->setWhatsThis(tr("<p>Specify the path to daily NMEA files using e.g. the following syntax (example):</p><p> ./PPP_${STATION}_${DATE}.nmea</p><p>BNC will produce one daily NMEA file per station, mainly to save NMEA GGA sentences from the PPP solution. Variable ${STATION} stands for the affected station and ${DATE} stands for the date.</p>"));929 930 _pppWidgets._snxtro File->setWhatsThis(tr("<p>Specify a path for saving SINEX Troposphere files on disk using e.g. the following syntax (example):</p><p> ./PPP_${STATION}${DOY}.${YY}.zpd</p><p>BNC will produce files per station to save troposphere parameters from the PPP solution in SINEX Troposphere format. Variable ${STATION} stands for the affected station, ${DOY} stands for the Day Of Year, and ${YY} for the year.</p>"));929 _pppWidgets._logPath->setWhatsThis(tr("<p>Specify the path to daily PPP logfiles using e.g. the following syntax (example):</p><p> ./PPP_${STATION}_${DATE}.log</p><p>BNC will produce one daily PPP logfile per station. Variable ${STATION} stands for the affected station and ${DATE} stands for the date.</p>")); 930 931 _pppWidgets._nmeaPath->setWhatsThis(tr("<p>Specify the path to daily NMEA files using e.g. the following syntax (example):</p><p> ./PPP_${STATION}_${DATE}.nmea</p><p>BNC will produce one daily NMEA file per station, mainly to save NMEA GGA sentences from the PPP solution. Variable ${STATION} stands for the affected station and ${DATE} stands for the date.</p>")); 932 933 _pppWidgets._snxtroPath->setWhatsThis(tr("<p>Specify a path for saving SINEX Troposphere files on disk using e.g. the following syntax (example):</p><p> ./PPP_${STATION}${DOY}.${YY}.zpd</p><p>BNC will produce files per station to save troposphere parameters from the PPP solution in SINEX Troposphere format. Variable ${STATION} stands for the affected station, ${DOY} stands for the Day Of Year, and ${YY} for the year.</p>")); 931 934 932 935 _pppWidgets._snxtroSampl->setWhatsThis(tr("<p>Select a 'Sampling' rate for saving troposphere paramers.</p><p>Default 'Sampling' rate is '0', meaning that all troposphere estimates will be saved on disk.</p>")); -
trunk/BNC/src/pppRun.cpp
r7301 r7506 137 137 _stopFlag = false; 138 138 139 QString roverName(_opt->_roverName.c_str()); 140 141 QString logFileSkl = settings.value("PPP/logFilePPP").toString(); 139 QString roverName(_opt->_roverName.c_str()), fullRoverName(""); 140 QString country; 141 QString monNum = "0"; 142 QString recNum = "0"; 143 QString intr = "1 day"; 144 int sampl = 0; 145 QListIterator<QString> it(settings.value("mountPoints").toStringList()); 146 while (it.hasNext()) { 147 QStringList hlp = it.next().split(" "); 148 if (hlp.size() < 7) 149 continue; 150 if (hlp.join(" ").indexOf(roverName, 0) != -1) { 151 country = hlp[2]; 152 } 153 } 154 fullRoverName = roverName.left(4) + 155 QString("%1").arg(monNum, 1, 10) + 156 QString("%1").arg(recNum, 1, 10) + 157 country; 158 159 bool v3filenames = settings.value("PPP/v3filenames").toBool(); 160 QString logFileSkl = settings.value("PPP/logPath").toString(); 142 161 if (logFileSkl.isEmpty()) { 143 162 _logFile = 0; 144 163 } 145 164 else { 146 if ( logFileSkl.indexOf("${STATION}") == -1) {147 logFileSkl = logFileSkl + "_" + roverName;165 if (v3filenames) { 166 logFileSkl = logFileSkl + fullRoverName + "${V3}" + ".ppp"; 148 167 } 149 168 else { 150 logFileSkl .replace("${STATION}", roverName);151 } 152 _logFile = new bncoutf(logFileSkl, "1 day", 0);153 } 154 155 QString nmeaFileSkl = settings.value("PPP/nmea File").toString();169 logFileSkl = logFileSkl + roverName.left(4) + "${GPSWD}" + ".ppp"; 170 } 171 _logFile = new bncoutf(logFileSkl, intr, sampl); 172 } 173 174 QString nmeaFileSkl = settings.value("PPP/nmeaPath").toString(); 156 175 if (nmeaFileSkl.isEmpty()) { 157 176 _nmeaFile = 0; 158 177 } 159 178 else { 160 if ( nmeaFileSkl.indexOf("${STATION}") == -1) {161 nmeaFileSkl = roverName + "_" + nmeaFileSkl;179 if (v3filenames) { 180 nmeaFileSkl = nmeaFileSkl + fullRoverName + "${V3}" + ".nmea"; 162 181 } 163 182 else { 164 nmeaFileSkl .replace("${STATION}", roverName);165 } 166 _nmeaFile = new bncoutf(nmeaFileSkl, "1 day", 0);167 } 168 169 QString snxtroFileSkl = settings.value("PPP/snxtro File").toString();183 nmeaFileSkl = nmeaFileSkl + roverName.left(4) + "${GPSWD}" + ".nmea"; 184 } 185 _nmeaFile = new bncoutf(nmeaFileSkl, intr, sampl); 186 } 187 188 QString snxtroFileSkl = settings.value("PPP/snxtroPath").toString(); 170 189 if (snxtroFileSkl.isEmpty()) { 171 190 _snxtroFile = 0; 172 191 } 173 192 else { 174 if ( snxtroFileSkl.indexOf("${STATION}") == -1) {175 snxtroFileSkl = snxtroFileSkl + "_" + roverName;193 if (v3filenames) { 194 snxtroFileSkl = snxtroFileSkl + fullRoverName + "${V3}" + ".tra"; 176 195 } 177 196 else { 178 snxtroFileSkl.replace("${STATION}", roverName.left(4)); 179 } 180 int samplSnxTro = settings.value("PPP/snxtroSampl").toInt(); 181 _snxtroFile = new bncSinexTro(_opt, snxtroFileSkl, "1 day", samplSnxTro); 197 snxtroFileSkl = snxtroFileSkl + roverName.left(4) + "${GPSWD}" + ".tro"; 198 } 199 sampl = settings.value("PPP/snxtroSampl").toInt(); 200 intr = settings.value("PPP/snxtroIntr").toString(); 201 _snxtroFile = new bncSinexTro(_opt, snxtroFileSkl, intr, sampl); 182 202 } 183 203 } -
trunk/BNC/src/pppWidgets.cpp
r7500 r7506 59 59 _crdFile = new qtFileChooser(); _crdFile ->setObjectName("PPP/crdFile"); _widgets << _crdFile; 60 60 _antexFile = new qtFileChooser(); _antexFile ->setObjectName("PPP/antexFile"); _widgets << _antexFile; 61 _log File = new QLineEdit(); _logFile ->setObjectName("PPP/logFilePPP"); _widgets << _logFile;62 _nmea File = new QLineEdit(); _nmeaFile ->setObjectName("PPP/nmeaFile"); _widgets << _nmeaFile;63 _snxtro File = new QLineEdit(); _snxtroFile ->setObjectName("PPP/snxtroFile"); _widgets << _snxtroFile;61 _logPath = new QLineEdit(); _logPath ->setObjectName("PPP/logPath"); _widgets << _logPath; 62 _nmeaPath = new QLineEdit(); _nmeaPath ->setObjectName("PPP/nmeaPath"); _widgets << _nmeaPath; 63 _snxtroPath = new QLineEdit(); _snxtroPath ->setObjectName("PPP/snxtroPath"); _widgets << _snxtroPath; 64 64 _snxtroSampl = new QSpinBox(); _snxtroSampl ->setObjectName("PPP/snxtroSampl"); _widgets << _snxtroSampl; 65 65 _snxtroIntr = new QComboBox(); _snxtroIntr ->setObjectName("PPP/snxtroIntr"); _widgets << _snxtroIntr; 66 _v3filenames = new QCheckBox(); _v3filenames ->setObjectName("PPP/v3filenames"); _widgets << _v3filenames; 66 67 _staTable = new QTableWidget(); _staTable ->setObjectName("PPP/staTable"); _widgets << _staTable; 67 68 _lcGPS = new QComboBox(); _lcGPS ->setObjectName("PPP/lcGPS"); _widgets << _lcGPS; … … 99 100 connect(_dataSource, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(slotEnableWidgets())); 100 101 101 connect(_snxtro File, SIGNAL(textChanged(const QString &)),102 connect(_snxtroPath, SIGNAL(textChanged(const QString &)), 102 103 this, SLOT(slotPPPTextChanged())); 103 104 … … 248 249 // --------- 249 250 _corrMount ->setText(settings.value(_corrMount ->objectName()).toString()); 250 _log File ->setText(settings.value(_logFile->objectName()).toString());251 _nmea File ->setText(settings.value(_nmeaFile->objectName()).toString());252 _snxtro File ->setText(settings.value(_snxtroFile->objectName()).toString());251 _logPath ->setText(settings.value(_logPath ->objectName()).toString()); 252 _nmeaPath ->setText(settings.value(_nmeaPath ->objectName()).toString()); 253 _snxtroPath ->setText(settings.value(_snxtroPath ->objectName()).toString()); 253 254 254 255 if (!settings.value(_sigmaC1->objectName()).toString().isEmpty()) { … … 291 292 _eleWgtCode ->setCheckState(Qt::CheckState(settings.value(_eleWgtCode ->objectName()).toInt())); 292 293 _eleWgtPhase->setCheckState(Qt::CheckState(settings.value(_eleWgtPhase->objectName()).toInt())); 294 _v3filenames->setCheckState(Qt::CheckState(settings.value(_v3filenames->objectName()).toInt())); 293 295 294 296 // SpinBoxex … … 346 348 settings.setValue(_crdFile ->objectName(), _crdFile ->fileName()); 347 349 settings.setValue(_antexFile ->objectName(), _antexFile ->fileName()); 348 settings.setValue(_log File ->objectName(), _logFile->text());349 settings.setValue(_nmea File ->objectName(), _nmeaFile->text());350 settings.setValue(_snxtro File ->objectName(), _snxtroFile->text());350 settings.setValue(_logPath ->objectName(), _logPath ->text()); 351 settings.setValue(_nmeaPath ->objectName(), _nmeaPath ->text()); 352 settings.setValue(_snxtroPath ->objectName(), _snxtroPath ->text()); 351 353 settings.setValue(_snxtroSampl ->objectName(), _snxtroSampl ->value()); 354 settings.setValue(_v3filenames ->objectName(), _v3filenames ->checkState()); 352 355 settings.setValue(_snxtroIntr ->objectName(), _snxtroIntr ->currentText()); 353 356 settings.setValue(_lcGPS ->objectName(), _lcGPS ->currentText()); … … 417 420 } 418 421 419 if ( _snxtro File->text() != "" && !allDisabled) {422 if ( _snxtroPath->text() != "" && !allDisabled) { 420 423 _snxtroSampl->setEnabled(true); 421 424 _snxtroIntr ->setEnabled(true); … … 488 491 // SNX TRO file sampling 489 492 // --------------------- 490 if (sender() == 0 || sender() == _snxtro File) {491 if ( _snxtro File->text() != "" ) {493 if (sender() == 0 || sender() == _snxtroPath) { 494 if ( _snxtroPath->text() != "" ) { 492 495 _snxtroSampl->setEnabled(true); 493 496 _snxtroIntr->setEnabled(true); -
trunk/BNC/src/pppWidgets.h
r7488 r7506 44 44 qtFileChooser* _crdFile; 45 45 qtFileChooser* _antexFile; 46 QLineEdit* _log File;47 QLineEdit* _nmea File;48 QLineEdit* _snxtro File;46 QLineEdit* _logPath; 47 QLineEdit* _nmeaPath; 48 QLineEdit* _snxtroPath; 49 49 QSpinBox* _snxtroSampl; 50 50 QComboBox* _snxtroIntr; 51 QCheckBox* _v3filenames; 51 52 QTableWidget* _staTable; 52 53 QComboBox* _lcGPS;
Note:
See TracChangeset
for help on using the changeset viewer.