Changeset 10903 in ntrip
- Timestamp:
- May 5, 2026, 11:57:17 AM (8 days ago)
- Location:
- trunk/BNC/src/RTCM3
- Files:
-
- 3 edited
-
RTCM3Decoder.cpp (modified) (1 diff)
-
bits.h (modified) (6 diffs)
-
ephEncoder.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r10899 r10903 1705 1705 eph._inav = (i == 1046); 1706 1706 eph._fnav = (i == 1045); 1707 int mnum = i;1708 1707 GETBITS(i, 6) 1709 1708 if (i < 1 || i > 36 ) { // max. constellation within I/NAV / F/NAV frames is 36 -
trunk/BNC/src/RTCM3/bits.h
r10902 r10903 156 156 // RTCM3 CRS encoding 157 157 ////////////////////////////////////////////////////////// 158 #define CRSTOINT(type, value) static_cast<type>( ceil(value))158 #define CRSTOINT(type, value) static_cast<type>(round(value)) 159 159 160 160 #define CRSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \ … … 169 169 // RTCM3 GPS EPH encoding 170 170 ////////////////////////////////////////////////////////// 171 #define GPSTOINT(type, value) static_cast<type>( ceil(value))171 #define GPSTOINT(type, value) static_cast<type>(round(value)) 172 172 173 173 #define GPSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \ … … 182 182 // RTCM3 GLONASS EPH encoding 183 183 ////////////////////////////////////////////////////////// 184 #define GLONASSTOINT(type, value) static_cast<type>( ceil(value))184 #define GLONASSTOINT(type, value) static_cast<type>(round(value)) 185 185 186 186 #define GLONASSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \ … … 207 207 // RTCM3 Galileo EPH encoding 208 208 ////////////////////////////////////////////////////////// 209 #define GALILEOTOINT(type, value) static_cast<type>( ceil(value))209 #define GALILEOTOINT(type, value) static_cast<type>(round(value)) 210 210 211 211 #define GALILEOADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \ … … 220 220 // RTCM3 BDS EPH encoding 221 221 ////////////////////////////////////////////////////////// 222 #define BDSTOINT(type, value) static_cast<type>( ceil(value))222 #define BDSTOINT(type, value) static_cast<type>(round(value)) 223 223 224 224 #define BDSADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \ … … 233 233 // RTCM3 SBAS EPH encoding 234 234 ////////////////////////////////////////////////////////// 235 #define SBASTOINT(type, value) static_cast<type>( ceil(value))235 #define SBASTOINT(type, value) static_cast<type>(round(value)) 236 236 237 237 #define SBASADDBITS(a, b) {bitbuffer = (bitbuffer<<(a)) \ -
trunk/BNC/src/RTCM3/ephEncoder.cpp
r10901 r10903 26 26 GPSADDBITSFLOAT(16, eph._clock_drift, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<13)) 27 27 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)) 29 29 GPSADDBITSFLOAT(16, eph._Crs, 1.0/static_cast<double>(1<<5)) 30 30 GPSADDBITSFLOAT(16, eph._Delta_n, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<13)) … … 63 63 GPSADDBITSFLOAT(8, eph._TGD, 1.0/static_cast<double>(1<<30)/static_cast<double>(1<<1)) 64 64 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 66 66 GPSADDBITS(10, 0) /* padding */ 67 67 if (eph._health == 0.0) { … … 95 95 GPSADDBITSFLOAT(22, eph._OMEGADOT, M_PI/static_cast<double>(1<<30)/static_cast<double>(1<<11)) 96 96 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 */ 99 100 } else { 100 101 GPSADDBITS(12, 1019) … … 104 105 GPSADDBITS(2,eph._L2Codes) 105 106 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)) 107 108 GPSADDBITS(16, static_cast<int>(eph._TOC.gpssec())>>4) 108 109 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.
