Changeset 6585 in ntrip


Ignore:
Timestamp:
Feb 15, 2015, 11:53:33 AM (9 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r6541 r6585  
    10561056    *stream << rnxSat.prn.toString().c_str();
    10571057
     1058    const t_rnxObs* hlp[header.nTypes(sys)];
    10581059    for (int iTypeV3 = 0; iTypeV3 < header.nTypes(sys); iTypeV3++) {
     1060      hlp[iTypeV3] = 0;
    10591061      QString typeV3 = header.obsType(sys, iTypeV3);
    1060       bool    found  = false;
    10611062      QMapIterator<QString, t_rnxObs> itObs(rnxSat.obs);
    10621063      while (itObs.hasNext()) {
     
    10641065        const QString&  type   = itObs.key();
    10651066        const t_rnxObs& rnxObs = itObs.value();
    1066         if (typeV3 == type2to3(sys, type) || typeV3 == type2to3(sys, type).left(2)) {
    1067           found = true;
    1068           if (rnxObs.value == 0.0) {
    1069             *stream << QString().leftJustified(16);
    1070           }
    1071           else {
    1072             *stream << QString("%1").arg(rnxObs.value, 14, 'f', 3);
    1073             if (rnxObs.lli != 0.0) {
    1074               *stream << QString("%1").arg(rnxObs.lli,1);
    1075             }
    1076             else {
    1077               *stream << ' ';
    1078             }
    1079             if (rnxObs.snr != 0.0) {
    1080               *stream << QString("%1").arg(rnxObs.snr,1);
    1081             }
    1082             else {
    1083               *stream << ' ';
    1084             }
    1085           }
    1086         }
    1087       }
    1088       if (!found) {
     1067        if ( typeV3 == type2to3(sys, type) ||
     1068             (typeV3 == type2to3(sys, type).left(2) && rnxObs.value != 0.0) ) {
     1069          hlp[iTypeV3] = &itObs.value();
     1070        }
     1071      }
     1072    }
     1073
     1074    for (int iTypeV3 = 0; iTypeV3 < header.nTypes(sys); iTypeV3++) {
     1075      const t_rnxObs* rnxObs = hlp[iTypeV3];
     1076      if (rnxObs == 0) {
    10891077        *stream << QString().leftJustified(16);
     1078      }
     1079      else {
     1080        *stream << QString("%1").arg(rnxObs->value, 14, 'f', 3);
     1081        if (rnxObs->lli != 0.0) {
     1082          *stream << QString("%1").arg(rnxObs->lli,1);
     1083        }
     1084        else {
     1085          *stream << ' ';
     1086        }
     1087        if (rnxObs->snr != 0.0) {
     1088          *stream << QString("%1").arg(rnxObs->snr,1);
     1089        }
     1090        else {
     1091          *stream << ' ';
     1092        }
    10901093      }
    10911094    }
Note: See TracChangeset for help on using the changeset viewer.