Changeset 3472 in ntrip


Ignore:
Timestamp:
Oct 14, 2011, 4:51:25 PM (13 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/combination
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/combination/bnccomb.cpp

    r3471 r3472  
    367367////////////////////////////////////////////////////////////////////////////
    368368void bncComb::processEpoch() {
    369   if (_method == filter) {
    370     return processEpoch_filter();
    371   }
    372   else {
    373     return processEpoch_singleEpoch();
    374   }
    375 }
    376 
    377 // Process Epoch - Filter Method
    378 ////////////////////////////////////////////////////////////////////////////
    379 void bncComb::processEpoch_filter() {
    380   int nPar = _params.size();
    381369
    382370  _log.clear();
     
    384372  QTextStream out(&_log, QIODevice::WriteOnly);
    385373
    386   out << endl <<           "Combination (Filter):" << endl
    387       << "---------------------------------------" << endl;
     374  out << endl <<           "Combination:" << endl
     375      << "------------------------------" << endl;
    388376
    389377  // Observation Statistics
     
    438426  }
    439427
     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////////////////////////////////////////////////////////////////////////////
     455t_irc bncComb::processEpoch_filter(QTextStream& out,
     456                                   QMap<QString, t_corr*>& resCorr) {
     457
    440458  // Prediction Step
    441459  // ---------------
     460  int nPar = _params.size();
    442461  ColumnVector x0(nPar);
    443462  for (int iPar = 1; iPar <= _params.size(); iPar++) {
     
    458477
    459478  ColumnVector dx;
    460   QMap<QString, t_corr*> resCorr;
    461479   
    462480  // Update and outlier detection loop
     
    469487
    470488    if (createAmat(AA, ll, PP, x0, resCorr) != success) {
    471       _buffer.remove(_resTime);
    472       emit newMessage(_log, false);
    473       return;
     489      return failure;
    474490    }
    475491
     
    527543  }
    528544
    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;
    539546}
    540547
     
    766773// Process Epoch - Single-Epoch Method
    767774////////////////////////////////////////////////////////////////////////////
    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 }
     775t_irc bncComb::processEpoch_singleEpoch(QTextStream& out,
     776                                        QMap<QString, t_corr*>& resCorr) {
     777
     778  return failure;
     779}
  • trunk/BNC/combination/bnccomb.h

    r3470 r3472  
    7676
    7777  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);
    8082  t_irc createAmat(Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP,
    8183                   const ColumnVector& x0, QMap<QString, t_corr*>& resCorr);
Note: See TracChangeset for help on using the changeset viewer.