Changeset 10551 in ntrip


Ignore:
Timestamp:
Sep 25, 2024, 10:31:19 PM (2 months ago)
Author:
stuerze
Message:

minor changes

Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/RTCM3/bits.h

    r10546 r10551  
    152152
    153153#define SCALEADDBITS(a, b, c) ADDBITS(a, (int64_t)(c > 0 ? b*c+0.5 : b*c-0.5))
     154
     155
     156// RTCM3 CRS encoding
     157//////////////////////////////////////////////////////////
     158#define CRSTOINT(type, value) static_cast<type>(round(value))
     159
     160#define CRSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \
     161                       |(CRSTOINT(long long,b)&((1ULL<<a)-1)); \
     162                       numbits += (a); \
     163                       while(numbits >= 8) { \
     164                       buffer[size++] = bitbuffer>>(numbits-8);numbits -= 8;}}
     165
     166#define CRSADDBITSFLOAT(a,b,c) {long long i = CRSTOINT(long long,(b)/(c)); \
     167                             CRSADDBITS(a,i)};
    154168
    155169// RTCM3 GPS EPH encoding
  • trunk/BNC/src/RTCM3/crsEncoder.cpp

    r10550 r10551  
    8585  SCALEADDBITS(23, 1000.0, helmertPar._dz)
    8686
    87   SCALEADDBITS(32, 50000.0, helmertPar._ox)
    88   SCALEADDBITS(32, 50000.0, helmertPar._oy)
    89   SCALEADDBITS(32, 50000.0, helmertPar._oz)
     87  CRSADDBITSFLOAT(32, helmertPar._ox, 50000.0)
     88  CRSADDBITSFLOAT(32, helmertPar._oy, 50000.0)
     89  CRSADDBITSFLOAT(32, helmertPar._oz, 50000.0)
    9090
    9191  SCALEADDBITS(25, 100000.0, helmertPar._sc)
  • trunk/BNC/src/src.pri

    r10549 r10551  
    2525#debug:DEFINES   += BNC_DEBUG_SSR
    2626#debug:DEFINES   += BNC_DEBUG_CMB
    27 debug:DEFINES    += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
     27#debug:DEFINES    += QT_DISABLE_DEPRECATED_BEFORE=0x050F00
    2828
    2929!versionAtLeast(QT_VERSION, 5.15.0):error("Use at least Qt version 5.15.0")
Note: See TracChangeset for help on using the changeset viewer.