Changeset 1431 in ntrip
- Timestamp:
- Jan 3, 2009, 11:22:42 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/GPSS/gpssDecoder.cpp
r1430 r1431 15 15 * 16 16 * -----------------------------------------------------------------------*/ 17 18 #include <iostream> 17 19 18 20 #include "gpssDecoder.h" … … 69 71 // ------------ 70 72 if (char(_buffer[1]) == 0x00) { 71 EPOCHHEADER epochHdr; 72 if (_buffer.length() >= int(2 + sizeof(recordSize) + sizeof(epochHdr))) { 73 74 int reqLength = 2 + sizeof(recordSize) + sizeof(EPOCHHEADER); 75 76 cout << "Obs: " << _buffer.length() << " " << reqLength << endl; 77 78 if (_buffer.length() >= reqLength) { 79 EPOCHHEADER epochHdr; 73 80 memcpy(&epochHdr, _buffer.data() + 2 + sizeof(recordSize), 74 81 sizeof(epochHdr)); 75 76 int reqLength = 2 + sizeof(recordSize) + sizeof(epochHdr) + 77 epochHdr.n_svs * sizeof(t_obsInternal) + sizeof(crc) + 1; 82 83 reqLength += epochHdr.n_svs * sizeof(t_obsInternal) + sizeof(crc) + 1; 78 84 79 85 if (_buffer.length() >= reqLength) { … … 87 93 } 88 94 } 95 _buffer.mid(reqLength); 89 96 } 90 97 … … 94 101 int reqLength = 2 + sizeof(recordSize) + sizeof(gpsephemeris) + 95 102 sizeof(crc) + 1; 103 104 cout << "Eph: " << _buffer.length() << " " << reqLength << endl; 105 96 106 if (_buffer.length() >= reqLength) { 97 107 gpsephemeris* gpsEph = new gpsephemeris; … … 100 110 emit newGPSEph(gpsEph); 101 111 } 112 _buffer.mid(reqLength); 102 113 } 103 114
Note:
See TracChangeset
for help on using the changeset viewer.