Changeset 9192 in ntrip


Ignore:
Timestamp:
Oct 31, 2020, 10:12:56 PM (3 years ago)
Author:
stuerze
Message:

some more ephemeris checks are added

Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/RTCM3Decoder.cpp

    r9124 r9192  
    10461046    GETFLOATSIGN(eph._Cus,            16, 1.0 / (double )(1 << 29))
    10471047    GETFLOAT(eph._sqrt_A,             32, 1.0 / (double )(1 << 19))
     1048    if (eph._sqrt_A < 1000.0) {return false;}
    10481049    GETBITS(i, 16)
    10491050    i <<= 4;
     
    11001101    GETBITS(eph._almanac_health, 1) /* almanac healthy */
    11011102    GETBITS(eph._almanac_health_availablility_indicator, 1) /* almanac health ok */
     1103    if (eph._almanac_health_availablility_indicator == 0.0) {return false;}
    11021104    GETBITS(eph._P1, 2) /*  P1 */
    11031105    GETBITS(i, 5)
     
    11351137    GETBITS(eph._M_FT,  4) /* GLONASS-M Ft */
    11361138    GETBITS(eph._M_NT, 11) /* GLONASS-M Nt */
     1139    if (eph._M_NT == 0.0) {return false;}
    11371140    GETBITS(eph._M_M,   2) /* GLONASS-M M */
    11381141    GETBITS(eph._additional_data_availability, 1) /* GLONASS-M The Availability of Additional Data */
     1142    if (eph._additional_data_availability == 0.0) {return false;}
    11391143    GETBITS(eph._NA,  11) /* GLONASS-M Na */
    11401144    GETFLOATSIGNM(eph._tauC,       32, 1.0/(double)(1<<30)/(double)(1<<1)) /* GLONASS tau c */
     
    11991203    GETFLOATSIGN(eph._Cus,     16, 1.0 / (double )(1 << 29))
    12001204    GETFLOAT(eph._sqrt_A,      32, 1.0 / (double )(1 << 19))
     1205    if (eph._sqrt_A < 1000.0) {return false;}
    12011206    GETBITS(i, 16)
    12021207    i <<= 4;
     
    13071312    GETFLOAT(eph._e,            32, 1.0 / (double )(1 << 30) / (double )(1 << 3))
    13081313    GETFLOAT(eph._sqrt_A,       32, 1.0 / (double )(1 << 19))
     1314    if (eph._sqrt_A < 1000.0) {return false;}
    13091315    GETFLOATSIGN(eph._OMEGA0,   32, R2R_PI/(double)(1<<30)/(double)(1<< 1))
    13101316    GETFLOATSIGN(eph._omega,    32, R2R_PI/(double)(1<<30)/(double)(1<< 1))
     
    14041410    GETFLOATSIGN(eph._Cus,            16, 1.0 / (double )(1 << 29))
    14051411    GETFLOAT(eph._sqrt_A,             32, 1.0 / (double )(1 << 19))
     1412    if (eph._sqrt_A < 1000.0) {return false;}
    14061413    GETBITSFACTOR(eph._TOEsec, 14, 60)
    14071414    /* FIXME: overwrite value, copied from old code */
     
    14251432      GETBITS(eph._E1_bHS, 2)
    14261433      GETBITS(eph._e1DataInValid, 1)
     1434      if (eph._E5bHS != eph._E1_bHS) {
     1435        return false;
     1436      }
     1437      if ((eph._BGD_1_5A == 0.0 && fabs(eph._BGD_1_5B) > 1e-9) ||
     1438          (eph._BGD_1_5B == 0.0 && fabs(eph._BGD_1_5A) > 1e-9)) {
     1439        return false;
     1440      }
    14271441    }
    14281442    else {
     
    14841498    GETFLOATSIGN(eph._Cus,     18, 1.0 / (double )(1 << 30) / (double )(1 << 1))
    14851499    GETFLOAT(eph._sqrt_A,      32, 1.0 / (double )(1 << 19))
     1500    if (eph._sqrt_A < 1000.0) {return false;}
    14861501    GETBITS(i, 17)
    14871502    i <<= 3;
     
    16931708          case 1045:
    16941709          case 1046:
     1710            // reject 1045/1046 from JAXA RTKLIB encoded stations
     1711            if (_staID.contains("AIRA") || _staID.contains("STK2") ||
     1712                _staID.contains("CCJ2") || _staID.contains("SYOG")) {
     1713              break;
     1714            }
    16951715            if (DecodeGalileoEphemeris(_Message, _BlockSize))
    16961716              decoded = true;
  • trunk/BNC/src/bncephuser.cpp

    r9059 r9192  
    205205    return;
    206206  }
    207 
    208207  double rr = xc.Rows(1,3).NormFrobenius();
    209 
     208  double rv = vv.NormFrobenius();
    210209  const double MINDIST = 2.e7;
    211210  const double MAXDIST = 6.e7;
    212211  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) {
    213216    eph->setCheckState(t_eph::bad);
    214217    return;
Note: See TracChangeset for help on using the changeset viewer.