- Timestamp:
- Dec 13, 2011, 2:55:00 PM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncgetthread.cpp
r3509 r3515 126 126 _isToBeDeleted = false; 127 127 _decoder = 0; 128 _decoderAux = 0; 128 129 _query = 0; 129 130 _nextSleep = 0; … … 345 346 delete _PPPclient; 346 347 delete _decoder; 348 delete _decoderAux; 347 349 delete _rnx; 348 350 delete _rawFile; … … 382 384 // ----------------------- 383 385 _decoder->_obsList.clear(); 386 if (_decoderAux) { 387 _decoderAux->_obsList.clear(); 388 } 389 390 GPSDecoder* decoderUsed = _decoder; 384 391 385 392 // Read Data … … 391 398 else if (_rawFile) { 392 399 data = _rawFile->readChunk(); 400 if (_rawFile->format() == "HASS2ASCII") { 401 if (_decoderAux == 0) { 402 emit(newMessage(_staID + ": Get data in HASS format", true)); 403 _decoderAux = new hassDecoder(_staID); 404 } 405 decoderUsed = _decoderAux; 406 } 393 407 394 408 if (data.isEmpty()) { … … 428 442 // ----------- 429 443 vector<string> errmsg; 430 _decoder->_obsList.clear();431 t_irc irc = _decoder->Decode(data.data(), data.size(), errmsg);444 decoderUsed->_obsList.clear(); 445 t_irc irc = decoderUsed->Decode(data.data(), data.size(), errmsg); 432 446 433 447 // Perform various scans and checks 434 448 // -------------------------------- 435 449 _latencyChecker->checkOutage(irc == success); 436 _latencyChecker->checkObsLatency( _decoder->_obsList);437 _latencyChecker->checkCorrLatency( _decoder->corrGPSEpochTime());450 _latencyChecker->checkObsLatency(decoderUsed->_obsList); 451 _latencyChecker->checkCorrLatency(decoderUsed->corrGPSEpochTime()); 438 452 439 453 emit newLatency(_staID, _latencyChecker->currentLatency()); … … 443 457 // Loop over all observations (observations output) 444 458 // ------------------------------------------------ 445 QListIterator<t_obs> it( _decoder->_obsList);459 QListIterator<t_obs> it(decoderUsed->_obsList); 446 460 bool firstObs = true; 447 461 while (it.hasNext()) { … … 455 469 // Check observation epoch 456 470 // ----------------------- 457 if (!_rawFile && !dynamic_cast<gpssDecoder*>( _decoder)) {471 if (!_rawFile && !dynamic_cast<gpssDecoder*>(decoderUsed)) { 458 472 int week; 459 473 double sec; … … 509 523 firstObs = false; 510 524 } 511 _decoder->_obsList.clear();525 decoderUsed->_obsList.clear(); 512 526 } 513 527 catch (Exception& exc) { -
trunk/BNC/bncgetthread.h
r3510 r3515 106 106 107 107 GPSDecoder* _decoder; 108 GPSDecoder* _decoderAux; 108 109 bncNetQuery* _query; 109 110 QUrl _mountPoint;
Note:
See TracChangeset
for help on using the changeset viewer.