Changeset 6141 in ntrip for trunk/BNC/src/rinex/corrfile.cpp
- Timestamp:
- Sep 13, 2014, 5:08:22 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/corrfile.cpp
r5732 r6141 71 71 } 72 72 73 QStringList corrs;73 QStringList lines; 74 74 75 75 if (!_lastLine.isEmpty()) { 76 corrs << _lastLine;76 lines << _lastLine; 77 77 } 78 78 … … 85 85 86 86 if (stopRead(tt)) { 87 if (corrs.size()) { 88 89 QListIterator<QString> it(corrs); 90 while (it.hasNext()) { 91 const QString& cLine = it.next(); 92 t_corr* corr = new t_corr(); 93 corr->readLine(cLine); 94 if (corr->tRao.valid()) { 95 _corrIODs[corr->prn] = corr->iod; 96 } 87 QList<t_orbCorr> orbCorr; 88 QList<t_clkCorr> clkCorr; 89 QListIterator<QString> it(lines); 90 while (it.hasNext()) { 91 const QString& str = it.next(); 92 if (str[0] == 'C') { 93 t_clkCorr corr(str.toAscii().data()); 94 _lastTime = corr._time; 95 clkCorr.push_back(corr); 97 96 } 98 99 emit newCorrections(corrs); 97 else if (str[0] == 'O') { 98 t_orbCorr corr(str.toAscii().data()); 99 _lastTime = corr._time; 100 orbCorr.push_back(corr); 101 } 102 } 103 if (orbCorr.size() > 0) { 104 emit newOrbCorrections(orbCorr); 105 } 106 if (clkCorr.size() > 0) { 107 emit newClkCorrections(clkCorr); 100 108 } 101 109 return; 102 110 } 103 111 else { 104 corrs << _lastLine;112 lines << _lastLine; 105 113 } 106 114 } … … 111 119 bool t_corrFile::stopRead(const bncTime& tt) { 112 120 113 if (_last Line.isEmpty()) {121 if (_lastTime.undef()) { 114 122 return false; 115 123 } 116 124 117 QTextStream in(_lastLine.toAscii(), QIODevice::ReadOnly); 118 int messageType, updateInterval, GPSweek; 119 double GPSweeks; 120 in >> messageType >> updateInterval >> GPSweek >> GPSweeks; 121 122 bncTime tNew(GPSweek, GPSweeks); 123 124 if (tNew > tt) { 125 if (_lastTime > tt) { 125 126 return true; 126 127 }
Note:
See TracChangeset
for help on using the changeset viewer.