Changeset 6841 in ntrip for trunk/BNC/src/rinex/rnxobsfile.cpp
- Timestamp:
- May 19, 2015, 11:24:19 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/rnxobsfile.cpp
r6817 r6841 244 244 in >> type >> value; 245 245 if (type.size()) 246 _glo PhaseBiases[type] = value;246 _gloBiases[type] = value; 247 247 } 248 248 } … … 345 345 //////////////////////////////////////////////////////////////////////////// 346 346 void t_rnxObsHeader::set(const t_rnxObsHeader& header, int version, 347 const QStringList* useObsTypes) { 347 const QStringList* useObsTypes, 348 const QStringList* phaseShifts, 349 const QStringList* gloBiases, 350 const QStringList* gloSlots) { 348 351 349 352 if (version <= 2) { … … 370 373 _comments = header._comments; 371 374 _usedSystems = header._usedSystems; 372 if (_version >= 3.0) { 373 _phaseShifts = header._phaseShifts; 374 _gloPhaseBiases = header._gloPhaseBiases; 375 _gloSlots = header._gloSlots; 376 } 375 377 376 for (unsigned iPrn = 1; iPrn <= t_prn::MAXPRN_GPS; iPrn++) { 378 377 _wlFactorsL1[iPrn] = header._wlFactorsL1[iPrn]; … … 456 455 } 457 456 } 457 458 if (_version >= 3.0) { 459 // set phase shifts 460 if (!phaseShifts || phaseShifts->empty()) { 461 _phaseShifts = header._phaseShifts; 462 } 463 else { 464 foreach (const QString &str, *phaseShifts) { 465 QStringList hlp = str.split("_", QString::SkipEmptyParts); 466 QStringList hlp1 = hlp.last().split(":", QString::SkipEmptyParts); 467 QString type = hlp.first(); 468 double shift = hlp1.first().toDouble(); 469 hlp1.removeFirst(); 470 QStringList &satList = hlp1; 471 QMap<QString, QPair<double, QStringList> >::iterator it = _phaseShifts.find(type); 472 if ( it != _phaseShifts.end()) { 473 it.value().second.append(satList); 474 it.value().second.removeDuplicates(); 475 } 476 else { 477 _phaseShifts.insert(type, QPair<double, QStringList>(shift, satList)); 478 } 479 } 480 } 481 // set GLONASS biases 482 if (!gloBiases || gloBiases->empty()) { 483 _gloBiases = header._gloBiases; 484 } 485 else { 486 foreach (const QString &str, *gloBiases) { 487 QStringList hlp = str.split(":", QString::SkipEmptyParts); 488 QString type = hlp.first();; 489 double value = hlp.last().toDouble(); 490 if (type.size()) 491 _gloBiases[type] = value; 492 } 493 } 494 // set GLONASS slots 495 if (!gloSlots || gloSlots->empty()) { 496 _gloSlots = header._gloSlots; 497 } 498 else { 499 foreach (const QString &str, *gloSlots) { 500 QStringList hlp = str.split(":", QString::SkipEmptyParts); 501 QString sat = hlp.first(); 502 int slot = hlp.last().toInt(); 503 t_prn prn; 504 prn.set(sat.toStdString()); 505 if(sat.size()) 506 _gloSlots[prn] = slot; 507 } 508 } 509 } 458 510 } 459 511 … … 646 698 if (_version >= 3.0) { 647 699 QString hlp = ""; 648 QMap<QString, double>::const_iterator it = _glo PhaseBiases.begin();649 while (it != _glo PhaseBiases.end()){700 QMap<QString, double>::const_iterator it = _gloBiases.begin(); 701 while (it != _gloBiases.end()){ 650 702 hlp += QString("%1%2").arg(it.key(), 4).arg(it.value(), 9, 'f', 3); 651 703 it++; … … 723 775 } 724 776 777 // Number of GLONASS biases 778 //////////////////////////////////////////////////////////////////////////// 779 int t_rnxObsHeader::numGloBiases() const { 780 return _gloBiases.size(); 781 } 782 783 // Number of GLONASS biases 784 //////////////////////////////////////////////////////////////////////////// 785 int t_rnxObsHeader::numGloSlots() const { 786 return _gloSlots.size(); 787 } 788 725 789 // Observation Type (satellite-system specific) 726 790 //////////////////////////////////////////////////////////////////////////// … … 743 807 } 744 808 return ""; 809 } 810 811 // 812 //////////////////////////////////////////////////////////////////////////// 813 QStringList t_rnxObsHeader::phaseShifts() const { 814 QStringList strList; 815 QMap<QString, QPair<double, QStringList> >::const_iterator it = _phaseShifts.begin(); 816 while (it != _phaseShifts.end()) { 817 strList.append(QString("%1_%2:%3").arg(it.key(), 3).arg(it.value().first, 9, 'f', 3).arg(it.value().second.join(""))); 818 it++; 819 } 820 return strList; 821 } 822 823 // 824 //////////////////////////////////////////////////////////////////////////// 825 QStringList t_rnxObsHeader::gloBiases() const { 826 QStringList strList; 827 QMap<QString, double>::const_iterator it = _gloBiases.begin(); 828 while (it != _gloBiases.end()) { 829 strList.append(QString("%1:%2").arg(it.key(), 3).arg(it.value(), 9, 'f', 3)); 830 it++; 831 } 832 return strList; 833 } 834 835 // 836 //////////////////////////////////////////////////////////////////////////// 837 QStringList t_rnxObsHeader::gloSlots() const { 838 QStringList strList; 839 QMap<t_prn, int>::const_iterator it = _gloSlots.begin(); 840 while (it != _gloSlots.end()){ 841 QString prn(it.key().toString().c_str()); 842 strList.append(QString("%1:%2").arg(prn, 3).arg(it.value())); 843 it++; 844 } 845 return strList; 745 846 } 746 847
Note:
See TracChangeset
for help on using the changeset viewer.