Changeset 9249 in ntrip


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

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

Location:
branches/BNC_2.12/src
Files:
4 edited

Legend:

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

    r9241 r9249  
    166166
    167167  if (eph->checkState() != t_eph::bad &&
    168        eph->checkState() != t_eph::outdated) {
     168      eph->checkState() != t_eph::outdated) {
    169169    deque<t_eph*>& qq = _eph[prn];
    170170    qq.push_back(newEph);
     
    243243    }
    244244    // maximum update interval: 300 sec
    245     else if (eph->type() == t_eph::SBAS    && (dt >     600 || dt <       -300)) {
     245    else if (eph->type() == t_eph::SBAS    && (dt >     600 || dt <     -300.0)) {
    246246      eph->setCheckState(t_eph::outdated);
    247247      return;
     
    253253    }
    254254    // update interval: up to 24 hours
    255     else if (eph->type() == t_eph::IRNSS   && fabs(dt > 24*3600)) {
     255    else if (eph->type() == t_eph::IRNSS   && fabs(dt > 24*3600.0)) {
    256256      eph->setCheckState(t_eph::outdated);
    257257      return;
     
    279279    // some lines to allow update of ephemeris data sets after an outage
    280280    // update interval: 2h,
    281     if      (eph->type() == t_eph::GPS     && dt >  2*3600) {
     281    if      (eph->type() == t_eph::GPS     && dt >  2*3600.0) {
    282282      ephL->setCheckState(t_eph::outdated);
    283283      return;
    284284    }
    285285    // update interval: 3h,
    286     else if (eph->type() == t_eph::Galileo && dt >  3*3600) {
     286    else if (eph->type() == t_eph::Galileo && dt >  3*3600.0) {
    287287      ephL->setCheckState(t_eph::outdated);
    288288      return;
    289289    }
    290290    // updated every 30 minutes
    291     else if (eph->type() == t_eph::GLONASS && dt >    1800) {
     291    else if (eph->type() == t_eph::GLONASS && dt >    1800.0) {
    292292      ephL->setCheckState(t_eph::outdated);
    293293      return;
    294294    }
    295295    // updated every ?
    296     else if (eph->type() == t_eph::QZSS    && dt >  2*3600) {
     296    else if (eph->type() == t_eph::QZSS    && dt >  2*3600.0) {
    297297      ephL->setCheckState(t_eph::outdated);
    298298      return;
    299299    }
    300300    // maximum update interval: 300 sec
    301     else if  (eph->type() == t_eph::SBAS   && dt >     300) {
     301    else if  (eph->type() == t_eph::SBAS   && dt >     300.0) {
    302302      ephL->setCheckState(t_eph::outdated);
    303303      return;
    304304    }
    305305    // updates 1h (GEO) up to 6 hours non-GEO
    306     else if  (eph->type() == t_eph::BDS    && dt >  6*3600) {
     306    else if  (eph->type() == t_eph::BDS    && dt >  6*3600.0) {
    307307      ephL->setCheckState(t_eph::outdated);
    308308      return;
    309309    }
    310310    // update interval: up to 24 hours
    311     else if  (eph->type() == t_eph::IRNSS  && dt > 24*3600) {
     311    else if  (eph->type() == t_eph::IRNSS  && dt > 24*3600.0) {
    312312      ephL->setCheckState(t_eph::outdated);
    313313      return;
  • 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////////////////////////////////////////////////////////////////////////////
  • branches/BNC_2.12/src/bncutils.h

    r8855 r9249  
    6565bool         checkForWrongObsEpoch(bncTime obsEpoch);
    6666
     67bool         outDatedBcep(const t_eph *eph);
     68
    6769QByteArray   ggaString(const QByteArray& latitude, const QByteArray& longitude,
    6870                       const QByteArray& height, const QString& ggaType);
     
    149151*/
    150152double       lti2sec(int type, int lti);
    151 
    152153
    153154// CRC24Q checksum calculation function (only full bytes supported).
  • branches/BNC_2.12/src/upload/bncrtnetuploadcaster.cpp

    r9206 r9249  
    2222#include "bncsp3.h"
    2323#include "gnss.h"
     24#include "bncutils.h"
    2425
    2526using namespace std;
     
    384385  for (int ii = 1; ii < lines.size(); ii++) {
    385386    QString key;  // prn or key VTEC, IND (phase bias indicators)
    386     double rtnUra = 0.0;    // [m]
     387    double rtnUra = 0.0; // [m]
    387388    ColumnVector rtnAPC; rtnAPC.ReSize(3); rtnAPC = 0.0;          // [m, m, m]
    388389    ColumnVector rtnVel; rtnVel.ReSize(3); rtnVel = 0.0;          // [m/s, m/s, m/s]
     
    467468    }
    468469
    469     if (eph  &&
    470         eph->checkState() != t_eph::bad &&
     470    if (eph  &&  !outDatedBcep(eph)           &&  // detected from storage because of no update
     471        eph->checkState() != t_eph::bad       &&
    471472        eph->checkState() != t_eph::unhealthy &&
    472         eph->checkState() != t_eph::outdated) {
     473        eph->checkState() != t_eph::outdated) {  // detected during reception (bncephuser)
    473474      QMap<QString, double> codeBiases;
    474475      QList<phaseBiasSignal> phaseBiasList;
     
    926927
    927928  _outBuffer += hlpBufferCo + hlpBufferBias + hlpBufferPhaseBias
    928       + hlpBufferVtec + '\0';;
     929      + hlpBufferVtec + '\0';
    929930}
    930931
Note: See TracChangeset for help on using the changeset viewer.