Changeset 3475 in ntrip for trunk/BNC


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

Legend:

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

    r3474 r3475  
    438438  // ----------------------------------------------------
    439439  t_irc irc;
     440  ColumnVector dx;
    440441  if (_method == filter) {
    441     irc = processEpoch_filter(out, resCorr);
     442    irc = processEpoch_filter(out, resCorr, dx);
    442443  }
    443444  else {
    444     irc = processEpoch_singleEpoch(out, resCorr);
    445   }
    446 
    447   // Print Results
    448   // -------------
     445    irc = processEpoch_singleEpoch(out, resCorr, dx);
     446  }
     447
     448  // Update Parameter Values, Print Results
     449  // --------------------------------------
    449450  if (irc == success) {
     451    for (int iPar = 1; iPar <= _params.size(); iPar++) {
     452      cmbParam* pp = _params[iPar-1];
     453      pp->xx += dx(iPar);
     454      if (pp->type == cmbParam::clkSat) {
     455        if (resCorr.find(pp->prn) != resCorr.end()) {
     456          resCorr[pp->prn]->dClk = pp->xx / t_CST::c;
     457        }
     458      }
     459      out << _resTime.datestr().c_str() << " "
     460          << _resTime.timestr().c_str() << " ";
     461      out.setRealNumberNotation(QTextStream::FixedNotation);
     462      out.setFieldWidth(8);
     463      out.setRealNumberPrecision(4);
     464      out << pp->toString() << " "
     465          << pp->xx << " +- " << sqrt(_QQ(pp->index,pp->index)) << endl;
     466      out.setFieldWidth(0);
     467    }
    450468    printResults(out, resCorr);
    451469    dumpResults(resCorr);
     
    461479////////////////////////////////////////////////////////////////////////////
    462480t_irc bncComb::processEpoch_filter(QTextStream& out,
    463                                    QMap<QString, t_corr*>& resCorr) {
     481                                   QMap<QString, t_corr*>& resCorr,
     482                                   ColumnVector& dx) {
    464483
    465484  // Prediction Step
     
    483502  SymmetricMatrix QQ_sav = _QQ;
    484503
    485   ColumnVector dx;
    486    
    487504  // Update and outlier detection loop
    488505  // ---------------------------------
     
    528545      break;
    529546    }
    530   }
    531 
    532   // Update Parameter Values
    533   // -----------------------
    534   for (int iPar = 1; iPar <= _params.size(); iPar++) {
    535     cmbParam* pp = _params[iPar-1];
    536     pp->xx += dx(iPar);
    537     if (pp->type == cmbParam::clkSat) {
    538       if (resCorr.find(pp->prn) != resCorr.end()) {
    539         resCorr[pp->prn]->dClk = pp->xx / t_CST::c;
    540       }
    541     }
    542     out << _resTime.datestr().c_str() << " "
    543         << _resTime.timestr().c_str() << " ";
    544     out.setRealNumberNotation(QTextStream::FixedNotation);
    545     out.setFieldWidth(8);
    546     out.setRealNumberPrecision(4);
    547     out << pp->toString() << " "
    548         << pp->xx << " +- " << sqrt(_QQ(pp->index,pp->index)) << endl;
    549     out.setFieldWidth(0);
    550547  }
    551548
     
    785782////////////////////////////////////////////////////////////////////////////
    786783t_irc bncComb::processEpoch_singleEpoch(QTextStream& out,
    787                                         QMap<QString, t_corr*>& resCorr) {
     784                                        QMap<QString, t_corr*>& resCorr,
     785                                        ColumnVector& dx) {
    788786
    789787  // Initialize resCorr
     
    875873  SymmetricMatrix NN; NN << AA.t() * PP * AA;
    876874  ColumnVector    bb = AA.t() * PP * ll;
    877   SymmetricMatrix QQ = NN.i();
    878 
    879   ColumnVector    xx = QQ * bb;
    880 
    881   cout << xx.t() << endl;
     875
     876  _QQ = NN.i();
     877  dx = _QQ * bb;
    882878
    883879  return success;
  • trunk/BNC/combination/bnccomb.h

    r3472 r3475  
    7777  void processEpoch();
    7878  t_irc processEpoch_filter(QTextStream& out,
    79                             QMap<QString, t_corr*>& resCorr);
     79                            QMap<QString, t_corr*>& resCorr,
     80                            ColumnVector& dx);
    8081  t_irc processEpoch_singleEpoch(QTextStream& out,
    81                                  QMap<QString, t_corr*>& resCorr);
     82                                 QMap<QString, t_corr*>& resCorr,
     83                                 ColumnVector& dx);
    8284  t_irc createAmat(Matrix& AA, ColumnVector& ll, DiagonalMatrix& PP,
    8385                   const ColumnVector& x0, QMap<QString, t_corr*>& resCorr);
Note: See TracChangeset for help on using the changeset viewer.