Changeset 7422 in ntrip for trunk/BNC/src/latencychecker.cpp


Ignore:
Timestamp:
Sep 25, 2015, 10:55:41 AM (9 years ago)
Author:
weber
Message:

String perfIntr changed to miscIntr

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/latencychecker.cpp

    r7333 r7422  
    9494  // Latency interval/average
    9595  // ------------------------
    96   _perfIntr = 1;
    97   QString perfIntr = settings.value("perfIntr").toString();
    98   if      ( perfIntr.isEmpty() ) {
    99     _perfIntr = 1;
    100   }
    101   else if ( perfIntr.indexOf("2 sec")   != -1 ) {
    102     _perfIntr = 2;
    103   }
    104   else if ( perfIntr.indexOf("10 sec")  != -1 ) {
    105     _perfIntr = 10;
    106   }
    107   else if ( perfIntr.indexOf("1 min")   != -1 ) {
    108     _perfIntr = 60;
    109   }
    110   else if ( perfIntr.left(5).indexOf("5 min")   != -1 ) {
    111     _perfIntr = 300;
    112   }
    113   else if ( perfIntr.indexOf("15 min")  != -1 ) {
    114     _perfIntr = 900;
    115   }
    116   else if ( perfIntr.indexOf("1 hour")  != -1 ) {
    117     _perfIntr = 3600;
    118   }
    119   else if ( perfIntr.indexOf("6 hours") != -1 ) {
    120     _perfIntr = 21600;
    121   }
    122   else if ( perfIntr.indexOf("1 day")   != -1 ) {
    123     _perfIntr = 86400;
     96  _miscIntr = 1;
     97  QString miscIntr = settings.value("miscIntr").toString();
     98  if      ( miscIntr.isEmpty() ) {
     99    _miscIntr = 1;
     100  }
     101  else if ( miscIntr.indexOf("2 sec")   != -1 ) {
     102    _miscIntr = 2;
     103  }
     104  else if ( miscIntr.indexOf("10 sec")  != -1 ) {
     105    _miscIntr = 10;
     106  }
     107  else if ( miscIntr.indexOf("1 min")   != -1 ) {
     108    _miscIntr = 60;
     109  }
     110  else if ( miscIntr.left(5).indexOf("5 min")   != -1 ) {
     111    _miscIntr = 300;
     112  }
     113  else if ( miscIntr.indexOf("15 min")  != -1 ) {
     114    _miscIntr = 900;
     115  }
     116  else if ( miscIntr.indexOf("1 hour")  != -1 ) {
     117    _miscIntr = 3600;
     118  }
     119  else if ( miscIntr.indexOf("6 hours") != -1 ) {
     120    _miscIntr = 21600;
     121  }
     122  else if ( miscIntr.indexOf("1 day")   != -1 ) {
     123    _miscIntr = 86400;
    124124  }
    125125
     
    331331void latencyChecker::checkObsLatency(const QList<t_satObs>& obsList) {
    332332
    333   if (_perfIntr > 0 ) {
     333  if (_miscIntr > 0 ) {
    334334
    335335    QListIterator<t_satObs> it(obsList);
     
    339339      _newSecGPS = static_cast<int>(obs._time.gpssec());
    340340      if (_newSecGPS != _oldSecGPS) {
    341         if (_newSecGPS % _perfIntr < _oldSecGPS % _perfIntr) {
     341        if (_newSecGPS % _miscIntr < _oldSecGPS % _miscIntr) {
    342342          if (_numLat > 0) {
    343343            if (_meanDiff > 0.0) {
     
    423423  }
    424424
    425   if (_perfIntr > 0) {
     425  if (_miscIntr > 0) {
    426426
    427427    _newSecGPS = corrGPSEpochTime;
     
    440440    }
    441441    if (_newSecGPS != _oldSecGPS) {
    442       if (int(_newSecGPS) % _perfIntr < int(_oldSecGPS) % _perfIntr) {
     442      if (int(_newSecGPS) % _miscIntr < int(_oldSecGPS) % _miscIntr) {
    443443        if (_numLat>0) {
    444444          QString late;
Note: See TracChangeset for help on using the changeset viewer.