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


Ignore:
Timestamp:
Jul 4, 2025, 12:13:03 PM (6 days ago)
Author:
stuerze
Message:

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

Location:
trunk/BNC/src/RTCM3
Files:
2 edited

Legend:

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

    r10632 r10688  
    16901690  bool decoded = false;
    16911691  uint64_t numbits = 0, bitfield = 0;
    1692   int i, week, mnum;
     1692  int i, week;
    16931693
    16941694  data += 3; /* header */
     
    17041704    eph._inav = (i == 1046);
    17051705    eph._fnav = (i == 1045);
    1706     mnum = i;
     1706    int mnum = i;
    17071707    GETBITS(i, 6)
    17081708    if (i < 1 || i > 36 ) { // max. constellation within I/NAV / F/NAV frames is 36
     
    20462046//
    20472047////////////////////////////////////////////////////////////////////////////
     2048bool RTCM3Decoder::DecodeGLONASSCodePhaseBiases(unsigned char* data, int size) {
     2049  t_GloBiasInfo gloBiases;
     2050  uint64_t numbits = 0, bitfield = 0;
     2051
     2052  data += 3; // header
     2053  size -= 6; // header + crc
     2054
     2055  SKIPBITS(12) // Message Number
     2056  GETBITS(gloBiases.staID, 12)
     2057  GETBITS(gloBiases.indicator, 1) // 0.. not aligned, 1.. aligned
     2058  SKIPBITS(3) // reserved bits
     2059  unsigned bitmask;
     2060  GETBITS(bitmask, 4)
     2061  bool L1C_valid = bitExtracted(unsigned(bitmask), 1, 0);
     2062  bool L1P_valid = bitExtracted(unsigned(bitmask), 1, 1);
     2063  bool L2C_valid = bitExtracted(unsigned(bitmask), 1, 2);
     2064  bool L2P_valid = bitExtracted(unsigned(bitmask), 1, 3);
     2065
     2066  if (L1C_valid) {
     2067    GETBITS(gloBiases.L1C_value, 16)
     2068  }
     2069  if (L1P_valid) {
     2070    GETBITS(gloBiases.L1P_value, 16)
     2071  }
     2072  if (L2C_valid) {
     2073    GETBITS(gloBiases.L2C_value, 16)
     2074  }
     2075  if (L2P_valid) {
     2076    GETBITS(gloBiases.L2P_value, 16)
     2077  }
     2078
     2079  if (!(_gloBiases == gloBiases)) {
     2080    _gloBiases.set(gloBiases);
     2081  }
     2082
     2083  return true;
     2084}
     2085
     2086//
     2087////////////////////////////////////////////////////////////////////////////
    20482088bool RTCM3Decoder::DecodeServiceCRS(unsigned char* data, int size) {
    20492089  t_serviceCrs serviceCrs;
     
    22092249      if (_rawFile)
    22102250        _staID = _rawFile->staID();
    2211       /* store the id into the list of loaded blocks */
    2212       _typeList.push_back(id);
     2251      /* store the id and message size into the list of loaded blocks */
     2252      _typeList.push_back(t_typeInfo());
     2253      _typeList.back().type = id;
     2254      _typeList.back().size = _BlockSize -6; /* header + crc */
    22132255
    22142256      /* SSR I+II data handled in another function, already pass the
     
    23002342            DecodeAntennaPosition(_Message, _BlockSize);
    23012343            break;
     2344          case 1230:
     2345            DecodeGLONASSCodePhaseBiases(_Message, _BlockSize);
     2346            break;
    23022347          case 1300:
    23032348            DecodeServiceCRS(_Message, _BlockSize);
  • trunk/BNC/src/RTCM3/RTCM3Decoder.h

    r10619 r10688  
    176176  bool DecodeServiceCRS(unsigned char* buffer, int bufLen);
    177177  /**
     178   * Extract GLONASS L1 and L2 Code-Phase bias messages from 1230 RTCM3 messages
     179   * @param buffer the buffer containing CLONASS L1 and L2 Code-Phase biases per station
     180   * @param bufLen the length of the buffer (the message length including header+crc)
     181   * @return <code>true</code> when data block was decodable
     182   */
     183  bool DecodeGLONASSCodePhaseBiases(unsigned char* buffer, int bufLen);
     184  /**
    178185   * Extract Helmert transformation parameters from 1301 RTCM3 messages
    179186   * @param buffer the buffer containing Helmert transformation parameters RTCM block
Note: See TracChangeset for help on using the changeset viewer.