Ignore:
Timestamp:
Aug 28, 2020, 10:19:54 PM (4 years ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/bncephuser.cpp

    r8850 r9060  
    221221    QDateTime now = currentDateAndTimeGPS();
    222222    bncTime currentTime(now.toString(Qt::ISODate).toStdString());
    223     double dt = currentTime - toc;
     223    double dt = fabs(currentTime - toc);
    224224
    225225    // update interval: 2h, data sets are valid for 4 hours
    226     if      ((eph->type() == t_eph::GPS)     &&
    227              (dt < -2*3600 || dt > 4*3600)) {
     226    if      (eph->type() == t_eph::GPS     && dt > 4*3600) {
    228227      eph->setCheckState(t_eph::outdated);
    229228      return;
    230229    }
    231230    // update interval: 3h, data sets are valid for 4 hours
    232     else if ((eph->type() == t_eph::Galileo) &&
    233              (dt < -3*3600 || dt > 4*3600)) {
     231    else if (eph->type() == t_eph::Galileo && dt > 4*3600) {
    234232      eph->setCheckState(t_eph::outdated);
    235233      return;
    236234    }
    237235    // updated every 30 minutes
    238     else if ((eph->type() == t_eph::GLONASS) &&
    239              (dt < -1800   || dt > 2*3600)) {
     236    else if (eph->type() == t_eph::GLONASS && dt > 2*3600) {
    240237      eph->setCheckState(t_eph::outdated);
    241238      return;
    242239    }
    243240    // orbit parameters are valid for 7200 seconds (minimum)
    244     else if ((eph->type() == t_eph::QZSS)    &&
    245              (dt < -1*3600 || dt > 3*3600)) {
     241    else if (eph->type() == t_eph::QZSS    && dt > 3*3600) {
    246242      eph->setCheckState(t_eph::outdated);
    247243      return;
    248244    }
    249245    // maximum update interval: 300 sec
    250     else if ((eph->type() == t_eph::SBAS)    &&
    251              (dt < -300    || dt > 1*3600)) {
     246    else if (eph->type() == t_eph::SBAS    && dt > 1*3600) {
    252247      eph->setCheckState(t_eph::outdated);
    253248      return;
    254249    }
    255250    // updates 1h (GEO) up to 6 hours non-GEO
    256     else if ((eph->type() == t_eph::BDS)     &&
    257              (dt < -1*3600 || dt > 6*3600)) {
     251    else if (eph->type() == t_eph::BDS     && dt > 6*3600) {
    258252      eph->setCheckState(t_eph::outdated);
    259253      return;
    260254    }
    261255    // update interval: up to 24 hours
    262     else if ((eph->type() == t_eph::IRNSS)   &&
    263              (dt < -1*3600 || dt > 24*3600)) {
     256    else if (eph->type() == t_eph::IRNSS   && dt > 24*3600) {
    264257      eph->setCheckState(t_eph::outdated);
    265258      return;
Note: See TracChangeset for help on using the changeset viewer.