Changeset 3971 in ntrip


Ignore:
Timestamp:
Apr 20, 2012, 3:03:42 PM (12 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r3970 r3971  
    624624              if (_header._obsTypesV2[i2] == typeV2) {
    625625                found = true;
    626                 map<int, int>::const_iterator it2 = _indexMap2to3[sys].find(i2);
    627                 if (it2 == _indexMap2to3[sys].end()) {
     626                if (_indexMap2to3[sys].find(i2) == _indexMap2to3[sys].end()) {
    628627                  _indexMap2to3[sys][i2] = i3;
    629628                }
     
    812811
    813812    const t_rnxSat& rnxSat = epo->rnxSat[iSat];
    814 
    815     for (int iTypeV2 = 0; iTypeV2 < nTypes(rnxSat.satSys); iTypeV2++) {
     813    char            sys    = rnxSat.satSys;
     814
     815    for (int iTypeV2 = 0; iTypeV2 < nTypes(sys); iTypeV2++) {
    816816
    817817      if (iTypeV2 > 0 && iTypeV2 % 5 == 0) {
     
    819819      }
    820820
    821       int iType;
     821      int iType = -1;
    822822      if   (_trafo == trafoNone) {
    823823        iType = iTypeV2;
    824824      }
    825825      else {
    826         iType = _indexMap2to3[rnxSat.satSys][iTypeV2];
    827       }
    828 
    829       if (rnxSat.obs[iType] == 0.0) {
     826        if (_indexMap2to3[sys].find(iTypeV2) != _indexMap2to3[sys].end()) {
     827          iType = _indexMap2to3[sys][iTypeV2];
     828        }
     829      }
     830
     831      if (iType == -1 || rnxSat.obs[iType] == 0.0) {
    830832        *_stream << QString().leftJustified(16);
    831833      }
     
    865867  for (unsigned iSat = 0; iSat < epo->rnxSat.size(); iSat++) {
    866868    const t_rnxSat& rnxSat = epo->rnxSat[iSat];
    867     *_stream << rnxSat.satSys
     869    char            sys    = rnxSat.satSys;
     870    *_stream << sys
    868871             << QString("%1").arg(rnxSat.satNum, 2, 10, QChar('0'));
    869872
    870     for (int iTypeV3 = 0; iTypeV3 < nTypes(rnxSat.satSys); iTypeV3++) {
    871 
    872       int iType;
     873    for (int iTypeV3 = 0; iTypeV3 < nTypes(sys); iTypeV3++) {
     874
     875      int iType = -1;
    873876      if   (_trafo == trafoNone) {
    874877        iType = iTypeV3;
    875878      }
    876879      else {
    877         iType = _indexMap3to2[rnxSat.satSys][iTypeV3];
    878       }
    879 
    880       if (rnxSat.obs[iType] == 0.0) {
     880        if (_indexMap3to2[sys].find(iTypeV3) != _indexMap3to2[sys].end()) {
     881          iType = _indexMap3to2[sys][iTypeV3];
     882        }
     883      }
     884
     885      if (iType == -1 || rnxSat.obs[iType] == 0.0) {
    881886        *_stream << QString().leftJustified(16);
    882887      }
Note: See TracChangeset for help on using the changeset viewer.