Changeset 9765 in ntrip for trunk/BNC/src/rinex/rnxnavfile.cpp
- Timestamp:
- Jun 20, 2022, 4:54:59 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/rnxnavfile.cpp
r9366 r9765 146 146 //////////////////////////////////////////////////////////////////////////// 147 147 void t_rnxNavFile::read(QTextStream* stream) { 148 QString navTypeStr; 148 149 149 150 while (stream->status() == QTextStream::Ok && !stream->atEnd()) { 151 150 152 QString line = stream->readLine(); 151 153 if (line.isEmpty()) { 152 154 continue; 153 155 } 156 154 157 QStringList hlp = line.split(QRegExp("\\s+"), QString::SkipEmptyParts); 158 QString firstStr = hlp.at(0); 155 159 QString prn; 156 if (version() >= 3.0) { 157 prn = hlp.at(0); 160 161 if (version() >= 3.0 && firstStr != ">") { 162 prn = firstStr; 163 } 164 else if (version() >= 4.0 && firstStr == ">") { 165 int lines2skip = 0; 166 QString key = hlp.at(1); 167 // EPH is used 168 if (key == "EPH") { 169 navTypeStr = hlp.at(3); 170 } 171 // all others are currently ignored 172 else if (key == "STO") { 173 lines2skip = 2; 174 } 175 else if (key == "EOP" || key == "ION") { 176 lines2skip = 3; 177 } 178 if (lines2skip) { 179 for (int ii = 1; ii < lines2skip; ii++) { 180 stream->readLine(); 181 } 182 } 183 continue; 158 184 } 159 185 else { … … 213 239 } 214 240 eph = new t_ephGPS(version(), lines); 241 } 242 else { 243 continue; 244 } 245 if (version() >= 4.0) { 246 if (eph->setNavType(navTypeStr) != success) { 247 delete eph; 248 continue; 249 } 215 250 } 216 251 _ephs.push_back(eph); … … 264 299 // 265 300 //////////////////////////////////////////////////////////////////////////// 266 void t_rnxNavFile::writeHeader(const QMap<QString, QString>* txtMap ) {301 void t_rnxNavFile::writeHeader(const QMap<QString, QString>* txtMap, int numMergedFiles, int leapSecs) { 267 302 268 303 QString runBy = BNC_CORE->userName(); … … 334 369 << "PGM / RUN BY / DATE\n"; 335 370 371 if (version() >= 4.0) { 372 *_stream << QString("%1").arg(leapSecs, 6, 10, QLatin1Char(' ')).left(60).leftJustified(60) 373 << "LEAP SECONDS\n"; 374 375 *_stream << QString("%1").arg(numMergedFiles, 19, 10, QLatin1Char(' ')).leftJustified(60) 376 << "MERGED FILE\n"; 377 } 378 336 379 QStringListIterator itCmnt(comments); 337 380 while (itCmnt.hasNext()) { … … 339 382 } 340 383 384 341 385 *_stream << QString() 342 386 .leftJustified(60)
Note:
See TracChangeset
for help on using the changeset viewer.