Changeset 3965 in ntrip


Ignore:
Timestamp:
Apr 20, 2012, 12:08:48 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/rinex/rnxobsfile.cpp

    r3964 r3965  
    599599        char    sys    = systems[iSys];
    600600        QString typeV3 =  type2to3(sys, typeV2);
    601         if (!typeV3.isEmpty()) {
     601        if (typeV3.isEmpty()) {
     602          _indexMap2to3[sys][ii] = -1;
     603        }
     604        else {
    602605          _header._obsTypesV3[sys].push_back(typeV3);
    603606          _indexMap2to3[sys][ii] = _header._obsTypesV3[sys].size() - 1;
    604         }
    605         else {
    606           _indexMap2to3[sys][ii] = -1;
    607607        }
    608608      }
     
    613613  // -------------------------------------
    614614  else if (_trafo == trafo3to2) {
    615 
     615    for (unsigned iSys = 0; iSys < systems.length(); iSys++) {
     616      char sys = systems[iSys];
     617      map<char, vector<QString> >::const_iterator it = header._obsTypesV3.find(sys);
     618      if (it != header._obsTypesV3.end()) {
     619        const vector<QString>& typesV3 = it->second;
     620        for (unsigned ii = 0; ii < typesV3.size(); ii++) {
     621          const QString& typeV3 = typesV3[ii];
     622          QString        typeV2 = type3to2(typeV3);
     623          if (typeV2.isEmpty()) {
     624            _indexMap3to2[sys][ii] = -1;
     625          }
     626          else {
     627            bool found = false;
     628            for (unsigned i2 = 0; i2 < _header._obsTypesV2.size(); i2++) {
     629              if (_header._obsTypesV2[i2] == typeV2) {
     630                found = true;
     631                _indexMap3to2[sys][ii] = i2;
     632                break;
     633              }
     634            }
     635            if (!found) {
     636              _header._obsTypesV2.push_back(typeV2);
     637              _indexMap3to2[sys][ii] = _header._obsTypesV2.size() - 1;
     638            }
     639          }
     640        }
     641      }
     642    }
    616643  }
    617644}
     
    940967    return typeV3.left(2);
    941968  }
    942 }
     969
     970  return "";
     971}
Note: See TracChangeset for help on using the changeset viewer.