Changeset 3758 in ntrip for trunk/BNC/rinex
- Timestamp:
- Apr 1, 2012, 4:27:17 PM (13 years ago)
- Location:
- trunk/BNC/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/rinex/rnxnavfile.cpp
r3757 r3758 101 101 //////////////////////////////////////////////////////////////////////////// 102 102 t_rnxNavFile::~t_rnxNavFile() { 103 while (!_ephs.empty()) { 104 t_eph* eph = _ephs.front(); 105 _ephs.pop(); 106 delete eph; 103 for (unsigned ii = 0; ii < _ephs.size(); ii++) { 104 delete _ephs[ii]; 107 105 } 108 106 } … … 151 149 } 152 150 if (eph && eph->ok()) { 153 _ephs.push(eph); 151 _ephs.push_back(eph); 154 152 } 155 153 else { … … 163 161 t_eph* t_rnxNavFile::getNextEph(const bncTime& tt, 164 162 const QMap<QString, int>* corrIODs) { 165 while (!_ephs.empty()) { 166 t_eph* eph = _ephs.front(); 167 bncTime ephTime(eph->GPSweek(), eph->GPSweeks()); 168 double dt = ephTime - tt; 169 if (dt < 2*3600.0) { 170 _ephs.pop(); 171 return eph; 172 } 173 else { 174 return 0; 163 164 if (corrIODs) { 165 QMapIterator<QString, int> itIOD(*corrIODs); 166 while (itIOD.hasNext()) { 167 itIOD.next(); 168 QString prn = itIOD.key(); 169 int iod = itIOD.value(); 170 vector<t_eph*>::iterator it = _ephs.begin(); 171 while (it != _ephs.end()) { 172 t_eph* eph = *it; 173 if (eph->prn() == prn && eph->IOD() == iod) { 174 it = _ephs.erase(it); 175 return eph; 176 } 177 ++it; 178 } 175 179 } 176 180 } 181 182 // while (!_ephs.empty()) { 183 // t_eph* eph = _ephs.front(); 184 // bncTime ephTime(eph->GPSweek(), eph->GPSweeks()); 185 // double dt = ephTime - tt; 186 // if (dt < 2*3600.0) { 187 // _ephs.pop(); 188 // return eph; 189 // } 190 // else { 191 // return 0; 192 // } 193 // } 194 177 195 return 0; 178 196 } -
trunk/BNC/rinex/rnxnavfile.h
r3757 r3758 57 57 58 58 private: 59 void read(QTextStream* stream); 60 std::queue<t_eph*> _ephs; 61 t_rnxNavHeader _header; 59 void read(QTextStream* stream); 60 61 std::vector<t_eph*> _ephs; 62 t_rnxNavHeader _header; 62 63 }; 63 64
Note:
See TracChangeset
for help on using the changeset viewer.