Changeset 7980 in ntrip for trunk/BNC/src/rinex/reqcedit.cpp
- Timestamp:
- Jul 21, 2016, 10:31:16 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/reqcedit.cpp
r7942 r7980 156 156 deleteLater(); 157 157 } 158 158 159 } 159 160 … … 643 644 int key = 0; 644 645 QString systems = obsFile->header().usedSystems(); 645 QString comment = QString(" RINEX 3 => 2 CONVERSION DETAILS:");646 QString comment = QString("Signal priorities for RINEX 3 => 2 conversion:"); 646 647 QString commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0')); 647 648 txtMap.insert(commentKey, comment); 648 649 649 650 for(int ii = 0; ii < obsFile->numSys(); ii++) { 650 key++;651 651 char sys = systems[ii].toAscii(); 652 QString preferredAttrib = obsFile->signalPriorities(sys);653 comment = QString("%1: Signal priority = %2").arg(sys).arg(preferredAttrib);654 commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0'));655 652 txtMap.insert(commentKey, comment); 653 QMap <char, QString> signalPriorityMap; 654 QStringList preferredAttribListSys = obsFile->signalPriorities(sys); 656 655 QStringList types = obsFile->header().obsTypes(sys); 657 656 for (int jj = 0; jj < types.size(); jj++) { 658 key++;659 657 QString inType = types[jj]; 660 for (int iPref = 0; iPref < preferredAttrib.length(); iPref++) { 661 if (preferredAttrib[iPref] == '?' || 662 (inType.length() == 2 && preferredAttrib[iPref] == '_' ) || 663 (inType.length() == 3 && preferredAttrib[iPref] == inType[2]) ) { 664 QString outType = t_rnxObsFile::type3to2(sys, inType); 665 comment = QString("%1: %2 => %3").arg(sys).arg(inType).arg(outType); 666 commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0')); 667 txtMap.insert(commentKey, comment); 668 break; 669 } 670 } 671 } 672 } 673 } 658 char band = inType[1].toAscii(); 659 for (int ii = 0; ii < preferredAttribListSys.size(); ii++) { 660 QString preferredAttrib; 661 if (preferredAttribListSys[ii].indexOf("&") != -1) { 662 QStringList hlp = preferredAttribListSys[ii].split("&", QString::SkipEmptyParts); 663 if (hlp.size() == 2 && hlp[0].contains(band)) { 664 preferredAttrib = hlp[1]; 665 } 666 } 667 else { 668 preferredAttrib = preferredAttribListSys[ii]; 669 } 670 if (!signalPriorityMap.contains(band) && !preferredAttrib.isEmpty()){ 671 signalPriorityMap[band] = preferredAttrib; 672 } 673 } 674 } 675 QMapIterator<char, QString> it(signalPriorityMap); 676 while (it.hasNext()) { 677 it.next(); 678 key++; 679 comment = QString("%1 band %2: %3").arg(sys).arg(it.key()).arg(it.value()); 680 commentKey = QString("COMMENT %1").arg(key, 3, 10, QChar('0')); 681 txtMap.insert(commentKey, comment); 682 } 683 } 684 }
Note:
See TracChangeset
for help on using the changeset viewer.