Changeset 10587 in ntrip for trunk/BNC/src/rinex/rnxnavfile.cpp
- Timestamp:
- Dec 10, 2024, 3:57:21 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/rnxnavfile.cpp
r10577 r10587 149 149 //////////////////////////////////////////////////////////////////////////// 150 150 void t_rnxNavFile::read(QTextStream* stream) { 151 QString ephType;152 151 153 152 while (stream->status() == QTextStream::Ok && !stream->atEnd()) { … … 157 156 continue; 158 157 } 159 158 QString navType; 160 159 QStringList hlp = line.split(QRegExp("\\s+"), Qt::SkipEmptyParts); 161 QString key, prn, navSubType;160 QString prn; 162 161 char sys; 163 164 162 QString firstStr = hlp.at(0); 165 if (version() >= 3.0 && firstStr != ">") { 163 164 // RINEX version 3 165 if (version() >= 3.0 && 166 version() < 4.0 && firstStr != ">") { 166 167 prn = firstStr; 167 168 sys = prn[0].toLatin1(); 168 } 169 navType = ""; 170 } 171 // RINEX version 4 169 172 else if (version() >= 4.0 && firstStr == ">") { 170 key = hlp.at(1);173 QString key = hlp.at(1); 171 174 prn = hlp.at(2); 172 175 sys = prn[0].toLatin1(); 173 ephType = hlp.at(3);176 navType = hlp.at(3); 174 177 175 178 // ALL Non-EPH messages are currently ignored … … 194 197 sys == 'J' || sys == 'I') { 195 198 lines2skip = 3; 196 if ((sys == 'I' && ephType == "L1NV") || // I: KLOB, NEQN197 (sys == 'J' && ephType == "CNVX")) { // J: WIDE, JAPN198 navSubType = hlp.at(4);199 if ((sys == 'I' && navType == "L1NV") || // I: KLOB, NEQN 200 (sys == 'J' && navType == "CNVX")) { // J: WIDE, JAPN 201 QString navSubType = hlp.at(4); 199 202 if (navSubType == "KLOB") { 200 203 lines2skip += 1; … … 213 216 continue; 214 217 } 218 // RINEX version 2 215 219 else { 216 220 if (glonass()) { … … 226 230 lines << line; 227 231 if (sys == 'G') { 228 for (int ii = 1; ii < 8; ii++) { 232 int nLines = 8; 233 if (navType == "CNAV") { 234 nLines += 1; 235 } 236 if (navType == "CNV2") { 237 nLines += 2; 238 } 239 for (int ii = 1; ii < nLines; ii++) { 229 240 lines << stream->readLine(); 230 241 } … … 232 243 } 233 244 else if (sys == 'R') { 234 int n um= 4;245 int nLines = 4; 235 246 if (version() >= 3.05) { 236 n um+= 1;237 } 238 for (int ii = 1; ii < n um; ii++) {247 nLines += 1; 248 } 249 for (int ii = 1; ii < nLines; ii++) { 239 250 lines << stream->readLine(); 240 251 } … … 248 259 } 249 260 else if (sys == 'J') { 250 for (int ii = 1; ii < 8; ii++) { 261 int nLines = 8; 262 if (navType == "CNAV") { 263 nLines += 1; 264 } 265 if (navType == "CNV2") { 266 nLines += 2; 267 } 268 for (int ii = 1; ii < nLines; ii++) { 251 269 lines << stream->readLine(); 252 270 } … … 260 278 } 261 279 else if (sys == 'C') { 262 for (int ii = 1; ii < 8; ii++) { 280 int nLines = 8; 281 if (navType == "CNV1" || 282 navType == "CNV2") { 283 nLines += 2; 284 } 285 if (navType == "CNV3") { 286 nLines += 1; 287 } 288 for (int ii = 1; ii < nLines; ii++) { 263 289 lines << stream->readLine(); 264 290 } … … 266 292 } 267 293 else if (sys == 'I') { 268 for (int ii = 1; ii < 8; ii++) { 294 int nLines = 8; 295 if (navType == "L1NV") { 296 nLines += 1; 297 } 298 for (int ii = 1; ii < nLines; ii++) { 269 299 lines << stream->readLine(); 270 300 } … … 272 302 } 273 303 274 if (version() >= 4.0 && key == "EPH") {275 if (eph->setEphType(ephType) != success) {276 delete eph;277 continue;278 }279 }280 281 304 if (eph) { 305 eph->setType(navType); 282 306 _ephs.push_back(eph); 283 307 } 308 284 309 } 285 310 } … … 363 388 else { 364 389 QString fmt; 365 t_eph::e_ typesys = satSystem();390 t_eph::e_system sys = satSystem(); 366 391 switch(sys) { 367 392 case t_eph::GPS:
Note:
See TracChangeset
for help on using the changeset viewer.