- Timestamp:
- Oct 30, 2024, 10:26:13 PM (7 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/rnxnavfile.cpp
r10548 r10574 149 149 //////////////////////////////////////////////////////////////////////////// 150 150 void t_rnxNavFile::read(QTextStream* stream) { 151 QString navType Str;151 QString navType; 152 152 153 153 while (stream->status() == QTextStream::Ok && !stream->atEnd()) { … … 159 159 160 160 QStringList hlp = line.split(QRegExp("\\s+"), Qt::SkipEmptyParts); 161 QString key, prn, navSubType; 162 char sys; 163 161 164 QString firstStr = hlp.at(0); 162 QString prn;163 164 165 if (version() >= 3.0 && firstStr != ">") { 165 166 prn = firstStr; 167 sys = prn[0].toLatin1(); 166 168 } 167 169 else if (version() >= 4.0 && firstStr == ">") { 170 key = hlp.at(1); 171 prn = hlp.at(2); 172 sys = prn[0].toLatin1(); 173 navType = hlp.at(3); 174 175 // ALL Non-EPH messages are currently ignored 168 176 int lines2skip = 0; 169 QString key = hlp.at(1); 170 // EPH is used 171 if (key == "EPH") { 172 navTypeStr = hlp.at(3); 173 } 174 // all others are currently ignored 175 else if (key == "STO") { 177 // STO 178 if (key == "STO") { 176 179 lines2skip = 2; 177 180 } 178 else if (key == "EOP" || key == "ION") { 181 // EOP 182 else if (key == "EOP") { 179 183 lines2skip = 3; 180 184 } 185 // ION 186 else if (key == "ION") { 187 if (sys == 'R') { 188 lines2skip = 1; //if (navType == "LXOC") {} 189 } 190 else if (sys == 'E') { 191 lines2skip = 2; 192 } 193 else if (sys == 'G' || sys == 'C' || 194 sys == 'J' || sys == 'I') { 195 lines2skip = 3; 196 if (sys == 'I' && navType == "L1NV" || // I: KLOB, NEQN 197 sys == 'J' && navType == "CNVX") { // J: WIDE, JAPN 198 navSubType = hlp.at(4); 199 if (navSubType == "KLOB") { 200 lines2skip += 1; 201 } 202 else if (navSubType == "NEQN") { 203 lines2skip += 4; 204 } 205 } 206 } 207 } 181 208 if (lines2skip) { 182 for (int ii = 1; ii < lines2skip; ii++) {209 for (int ii = 1; ii <= lines2skip; ii++) { 183 210 stream->readLine(); 184 211 } … … 196 223 197 224 t_eph* eph = 0; 198 QStringList lines; lines << line; 199 if (prn[0] == 'G') { 225 QStringList lines; 226 lines << line; 227 if (sys == 'G') { 200 228 for (int ii = 1; ii < 8; ii++) { 201 229 lines << stream->readLine(); … … 203 231 eph = new t_ephGPS(version(), lines); 204 232 } 205 else if ( prn[0]== 'R') {233 else if (sys == 'R') { 206 234 int num = 4; 207 235 if (version() >= 3.05) { … … 213 241 eph = new t_ephGlo(version(), lines); 214 242 } 215 else if ( prn[0]== 'E') {243 else if (sys == 'E') { 216 244 for (int ii = 1; ii < 8; ii++) { 217 245 lines << stream->readLine(); … … 219 247 eph = new t_ephGal(version(), lines); 220 248 } 221 else if ( prn[0]== 'J') {249 else if (sys == 'J') { 222 250 for (int ii = 1; ii < 8; ii++) { 223 251 lines << stream->readLine(); … … 225 253 eph = new t_ephGPS(version(), lines); 226 254 } 227 else if ( prn[0]== 'S') {255 else if (sys== 'S') { 228 256 for (int ii = 1; ii < 4; ii++) { 229 257 lines << stream->readLine(); … … 231 259 eph = new t_ephSBAS(version(), lines); 232 260 } 233 else if ( prn[0]== 'C') {261 else if (sys == 'C') { 234 262 for (int ii = 1; ii < 8; ii++) { 235 263 lines << stream->readLine(); … … 237 265 eph = new t_ephBDS(version(), lines); 238 266 } 239 else if ( prn[0]== 'I') {267 else if (sys == 'I') { 240 268 for (int ii = 1; ii < 8; ii++) { 241 269 lines << stream->readLine(); … … 244 272 } 245 273 246 if (version() >= 4.0 ) {247 if (eph->setNavType(navType Str) != success) {274 if (version() >= 4.0 && key == "EPH") { 275 if (eph->setNavType(navType) != success) { 248 276 delete eph; 249 277 continue;
Note:
See TracChangeset
for help on using the changeset viewer.