Changeset 2547 in ntrip for trunk/BNC/bncmodel.cpp


Ignore:
Timestamp:
Aug 8, 2010, 4:29:09 PM (14 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r2540 r2547  
    137137
    138138  connect(this, SIGNAL(newMessage(QByteArray,bool)),
    139           ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool)));
     139          ((bncApp*)qApp),
     140          SLOT(slotMessage(const QByteArray,bool)));
    140141
    141142  bncSettings settings;
     
    235236
    236237  if (epoData->sizeGPS() < MINOBS) {
    237     _log += "\nNot enough data";
     238    _log += "bncModel::cmpBancroft: not enough data\n";
    238239    return failure;
    239240  }
     
    544545  _time = epoData->tt;
    545546
     547  _log += "Single Point Positioning of Epoch "
     548        + QByteArray(_time.timestr(1).c_str()) +
     549          "\n--------------------------------------------------------------\n";
     550
    546551  SymmetricMatrix QQsav;
    547552  ColumnVector    dx;
     
    555560    // -----------------
    556561    if (cmpBancroft(epoData) != success) {
    557       _log += "\nBancroft failed";
    558562      emit newMessage(_log, false);
    559563      return failure;
     
    576580   
    577581    if (nObs < nPar) {
    578       _log += "\nnObs < nPar";
     582      _log += "bncModel::update: nObs < nPar\n";
    579583      emit newMessage(_log, false);
    580584      return failure;
     
    651655    vv = ll - AA * dx;
    652656
    653     ostringstream str;
    654     str.setf(ios::fixed);
     657    ostringstream strA;
     658    strA.setf(ios::fixed);
    655659    ColumnVector vv_code(epoData->sizeGPS());
    656660    ColumnVector vv_phase(epoData->sizeGPS());
     
    672676    }
    673677
    674     str << "\nresiduals code  " << setprecision(3) << vv_code.t();
     678    strA   << "residuals code  " << setw(8) << setprecision(3) << vv_code.t();
    675679    if (_usePhase) {
    676       str <<  "residuals phase " << setprecision(3) << vv_phase.t();
     680      strA << "residuals phase " << setw(8) << setprecision(3) << vv_phase.t();
    677681    }
    678682    if (_useGlonass) {
    679       str <<  "residuals glo   " << setprecision(3) << vv_glo.t();
    680     }
    681     _log += str.str().c_str();
     683      strA << "residuals glo   " << setw(8) << setprecision(3) << vv_glo.t();
     684    }
     685    _log += strA.str().c_str();
    682686
    683687  } while (outlierDetection(QQsav, vv, epoData->satDataGPS,
     
    694698
    695699    if      (par->type == bncParam::RECCLK) {
    696       strB << "\n    clk = " << setw(6) << setprecision(3) << par->xx
     700      strB << "\n    clk     = " << setw(6) << setprecision(3) << par->xx
    697701           << " +- " << setw(6) << setprecision(3)
    698702           << sqrt(_QQ(par->index,par->index));
     
    705709    }
    706710    else if (par->type == bncParam::TROPO) {
    707       strB << "\n    trp = " << par->prn.toAscii().data()
     711      strB << "\n    trp     = " << par->prn.toAscii().data()
    708712           << setw(7) << setprecision(3) << delay_saast(M_PI/2.0) << " "
    709713           << setw(6) << setprecision(3) << showpos << par->xx << noshowpos
     
    713717  }
    714718  strB << '\n';
    715 
    716   // Message (both log file and screen)
    717   // ----------------------------------
    718   ostringstream strA;
    719   strA.setf(ios::fixed);
    720   strA << _staID.data() << ": PPP "
     719  _log += strB.str().c_str();
     720  emit newMessage(_log, false);
     721
     722  // Final Message (both log file and screen)
     723  // ----------------------------------------
     724  ostringstream strC;
     725  strC.setf(ios::fixed);
     726  strC << _staID.data() << "  PPP "
    721727       << epoData->tt.timestr(1) << " " << epoData->sizeAll() << " "
    722728       << setw(14) << setprecision(3) << x()                  << " +- "
     
    726732       << setw(14) << setprecision(3) << z()                  << " +- "
    727733       << setw(6)  << setprecision(3) << sqrt(_QQ(3,3));
    728 
    729   emit newMessage(QByteArray(strA.str().c_str()), true);
    730 
    731   _log += strB.str().c_str();
    732   emit newMessage(_log, false);
    733734
    734735  // NEU Output
     
    747748    xyz2ell(xyzRef, ellRef);
    748749    xyz2neu(ellRef, _xyz, _neu);
    749     ostringstream strC;
    750     strC.setf(ios::fixed);
    751     strC << _staID.data() << ": NEU "
    752          << epoData->tt.timestr(1) << " " << epoData->sizeAll() << " "
    753          << setw(8)  << setprecision(3) << _neu[0]              << " "
    754          << setw(8)  << setprecision(3) << _neu[1]              << " "
    755          << setw(8)  << setprecision(3) << _neu[2]              << endl;
    756     emit newMessage(QByteArray(strC.str().c_str()), true);
    757   }
     750    strC << "  NEU "
     751         << setw(8) << setprecision(3) << _neu[0] << " "
     752         << setw(8) << setprecision(3) << _neu[1] << " "
     753         << setw(8) << setprecision(3) << _neu[2];
     754  }
     755
     756  strC << endl;
     757 
     758  emit newMessage(QByteArray(strC.str().c_str()), true);
    758759
    759760  // NMEA Output
     
    859860    _QQ = QQsav;
    860861
    861     _log += "\nOutlier Phase " + prn.toAscii() + " "
    862           + QByteArray::number(vvMaxPhaseGlo, 'f', 3);
     862    _log += "Outlier Phase " + prn.toAscii() + " "
     863          + QByteArray::number(vvMaxPhaseGlo, 'f', 3) + "\n";
    863864
    864865    return 1;
     
    872873    _QQ = QQsav;
    873874
    874     _log += "\nOutlier Code " + prn.toAscii() + " "
    875             + QByteArray::number(vvMaxCodeGPS, 'f', 3);
     875    _log += "Outlier Code " + prn.toAscii() + " "
     876            + QByteArray::number(vvMaxCodeGPS, 'f', 3) + "\n";
    876877
    877878    return 1;
     
    884885    _QQ = QQsav;
    885886
    886     _log += "\nOutlier Phase " + prn.toAscii() + " "
    887           + QByteArray::number(vvMaxPhaseGPS, 'f', 3);
     887    _log += "Outlier Phase " + prn.toAscii() + " "
     888          + QByteArray::number(vvMaxPhaseGPS, 'f', 3)  + "\n";
    888889
    889890    return 1;
Note: See TracChangeset for help on using the changeset viewer.