Changeset 10903 in ntrip


Ignore:
Timestamp:
May 5, 2026, 11:57:17 AM (8 days ago)
Author:
stuerze
Message:

minor changes

Location:
trunk/BNC/src/RTCM3
Files:
3 edited

Legend:

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

    r10899 r10903  
    17051705    eph._inav = (i == 1046);
    17061706    eph._fnav = (i == 1045);
    1707     int mnum = i;
    17081707    GETBITS(i, 6)
    17091708    if (i < 1 || i > 36 ) { // max. constellation within I/NAV / F/NAV frames is 36
  • trunk/BNC/src/RTCM3/bits.h

    r10902 r10903  
    156156// RTCM3 CRS encoding
    157157//////////////////////////////////////////////////////////
    158 #define CRSTOINT(type, value) static_cast<type>(ceil(value))
     158#define CRSTOINT(type, value) static_cast<type>(round(value))
    159159
    160160#define CRSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
     
    169169// RTCM3 GPS EPH encoding
    170170//////////////////////////////////////////////////////////
    171 #define GPSTOINT(type, value) static_cast<type>(ceil(value))
     171#define GPSTOINT(type, value) static_cast<type>(round(value))
    172172
    173173#define GPSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
     
    182182// RTCM3 GLONASS EPH encoding
    183183//////////////////////////////////////////////////////////
    184 #define GLONASSTOINT(type, value) static_cast<type>(ceil(value))
     184#define GLONASSTOINT(type, value) static_cast<type>(round(value))
    185185
    186186#define GLONASSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
     
    207207// RTCM3 Galileo EPH encoding
    208208//////////////////////////////////////////////////////////
    209 #define GALILEOTOINT(type, value) static_cast<type>(ceil(value))
     209#define GALILEOTOINT(type, value) static_cast<type>(round(value))
    210210
    211211#define GALILEOADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
     
    220220// RTCM3 BDS EPH encoding
    221221//////////////////////////////////////////////////////////
    222 #define BDSTOINT(type, value) static_cast<type>(ceil(value))
     222#define BDSTOINT(type, value) static_cast<type>(round(value))
    223223
    224224#define BDSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
     
    233233// RTCM3 SBAS EPH encoding
    234234//////////////////////////////////////////////////////////
    235 #define SBASTOINT(type, value) static_cast<type>(ceil(value))
     235#define SBASTOINT(type, value) static_cast<type>(round(value))
    236236
    237237#define SBASADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
  • trunk/BNC/src/RTCM3/ephEncoder.cpp

    r10901 r10903  
    2626    GPSADDBITSFLOAT(16, eph._clock_drift, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<13))
    2727    GPSADDBITSFLOAT(22, eph._clock_bias, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    28     GPSADDBITS(8, eph._IODE)
     28    GPSADDBITS(8, static_cast<int>(eph._IODE))
    2929    GPSADDBITSFLOAT(16, eph._Crs, 1.0/static_cast<double>(1<<5))
    3030    GPSADDBITSFLOAT(16, eph._Delta_n, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13))
     
    6363    GPSADDBITSFLOAT(8, eph._TGD, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    6464    GPSADDBITSFLOAT(22, eph._Delta_n, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<11))
    65     GPSADDBITS(8, eph._IODE) // Issue Of Data Ephemeris and Clock
     65    GPSADDBITS(8, static_cast<int>(eph._IODE)) // Issue Of Data Ephemeris and Clock
    6666    GPSADDBITS(10, 0) /* padding */
    6767    if        (eph._health == 0.0) {
     
    9595    GPSADDBITSFLOAT(22, eph._OMEGADOT, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<11))
    9696    GPSADDBITSFLOAT(32, eph._i0, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<1))
    97     GPSADDBITS(2, static_cast<int> (eph._s_bits_after_IDOT))
    98     GPSADDBITS(2, static_cast<int> (eph._s_bits_after_i0))
     97    GPSADDBITS(2, static_cast<int>(eph._s_bits_after_IDOT))
     98    GPSADDBITS(2, static_cast<int>(eph._s_bits_after_i0))
     99    GPSADDBITS(6, 0) /* padding */
    99100  } else {
    100101    GPSADDBITS(12, 1019)
     
    104105    GPSADDBITS(2,eph._L2Codes)
    105106    GPSADDBITSFLOAT(14, eph._IDOT, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13))
    106     GPSADDBITS(8, eph._IODE)
     107    GPSADDBITS(8, static_cast<int>(eph._IODE))
    107108    GPSADDBITS(16, static_cast<int>(eph._TOC.gpssec())>>4)
    108109    GPSADDBITSFLOAT(8, eph._clock_driftrate, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<25))
Note: See TracChangeset for help on using the changeset viewer.