Changeset 3106 in ntrip


Ignore:
Timestamp:
Mar 21, 2011, 4:50:07 PM (14 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r3034 r3106  
    217217  }
    218218
    219   unsigned nPar = _params.size();
    220 
    221   _QQ.ReSize(nPar);
    222 
    223   _QQ = 0.0;
    224 
    225   for (int iPar = 1; iPar <= _params.size(); iPar++) {
    226     bncParam* pp = _params[iPar-1];
    227     if      (pp->isCrd()) {
    228       _QQ(iPar,iPar) = _sigCrd0 * _sigCrd0;
    229     }
    230     else if (pp->type == bncParam::RECCLK) {
    231       _QQ(iPar,iPar) = _sigClk0 * _sigClk0;
    232     }
    233     else if (pp->type == bncParam::TROPO) {
    234       _QQ(iPar,iPar) = _sigTrp0 * _sigTrp0;
    235     }
    236     else if (pp->type == bncParam::GALILEO_OFFSET) {
    237       _QQ(iPar,iPar) = _sigGalileoOffset0 * _sigGalileoOffset0;
    238     }
    239   }
    240 
    241219  // NMEA Output
    242220  // -----------
     
    448426  bncSettings settings;
    449427
     428  _time = epoData->tt; // current epoch time
     429
     430  const double MAXSOLGAP = 60.0;
     431
    450432  bool firstCrd = false;
    451   if (x() == 0.0 && y() == 0.0 && z() == 0.0) {
     433  if (!_lastTimeOK.valid() || _time - _lastTimeOK > MAXSOLGAP) {
    452434    firstCrd = true;
    453435    _startTime = epoData->tt;
     436
     437    unsigned nPar = _params.size();
     438    _QQ.ReSize(nPar);
     439    _QQ = 0.0;
     440    for (int iPar = 1; iPar <= _params.size(); iPar++) {
     441      bncParam* pp = _params[iPar-1];
     442      pp->xx = 0.0;
     443      if      (pp->isCrd()) {
     444        _QQ(iPar,iPar) = _sigCrd0 * _sigCrd0;
     445      }
     446      else if (pp->type == bncParam::RECCLK) {
     447        _QQ(iPar,iPar) = _sigClk0 * _sigClk0;
     448      }
     449      else if (pp->type == bncParam::TROPO) {
     450        _QQ(iPar,iPar) = _sigTrp0 * _sigTrp0;
     451      }
     452      else if (pp->type == bncParam::GALILEO_OFFSET) {
     453        _QQ(iPar,iPar) = _sigGalileoOffset0 * _sigGalileoOffset0;
     454      }
     455    }
    454456  }
    455457
     
    622624  _log.clear(); 
    623625
    624   _time = epoData->tt;
    625 
    626626  if (settings.value("pppSPP").toString() == "PPP") {
    627627    _log += "Precise Point Positioning of Epoch "
     
    976976  writeNMEAstr(QString(strGGA.str().c_str()));
    977977
     978  _lastTimeOK = _time; // remember time of last successful update
    978979  return success;
    979980}
  • trunk/BNC/bncmodel.h

    r2932 r3106  
    130130
    131131  bncTime               _time;
     132  bncTime               _lastTimeOK;
    132133  QByteArray            _staID;
    133134  QVector<bncParam*>    _params;
Note: See TracChangeset for help on using the changeset viewer.