Changeset 8850 in ntrip for branches/BNC_2.12


Ignore:
Timestamp:
Nov 19, 2019, 2:33:00 PM (5 years ago)
Author:
stuerze
Message:

minor changes in ephemris check

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

Legend:

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

    r8846 r8850  
    221221    QDateTime now = currentDateAndTimeGPS();
    222222    bncTime currentTime(now.toString(Qt::ISODate).toStdString());
    223     double timeDiff = currentTime - toc;
     223    double dt = currentTime - toc;
    224224
    225225    // update interval: 2h, data sets are valid for 4 hours
    226226    if      ((eph->type() == t_eph::GPS)     &&
    227              (timeDiff < -2*3600 || timeDiff > 4*3600)) {
     227             (dt < -2*3600 || dt > 4*3600)) {
    228228      eph->setCheckState(t_eph::outdated);
    229229      return;
     
    231231    // update interval: 3h, data sets are valid for 4 hours
    232232    else if ((eph->type() == t_eph::Galileo) &&
    233              (timeDiff < -3*3600 || timeDiff > 4*3600)) {
     233             (dt < -3*3600 || dt > 4*3600)) {
    234234      eph->setCheckState(t_eph::outdated);
    235235      return;
     
    237237    // updated every 30 minutes
    238238    else if ((eph->type() == t_eph::GLONASS) &&
    239              (timeDiff < -1800   || timeDiff > 2*3600)) {
     239             (dt < -1800   || dt > 2*3600)) {
    240240      eph->setCheckState(t_eph::outdated);
    241241      return;
     
    243243    // orbit parameters are valid for 7200 seconds (minimum)
    244244    else if ((eph->type() == t_eph::QZSS)    &&
    245              (timeDiff < -1*3600 || timeDiff > 3*3600)) {
     245             (dt < -1*3600 || dt > 3*3600)) {
    246246      eph->setCheckState(t_eph::outdated);
    247247      return;
     
    249249    // maximum update interval: 300 sec
    250250    else if ((eph->type() == t_eph::SBAS)    &&
    251              (timeDiff < -300    || timeDiff > 1*3600)) {
     251             (dt < -300    || dt > 1*3600)) {
    252252      eph->setCheckState(t_eph::outdated);
    253253      return;
     
    255255    // updates 1h (GEO) up to 6 hours non-GEO
    256256    else if ((eph->type() == t_eph::BDS)     &&
    257              (timeDiff < -1*3600 || timeDiff > 6*3600)) {
     257             (dt < -1*3600 || dt > 6*3600)) {
    258258      eph->setCheckState(t_eph::outdated);
    259259      return;
     
    261261    // update interval: up to 24 hours
    262262    else if ((eph->type() == t_eph::IRNSS)   &&
    263              (timeDiff < -1*3600 || timeDiff > 24*3600)) {
     263             (dt < -1*3600 || dt > 24*3600)) {
    264264      eph->setCheckState(t_eph::outdated);
    265265      return;
     
    277277    ColumnVector vvL(3);
    278278    ephL->getCrd(eph->TOC(), xcL, vvL, false);
    279 
    280     double dt    = fabs(eph->TOC() - ephL->TOC());
     279    double dt = eph->TOC() - ephL->TOC();
     280    if (dt < 0.0) {
     281      dt += 604800.0;
     282    }
    281283    double diff  = (xc.Rows(1,3) - xcL.Rows(1,3)).norm_Frobenius();
    282284    double diffC = fabs(xc(4) - xcL(4)) * t_CST::c;
  • branches/BNC_2.12/src/bncversion.h

    r8843 r8850  
    33#define BNCVERSION_H
    44
    5 #define BNCVERSION "2.12.11"
     5#define BNCVERSION "2.12.12"
    66#define BNCPGMNAME "BNC " BNCVERSION
    77
Note: See TracChangeset for help on using the changeset viewer.