Ignore:
Timestamp:
Dec 10, 2024, 3:57:21 PM (3 months ago)
Author:
stuerze
Message:

RINEX version 4.02 updates

File:
1 edited

Legend:

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

    r10579 r10587  
    10641064    }
    10651065    GETBITS(i, 4)
    1066     eph._ura = accuracyFromIndex(i, eph.type());
     1066    eph._ura = accuracyFromIndex(i, eph.system());
    10671067    GETBITS(eph._L2Codes, 2)
    10681068    GETFLOATSIGN(eph._IDOT, 14, R2R_PI/(double)(1<<30)/(double)(1<<13))
     
    11321132    GETBITS(eph._L2PFlag, 1)
    11331133    GETBITS(fitIntervalFalg, 1)
    1134     eph._fitInterval = fitIntervalFromFlag(fitIntervalFalg, eph._IODC, eph.type());
     1134    eph._fitInterval = fitIntervalFromFlag(fitIntervalFalg, eph._IODC, eph.system());
    11351135    eph._TOT = 0.9999e9;
    1136     eph._ephType = t_eph::LNAV;
     1136    eph._type = t_eph::LNAV;
    11371137
    11381138    emit newGPSEph(eph);
     
    11591159    eph._receptStaID = _staID;
    11601160
    1161     eph._flags_unknown = true;
    1162 
    11631161    GETBITS(sv, 6)
    11641162    if (sv < 1 || sv > 63) {
     
    11841182      return false;
    11851183    }
    1186     eph._frequency_number = i - 7;
     1184    eph._frq_num = i - 7;
    11871185    GETBITS(eph._almanac_health, 1) /* almanac healthy */
    11881186    GETBITS(eph._almanac_health_availablility_indicator, 1) /* almanac health ok */
     
    12451243    eph._TOC.setTk(i * 60 * 1000); /* tb */
    12461244
    1247     GETFLOATSIGNM(eph._x_velocity,    24, 1.0 / (double )(1 << 20))
    1248     GETFLOATSIGNM(eph._x_pos,         27, 1.0 / (double )(1 << 11))
    1249     GETFLOATSIGNM(eph._x_acceleration, 5, 1.0 / (double )(1 << 30))
    1250     GETFLOATSIGNM(eph._y_velocity,    24, 1.0 / (double )(1 << 20))
    1251     GETFLOATSIGNM(eph._y_pos,         27, 1.0 / (double )(1 << 11))
    1252     GETFLOATSIGNM(eph._y_acceleration, 5, 1.0 / (double )(1 << 30))
    1253     GETFLOATSIGNM(eph._z_velocity,    24, 1.0 / (double )(1 << 20))
    1254     GETFLOATSIGNM(eph._z_pos,         27, 1.0 / (double )(1 << 11))
    1255     GETFLOATSIGNM(eph._z_acceleration, 5, 1.0 / (double )(1 << 30))
     1245    GETFLOATSIGNM(eph._x_vel, 24, 1.0 / (double )(1 << 20))
     1246    GETFLOATSIGNM(eph._x_pos, 27, 1.0 / (double )(1 << 11))
     1247    GETFLOATSIGNM(eph._x_acc, 5, 1.0 / (double )(1 << 30))
     1248    GETFLOATSIGNM(eph._y_vel, 24, 1.0 / (double )(1 << 20))
     1249    GETFLOATSIGNM(eph._y_pos, 27, 1.0 / (double )(1 << 11))
     1250    GETFLOATSIGNM(eph._y_acc, 5, 1.0 / (double )(1 << 30))
     1251    GETFLOATSIGNM(eph._z_vel, 24, 1.0 / (double )(1 << 20))
     1252    GETFLOATSIGNM(eph._z_pos, 27, 1.0 / (double )(1 << 11))
     1253    GETFLOATSIGNM(eph._z_acc, 5, 1.0 / (double )(1 << 30))
    12561254    GETBITS(eph._P3, 1)    /* P3 */
    12571255    GETFLOATSIGNM(eph._gamma,      11, 1.0 / (double )(1 << 30) / (double )(1 << 10))
     
    12811279      return false;
    12821280    }
    1283     GETBITS(eph._NA,  11) /* GLONASS-M Na */
     1281    GETBITS(eph._M_NA,  11) /* GLONASS-M Na */
    12841282    GETFLOATSIGNM(eph._tauC,       32, 1.0/(double)(1<<30)/(double)(1<<1)) /* GLONASS tau c */
    12851283    GETBITS(eph._M_N4, 5) /* GLONASS-M N4 */
     
    13021300      return false;
    13031301    }
    1304     eph._xv(4) = eph._x_velocity * 1.e3;
    1305     eph._xv(5) = eph._y_velocity * 1.e3;
    1306     eph._xv(6) = eph._z_velocity * 1.e3;
     1302    eph._xv(4) = eph._x_vel * 1.e3;
     1303    eph._xv(5) = eph._y_vel * 1.e3;
     1304    eph._xv(6) = eph._z_vel * 1.e3;
    13071305    if (eph._xv.Rows(4,6).NormFrobenius() < 1.0) {
    13081306#ifdef BNC_DEBUG_BCE
     
    13121310      return false;
    13131311    }
    1314     GLOFreq[sv - 1] = 100 + eph._frequency_number ; /* store frequency for other users (MSM) */
    1315     _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(eph._frequency_number, 2, 'f', 0);
    1316 
    1317     eph._ephType = t_eph::FDMA;
     1312    GLOFreq[sv - 1] = 100 + eph._frq_num ; /* store frequency for other users (MSM) */
     1313    _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(eph._frq_num, 2, 'f', 0);
     1314
     1315    eph._type = t_eph::FDMA;
     1316    eph._healthflags_unknown = false;
     1317    eph._statusflags_unknown = false;
    13181318
    13191319    emit newGlonassEph(eph);
     
    14291429
    14301430    GETBITS(i, 4)
    1431     eph._ura = accuracyFromIndex(i, eph.type());
     1431    eph._ura = accuracyFromIndex(i, eph.system());
    14321432    GETBITS(eph._health, 6)
    14331433    GETFLOATSIGN(eph._TGD,       8, 1.0 / (double )(1 << 30) / (double )(1 << 1))
    14341434    GETBITS(eph._IODC, 10)
    14351435    GETBITS(fitIntervalFalg, 1)
    1436     eph._fitInterval = fitIntervalFromFlag(fitIntervalFalg, eph._IODC, eph.type());
     1436    eph._fitInterval = fitIntervalFromFlag(fitIntervalFalg, eph._IODC, eph.system());
    14371437    eph._TOT = 0.9999e9;
    1438     eph._ephType = t_eph::LNAV;
     1438    eph._type = t_eph::LNAV;
    14391439
    14401440    emit newGPSEph(eph);
     
    14871487    GETFLOATSIGN(eph._clock_driftrate, 8, 1.0 / (double )(1 << 30) / (double )(1 << 25))
    14881488    GETBITS(i, 4)
    1489     eph._ura = accuracyFromIndex(i, eph.type());
     1489    eph._ura = accuracyFromIndex(i, eph.system());
    14901490    GETBITS(i, 16)
    14911491    i <<= 4;
     
    15671567    SKIPBITS(2)
    15681568    eph._TOT = 0.9999e9;
    1569     eph._ephType = t_eph::LNAV;
     1569    eph._type = t_eph::LNAV;
    15701570
    15711571    emit newGPSEph(eph);
     
    16181618    eph._TOC.setTOD(i * 1000);
    16191619    GETBITS(i, 4)
    1620     eph._ura = accuracyFromIndex(i, eph.type());
     1620    eph._ura = accuracyFromIndex(i, eph.system());
    16211621    GETFLOATSIGN(eph._x_pos, 30, 0.08)
    16221622    GETFLOATSIGN(eph._y_pos, 30, 0.08)
     
    16311631      return false;
    16321632    }
    1633     GETFLOATSIGN(eph._x_velocity, 17, 0.000625)
    1634     GETFLOATSIGN(eph._y_velocity, 17, 0.000625)
    1635     GETFLOATSIGN(eph._z_velocity, 18, 0.004)
    1636     GETFLOATSIGN(eph._x_acceleration, 10, 0.0000125)
    1637     GETFLOATSIGN(eph._y_acceleration, 10, 0.0000125)
    1638     GETFLOATSIGN(eph._z_acceleration, 10, 0.0000625)
     1633    GETFLOATSIGN(eph._x_vel, 17, 0.000625)
     1634    GETFLOATSIGN(eph._y_vel, 17, 0.000625)
     1635    GETFLOATSIGN(eph._z_vel, 18, 0.004)
     1636    GETFLOATSIGN(eph._x_acc, 10, 0.0000125)
     1637    GETFLOATSIGN(eph._y_acc, 10, 0.0000125)
     1638    GETFLOATSIGN(eph._z_acc, 10, 0.0000625)
    16391639    GETFLOATSIGN(eph._agf0, 12, 1.0 / (1 << 30) / (1 << 1))
    16401640    GETFLOATSIGN(eph._agf1, 8, 1.0 / (1 << 30) / (1 << 10))
     
    16421642    eph._TOT = 0.9999E9;
    16431643    eph._health = 0;
    1644     eph._ephType = t_eph::SBASL1;
     1644    eph._type = t_eph::SBASL1;
    16451645
    16461646    emit newSBASEph(eph);
     
    16951695    GETBITS(eph._IODnav, 10)
    16961696    GETBITS(i, 8)
    1697     eph._SISA = accuracyFromIndex(i, eph.type());
     1697    eph._SISA = accuracyFromIndex(i, eph.system());
    16981698    GETFLOATSIGN(eph._IDOT, 14, R2R_PI/(double)(1<<30)/(double)(1<<13))
    16991699    GETBITSFACTOR(i, 14, 60)
     
    17311731    }
    17321732    /* FIXME: overwrite value, copied from old code */
    1733     eph._TOEsec = eph._TOC.gpssec();
     1733    //eph._TOEsec = eph._TOC.gpssec();
    17341734    GETFLOATSIGN(eph._Cic,      16, 1.0 / (double )(1 << 29))
    17351735    GETFLOATSIGN(eph._OMEGA0,   32, R2R_PI/(double)(1<<30)/(double)(1<<1))
     
    17421742    if (eph._inav) {
    17431743      /* set unused F/NAV values */
    1744       eph._E5aHS = 0.0;
    1745       eph._e5aDataInvalid = false;
     1744      eph._E5a_HS = 0.0;
     1745      eph._E5a_DataInvalid = false;
    17461746
    17471747      GETFLOATSIGN(eph._BGD_1_5B, 10, 1.0 / (double )(1 << 30) / (double )(1 << 2))
    1748       GETBITS(eph._E5bHS, 2)
    1749       GETBITS(eph._e5bDataInvalid, 1)
    1750       GETBITS(eph._E1_bHS, 2)
    1751       GETBITS(eph._e1DataInvalid, 1)
    1752       if (eph._E5bHS != eph._E1_bHS) {
     1748      GETBITS(eph._E5b_HS, 2)
     1749      GETBITS(eph._E5b_DataInvalid, 1)
     1750      GETBITS(eph._E1B_HS, 2)
     1751      GETBITS(eph._E1B_DataInvalid, 1)
     1752      if (eph._E5b_HS != eph._E1B_HS) {
    17531753#ifdef BNC_DEBUG_BCE
    17541754        emit(newMessage(QString("%1: Block %2 (%3) SHS E5b %4 E1B %5: inconsistent health!")
    17551755             .arg(_staID).arg(1046,4).arg(eph._prn.toString().c_str())
    1756              .arg(eph._E5bHS).arg(eph._E1_bHS).toLatin1(), true));
     1756             .arg(eph._E5b_HS).arg(eph._E1B_HS).toLatin1(), true));
    17571757#endif
    17581758        return false;
     
    17611761          (eph._BGD_1_5B == 0.0 && fabs(eph._BGD_1_5A) > 1e-9)) {
    17621762#ifdef BNC_DEBUG_BCE
    1763         emit(newMessage(QString("%1: Block %2 (%3) BGD_15a = %4 BGD_15b = %5: inconsistent BGD!")
     1763        emit(newMessage(QString("%1: Block %2 (%3) BGD_1_5a = %4 BGD_1_5b = %5: inconsistent BGD!")
    17641764             .arg(_staID).arg(1046,4).arg(eph._prn.toString().c_str())
    17651765             .arg(eph._BGD_1_5A,10,'E',3).arg(eph._BGD_1_5B,10,'E',3).toLatin1(), true));
     
    17671767        return false;
    17681768      }
    1769       eph._ephType = t_eph::INAF;
     1769      eph._type = t_eph::INAV;
    17701770    }
    17711771    else {
    17721772      /* set unused I/NAV values */
    17731773      eph._BGD_1_5B = 0.0;
    1774       eph._E5bHS = 0.0;
    1775       eph._E1_bHS = 0.0;
    1776       eph._e1DataInvalid = false;
    1777       eph._e5bDataInvalid = false;
    1778 
    1779       GETBITS(eph._E5aHS, 2)
    1780       GETBITS(eph._e5aDataInvalid, 1)
    1781       eph._ephType = t_eph::FNAV;
     1774      eph._E5b_HS = 0.0;
     1775      eph._E1B_HS = 0.0;
     1776      eph._E1B_DataInvalid = false;
     1777      eph._E5b_DataInvalid = false;
     1778
     1779      GETBITS(eph._E5a_HS, 2)
     1780      GETBITS(eph._E5a_DataInvalid, 1)
     1781      eph._type = t_eph::FNAV;
    17821782    }
    17831783    eph._TOT = 0.9999e9;
     
    18411841    eph._BDTweek = week;
    18421842    GETBITS(i, 4)
    1843     eph._URA = accuracyFromIndex(i, eph.type());
     1843    eph._ura = accuracyFromIndex(i, eph.system());
    18441844    GETFLOATSIGN(eph._IDOT, 14, R2R_PI/(double)(1<<30)/(double)(1<<13))
    18451845    GETBITS(eph._AODE, 5)
     
    19031903    eph._TOT = 0.9999E9;
    19041904    if (eph._i0 > iMaxGEO) {
    1905       eph._ephType = t_eph::D1;
     1905      eph._type = t_eph::D1;
    19061906    }
    19071907    else {
    1908       eph._ephType = t_eph::D2;
     1908      eph._type = t_eph::D2;
    19091909    }
    19101910
Note: See TracChangeset for help on using the changeset viewer.