Changeset 10545 in ntrip for trunk/BNC/src/RTCM3
- Timestamp:
- Sep 25, 2024, 1:15:37 PM (7 weeks ago)
- Location:
- trunk/BNC/src/RTCM3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r10544 r10545 2116 2116 GETBITS(helmertPar._sysIdentNum, 8) 2117 2117 GETBITS(helmertPar._utilTrafoMessageIndicator, 10) 2118 int mjd; 2119 GETBITS(mjd, 16) 2120 helmertPar._t0 = mjd + 44244; 2118 GETBITS(helmertPar._mjd, 16) 2119 helmertPar._mjd += 44244; 2121 2120 2122 2121 // delete old parameter entries if available … … 2129 2128 _helmertPar.push_back(helmertPar); 2130 2129 2131 GETFLOATSIGN(_helmertPar.back()._dx, 23, 0.001) 2132 GETFLOATSIGN(_helmertPar.back()._dy, 23, 0.001) 2133 GETFLOATSIGN(_helmertPar.back()._dz, 23, 0.001) 2134 GETFLOATSIGN(_helmertPar.back()._ox, 32, 0.00002) 2135 GETFLOATSIGN(_helmertPar.back()._oy, 32, 0.00002) 2136 GETFLOATSIGN(_helmertPar.back()._oz, 32, 0.00002) 2137 GETFLOATSIGN(_helmertPar.back()._sc, 25, 0.00001) 2138 GETFLOATSIGN(_helmertPar.back()._dxr, 17, 0.00002) 2139 GETFLOATSIGN(_helmertPar.back()._dyr, 17, 0.00002) 2140 GETFLOATSIGN(_helmertPar.back()._dzr, 17, 0.00002) 2141 GETFLOATSIGN(_helmertPar.back()._oxr, 17, 0.0000004) 2142 GETFLOATSIGN(_helmertPar.back()._oyr, 17, 0.0000004) 2143 GETFLOATSIGN(_helmertPar.back()._ozr, 17, 0.0000004) 2144 GETFLOATSIGN(_helmertPar.back()._scr, 14, 0.0000002) 2130 GETFLOATSIGN(_helmertPar.back()._dx, 23, 1/1000.0) 2131 GETFLOATSIGN(_helmertPar.back()._dy, 23, 1/1000.0) 2132 GETFLOATSIGN(_helmertPar.back()._dz, 23, 1/1000.0) 2133 2134 GETFLOATSIGN(_helmertPar.back()._ox, 32, 1/50000.0) 2135 GETFLOATSIGN(_helmertPar.back()._oy, 32, 1/50000.0) 2136 GETFLOATSIGN(_helmertPar.back()._oz, 32, 1/50000.0) 2137 2138 GETFLOATSIGN(_helmertPar.back()._sc, 25, 1/100000.0) 2139 2140 GETFLOATSIGN(_helmertPar.back()._dxr, 17, 1/50000.0) 2141 GETFLOATSIGN(_helmertPar.back()._dyr, 17, 1/50000.0) 2142 GETFLOATSIGN(_helmertPar.back()._dzr, 17, 1/50000.0) 2143 2144 GETFLOATSIGN(_helmertPar.back()._oxr, 17, 1/2500000.0) 2145 GETFLOATSIGN(_helmertPar.back()._oyr, 17, 1/2500000.0) 2146 GETFLOATSIGN(_helmertPar.back()._ozr, 17, 1/2500000.0) 2147 2148 GETFLOATSIGN(_helmertPar.back()._scr, 14, 1/5000000.0) 2145 2149 2146 2150 //_helmertPar.back().print(); -
trunk/BNC/src/RTCM3/clock_and_orbit/clock_orbit.h
r10533 r10545 407 407 virtual CodeType rnxTypeToCodeType(char system, std::string type) = 0; 408 408 409 #define STOREBITS \410 while(numbits >= 8) { \411 if(!size) return 0; \412 *(buffer++) = bitbuffer>>(numbits-8); \413 numbits -= 8; \414 ++ressize; \415 --size; \416 }417 418 #define ADDBITS(a, b) { \419 bitbuffer = (bitbuffer<<(a))|((b)&((1<<a)-1)); \420 numbits += (a); \421 STOREBITS \422 }423 424 #define STARTDATA \425 size_t ressize=0; \426 char *blockstart=0; \427 int numbits=0; \428 uint64_t bitbuffer=0;429 430 #define INITBLOCK \431 numbits = 0; \432 blockstart = buffer; \433 ADDBITS(8, 0xD3) \434 ADDBITS(6, 0) \435 ADDBITS(10, 0)436 437 #define ENDBLOCK \438 if(numbits) { ADDBITS((8-numbits), 0) } { \439 int len = buffer-blockstart-3; \440 blockstart[1] |= len>>8; \441 blockstart[2] = len; \442 if(len > 1023) \443 return 0; \444 len = CRC24(len+3, (const unsigned char *) blockstart); \445 ADDBITS(24, len) \446 }447 448 #define SCALEADDBITS(a, b, c) ADDBITS(a, (int64_t)(c > 0 ? b*c+0.5 : b*c-0.5))449 450 409 #define MPI 3.141592653589793 451 410 -
trunk/BNC/src/RTCM3/crs.h
r10540 r10545 82 82 _sysIdentNum = 0; 83 83 _utilTrafoMessageIndicator = 0; 84 _ t0= 0;84 _mjd = 0; 85 85 _dx = 0.0; 86 86 _dy = 0.0; … … 140 140 strncmp(_targetName, helmertPar1._targetName, strlen(_targetName)) == 0 && 141 141 _sysIdentNum == helmertPar1._sysIdentNum && 142 _ t0 == helmertPar1._t0) {142 _mjd == helmertPar1._mjd) { 143 143 return true; 144 144 } … … 153 153 cout << "_sysIdentNum: " << _sysIdentNum << endl; 154 154 cout << "_utilTrafoMessageIndicator: " << IndtoString().toStdString().c_str() << endl; 155 bncTime t; t.setmjd(0, _ t0);156 cout << "_t0 : " << "MJD " << _ t0<< " (" << t.datestr() << ")" << endl;155 bncTime t; t.setmjd(0, _mjd); 156 cout << "_t0 : " << "MJD " << _mjd << " (" << t.datestr() << ")" << endl; 157 157 cout <<setw(10) << setprecision(5) << "_dx : " << _dx << endl; 158 158 cout <<setw(10) << setprecision(5) << "_dy : " << _dy << endl; … … 164 164 cout <<setw(10) << setprecision(5) << "_oy : " << _oy << endl; 165 165 cout <<setw(10) << setprecision(5) << "_oz : " << _oz << endl; 166 cout <<setw(1 0) << setprecision(7) << "_oxr : " << _oxr << endl;167 cout <<setw(1 0) << setprecision(7) << "_oyr : " << _oyr << endl;168 cout <<setw(1 0) << setprecision(7) << "_ozr : " << _ozr << endl;166 cout <<setw(15) << setprecision(7) << "_oxr : " << _oxr << endl; 167 cout <<setw(15) << setprecision(7) << "_oyr : " << _oyr << endl; 168 cout <<setw(15) << setprecision(7) << "_ozr : " << _ozr << endl; 169 169 cout <<setw(10) << setprecision(5) << "_sc : " << _sc << endl; 170 170 cout <<setw(10) << setprecision(7) << "_scr : " << _scr << endl; … … 175 175 int _sysIdentNum; 176 176 int _utilTrafoMessageIndicator; 177 int _ t0;// reference epoch177 int _mjd; // reference epoch 178 178 double _dx; // translation in x 179 179 double _dy; // translation in y -
trunk/BNC/src/RTCM3/crsEncoder.cpp
r10534 r10545 65 65 66 66 ADDBITS(12, 1301) 67 int N = sizeof(helmertPar._sourceName) / sizeof(helmertPar._sourceName[0]); 68 if (N > 31) {N = 31;} 69 ADDBITS(5, N) 70 for(int i = 0; i < N; i++) { 71 ADDBITS(8, helmertPar._sourceName[i]) 72 } 73 N = sizeof(helmertPar._targetName) / sizeof(helmertPar._targetName[0]); 74 if (N > 31) {N = 31;} 75 ADDBITS(5, N) 76 for(int i = 0; i < N; i++) { 77 ADDBITS(8, helmertPar._targetName[i]) 78 } 79 ADDBITS(8 , helmertPar._sysIdentNum) 80 ADDBITS(10, helmertPar._utilTrafoMessageIndicator) 81 ADDBITS(16, (helmertPar._mjd - 44244)) 82 83 SCALEADDBITS(23, 1000.0, helmertPar._dx) 84 SCALEADDBITS(23, 1000.0, helmertPar._dy) 85 SCALEADDBITS(23, 1000.0, helmertPar._dz) 86 87 SCALEADDBITS(32, 50000.0, helmertPar._ox) 88 SCALEADDBITS(32, 50000.0, helmertPar._oy) 89 SCALEADDBITS(32, 50000.0, helmertPar._oz) 90 91 SCALEADDBITS(25, 100000.0, helmertPar._sc) 92 93 SCALEADDBITS(17, 50000.0, helmertPar._dxr) 94 SCALEADDBITS(17, 50000.0, helmertPar._dyr) 95 SCALEADDBITS(17, 50000.0, helmertPar._dzr) 96 97 SCALEADDBITS(17, 2500000.0, helmertPar._oxr) 98 SCALEADDBITS(17, 2500000.0, helmertPar._oyr) 99 SCALEADDBITS(17, 2500000.0, helmertPar._ozr) 100 101 SCALEADDBITS(14, 5000000.0, helmertPar._scr) 67 102 68 103 ENDBLOCK
Note:
See TracChangeset
for help on using the changeset viewer.