Changeset 9202 in ntrip


Ignore:
Timestamp:
Nov 3, 2020, 12:49:16 PM (3 years ago)
Author:
stuerze
Message:

minor changes

File:
1 edited

Legend:

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

    r9199 r9202  
    206206  }
    207207  double rr = xc.Rows(1,3).NormFrobenius();
    208   double rv = vv.NormFrobenius();
     208
    209209  const double MINDIST = 2.e7;
    210210  const double MAXDIST = 6.e7;
    211211  if (rr < MINDIST || rr > MAXDIST || std::isnan(rr)) {
    212     eph->setCheckState(t_eph::bad);
    213     return;
    214   }
    215   if (eph->type() == t_eph::GLONASS && rv < 1.0) {
    216212    eph->setCheckState(t_eph::bad);
    217213    return;
     
    224220    QDateTime now = currentDateAndTimeGPS();
    225221    bncTime currentTime(now.toString(Qt::ISODate).toStdString());
    226     double dt = fabs(currentTime - toc);
     222    double dt = currentTime - toc;
    227223
    228224    // update interval: 2h, data sets are valid for 4 hours
    229     if      (eph->type() == t_eph::GPS     && dt > 4*3600) {
     225    if      (eph->type() == t_eph::GPS     && (dt > 4*3600.0 || dt < -2*3600.0)) {
    230226      eph->setCheckState(t_eph::outdated);
    231227      return;
    232228    }
    233229    // update interval: 3h, data sets are valid for 4 hours
    234     else if (eph->type() == t_eph::Galileo && dt > 4*3600) {
     230    else if (eph->type() == t_eph::Galileo && (dt > 4*3600.0 || dt <       0.0)) {
    235231      eph->setCheckState(t_eph::outdated);
    236232      return;
    237233    }
    238234    // updated every 30 minutes
    239     else if (eph->type() == t_eph::GLONASS && dt > 2*3600) {
     235    else if (eph->type() == t_eph::GLONASS && (dt > 1*3600.0 || dt <   -1800.0)) {
    240236      eph->setCheckState(t_eph::outdated);
    241237      return;
    242238    }
    243239    // orbit parameters are valid for 7200 seconds (minimum)
    244     else if (eph->type() == t_eph::QZSS    && dt > 3*3600) {
     240    else if (eph->type() == t_eph::QZSS    && (dt > 2*3600.0 || dt < -1*3600.0)) {
    245241      eph->setCheckState(t_eph::outdated);
    246242      return;
    247243    }
    248244    // maximum update interval: 300 sec
    249     else if (eph->type() == t_eph::SBAS    && dt > 1*3600) {
     245    else if (eph->type() == t_eph::SBAS    && (dt >     600 || dt <       -300)) {
    250246      eph->setCheckState(t_eph::outdated);
    251247      return;
    252248    }
    253249    // updates 1h (GEO) up to 6 hours non-GEO
    254     else if (eph->type() == t_eph::BDS     && dt > 6*3600) {
     250    else if (eph->type() == t_eph::BDS     && (dt > 6*3600  || dt <        0.0)) {
    255251      eph->setCheckState(t_eph::outdated);
    256252      return;
    257253    }
    258254    // update interval: up to 24 hours
    259     else if (eph->type() == t_eph::IRNSS   && dt > 24*3600) {
     255    else if (eph->type() == t_eph::IRNSS   && fabs(dt > 24*3600)) {
    260256      eph->setCheckState(t_eph::outdated);
    261257      return;
     
    281277
    282278    // some lines to allow update of ephemeris data sets after outage
    283     if      (eph->type() == t_eph::GPS     && dt >  4*3600) {
    284       ephL->setCheckState(t_eph::outdated);
    285       return;
    286     }
    287     else if (eph->type() == t_eph::Galileo && dt >  4*3600) {
    288       ephL->setCheckState(t_eph::outdated);
    289       return;
    290     }
    291     else if (eph->type() == t_eph::GLONASS && dt >  2*3600) {
    292       ephL->setCheckState(t_eph::outdated);
    293       return;
    294     }
    295     else if (eph->type() == t_eph::QZSS    && dt >  3*3600) {
    296       ephL->setCheckState(t_eph::outdated);
    297       return;
    298     }
    299     else if  (eph->type() == t_eph::SBAS   && dt >    3600) {
    300       ephL->setCheckState(t_eph::outdated);
    301       return;
    302     }
     279    // update interval: 2h,
     280    if      (eph->type() == t_eph::GPS     && dt >  2*3600) {
     281      ephL->setCheckState(t_eph::outdated);
     282      return;
     283    }
     284    // update interval: 3h,
     285    else if (eph->type() == t_eph::Galileo && dt >  3*3600) {
     286      ephL->setCheckState(t_eph::outdated);
     287      return;
     288    }
     289    // updated every 30 minutes
     290    else if (eph->type() == t_eph::GLONASS && dt >    1800) {
     291      ephL->setCheckState(t_eph::outdated);
     292      return;
     293    }
     294    // updated every ?
     295    else if (eph->type() == t_eph::QZSS    && dt >  2*3600) {
     296      ephL->setCheckState(t_eph::outdated);
     297      return;
     298    }
     299    // maximum update interval: 300 sec
     300    else if  (eph->type() == t_eph::SBAS   && dt >     300) {
     301      ephL->setCheckState(t_eph::outdated);
     302      return;
     303    }
     304    // updates 1h (GEO) up to 6 hours non-GEO
    303305    else if  (eph->type() == t_eph::BDS    && dt >  6*3600) {
    304306      ephL->setCheckState(t_eph::outdated);
    305307      return;
    306308    }
     309    // update interval: up to 24 hours
    307310    else if  (eph->type() == t_eph::IRNSS  && dt > 24*3600) {
    308311      ephL->setCheckState(t_eph::outdated);
Note: See TracChangeset for help on using the changeset viewer.