Changeset 3478 in ntrip for trunk


Ignore:
Timestamp:
Oct 15, 2011, 9:06:18 AM (13 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r3477 r3478  
    785785  // Remove Satellites that are not in Master
    786786  // ----------------------------------------
    787   QMutableVectorIterator<cmbCorr*> itCorr1(corrs());
    788   while (itCorr1.hasNext()) {
    789     cmbCorr* corr = itCorr1.next();
     787  QMutableVectorIterator<cmbCorr*> it(corrs());
     788  while (it.hasNext()) {
     789    cmbCorr* corr = it.next();
    790790    QString  prn  = corr->prn;
    791791    bool foundMaster = false;
    792     QVectorIterator<cmbCorr*> it(corrs());
    793     while (it.hasNext()) {
    794       cmbCorr* corr2 = it.next();
    795       QString  prn2  = corr2->prn;
    796       QString  AC   = corr2->acName;
    797       if (AC == _masterOrbitAC && prn == prn2) {
     792    QVectorIterator<cmbCorr*> itHlp(corrs());
     793    while (itHlp.hasNext()) {
     794      cmbCorr* corrHlp = itHlp.next();
     795      QString  prnHlp  = corrHlp->prn;
     796      QString  ACHlp   = corrHlp->acName;
     797      if (ACHlp == _masterOrbitAC && prn == prnHlp) {
    798798        foundMaster = true;
    799799        break;
     
    801801    }
    802802    if (!foundMaster) {
    803       itCorr1.remove();
     803      it.remove();
    804804    }
    805805  }
     
    872872  }
    873873
    874   SymmetricMatrix NN; NN << AA.t() * PP * AA;
    875   ColumnVector    bb = AA.t() * PP * ll;
    876 
    877   _QQ = NN.i();
    878   dx = _QQ * bb;
    879 
    880   ColumnVector vv = ll - AA * dx;
    881 
    882   int     maxResIndex;
    883   double  maxRes = vv.maximum_absolute_value1(maxResIndex);   
     874  ColumnVector vv;
     875  try {
     876    Matrix          ATP = AA.t() * PP;
     877    SymmetricMatrix NN; NN << ATP * AA;
     878    ColumnVector    bb = ATP * ll;
     879    _QQ = NN.i();
     880    dx  = _QQ * bb;
     881    vv  = ll - AA * dx;
     882  }
     883  catch (Exception& exc) {
     884    out << exc.what() << endl;
     885    return failure;
     886  }
     887
    884888  out.setRealNumberNotation(QTextStream::FixedNotation);
    885889  out.setRealNumberPrecision(3); 
    886   out << _resTime.datestr().c_str() << " " << _resTime.timestr().c_str()
    887       << " Maximum Residuum " << maxRes << ' '
    888       << corrs()[maxResIndex-1]->acName << ' ' << corrs()[maxResIndex-1]->prn;
     890  for (int ii = 0; ii < vv.Nrows(); ii++) {
     891    const cmbCorr* corr = corrs()[ii];
     892    out << _resTime.datestr().c_str() << ' '
     893        << _resTime.timestr().c_str() << " "
     894        << corr->acName << ' ' << corr->prn << ' '
     895        << " dClk = " << corr->dClk << " res = " << vv[ii] << endl;
     896  }
    889897
    890898  return success;
Note: See TracChangeset for help on using the changeset viewer.