Changeset 8197 in ntrip
- Timestamp:
- Dec 11, 2017, 9:57:14 AM (7 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/GPSDecoder.h
r6864 r8197 43 43 virtual ~GPSDecoder(); 44 44 45 virtual t_irc Decode(char* buffer, int bufLen, 45 virtual t_irc Decode(char* buffer, int bufLen, 46 46 std::vector<std::string>& errmsg) = 0; 47 47 … … 50 50 51 51 void initRinex(const QByteArray& staID, const QUrl& mountPoint, 52 const QByteArray& latitude, const QByteArray& longitude, 52 const QByteArray& latitude, const QByteArray& longitude, 53 53 const QByteArray& nmea, const QByteArray& ntripVersion); 54 54 … … 80 80 QList<int> _typeList; // RTCM message types 81 81 QStringList _antType; // RTCM antenna descriptor 82 QStringList _recType; // RTCM receiver descriptor 82 83 QList<t_antInfo> _antList; // RTCM antenna XYZ 83 84 QString _gloFrq; // GLONASS slot -
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r8186 r8197 1379 1379 } 1380 1380 1381 / /1382 //////////////////////////////////////////////////////////////////////////// 1383 bool RTCM3Decoder::DecodeAntenna (unsigned char* data, int size) {1381 /* 1382 //////////////////////////////////////////////////////////////////////////// 1383 bool RTCM3Decoder::DecodeAntennaReceiver(unsigned char* data, int size) { 1384 1384 char *antenna, type[256]; 1385 1385 int antnum = -1; 1386 1386 uint64_t numbits = 0, bitfield = 0; 1387 1387 1388 data += 4; /* header */1389 size -= 6; /* header + crc */1388 data += 4; 1389 size -= 6; 1390 1390 1391 1391 SKIPBITS(12) … … 1396 1396 if (!_antType.contains(type)) { 1397 1397 _antType.push_back(type); 1398 } 1399 } 1400 return true; 1401 }*/ 1402 1403 // 1404 //////////////////////////////////////////////////////////////////////////// 1405 bool RTCM3Decoder::DecodeAntennaReceiver(unsigned char* data, int size) { 1406 char *antenna, anttype[256]; 1407 char *dummy; 1408 char *receiver, rectype[256]; 1409 1410 int type; 1411 1412 int dnum = -1; 1413 int antnum = -1; 1414 int recnum = -1; 1415 uint64_t numbits = 0, bitfield = 0; 1416 1417 data += 3; /* header*/ 1418 size -= 6; /* header + crc */ 1419 1420 GETBITS(type, 12) qDebug() << "Type: " << type; 1421 SKIPBITS(12) 1422 GETSTRING(antnum, antenna) 1423 if (antnum > -1 && antnum < 265) { 1424 memcpy(anttype, antenna, antnum); 1425 anttype[antnum] = 0; 1426 if (!_antType.contains(anttype)) { 1427 _antType.push_back(anttype); 1428 } 1429 } 1430 if (type == 1033) { 1431 SKIPBITS(8) 1432 GETSTRING(dnum, dummy) 1433 GETSTRING(recnum, receiver) 1434 if (recnum > -1 && recnum < 265) { 1435 memcpy(rectype, receiver, recnum); 1436 rectype[recnum] = 0; 1437 if (!_recType.contains(rectype)) { 1438 _recType.push_back(rectype); 1439 } 1398 1440 } 1399 1441 } … … 1526 1568 case 1008: 1527 1569 case 1033: 1528 DecodeAntenna (_Message, _BlockSize);1570 DecodeAntennaReceiver(_Message, _BlockSize); 1529 1571 break; 1530 1572 case 1005: -
trunk/BNC/src/RTCM3/RTCM3Decoder.h
r6812 r8197 64 64 * {@link _MessageSize}: contains to current amount of bytes in the buffer<br> 65 65 * {@link _SkipBytes}: amount of bytes to skip at the beginning of the buffer 66 * 66 * 67 67 * The functions sets following variables:<br> 68 68 * {@link _NeedBytes}: Minimum number of bytes needed on next call<br> … … 146 146 bool DecodeBDSEphemeris(unsigned char* buffer, int bufLen); 147 147 /** 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 150 151 * @param bufLen the length of the buffer (the message length including header+crc) 151 152 * @return <code>true</code> when data block was decodable 152 153 */ 153 bool DecodeAntenna (unsigned char* buffer, int bufLen);154 bool DecodeAntennaReceiver(unsigned char* buffer, int bufLen); 154 155 /** 155 156 * Extract antenna type from 1005 or 1006 RTCM3 messages. … … 166 167 167 168 /** List of decoders for Clock and Orbit data */ 168 QMap<QByteArray, RTCM3coDecoder*> _coDecoders; 169 QMap<QByteArray, RTCM3coDecoder*> _coDecoders; 169 170 170 171 /** Message buffer for input parsing */ -
trunk/BNC/src/bncgetthread.cpp
r8127 r8197 893 893 } 894 894 895 // RTCMv3 receiver descriptor 896 // -------------------------- 897 for (int ii = 0; ii < decoder()->_recType.size(); ii++) { 898 QString rec1 = QString("%1 ").arg(decoder()->_recType[ii]); 899 emit(newMessage(_staID + ": Receiver descriptor " + rec1.toLatin1(), true)); 900 } 901 895 902 // RTCM GLONASS slots 896 903 // ------------------ … … 939 946 decoder()->_typeList.clear(); 940 947 decoder()->_antType.clear(); 948 decoder()->_recType.clear(); 941 949 decoder()->_antList.clear(); 942 950 }
Note:
See TracChangeset
for help on using the changeset viewer.