Changeset 3472 in ntrip
- Timestamp:
- Oct 14, 2011, 4:51:25 PM (13 years ago)
- Location:
- trunk/BNC/combination
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/combination/bnccomb.cpp
r3471 r3472 367 367 //////////////////////////////////////////////////////////////////////////// 368 368 void bncComb::processEpoch() { 369 if (_method == filter) {370 return processEpoch_filter();371 }372 else {373 return processEpoch_singleEpoch();374 }375 }376 377 // Process Epoch - Filter Method378 ////////////////////////////////////////////////////////////////////////////379 void bncComb::processEpoch_filter() {380 int nPar = _params.size();381 369 382 370 _log.clear(); … … 384 372 QTextStream out(&_log, QIODevice::WriteOnly); 385 373 386 out << endl << "Combination (Filter):" << endl387 << "------------------------------ ---------" << endl;374 out << endl << "Combination:" << endl 375 << "------------------------------" << endl; 388 376 389 377 // Observation Statistics … … 438 426 } 439 427 428 QMap<QString, t_corr*> resCorr; 429 430 // Perform the actual Combination using selected Method 431 // ---------------------------------------------------- 432 t_irc irc; 433 if (_method == filter) { 434 irc = processEpoch_filter(out, resCorr); 435 } 436 else { 437 irc = processEpoch_singleEpoch(out, resCorr); 438 } 439 440 // Print Results 441 // ------------- 442 if (irc == success) { 443 printResults(out, resCorr); 444 dumpResults(resCorr); 445 } 446 447 // Delete Data, emit Message 448 // ------------------------- 449 _buffer.remove(_resTime); 450 emit newMessage(_log, false); 451 } 452 453 // Process Epoch - Filter Method 454 //////////////////////////////////////////////////////////////////////////// 455 t_irc bncComb::processEpoch_filter(QTextStream& out, 456 QMap<QString, t_corr*>& resCorr) { 457 440 458 // Prediction Step 441 459 // --------------- 460 int nPar = _params.size(); 442 461 ColumnVector x0(nPar); 443 462 for (int iPar = 1; iPar <= _params.size(); iPar++) { … … 458 477 459 478 ColumnVector dx; 460 QMap<QString, t_corr*> resCorr;461 479 462 480 // Update and outlier detection loop … … 469 487 470 488 if (createAmat(AA, ll, PP, x0, resCorr) != success) { 471 _buffer.remove(_resTime); 472 emit newMessage(_log, false); 473 return; 489 return failure; 474 490 } 475 491 … … 527 543 } 528 544 529 // Print Results 530 // ------------- 531 printResults(out, resCorr); 532 dumpResults(resCorr); 533 534 emit newMessage(_log, false); 535 536 // Delete Data 537 // ----------- 538 _buffer.remove(_resTime); 545 return success; 539 546 } 540 547 … … 766 773 // Process Epoch - Single-Epoch Method 767 774 //////////////////////////////////////////////////////////////////////////// 768 void bncComb::processEpoch_singleEpoch() { 769 770 _log.clear(); 771 772 QTextStream out(&_log, QIODevice::WriteOnly); 773 774 out << endl << "Combination (Single-Epoch):" << endl 775 << "---------------------------------------------" << endl; 776 777 // Observation Statistics 778 // ---------------------- 779 QListIterator<cmbAC*> icAC(_ACs); 780 while (icAC.hasNext()) { 781 cmbAC* AC = icAC.next(); 782 AC->numObs = 0; 783 QVectorIterator<cmbCorr*> itCorr(corrs()); 784 while (itCorr.hasNext()) { 785 cmbCorr* corr = itCorr.next(); 786 if (corr->acName == AC->name) { 787 AC->numObs += 1; 788 } 789 } 790 out << AC->name.toAscii().data() << ": " << AC->numObs << endl; 791 } 792 793 QMap<QString, t_corr*> resCorr; 794 795 796 // Print Results 797 // ------------- 798 printResults(out, resCorr); 799 dumpResults(resCorr); 800 801 emit newMessage(_log, false); 802 803 // Delete Data 804 // ----------- 805 _buffer.remove(_resTime); 806 } 775 t_irc bncComb::processEpoch_singleEpoch(QTextStream& out, 776 QMap<QString, t_corr*>& resCorr) { 777 778 return failure; 779 } -
trunk/BNC/combination/bnccomb.h
r3470 r3472 76 76 77 77 void processEpoch(); 78 void processEpoch_filter(); 79 void processEpoch_singleEpoch(); 78 t_irc processEpoch_filter(QTextStream& out, 79 QMap<QString, t_corr*>& resCorr); 80 t_irc processEpoch_singleEpoch(QTextStream& out, 81 QMap<QString, t_corr*>& resCorr); 80 82 t_irc createAmat(Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP, 81 83 const ColumnVector& x0, QMap<QString, t_corr*>& resCorr);
Note:
See TracChangeset
for help on using the changeset viewer.