Changeset 1436 in ntrip
- Timestamp:
- Jan 3, 2009, 12:59:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/GPSS/gpssDecoder.cpp
r1435 r1436 109 109 epochHdr.n_svs * sizeof(t_obsInternal); 110 110 memcpy(&crc, _buffer.data() + checkLen, sizeof(crc)); 111 int cr dCal = cal_crc((unsigned char*) _buffer.data(), checkLen);111 int crcCal = cal_crc((unsigned char*) _buffer.data(), checkLen); 112 112 113 cout << "Obs: " << crc << " " << crdCal << endl;114 115 for (int is = 0; is < epochHdr.n_svs; is++) {116 t_obs* obs = new t_obs();117 memcpy(&(obs->_o), _buffer.data() + 2 + sizeof(recordSize) +118 sizeof(epochHdr) + is * sizeof(t_obsInternal),119 sizeof(t_obsInternal));120 _obsList.push_back(obs);113 if (crc == crcCal) { 114 for (int is = 0; is < epochHdr.n_svs; is++) { 115 t_obs* obs = new t_obs(); 116 memcpy(&(obs->_o), _buffer.data() + 2 + sizeof(recordSize) + 117 sizeof(epochHdr) + is * sizeof(t_obsInternal), 118 sizeof(t_obsInternal)); 119 _obsList.push_back(obs); 120 } 121 121 } 122 122 } … … 135 135 int checkLen = 2 + sizeof(recordSize) + sizeof(gpsephemeris); 136 136 memcpy(&crc, _buffer.data() + checkLen, sizeof(crc)); 137 int cr dCal = cal_crc((unsigned char*) _buffer.data(), checkLen);137 int crcCal = cal_crc((unsigned char*) _buffer.data(), checkLen); 138 138 139 cout << "Eph: " << crc << " " << crdCal << endl;140 141 gpsephemeris* gpsEph = new gpsephemeris;142 memcpy(gpsEph, _buffer.data() + 2 + sizeof(recordSize),143 sizeof(gpsephemeris));144 emit newGPSEph(gpsEph);139 if (crc == crcCal) { 140 gpsephemeris* gpsEph = new gpsephemeris; 141 memcpy(gpsEph, _buffer.data() + 2 + sizeof(recordSize), 142 sizeof(gpsephemeris)); 143 emit newGPSEph(gpsEph); 144 } 145 145 } 146 146 _buffer = _buffer.mid(reqLength);
Note:
See TracChangeset
for help on using the changeset viewer.