Changeset 9249 in ntrip for branches/BNC_2.12/src/bncutils.cpp


Ignore:
Timestamp:
Nov 12, 2020, 11:49:23 AM (4 years ago)
Author:
stuerze
Message:

another check is added, to prevent the usage of not updated nav data sets during ssr upload

File:
1 edited

Legend:

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

    r9089 r9249  
    255255  currentGPSWeeks(week, sec);
    256256  bncTime currTime(week, sec);
     257
    257258  if (((currTime - obsTime) < 0.0) ||
    258259      (fabs(currTime - obsTime) > maxDt)) {
     
    261262  return false;
    262263}
     264
     265//
     266////////////////////////////////////////////////////////////////////////////
     267bool outDatedBcep(const t_eph *eph) {
     268  bncTime   toc = eph->TOC();
     269  QDateTime now = currentDateAndTimeGPS();
     270  bncTime currentTime(now.toString(Qt::ISODate).toStdString());
     271  double dt = currentTime - toc;
     272
     273  // update interval: 2h, data sets are valid for 4 hours
     274  if      (eph->type() == t_eph::GPS     && dt > 4*3600.0) {
     275    return true;
     276  }
     277  // update interval: 3h, data sets are valid for 4 hours
     278  else if (eph->type() == t_eph::Galileo && dt > 4*3600.0) {
     279    return true;
     280  }
     281  // updated every 30 minutes
     282  else if (eph->type() == t_eph::GLONASS && dt > 1*3600.0) {
     283    return true;
     284  }
     285  // orbit parameters are valid for 7200 seconds (minimum)
     286  else if (eph->type() == t_eph::QZSS    && dt > 2*3600.0) {
     287    return true;
     288  }
     289  // maximum update interval: 300 sec
     290  else if (eph->type() == t_eph::SBAS    && dt >    600.0) {
     291    return true;
     292  }
     293  // updates 1h (GEO) up to 6 hours non-GEO
     294  else if (eph->type() == t_eph::BDS     && dt > 6*3600.0) {
     295    return true;
     296  }
     297  // update interval: up to 24 hours
     298  else if (eph->type() == t_eph::IRNSS   && dt > 24*3600.0) {
     299    return true;
     300  }
     301  return false;
     302}
     303
    263304//
    264305////////////////////////////////////////////////////////////////////////////
Note: See TracChangeset for help on using the changeset viewer.