Changeset 10692 in ntrip for trunk/BNC/src/RTCM3


Ignore:
Timestamp:
Jul 8, 2025, 10:07:50 AM (2 days ago)
Author:
stuerze
Message:

RTCM message 1230 (on-change) and the size of each RTCM message is added in scanRTCM

File:
1 edited

Legend:

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

    r10688 r10692  
    19581958  char *antserialnum;
    19591959  char *receiver;
    1960   char *recfirmware;
     1960  char *rec_firmware;
    19611961  char *recserialnum;
    19621962  int type;
     
    19751975  GETSTRING(antnum, antenna)
    19761976  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)) {
    19781978    _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;
    19811981  }
    19821982  SKIPBITS(8) /* antenna setup ID */
     
    19841984    GETSTRING(antsernum, antserialnum)
    19851985    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;
    19881988    }
    19891989  }
     
    19911991  if (type == 1033) {
    19921992    GETSTRING(recnum, receiver)
    1993     GETSTRING(recfirnum, recfirmware)
     1993    GETSTRING(recfirnum, rec_firmware)
    19941994    GETSTRING(recsernum, recserialnum)
    19951995    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)) {
    19971997      _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;
    20002000      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;
    20032003      }
    20042004      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;
    20072007      }
    20082008    }
     
    20232023  GETBITS(type, 12)
    20242024  _antList.push_back(t_antRefPoint());
    2025   _antList.back().type = t_antRefPoint::ARP;
     2025  _antList.back()._type = t_antRefPoint::ARP;
    20262026  SKIPBITS(22)
    20272027  GETBITSSIGN(x, 38)
    2028   _antList.back().xx = x * 1e-4;
     2028  _antList.back()._xx = x * 1e-4;
    20292029  SKIPBITS(2)
    20302030  GETBITSSIGN(y, 38)
    2031   _antList.back().yy = y * 1e-4;
     2031  _antList.back()._yy = y * 1e-4;
    20322032  SKIPBITS(2)
    20332033  GETBITSSIGN(z, 38)
    2034   _antList.back().zz = z * 1e-4;
     2034  _antList.back()._zz = z * 1e-4;
    20352035  if (type == 1006) {
    20362036    double h;
    20372037    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;
    20422042
    20432043  return true;
     
    20472047////////////////////////////////////////////////////////////////////////////
    20482048bool RTCM3Decoder::DecodeGLONASSCodePhaseBiases(unsigned char* data, int size) {
    2049   t_GloBiasInfo gloBiases;
     2049  t_GloBiasInfo gloBiasInfo;
     2050  int i = 0;
    20502051  uint64_t numbits = 0, bitfield = 0;
    20512052
     
    20542055
    20552056  SKIPBITS(12) // Message Number
    2056   GETBITS(gloBiases.staID, 12)
    2057   GETBITS(gloBiases.indicator, 1) // 0.. not aligned, 1.. aligned
     2057  GETBITS(gloBiasInfo._staID, 12)
     2058  GETBITS(gloBiasInfo._indicator, 1) // 0.. not aligned, 1.. aligned
    20582059  SKIPBITS(3) // reserved bits
    2059   unsigned bitmask;
     2060  unsigned int bitmask;
    20602061  GETBITS(bitmask, 4)
    20612062  bool L1C_valid = bitExtracted(unsigned(bitmask), 1, 0);
     
    20652066
    20662067  if (L1C_valid) {
    2067     GETBITS(gloBiases.L1C_value, 16)
     2068    GETBITSSIGN(i, 16)
     2069    gloBiasInfo._L1C_value = i * 0.02;
    20682070  }
    20692071  if (L1P_valid) {
    2070     GETBITS(gloBiases.L1P_value, 16)
     2072    GETBITSSIGN(i, 16)
     2073    gloBiasInfo._L1P_value = i * 0.02;
    20712074  }
    20722075  if (L2C_valid) {
    2073     GETBITS(gloBiases.L2C_value, 16)
     2076    GETBITSSIGN(i, 16)
     2077    gloBiasInfo._L2C_value = i * 0.02;
    20742078  }
    20752079  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);
    20812086  }
    20822087
     
    22512256      /* store the id and message size into the list of loaded blocks */
    22522257      _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 */
    22552260
    22562261      /* SSR I+II data handled in another function, already pass the
     
    22742279        }
    22752280      }
    2276       else if (id >= 1070 && id <= 1237) { /* MSM */
     2281      else if (id >= 1070 && id <= 1137) { /* MSM */
    22772282        if (DecodeRTCM3MSM(_Message, _BlockSize))
    22782283          decoded = true;
Note: See TracChangeset for help on using the changeset viewer.