Changeset 8234 in ntrip for trunk/BNC/src/RTCM3
- Timestamp:
- Jan 5, 2018, 10:52:16 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM3/RTCM3Decoder.cpp
r8204 r8234 1382 1382 //////////////////////////////////////////////////////////////////////////// 1383 1383 bool RTCM3Decoder::DecodeAntennaReceiver(unsigned char* data, int size) { 1384 char *antenna, anttype[256]; 1385 char *dummy; 1386 char *receiver, rectype[256]; 1387 1384 char *antenna; 1385 char *antserialnum; 1386 char *receiver; 1387 char *recfirmware; 1388 char *recserialnum; 1388 1389 int type; 1389 1390 int dnum = -1; 1390 int antsernum = -1; 1391 1391 int antnum = -1; 1392 1392 int recnum = -1; 1393 int recsernum = -1; 1394 int recfirnum = -1; 1393 1395 uint64_t numbits = 0, bitfield = 0; 1394 1396 … … 1397 1399 1398 1400 GETBITS(type, 12) 1399 SKIPBITS(12) 1401 SKIPBITS(12) /* reference station ID */ 1400 1402 GETSTRING(antnum, antenna) 1401 if (antnum > -1 && antnum < 265) { 1402 memcpy(anttype, antenna, antnum); 1403 anttype[antnum] = 0; 1404 if (!_antType.contains(anttype)) { 1405 _antType.push_back(anttype); 1403 if ((antnum > -1 && antnum < 265) && 1404 (_antType.empty() || strncmp(_antType.back().descriptor, antenna, recnum) != 0)) { 1405 _antType.push_back(t_antInfo()); 1406 memcpy(_antType.back().descriptor, antenna, antnum); 1407 _antType.back().descriptor[antnum] = 0; 1408 } 1409 SKIPBITS(8) /* antenna setup ID */ 1410 if (type == 1008 || type == 1033 ) { 1411 GETSTRING(antsernum, antserialnum) 1412 if ((antsernum > -1 && antsernum < 265)) { 1413 memcpy(_antType.back().serialnumber, antserialnum, antsernum); 1414 _antType.back().serialnumber[antsernum] = 0; 1406 1415 } 1407 1416 } 1417 1408 1418 if (type == 1033) { 1409 SKIPBITS(8)1410 GETSTRING(dnum, dummy)1411 1419 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); 1420 GETSTRING(recfirnum, recfirmware) 1421 GETSTRING(recsernum, recserialnum) 1422 if ((recnum > -1 && recnum < 265) && 1423 (_recType.empty() || strncmp(_recType.back().descriptor, receiver, recnum) != 0)) { 1424 _recType.push_back(t_recInfo()); 1425 memcpy(_recType.back().descriptor, receiver, recnum); 1426 _recType.back().descriptor[recnum] = 0; 1427 if (recfirnum > -1 && recfirnum < 265) { 1428 memcpy(_recType.back().firmware, recfirmware, recfirnum); 1429 _recType.back().firmware[recfirnum] = 0; 1430 } 1431 if (recsernum > -1 && recsernum < 265) { 1432 memcpy(_recType.back().serialnumber, recserialnum, recsernum); 1433 _recType.back().serialnumber[recsernum] = 0; 1417 1434 } 1418 1435 } … … 1432 1449 1433 1450 GETBITS(type, 12) 1434 _antList.push_back(t_ant Info());1435 _antList.back().type = t_ant Info::ARP;1451 _antList.push_back(t_antRefPoint()); 1452 _antList.back().type = t_antRefPoint::ARP; 1436 1453 SKIPBITS(22) 1437 1454 GETBITSSIGN(x, 38)
Note:
See TracChangeset
for help on using the changeset viewer.