Changeset 3506 in ntrip


Ignore:
Timestamp:
Nov 19, 2011, 3:22:19 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/GPSS/hassDecoder.cpp

    r3505 r3506  
    2323////////////////////////////////////////////////////////////////////////////
    2424hassDecoder::hassDecoder(const QString& staID) : RTCM3coDecoder(staID) {
     25  _GPSweeks = -1.0;
    2526}
    2627
     
    3839  _buffer += QByteArray(data, dataLen);
    3940
     41  bool corrFound = false;
     42  int indexEOL = -1;
     43  while ( (indexEOL = _buffer.indexOf('\n')) != -1) {
     44    QByteArray line = _buffer.left(indexEOL-1);
     45    _buffer = _buffer.mid(indexEOL);
    4046
    41   return success;
     47    if (QString(line).split(QRegExp("\\s+")).count() != 11) {
     48      continue;
     49    }
     50    else {
     51      corrFound = true;
     52    }
     53
     54    QTextStream in(line, QIODevice::ReadOnly | QIODevice::Text);
     55    int     mjd, IOD;
     56    double  daySec;
     57    double  deltaX, deltaY, deltaZ, deltaClk;
     58    double  rateDeltaX, rateDeltaY, rateDeltaZ;
     59    QString prn;
     60   
     61    in >> mjd >> daySec >> prn >> IOD >> deltaX >> deltaY >> deltaZ
     62       >> deltaClk >> rateDeltaX >> rateDeltaY >> rateDeltaZ;
     63
     64  }
     65
     66  if (corrFound) {
     67    return success;
     68  }
     69  else {
     70    return failure;
     71  }
    4272}
Note: See TracChangeset for help on using the changeset viewer.