- Timestamp:
- Jan 5, 2018, 10:52:16 AM (7 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM/RTCM2Decoder.cpp
r8204 r8234 202 202 if (_PP.ID() == 3) { 203 203 if (_msg03.validMsg) { 204 _antList.push_back(t_antInfo()); 205 206 this->getStaCrd(_antList.back().xx, _antList.back().yy, 207 _antList.back().zz); 208 209 _antList.back().type = t_antInfo::APC; 204 _antList.push_back(t_antRefPoint()); 205 206 this->getStaCrd(_antList.back().xx, _antList.back().yy, _antList.back().zz); 207 208 _antList.back().type = t_antRefPoint::APC; 210 209 _antList.back().message = _PP.ID(); 211 210 } 212 211 } else if (_PP.ID() == 23) { 213 if (_msg23.validMsg && !_antType.contains(_msg23.antType.c_str())) { 214 _antType.push_back(_msg23.antType.c_str()); 212 if (_msg23.validMsg) { 213 int antlen = strlen(_msg23.antType.c_str()); 214 int serlen = strlen(_msg23.antSN.c_str()); 215 if ((antlen) && 216 (_antType.empty() || strncmp(_antType.back().descriptor, _msg23.antType.c_str(), antlen) != 0)) { 217 _antType.push_back(t_antInfo()); 218 memcpy(_antType.back().descriptor, _msg23.antType.c_str(), antlen); 219 _antType.back().descriptor[antlen] = 0; 220 if (serlen) { 221 memcpy(_antType.back().serialnumber, _msg23.antSN.c_str(), serlen); 222 _antType.back().serialnumber[serlen] = 0; 223 } 224 } 215 225 } 216 226 } else if (_PP.ID() == 24) { 217 227 if (_msg24.validMsg) { 218 _antList.push_back(t_ant Info());228 _antList.push_back(t_antRefPoint()); 219 229 220 230 _antList.back().xx = _msg24.x; … … 225 235 _antList.back().height = _msg24.h; 226 236 227 _antList.back().type = t_ant Info::ARP;237 _antList.back().type = t_antRefPoint::ARP; 228 238 _antList.back().message = _PP.ID(); 229 239 } -
trunk/BNC/src/RTCM/RTCM2Decoder.h
r6443 r8234 29 29 #include <vector> 30 30 #include <list> 31 #include <stdio.h> 31 32 32 33 #include "GPSDecoder.h" … … 71 72 rtcm2::RTCM2_24 _msg24; 72 73 rtcm2::RTCM2_2021 _msg2021; 73 bncEphUser _ephUser; 74 bncEphUser _ephUser; 74 75 }; 75 76 -
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.