Changeset 8410 in ntrip for trunk


Ignore:
Timestamp:
Jul 6, 2018, 11:06:59 AM (6 years ago)
Author:
stuerze
Message:

updates regarding SSR BDS IOD

Location:
trunk/BNC/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit_rtcm.c

    r7777 r8410  
    101101
    102102#define T_GPS_IODE(a)                    ADDBITS(8, a)      /* DF071 */
    103 #define T_GLONASS_IOD(a)                 ADDBITS(8, a)      /* DF237 */
     103#define T_GLONASS_IOD(a)                 ADDBITS(8, a)      /* DF239 */
    104104#define T_GALILEO_IOD(a)                 ADDBITS(10, a)     /* DF459 */
    105105#define T_SBAS_T0MOD(a)                  ADDBITS(9, (a/16)) /* DF468 */
    106106#define T_SBAS_IODCRC(a)                 ADDBITS(24, a)     /* DF469 */
    107107#define T_BDS_TOEMOD(a)                  ADDBITS(10, (a/8)) /* DF470 */
    108 #define T_BDS_IODCRC(a)                  ADDBITS(24, a)     /* DF471 */
     108#define T_BDS_IOD(a)                     ADDBITS(8, a)      /* DF471 */
    109109
    110110#define T_DELTA_RADIAL(a)                SCALEADDBITS(22,    10000.0, a)
     
    265265          T_GPS_SATELLITE_ID(co->Sat[i].ID)
    266266          T_BDS_TOEMOD(co->Sat[i].toe)
    267           T_BDS_IODCRC(co->Sat[i].IOD)
     267          T_BDS_IOD(co->Sat[i].IOD)
    268268          break;
    269269        }
     
    393393            T_GPS_SATELLITE_ID(co->Sat[i].ID)
    394394            T_BDS_TOEMOD(co->Sat[i].toe)
    395             T_BDS_IODCRC(co->Sat[i].IOD)
     395            T_BDS_IOD(co->Sat[i].IOD)
    396396            break;
    397397          }
     
    732732#define G_SBAS_IODCRC(a)                 GETBITS(a, 24)          /* DF469 */
    733733#define G_BDS_TOEMOD(a)                  GETBITSFACTOR(a, 10, 8) /* DF470 */
    734 #define G_BDS_IODCRC(a)                  GETBITS(a, 24)          /* DF471 */
     734#define G_BDS_IOD(a)                     GETBITS(a, 8)           /* DF471 */
    735735
    736736/* defined values */
     
    993993          case CLOCKORBIT_SATBDS:
    994994            G_BDS_TOEMOD(co->Sat[pos].toe)
    995             G_BDS_IODCRC(co->Sat[pos].IOD)
     995            G_BDS_IOD(co->Sat[pos].IOD)
    996996            break;
    997997          }
     
    11301130          case CLOCKORBIT_SATBDS:
    11311131            G_BDS_TOEMOD(co->Sat[pos].toe)
    1132             G_BDS_IODCRC(co->Sat[pos].IOD)
     1132            G_BDS_IOD(co->Sat[pos].IOD)
    11331133            break;
    11341134          }
  • trunk/BNC/src/ephemeris.cpp

    r8368 r8410  
    14891489////////////////////////////////////////////////////////////////////////////
    14901490unsigned int t_ephBDS::IOD() const {
    1491   unsigned char buffer[80];
    1492   int size = 0;
    1493   int numbits = 0;
    1494   long long bitbuffer = 0;
    1495   unsigned char *startbuffer = buffer;
    1496 
    1497   BDSADDBITSFLOAT(14, this->_IDOT, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13))
    1498   BDSADDBITSFLOAT(11, this->_clock_driftrate, 1.0/static_cast<double>(1<<30)
    1499       /static_cast<double>(1<<30)/static_cast<double>(1<<6))
    1500   BDSADDBITSFLOAT(22, this->_clock_drift, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<20))
    1501   BDSADDBITSFLOAT(24, this->_clock_bias, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<3))
    1502   BDSADDBITSFLOAT(18, this->_Crs, 1.0/static_cast<double>(1<<6))
    1503   BDSADDBITSFLOAT(16, this->_Delta_n, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13))
    1504   BDSADDBITSFLOAT(32, this->_M0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    1505   BDSADDBITSFLOAT(18, this->_Cuc, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    1506   BDSADDBITSFLOAT(32, this->_e, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<3))
    1507   BDSADDBITSFLOAT(18, this->_Cus, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    1508   BDSADDBITSFLOAT(32, this->_sqrt_A, 1.0/static_cast<double>(1<<19))
    1509   BDSADDBITSFLOAT(18, this->_Cic, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    1510   BDSADDBITSFLOAT(32, this->_OMEGA0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    1511   BDSADDBITSFLOAT(18, this->_Cis, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    1512   BDSADDBITSFLOAT(32, this->_i0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    1513   BDSADDBITSFLOAT(18, this->_Crc, 1.0/static_cast<double>(1<<6))
    1514   BDSADDBITSFLOAT(32, this->_omega, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    1515   BDSADDBITSFLOAT(24, this->_OMEGADOT, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13))
    1516   BDSADDBITS(5, 0)  // the last byte is filled by 0-bits to obtain a length of an integer multiple of 8
    1517 
    1518   return CRC24(size, startbuffer);
    1519 
    1520 
     1491  return (int(_TOEsec)/720) % 240;
    15211492}
    15221493
     
    16951666//////////////////////////////////////////////////////////////////////////////
    16961667QString t_ephBDS::toString(double version) const {
    1697 
     1668IOD();
    16981669  QString rnxStr = rinexDateStr(_TOC-14.0, _prn, version);
    16991670
Note: See TracChangeset for help on using the changeset viewer.