Changeset 10692 in ntrip for trunk/BNC/src/RTCM3
- Timestamp:
- Jul 8, 2025, 10:07:50 AM (2 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r10688 r10692 1958 1958 char *antserialnum; 1959 1959 char *receiver; 1960 char *recfirmware; 1960 char *rec_firmware; 1961 1961 char *recserialnum; 1962 1962 int type; … … 1975 1975 GETSTRING(antnum, antenna) 1976 1976 if ((antnum > -1 && antnum < 265) && 1977 (_antType.empty() || strncmp(_antType.back().descriptor, antenna, recnum) != 0)) { 1977 (_antType.empty() || strncmp(_antType.back()._descriptor, antenna, recnum) != 0)) { 1978 1978 _antType.push_back(t_antInfo()); 1979 memcpy(_antType.back().descriptor, antenna, antnum); 1980 _antType.back().descriptor[antnum] = 0; 1979 memcpy(_antType.back()._descriptor, antenna, antnum); 1980 _antType.back()._descriptor[antnum] = 0; 1981 1981 } 1982 1982 SKIPBITS(8) /* antenna setup ID */ … … 1984 1984 GETSTRING(antsernum, antserialnum) 1985 1985 if ((antsernum > -1 && antsernum < 265)) { 1986 memcpy(_antType.back().serialnumber, antserialnum, antsernum); 1987 _antType.back().serialnumber[antsernum] = 0; 1986 memcpy(_antType.back()._serialnumber, antserialnum, antsernum); 1987 _antType.back()._serialnumber[antsernum] = 0; 1988 1988 } 1989 1989 } … … 1991 1991 if (type == 1033) { 1992 1992 GETSTRING(recnum, receiver) 1993 GETSTRING(recfirnum, recfirmware) 1993 GETSTRING(recfirnum, rec_firmware) 1994 1994 GETSTRING(recsernum, recserialnum) 1995 1995 if ((recnum > -1 && recnum < 265) && 1996 (_recType.empty() || strncmp(_recType.back().descriptor, receiver, recnum) != 0)) { 1996 (_recType.empty() || strncmp(_recType.back()._descriptor, receiver, recnum) != 0)) { 1997 1997 _recType.push_back(t_recInfo()); 1998 memcpy(_recType.back().descriptor, receiver, recnum); 1999 _recType.back().descriptor[recnum] = 0; 1998 memcpy(_recType.back()._descriptor, receiver, recnum); 1999 _recType.back()._descriptor[recnum] = 0; 2000 2000 if (recfirnum > -1 && recfirnum < 265) { 2001 memcpy(_recType.back().firmware, recfirmware, recfirnum); 2002 _recType.back().firmware[recfirnum] = 0; 2001 memcpy(_recType.back()._firmware, rec_firmware, recfirnum); 2002 _recType.back()._firmware[recfirnum] = 0; 2003 2003 } 2004 2004 if (recsernum > -1 && recsernum < 265) { 2005 memcpy(_recType.back().serialnumber, recserialnum, recsernum); 2006 _recType.back().serialnumber[recsernum] = 0; 2005 memcpy(_recType.back()._serialnumber, recserialnum, recsernum); 2006 _recType.back()._serialnumber[recsernum] = 0; 2007 2007 } 2008 2008 } … … 2023 2023 GETBITS(type, 12) 2024 2024 _antList.push_back(t_antRefPoint()); 2025 _antList.back().type = t_antRefPoint::ARP; 2025 _antList.back()._type = t_antRefPoint::ARP; 2026 2026 SKIPBITS(22) 2027 2027 GETBITSSIGN(x, 38) 2028 _antList.back().xx = x * 1e-4; 2028 _antList.back()._xx = x * 1e-4; 2029 2029 SKIPBITS(2) 2030 2030 GETBITSSIGN(y, 38) 2031 _antList.back().yy = y * 1e-4; 2031 _antList.back()._yy = y * 1e-4; 2032 2032 SKIPBITS(2) 2033 2033 GETBITSSIGN(z, 38) 2034 _antList.back().zz = z * 1e-4; 2034 _antList.back()._zz = z * 1e-4; 2035 2035 if (type == 1006) { 2036 2036 double h; 2037 2037 GETBITS(h, 16) 2038 _antList.back().height = h * 1e-4; 2039 _antList.back().height_f = true; 2040 } 2041 _antList.back().message = type; 2038 _antList.back()._height = h * 1e-4; 2039 _antList.back()._height_f = true; 2040 } 2041 _antList.back()._message = type; 2042 2042 2043 2043 return true; … … 2047 2047 //////////////////////////////////////////////////////////////////////////// 2048 2048 bool RTCM3Decoder::DecodeGLONASSCodePhaseBiases(unsigned char* data, int size) { 2049 t_GloBiasInfo gloBiases; 2049 t_GloBiasInfo gloBiasInfo; 2050 int i = 0; 2050 2051 uint64_t numbits = 0, bitfield = 0; 2051 2052 … … 2054 2055 2055 2056 SKIPBITS(12) // Message Number 2056 GETBITS(gloBias es.staID, 12)2057 GETBITS(gloBias es.indicator, 1) // 0.. not aligned, 1.. aligned2057 GETBITS(gloBiasInfo._staID, 12) 2058 GETBITS(gloBiasInfo._indicator, 1) // 0.. not aligned, 1.. aligned 2058 2059 SKIPBITS(3) // reserved bits 2059 unsigned bitmask; 2060 unsigned int bitmask; 2060 2061 GETBITS(bitmask, 4) 2061 2062 bool L1C_valid = bitExtracted(unsigned(bitmask), 1, 0); … … 2065 2066 2066 2067 if (L1C_valid) { 2067 GETBITS(gloBiases.L1C_value, 16) 2068 GETBITSSIGN(i, 16) 2069 gloBiasInfo._L1C_value = i * 0.02; 2068 2070 } 2069 2071 if (L1P_valid) { 2070 GETBITS(gloBiases.L1P_value, 16) 2072 GETBITSSIGN(i, 16) 2073 gloBiasInfo._L1P_value = i * 0.02; 2071 2074 } 2072 2075 if (L2C_valid) { 2073 GETBITS(gloBiases.L2C_value, 16) 2076 GETBITSSIGN(i, 16) 2077 gloBiasInfo._L2C_value = i * 0.02; 2074 2078 } 2075 2079 if (L2P_valid) { 2076 GETBITS(gloBiases.L2P_value, 16) 2077 } 2078 2079 if (!(_gloBiases == gloBiases)) { 2080 _gloBiases.set(gloBiases); 2080 GETBITSSIGN(i, 16) 2081 gloBiasInfo._L2P_value = i * 0.02; 2082 } 2083 2084 if (_gloBiasInfo != gloBiasInfo) { 2085 _gloBiasInfo.set(gloBiasInfo); 2081 2086 } 2082 2087 … … 2251 2256 /* store the id and message size into the list of loaded blocks */ 2252 2257 _typeList.push_back(t_typeInfo()); 2253 _typeList.back().type = id; 2254 _typeList.back().size = _BlockSize -6; /* header + crc */ 2258 _typeList.back()._type = id; 2259 _typeList.back()._size = _BlockSize -6; /* header + crc */ 2255 2260 2256 2261 /* SSR I+II data handled in another function, already pass the … … 2274 2279 } 2275 2280 } 2276 else if (id >= 1070 && id <= 1 237) { /* MSM */2281 else if (id >= 1070 && id <= 1137) { /* MSM */ 2277 2282 if (DecodeRTCM3MSM(_Message, _BlockSize)) 2278 2283 decoded = true;
Note:
See TracChangeset
for help on using the changeset viewer.