Changeset 8200 in ntrip


Ignore:
Timestamp:
Dec 11, 2017, 12:09:58 PM (7 years ago)
Author:
stuerze
Message:

receiver type extraction from 1033 RTCM3 messages is added

Location:
branches/BNC_2.12/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/GPSDecoder.h

    r6864 r8200  
    8080  QList<int>       _typeList;  // RTCM message types
    8181  QStringList      _antType;   // RTCM antenna descriptor
     82  QStringList      _recType;   // RTCM receiver descriptor
    8283  QList<t_antInfo> _antList;   // RTCM antenna XYZ
    8384  QString          _gloFrq;    // GLONASS slot
  • branches/BNC_2.12/src/RTCM3/RTCM3Decoder.cpp

    r8184 r8200  
    10461046    GETBITS(i, 5)
    10471047    eph._frequency_number = i - 7;
    1048     GLOFreq[sv - 1] = 100 + i - 7; /* store frequency for other users (MSM) */
    1049     _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(
    1050         eph._frequency_number, 2, 'f', 0);
    10511048    GETBITS(eph._almanac_health, 1) /* almanac healthy */
    10521049    GETBITS(eph._almanac_health_availablility_indicator, 1) /* almanac health ok */
     
    11031100    eph._xv(6) = eph._z_velocity * 1.e3;
    11041101
     1102   GLOFreq[sv - 1] = 100 + eph._frequency_number ; /* store frequency for other users (MSM) */
     1103    _gloFrq = QString("%1 %2").arg(eph._prn.toString().c_str()).arg(eph._frequency_number, 2, 'f', 0);
     1104   
    11051105    emit newGlonassEph(eph);
    11061106    decoded = true;
     
    13811381//
    13821382////////////////////////////////////////////////////////////////////////////
    1383 bool RTCM3Decoder::DecodeAntenna(unsigned char* data, int size) {
    1384   char *antenna, type[256];
     1383bool RTCM3Decoder::DecodeAntennaReceiver(unsigned char* data, int size) {
     1384  char *antenna, anttype[256];
     1385  char *dummy;
     1386  char *receiver, rectype[256];
     1387
     1388  int type;
     1389
     1390  int dnum = -1;
    13851391  int antnum = -1;
     1392  int recnum = -1;
    13861393  uint64_t numbits = 0, bitfield = 0;
    13871394
    1388   data += 4; /* header */
     1395  data += 3; /* header*/
    13891396  size -= 6; /* header + crc */
    13901397
     1398  GETBITS(type, 12)
    13911399  SKIPBITS(12)
    13921400  GETSTRING(antnum, antenna)
    13931401  if (antnum > -1 && antnum < 265) {
    1394     memcpy(type, antenna, antnum);
    1395     type[antnum] = 0;
    1396     if (!_antType.contains(type)) {
    1397       _antType.push_back(type);
     1402    memcpy(anttype, antenna, antnum);
     1403    anttype[antnum] = 0;
     1404    if (!_antType.contains(anttype)) {
     1405      _antType.push_back(anttype);
     1406    }
     1407  }
     1408  if (type == 1033) {
     1409    SKIPBITS(8)
     1410    GETSTRING(dnum, dummy)
     1411    GETSTRING(recnum, receiver)
     1412    if (recnum > -1 && recnum < 265) {
     1413      memcpy(rectype, receiver, recnum);
     1414      rectype[recnum] = 0;
     1415      if (!_recType.contains(rectype)) {
     1416        _recType.push_back(rectype);
     1417      }
    13981418    }
    13991419  }
     
    15261546          case 1008:
    15271547          case 1033:
    1528             DecodeAntenna(_Message, _BlockSize);
     1548            DecodeAntennaReceiver(_Message, _BlockSize);
    15291549            break;
    15301550          case 1005:
  • branches/BNC_2.12/src/RTCM3/RTCM3Decoder.h

    r6812 r8200  
    146146  bool DecodeBDSEphemeris(unsigned char* buffer, int bufLen);
    147147  /**
    148    * Extract antenna type from 1007, 1008 or 1033 RTCM3 messages.
    149    * @param buffer the buffer containing an antenna RTCM block
     148   * Extract antenna type from 1007, 1008 or 1033 RTCM3 messages
     149   * and extract receiver type from 1033 RTCM3 messages
     150   * @param buffer the buffer containing an antenna (and receiver) RTCM block
    150151   * @param bufLen the length of the buffer (the message length including header+crc)
    151152   * @return <code>true</code> when data block was decodable
    152153   */
    153   bool DecodeAntenna(unsigned char* buffer, int bufLen);
     154  bool DecodeAntennaReceiver(unsigned char* buffer, int bufLen);
    154155  /**
    155156   * Extract antenna type from 1005 or 1006 RTCM3 messages.
  • branches/BNC_2.12/src/bncgetthread.cpp

    r8124 r8200  
    888888      }
    889889
     890      // RTCMv3 receiver descriptor
     891      // --------------------------
     892      for (int ii = 0; ii < decoder()->_recType.size(); ii++) {
     893        QString rec1 = QString("%1 ").arg(decoder()->_recType[ii]);
     894        emit(newMessage(_staID + ": Receiver descriptor " + rec1.toLatin1(), true));
     895      }
     896
    890897      // RTCM GLONASS slots
    891898      // ------------------
     
    934941  decoder()->_typeList.clear();
    935942  decoder()->_antType.clear();
     943  decoder()->_recType.clear();
    936944  decoder()->_antList.clear();
    937945}
Note: See TracChangeset for help on using the changeset viewer.