Changeset 7980 in ntrip for trunk/BNC/src/rinex
- Timestamp:
- Jul 21, 2016, 10:31:16 AM (9 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 3 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 } -
trunk/BNC/src/rinex/rnxobsfile.cpp
r7894 r7980 1303 1303 } 1304 1304 *stream << endl; 1305 1305 1306 for (unsigned iSat = 0; iSat < epo->rnxSat.size(); iSat++) { 1306 1307 1307 const t_rnxSat& rnxSat = epo->rnxSat[iSat]; 1308 1308 char sys = rnxSat.prn.system(); 1309 1310 1309 for (int iTypeV2 = 0; iTypeV2 < header.nTypes(sys); iTypeV2++) { 1311 1310 if (iTypeV2 > 0 && iTypeV2 % 5 == 0) { … … 1314 1313 QString typeV2 = header.obsType(sys, iTypeV2); 1315 1314 bool found = false; 1316 1317 QString preferredAttrib = signalPriorities(sys); 1318 for (int iPref = 0; iPref < preferredAttrib.length(); iPref++) { 1315 QStringList preferredAttribList = signalPriorities(sys); 1316 QString preferredAttrib; 1317 for (int ii = 0; ii < preferredAttribList.size(); ii++) { 1318 if (preferredAttribList[ii].indexOf("&") != -1) { 1319 QStringList hlp = preferredAttribList[ii].split("&", QString::SkipEmptyParts); 1320 if (hlp.size() == 2 && hlp[0].contains(typeV2[1])) { 1321 preferredAttrib = hlp[1]; 1322 } 1323 } 1324 else { 1325 preferredAttrib = preferredAttribList[ii]; 1326 } 1327 } 1328 1329 for (int iPref = 0; iPref < preferredAttribList.size(); iPref++) { 1319 1330 QMapIterator<QString, t_rnxObs> itObs(rnxSat.obs); 1320 1331 while (itObs.hasNext()) { … … 1545 1556 // Tracking Mode Priorities 1546 1557 //////////////////////////////////////////////////////////////////////////// 1547 QString t_rnxObsFile::signalPriorities(char sys) {1558 QStringList t_rnxObsFile::signalPriorities(char sys) { 1548 1559 1549 1560 bncSettings settings; 1550 1561 1551 1562 QStringList priorList; 1552 1563 QString reqcAction = settings.value("reqcAction").toString(); … … 1555 1566 // --------------------------------------------------- 1556 1567 if (reqcAction == "Edit/Concatenate") { 1557 priorList = settings.value("reqcV2Priority").toString().split(" ", QString::SkipEmptyParts);1568 priorList = settings.value("reqcV2Priority").toString().split(" ", QString::SkipEmptyParts); 1558 1569 } 1559 1570 … … 1561 1572 // ---------------------------- 1562 1573 else { 1563 priorList = settings.value("rnxV2Priority").toString().split(" ", QString::SkipEmptyParts); 1564 } 1565 1566 if (priorList.empty()) { 1567 priorList << "CWPX_?"; 1568 } 1569 1570 QString result; 1574 priorList = settings.value("rnxV2Priority").toString().split(" ", QString::SkipEmptyParts); 1575 } 1576 1577 QStringList result; 1571 1578 for (int ii = 0; ii < priorList.size(); ii++) { 1572 1579 if (priorList[ii].indexOf(":") != -1) { 1573 1580 QStringList hlp = priorList[ii].split(":", QString::SkipEmptyParts); 1574 1581 if (hlp.size() == 2 && hlp[0].length() == 1 && hlp[0][0] == sys) { 1575 result = hlp[1]; 1582 result.append(hlp[1]); 1583 } 1584 } 1585 else { 1586 result.append(priorList[ii]); 1587 } 1588 } 1589 1590 if (result.empty()) { 1591 switch (sys) { 1592 case 'G': 1593 result << "G:12&PWCSLXYN G:5&IQX"; 1576 1594 break; 1577 } 1578 } 1579 else { 1580 result = priorList[ii]; 1581 } 1582 } 1583 1595 case 'R': 1596 result << "R:12&PC R:3&IQX"; 1597 break; 1598 case 'E': 1599 result << "E:16&BCX E:578&IQX"; 1600 break; 1601 case 'J': 1602 result << "J:1&SLXCZ J:26&SLX J:5&IQX"; 1603 break; 1604 case 'C': 1605 result << "C:IQX"; 1606 break; 1607 case 'I': 1608 result << "I:ABCX"; 1609 break; 1610 case 'S': 1611 result << "S:1&C S:5&IQX"; 1612 break; 1613 } 1614 } 1584 1615 return result; 1585 1616 } -
trunk/BNC/src/rinex/rnxobsfile.h
r7817 r7980 207 207 static QString type2to3(char sys, const QString& typeV2); 208 208 static QString type3to2(char sys, const QString& typeV3); 209 static QString signalPriorities(char sys);209 static QStringList signalPriorities(char sys); 210 210 211 211 static void writeEpoch(QTextStream* stream, const t_rnxObsHeader& header, const t_rnxEpo* epo) {
Note:
See TracChangeset
for help on using the changeset viewer.