Changeset 6719 in ntrip
- Timestamp:
- Mar 25, 2015, 10:48:43 AM (10 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/rnxobsfile.cpp
r6704 r6719 213 213 _startTime.set(year, month, day, hour, min, sec); 214 214 } 215 else if (key == "SYS / PHASE SHIFT"){ 216 QTextStream in(value.toAscii(), QIODevice::ReadOnly); 217 char sys; 218 QString obstype; 219 double shift; 220 in >> sys >> obstype >> shift; 221 if (obstype.size()) 222 _phaseShifts.insert(sys, QPair<QString, double>(obstype, shift)); 223 } 224 else if (key == "GLONASS COD/PHS/BIS"){ 225 QTextStream in(value.toAscii(), QIODevice::ReadOnly); 226 for (int ii = 0; ii < 4; ii++) { 227 QString type; 228 double value; 229 in >> type >> value; 230 if (type.size()) 231 _gloPhaseBiases[type] = value; 232 } 233 } 234 else if (key == "GLONASS SLOT / FRQ #") { 235 QTextStream* in = new QTextStream(value.toAscii(), QIODevice::ReadOnly); 236 int nSlots = 0; 237 *in >> nSlots; 238 for (int ii = 0; ii < nSlots; ii++) { 239 if (ii > 0 && ii % 8 == 0) { 240 line = stream->readLine(); ++numLines; 241 delete in; 242 in = new QTextStream(line.left(60).toAscii(), QIODevice::ReadOnly); 243 } 244 QString sat; 245 int slot; 246 *in >> sat >> slot; 247 t_prn prn; 248 prn.set(sat.toStdString()); 249 if(sat.size()) 250 _gloSlots[prn] = slot; 251 } 252 delete in; 253 } 215 254 if (maxLines > 0 && numLines == maxLines) { 216 255 break; … … 218 257 } 219 258 220 // set default observation types if empty in sklfile221 // -------------------------------------------------- 259 // set default observation types if empty in input file 260 // ---------------------------------------------------- 222 261 if (_obsTypes.empty()) { 223 262 setDefault(_markerName, _version); … … 313 352 _comments = header._comments; 314 353 _usedSystems = header._usedSystems; 315 354 if (_version >= 3.0) { 355 _phaseShifts = header._phaseShifts; 356 _gloPhaseBiases = header._gloPhaseBiases; 357 _gloSlots = header._gloSlots; 358 } 316 359 for (unsigned iPrn = 1; iPrn <= t_prn::MAXPRN_GPS; iPrn++) { 317 360 _wlFactorsL1[iPrn] = header._wlFactorsL1[iPrn]; … … 515 558 .leftJustified(60) 516 559 << "TIME OF FIRST OBS\n"; 560 561 if (_version >= 3.0) { 562 if (_phaseShifts.empty()) { 563 QString sys = _usedSystems; 564 for (int ii = 0; ii < sys.size(); ii++) { 565 *stream << QString("%1") 566 .arg(sys[ii], 0) 567 .leftJustified(60) 568 << "SYS / PHASE SHIFT\n"; 569 } 570 } else { 571 QMultiHash<char, QPair<QString, double> >::const_iterator it = _phaseShifts.begin(); 572 while(it != _phaseShifts.end()) { 573 *stream << QString("%1%2%3") 574 .arg(it.key(), 0) 575 .arg(it.value().first, 4) 576 .arg(it.value().second, 9, 'f', 5) 577 .leftJustified(60) 578 << "SYS / PHASE SHIFT\n"; 579 it++; 580 } 581 } 582 } 583 584 if (_version >= 3.0) { 585 QString hlp = ""; 586 QMap<QString, double>::const_iterator it = _gloPhaseBiases.begin(); 587 while (it != _gloPhaseBiases.end()){ 588 hlp += QString("%1%2").arg(it.key(), 4).arg(it.value(), 9, 'f', 3); 589 it++; 590 } 591 *stream << QString("%1") 592 .arg(hlp, 0) 593 .leftJustified(60) 594 << "GLONASS COD/PHS/BIS\n"; 595 } 596 597 if (_version >= 3.0) { 598 QString number = QString::number(_gloSlots.size()); 599 QString hlp = ""; 600 int ii = 0; 601 QMap<t_prn, int>::const_iterator it = _gloSlots.begin(); 602 while (it != _gloSlots.end()) { 603 QString prn(it.key().toString().c_str()); 604 hlp += QString("%1%2").arg(prn, 4).arg(it.value(), 3); 605 it++; 606 ii++; 607 if (ii % 8 == 0) { 608 *stream << QString("%1%2") 609 .arg(number, 3) 610 .arg(hlp, 0) 611 .leftJustified(60) 612 << "GLONASS SLOT / FRQ #\n"; 613 ii = 0; 614 hlp = number = ""; 615 } 616 } 617 if (hlp.size() || !_gloSlots.size()) { 618 *stream << QString("%1%2") 619 .arg(number, 3) 620 .arg(hlp, 0) 621 .leftJustified(60) 622 << "GLONASS SLOT / FRQ #\n"; 623 } 624 } 625 517 626 518 627 *stream << QString() -
trunk/BNC/src/rinex/rnxobsfile.h
r6302 r6719 64 64 private: 65 65 QStringList obsTypesStrings() const; 66 QString 67 double 68 double 69 QString 70 QString 71 QString 72 QString 73 QString 74 QString 75 QString 76 QString 77 QString 78 QStringList 79 ColumnVector 80 ColumnVector 81 ColumnVector 82 ColumnVector 66 QString _usedSystems; 67 double _version; 68 double _interval; 69 QString _antennaNumber; 70 QString _antennaName; 71 QString _markerName; 72 QString _markerNumber; 73 QString _observer; 74 QString _agency; 75 QString _receiverNumber; 76 QString _receiverType; 77 QString _receiverVersion; 78 QStringList _comments; 79 ColumnVector _antNEU; 80 ColumnVector _antXYZ; 81 ColumnVector _antBSG; 82 ColumnVector _xyz; 83 83 QMap<char, QStringList> _obsTypes; 84 QMap<t_prn, int> _gloSlots; 85 QMap<QString, double> _gloPhaseBiases; 84 86 int _wlFactorsL1[t_prn::MAXPRN_GPS+1]; 85 87 int _wlFactorsL2[t_prn::MAXPRN_GPS+1]; 86 88 bncTime _startTime; 89 QMultiHash<char, QPair<QString, double> > _phaseShifts; 87 90 }; 88 91
Note:
See TracChangeset
for help on using the changeset viewer.