Changeset 9193 in ntrip


Ignore:
Timestamp:
Oct 31, 2020, 10:14:11 PM (4 weeks ago)
Author:
stuerze
Message:

some more ephemeris checks are added

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

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/RTCM3/RTCM3Decoder.cpp

    r9089 r9193  
    10391039    GETFLOATSIGN(eph._clock_drift,    16, 1.0 / (double )(1 << 30) / (double )(1 << 13))
    10401040    GETFLOATSIGN(eph._clock_bias,     22, 1.0 / (double )(1 << 30) / (double )(1 << 1))
    1041 
    10421041    GETBITS(eph._IODC, 10)
    10431042    GETFLOATSIGN(eph._Crs, 16, 1.0 / (double )(1 << 5))
     
    10481047    GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29))
    10491048    GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19))
     1049    if (eph._sqrt_A < 1000.0) {return false;}
    10501050    GETBITS(i, 16)
    10511051    i <<= 4;
     
    11021102    GETBITS(eph._almanac_health, 1) /* almanac healthy */
    11031103    GETBITS(eph._almanac_health_availablility_indicator, 1) /* almanac health ok */
     1104    if (eph._almanac_health_availablility_indicator == 0.0) {return false;}
    11041105    GETBITS(eph._P1, 2) /*  P1 */
    11051106    GETBITS(i, 5)
     
    11091110    GETBITS(i, 1)
    11101111    tk += i * 30;
    1111        eph._tki = tk - 3*60*60;
     1112    eph._tki = tk - 3*60*60;
    11121113    if(eph._tki < 0.0) {
    11131114      eph._tki += 86400.0;
     
    11371138    GETBITS(eph._M_FT, 4) /* GLONASS-M Ft */
    11381139    GETBITS(eph._M_NT, 11) /* GLONASS-M Nt */
     1140    if (eph._M_NT == 0.0) {return false;}
    11391141    GETBITS(eph._M_M, 2) /* GLONASS-M M */
    11401142    GETBITS(eph._additional_data_availability, 1) /* GLONASS-M The Availability of Additional Data */
     1143    if (eph._additional_data_availability == 0.0) {return false;}
    11411144    GETBITS(eph._NA, 11) /* GLONASS-M Na */
    11421145    GETFLOATSIGNM(eph._tauC, 32, 1.0/(double)(1<<30)/(double)(1<<1)) /* GLONASS tau c */
     
    11931196    GETFLOATSIGN(eph._clock_drift,    16, 1.0 / (double )(1 << 30) / (double )(1 << 13))
    11941197    GETFLOATSIGN(eph._clock_bias,     22, 1.0 / (double )(1 << 30) / (double )(1 << 1))
    1195 
    11961198    GETBITS(eph._IODE, 8)
    11971199    GETFLOATSIGN(eph._Crs, 16, 1.0 / (double )(1 << 5))
     
    12021204    GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29))
    12031205    GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19))
     1206    if (eph._sqrt_A < 1000.0) {return false;}
    12041207    GETBITS(i, 16)
    12051208    i <<= 4;
     
    13101313    GETFLOAT(eph._e,            32, 1.0 / (double )(1 << 30) / (double )(1 << 3))
    13111314    GETFLOAT(eph._sqrt_A,       32, 1.0 / (double )(1 << 19))
     1315    if (eph._sqrt_A < 1000.0) {return false;}
    13121316    GETFLOATSIGN(eph._OMEGA0,   32, R2R_PI/(double)(1<<30)/(double)(1<< 1))
    13131317    GETFLOATSIGN(eph._omega,    32, R2R_PI/(double)(1<<30)/(double)(1<< 1))
     
    14071411    GETFLOATSIGN(eph._Cus, 16, 1.0 / (double )(1 << 29))
    14081412    GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19))
     1413    if (eph._sqrt_A < 1000.0) {return false;}
    14091414    GETBITSFACTOR(eph._TOEsec, 14, 60)
    14101415    /* FIXME: overwrite value, copied from old code */
     
    14231428      eph._e5aDataInValid = false;
    14241429
    1425 GETFLOATSIGN(eph._BGD_1_5B, 10, 1.0 / (double )(1 << 30) / (double )(1 << 2))
     1430      GETFLOATSIGN(eph._BGD_1_5B, 10, 1.0 / (double )(1 << 30) / (double )(1 << 2))
    14261431      GETBITS(eph._E5bHS, 2)
    14271432      GETBITS(eph._e5bDataInValid, 1)
    14281433      GETBITS(eph._E1_bHS, 2)
    14291434      GETBITS(eph._e1DataInValid, 1)
     1435      if (eph._E5bHS != eph._E1_bHS) {
     1436        return false;
     1437      }
     1438      if ((eph._BGD_1_5A == 0.0 && fabs(eph._BGD_1_5B) > 1e-9) ||
     1439          (eph._BGD_1_5B == 0.0 && fabs(eph._BGD_1_5A) > 1e-9)) {
     1440        return false;
     1441      }
    14301442    }
    14311443    else {
     
    14871499    GETFLOATSIGN(eph._Cus, 18, 1.0 / (double )(1 << 30) / (double )(1 << 1))
    14881500    GETFLOAT(eph._sqrt_A, 32, 1.0 / (double )(1 << 19))
    1489     GETBITS(i, 17)
     1501        if (eph._sqrt_A < 1000.0) {return false;}
     1502        GETBITS(i, 17)
    14901503    i <<= 3;
    14911504    eph._TOEsec = i;
     
    16791692          case 1045:
    16801693          case 1046:
     1694            // reject 1045/1046 from JAXA RTKLIB encoded stations
     1695            if (_staID.contains("AIRA") || _staID.contains("STK2") ||
     1696                _staID.contains("CCJ2") || _staID.contains("SYOG")) {
     1697              break;
     1698            }
    16811699            if (DecodeGalileoEphemeris(_Message, _BlockSize))
    16821700              decoded = true;
  • branches/BNC_2.12/src/bncephuser.cpp

    r9060 r9193  
    205205    return;
    206206  }
    207 
    208207  double rr = xc.Rows(1,3).norm_Frobenius();
    209 
     208  double rv = vv.norm_Frobenius();
    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.