Changeset 3864 in ntrip


Ignore:
Timestamp:
Apr 13, 2012, 11:35:34 AM (13 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r3859 r3864  
    142142    }
    143143    else if (key == "# / TYPES OF OBSERV") {
    144       QTextStream in(value.toAscii(), QIODevice::ReadOnly);
     144      QTextStream* in = new QTextStream(value.toAscii(), QIODevice::ReadOnly);
    145145      int nTypes;
    146       in >> nTypes;
     146      *in >> nTypes;
    147147      _obsTypesV2.clear();
    148148      for (int ii = 0; ii < nTypes; ii++) {
     149        if (ii > 0 && ii % 9 == 0) {
     150          line = stream->readLine(); ++numLines;
     151          delete in;
     152          in = new QTextStream(line.toAscii(), QIODevice::ReadOnly);
     153        }
    149154        QString hlp;
    150         in >> hlp;
     155        *in >> hlp;
    151156        _obsTypesV2.push_back(hlp);
    152157      }
     
    598603
    599604  QString hlp;
     605  QTextStream(&hlp) << QString("%1").arg(_header._obsTypesV2.size(), 6);
    600606  for (unsigned ii = 0; ii < _header._obsTypesV2.size(); ii++) {
    601     hlp += QString("%1").arg(_header._obsTypesV2[ii], 6);
    602   }
    603   *_stream << (QString("%1").arg(_header._obsTypesV2.size(),6) + hlp)
    604     .leftJustified(60)
    605           << "# / TYPES OF OBSERV\n";
     607    QTextStream(&hlp) << QString("%1").arg(_header._obsTypesV2[ii], 6);   
     608    if (ii > 0 && (ii % 8 == 0 || ii == _header._obsTypesV2.size()-1)) {
     609      *_stream << hlp.leftJustified(60) << "# / TYPES OF OBSERV\n";
     610      hlp = QString().leftJusified(6);
     611    }
     612  }
    606613
    607614  *_stream << QString("%1")
Note: See TracChangeset for help on using the changeset viewer.