Changeset 10330 in ntrip


Ignore:
Timestamp:
Feb 13, 2024, 11:51:53 AM (2 months ago)
Author:
stuerze
Message:

another test is added in PPP and combination mode to check if stored ephemerides were outdated and/or not updated in between

Location:
trunk/BNC/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppEphPool.cpp

    r9674 r10330  
    121121
    122122  for (unsigned ii = 0; ii < _ephs.size(); ii++) {
    123     t_eph* eph = _ephs[ii];
     123    const t_eph* eph = _ephs[ii];
    124124    t_irc irc = eph->getCrd(tt, xc, vv, OPT->useOrbClkCorr());
    125125    if (irc == success) {
    126       if (eph->prn().system() == 'R') {
    127         double age = tt - eph->TOC();
    128         if (fabs(age) > 3600.0) {
     126        if (outDatedBcep(eph, tt)) {
    129127          continue;
    130         }
    131128      }
    132129      return irc;
  • trunk/BNC/src/bncephuser.cpp

    r9930 r10330  
    194194  // --------------------------------------------------------
    195195  if (realTime) {
    196     if (outDatedBcep(eph)) {
     196    QDateTime now = currentDateAndTimeGPS();
     197    bncTime   currentTime(now.toString(Qt::ISODate).toStdString());
     198    if (outDatedBcep(eph, currentTime)) {
    197199      eph->setCheckState(t_eph::outdated);
    198200      return;
  • trunk/BNC/src/bncutils.cpp

    r10091 r10330  
    265265//
    266266////////////////////////////////////////////////////////////////////////////
    267 bool outDatedBcep(const t_eph *eph) {
     267bool outDatedBcep(const t_eph *eph, bncTime tt) {
    268268  bncTime   toc = eph->TOC();
    269   QDateTime now = currentDateAndTimeGPS();
    270   bncTime currentTime(now.toString(Qt::ISODate).toStdString());
    271   double dt = currentTime - toc;
     269  double dt = tt -toc;
    272270
    273271  // update interval: 2h, data sets are valid for 4 hours
     
    280278  }
    281279  // updated every 30 minutes + 5 min
    282   else if (eph->type() == t_eph::GLONASS && (dt >  3900.0 || dt < -2100.0)) {
     280  else if (eph->type() == t_eph::GLONASS && (dt >  2100.0 || dt < -2100.0)) {
    283281    return true;
    284282  }
  • trunk/BNC/src/bncutils.h

    r9373 r10330  
    7676bool         checkForWrongObsEpoch(bncTime obsEpoch);
    7777
    78 bool         outDatedBcep(const t_eph *eph);
     78bool         outDatedBcep(const t_eph *eph, bncTime tt);
    7979
    8080QByteArray   ggaString(const QByteArray& latitude, const QByteArray& longitude,
  • trunk/BNC/src/combination/bnccomb.cpp

    r10311 r10330  
    638638////////////////////////////////////////////////////////////////////////////
    639639void bncComb::processEpoch(bncTime epoTime, const vector<t_clkCorr>& clkCorrVec) {
    640 
     640  QDateTime now = currentDateAndTimeGPS();
     641  bncTime   currentTime(now.toString(Qt::ISODate).toStdString());
    641642  for (unsigned ii = 0; ii < clkCorrVec.size(); ii++) {
    642643    const t_clkCorr& clkCorr = clkCorrVec[ii];
     
    698699      continue;
    699700    }
    700     else if (ephLast->checkState() == t_eph::bad ||
     701    else if (outDatedBcep(ephLast, currentTime)  ||
     702             ephLast->checkState() == t_eph::bad ||
    701703             ephLast->checkState() == t_eph::outdated ||
    702704             ephLast->checkState() == t_eph::unhealthy) {
     
    711713        _newCorr->_eph = ephLast;
    712714      }
    713       else if (ephPrev && ephPrev->checkState() == t_eph::ok &&
     715      else if (ephPrev &&
     716               !outDatedBcep(ephPrev, currentTime) &&  // if not updated in storage
     717               ephPrev->checkState() == t_eph::ok  &&  // received
    714718               ephPrev->IOD() == _newCorr->_iod) {
    715719        _newCorr->_eph = ephPrev;
  • trunk/BNC/src/upload/bncrtnetuploadcaster.cpp

    r10227 r10330  
    543543    }
    544544
     545    QDateTime now = currentDateAndTimeGPS();
     546    bncTime   currentTime(now.toString(Qt::ISODate).toStdString());
    545547    if (eph &&
    546         !outDatedBcep(eph)                    &&  // detected from storage because of no update
     548        !outDatedBcep(eph, currentTime)       &&  // detected from storage because of no update
    547549        eph->checkState() != t_eph::bad       &&
    548550        eph->checkState() != t_eph::unhealthy &&
Note: See TracChangeset for help on using the changeset viewer.