Changeset 7208 in ntrip


Ignore:
Timestamp:
Aug 17, 2015, 2:34:40 PM (9 years ago)
Author:
stuerze
Message:

minor changes to decide between erroneous and outdated ephemerides during the ephemeris check

Location:
trunk/BNC/src
Files:
4 edited

Legend:

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

    r7179 r7208  
    208208  QMutexLocker locker(&_mutex);
    209209  t_irc ircPut = _ephUser.putNewEph(eph, true);
    210   if (eph->checkState() == t_eph::bad) {
     210  if      (eph->checkState() == t_eph::bad) {
    211211    messagePrivate("WRONG EPHEMERIS\n" + eph->toString(3.0).toAscii());
     212    return failure;
     213  }
     214  else if (eph->checkState() == t_eph::outdated) {
     215    messagePrivate("OUTDATED EPHEMERIS\n" + eph->toString(3.0).toAscii());
    212216    return failure;
    213217  }
  • trunk/BNC/src/bncephuser.cpp

    r7041 r7208  
    154154  const t_eph* ephOld = ephLast(prn);
    155155
    156   if (ephOld && ephOld->checkState() == t_eph::bad) {
     156  if (ephOld &&
     157      (ephOld->checkState() == t_eph::bad ||
     158       ephOld->checkState() == t_eph::outdated)) {
    157159    ephOld = 0;
    158160  }
    159161 
    160162  if ((ephOld == 0 || newEph->isNewerThan(ephOld)) &&
    161       eph->checkState() != t_eph::bad) {
     163      (eph->checkState() != t_eph::bad ||
     164       eph->checkState() != t_eph::outdated)) {
    162165    deque<t_eph*>& qq = _eph[prn];
    163166    qq.push_back(newEph);
     
    210213  if      (eph->type() == t_eph::GPS  || t_eph::Galileo) {
    211214    if (timeDiff > 4*3600) { // update interval: 2h, data sets are valid for 4 hours
    212       eph->setCheckState(t_eph::bad);
     215      eph->setCheckState(t_eph::outdated);
    213216      return;
    214217    }
     
    216219  else if (eph->type() == t_eph::GLONASS) {
    217220    if (timeDiff > 1*3600) { // updated every 30 minutes
    218       eph->setCheckState(t_eph::bad);
     221      eph->setCheckState(t_eph::outdated);
    219222      return;
    220223    }
     
    222225  else if (eph->type() == t_eph::QZSS) {
    223226    if (timeDiff > 1*1800) {
    224       eph->setCheckState(t_eph::bad);
     227      eph->setCheckState(t_eph::outdated);
    225228      return;
    226229    }
     
    228231  else if (eph->type() == t_eph::SBAS) {
    229232    if (timeDiff > 600) { // maximum update interval: 300 sec
    230       eph->setCheckState(t_eph::bad);
     233      eph->setCheckState(t_eph::outdated);
    231234      return;
    232235    }
     
    234237  else if (eph->type() == t_eph::BDS) {
    235238    if (timeDiff > 6*3600) { // updates 1 (GEO) up to 6 hours
    236       eph->setCheckState(t_eph::bad);
     239      eph->setCheckState(t_eph::outdated);
    237240      return;
    238241    }
     
    256259    if      ((eph->type() == t_eph::GPS ||
    257260              eph->type() == t_eph::Galileo)  && dt > 4*3600) {
    258       ephL->setCheckState(t_eph::bad);
     261      ephL->setCheckState(t_eph::outdated);
    259262      return;
    260263    }
    261264    else if ((eph->type() == t_eph::GLONASS ||
    262265              eph->type() == t_eph::QZSS)     && dt > 2*3600) {
    263       ephL->setCheckState(t_eph::bad);
     266      ephL->setCheckState(t_eph::outdated);
    264267      return;
    265268    }
    266269    else if  (eph->type() == t_eph::SBAS      && dt > 1*3600)   {
    267       ephL->setCheckState(t_eph::bad);
     270      ephL->setCheckState(t_eph::outdated);
    268271      return;
    269272    }
    270273    else if  (eph->type() == t_eph::BDS       && dt > 6*3600)   {
    271       ephL->setCheckState(t_eph::bad);
     274      ephL->setCheckState(t_eph::outdated);
    272275      return;
    273276    }
  • trunk/BNC/src/ephemeris.h

    r7169 r7208  
    1818 public:
    1919  enum e_type {unknown, GPS, QZSS, GLONASS, Galileo, SBAS, BDS};
    20   enum e_checkState {unchecked, ok, bad};
     20  enum e_checkState {unchecked, ok, bad, outdated};
    2121
    2222  t_eph();
  • trunk/BNC/src/rinex/rnxnavfile.cpp

    r7169 r7208  
    200200      eph = new t_ephBDS(version(), lines);
    201201    }
    202     if (eph && eph->checkState() != t_eph::bad) {
     202    if (eph &&
     203        eph->checkState() != t_eph::bad &&
     204        eph->checkState() != t_eph::outdated) {
    203205      _ephs.push_back(eph);
    204206    }
Note: See TracChangeset for help on using the changeset viewer.