- Timestamp:
- Aug 11, 2015, 3:46:18 PM (9 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r7014 r7179 124 124 125 125 QString hlpStr = bncRinex::nextEpochStr(datTim, 126 settings.value("corrIntr").toString() );126 settings.value("corrIntr").toString(), false); 127 127 128 128 QString fileNameHlp = _fileNameSkl -
trunk/BNC/src/bnccore.cpp
r7026 r7179 125 125 qRegisterMetaType<QList<t_satPhaseBias> > ("QList<t_satPhaseBias>"); 126 126 qRegisterMetaType<t_vTec> ("t_vTec"); 127 128 127 } 129 128 … … 291 290 QDateTime datTim = currentDateAndTimeGPS(); 292 291 293 QString ephFileNameGPS = _ephPath + "BRDC" + 294 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')); 292 QString ephFileNameGPS = _ephPath + "BRDC"; 293 294 bool ephV3filenames = settings.value("ephV3filenames").toBool(); 295 295 296 296 QString hlpStr = bncRinex::nextEpochStr(datTim, 297 settings.value("ephIntr").toString() );297 settings.value("ephIntr").toString(), ephV3filenames); 298 298 299 299 if (_rinexVers == 3) { 300 ephFileNameGPS += hlpStr + datTim.toString(".yyP"); 301 } 302 else { 303 ephFileNameGPS += hlpStr + datTim.toString(".yyN"); 300 if (ephV3filenames) { 301 QString country = "WLD"; 302 QString monNum = "0"; 303 QString recNum = "0"; 304 ephFileNameGPS += QString("%1").arg(monNum, 1, 10) + 305 QString("%1").arg(recNum, 1, 10) + 306 country + 307 "_S_" + // stream 308 QString("%1").arg(datTim.date().year()) + 309 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 310 hlpStr + // HMS_period 311 "_MN.rnx"; // mixed BRDC 312 } 313 else { // RNX v3 with old filenames 314 ephFileNameGPS += QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 315 hlpStr + datTim.toString(".yyP"); 316 } 317 } 318 else { // RNX v2.11 319 ephFileNameGPS += QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 320 hlpStr + datTim.toString(".yyN"); 304 321 } 305 322 -
trunk/BNC/src/bncrinex.cpp
r7174 r7179 209 209 //////////////////////////////////////////////////////////////////////////// 210 210 QString bncRinex::nextEpochStr(const QDateTime& datTim, 211 const QString& intStr, QDateTime* nextEpoch) { 211 const QString& intStr, bool rnxV3filenames, 212 QDateTime* nextEpoch) { 212 213 213 214 QString epoStr; … … 216 217 QDate nextDate; 217 218 219 (rnxV3filenames) ? epoStr = "" : epoStr = "A"; 220 218 221 int indHlp = intStr.indexOf("min"); 219 222 220 223 if ( indHlp != -1) { 221 224 int step = intStr.left(indHlp-1).toInt(); 222 char ch = 'A' + datTim.time().hour(); 223 epoStr = ch; 225 if (rnxV3filenames) { 226 epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H 227 } 224 228 if (datTim.time().minute() >= 60-step) { 225 epoStr += QString("%1").arg(60-step, 2, 10, QChar('0')); 229 epoStr += QString("%1").arg(60-step, 2, 10, QChar('0')); // M 226 230 if (datTim.time().hour() < 23) { 227 231 nextTime.setHMS(datTim.time().hour() + 1 , 0, 0); … … 236 240 for (int limit = step; limit <= 60-step; limit += step) { 237 241 if (datTim.time().minute() < limit) { 238 epoStr += QString("%1").arg(limit-step, 2, 10, QChar('0')); 242 epoStr += QString("%1").arg(limit-step, 2, 10, QChar('0')); // M 239 243 nextTime.setHMS(datTim.time().hour(), limit, 0); 240 244 nextDate = datTim.date(); … … 243 247 } 244 248 } 249 if (rnxV3filenames) { 250 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // S 251 epoStr += QString("_%1M").arg(step, 2, 10, QChar('0')); // period 252 } 245 253 } 246 254 else if (intStr == "1 hour") { 247 char ch = 'A' + datTim.time().hour(); 248 epoStr = ch; 255 int step = intStr.left(indHlp-1).toInt(); 256 if (rnxV3filenames) { 257 epoStr += QString("%1").arg(datTim.time().hour(), 2, 10, QChar('0')); // H 258 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // M 259 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // S 260 epoStr += QString("_%1H").arg(step+1, 2, 10, QChar('0')); // period 261 } 249 262 if (datTim.time().hour() < 23) { 250 263 nextTime.setHMS(datTim.time().hour() + 1 , 0, 0); … … 257 270 } 258 271 else { 259 epoStr = "0"; 272 int step = intStr.left(indHlp-1).toInt(); 273 if (rnxV3filenames) { 274 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // H 275 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // M 276 epoStr += QString("%1").arg(0, 2, 10, QChar('0')); // S 277 epoStr += QString("_%1D").arg(step+1, 2, 10, QChar('0')); // period 278 } else { 279 epoStr = "0"; 280 } 260 281 nextTime.setHMS(0, 0, 0); 261 282 nextDate = datTim.date().addDays(1); … … 282 303 283 304 QString hlpStr = nextEpochStr(datTim, settings.value("rnxIntr").toString(), 284 &_nextCloseEpoch);305 _rnxV3filenames, &_nextCloseEpoch); 285 306 286 307 QString ID4 = _statID.left(4); … … 306 327 } 307 328 308 path += ID4 + 309 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 310 hlpStr + distStr + datTim.toString(".yyO"); 329 if (_rnxV3filenames) { 330 QString country; 331 QString monNum = "0"; 332 QString recNum = "0"; 333 QListIterator<QString> it(settings.value("mountPoints").toStringList()); 334 while (it.hasNext()) { 335 QStringList hlp = it.next().split(" "); 336 if (hlp.size() <= 1) 337 continue; 338 if (hlp.join(" ").indexOf(_statID, 0) != -1) { 339 country = hlp[2]; 340 } 341 } 342 int sampl = settings.value("rnxSampl").toString().mid(0,2).toInt(); 343 if (!sampl) 344 sampl++; 345 path += ID4 + 346 QString("%1").arg(monNum, 1, 10) + 347 QString("%1").arg(recNum, 1, 10) + 348 country + 349 "_S_" + // stream 350 QString("%1").arg(datTim.date().year()) + 351 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 352 hlpStr + // HMS_period 353 QString("_%1S").arg(sampl, 2, 10, QChar('0')) + // sampling rate 354 distStr + 355 "_MO.rnx"; // mixed OBS 356 } 357 else { 358 path += ID4 + 359 QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0')) + 360 hlpStr + distStr + datTim.toString(".yyO"); 361 } 311 362 312 363 _fName = path.toAscii(); -
trunk/BNC/src/bncrinex.h
r7171 r7179 47 47 static QString nextEpochStr(const QDateTime& datTim, 48 48 const QString& intStr, 49 bool rnxV3filenames, 49 50 QDateTime* nextEpoch = 0); 50 51 static std::string asciiSatLine(const t_satObs& obs); -
trunk/BNC/src/bncwindow.cpp
r7178 r7179 213 213 _rnxFileCheckBox = new QCheckBox(); 214 214 _rnxFileCheckBox->setCheckState(Qt::CheckState(settings.value("rnxOnlyWithSKL").toInt())); 215 _rnxV3filenameCheckBox = new QCheckBox();216 _rnxV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3filenames").toInt()));217 215 _rnxSamplSpinBox->setSuffix(" sec"); 218 216 _rnxSkelLineEdit = new QLineEdit(settings.value("rnxSkel").toString()); … … 221 219 _rnxV3CheckBox = new QCheckBox(); 222 220 _rnxV3CheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3").toInt())); 221 _rnxV3filenameCheckBox = new QCheckBox(); 222 _rnxV3filenameCheckBox->setCheckState(Qt::CheckState(settings.value("rnxV3filenames").toInt())); 223 223 QString hlp = settings.value("rnxV2Priority").toString(); 224 224 if (hlp.isEmpty()) { … … 1734 1734 settings.setValue("rnxV3filenames",_rnxV3filenameCheckBox->checkState()); 1735 1735 settings.setValue("rnxScript", _rnxScrpLineEdit->text()); 1736 settings.setValue("rnxV3", _rnxV3CheckBox->checkState()); 1736 (_rnxV3filenameCheckBox->checkState()) ? 1737 settings.setValue("rnxV3", _rnxV3filenameCheckBox->checkState()) : 1738 settings.setValue("rnxV3", _rnxV3CheckBox->checkState()); 1737 1739 settings.setValue("rnxV2Priority",_rnxV2Priority->text()); 1738 1740 // RINEX Ephemeris … … 1740 1742 settings.setValue("ephIntr", _ephIntrComboBox->currentText()); 1741 1743 settings.setValue("outEphPort", _outEphPortLineEdit->text()); 1742 settings.setValue("ephV3", _ephV3CheckBox->checkState());1743 1744 settings.setValue("ephV3filenames", _ephV3filenameCheckBox->checkState()); 1745 (_ephV3filenameCheckBox->checkState()) ? 1746 settings.setValue("ephV3", _ephV3filenameCheckBox->checkState()) : 1747 settings.setValue("ephV3", _ephV3CheckBox->checkState()); 1744 1748 // Broadcast Corrections 1745 1749 settings.setValue("corrPath", _corrPathLineEdit->text());
Note:
See TracChangeset
for help on using the changeset viewer.