Changeset 8912 in ntrip for trunk/BNC/src/PPP/pppClient.cpp


Ignore:
Timestamp:
Apr 6, 2020, 10:43:22 AM (4 years ago)
Author:
stuerze
Message:

minor changes regarding PPP (not completed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppClient.cpp

    r8910 r8912  
    6868
    6969  if (_opt->_refSatRequired) {
    70     for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
    71       char system = OPT->systems()[iSys];
     70    for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) {
     71      char system = _opt->systems()[iSys];
    7272      _obsPool->initRefSatMapElement(system);
    7373    }
     
    165165  for (unsigned ii = 0; ii < satObs.size(); ii++) {
    166166    char system = satObs[ii]->_prn.system();
    167     if (OPT->useSystem(system)) {
     167    if (_opt->useSystem(system)) {
    168168      t_pppSatObs* pppSatObs = new t_pppSatObs(*satObs[ii]);
    169169      if (pppSatObs->isValid()) {
     
    180180  if (_opt->_refSatRequired) {
    181181    // reference satellite definition per system
    182     for (unsigned iSys = 0; iSys < OPT->systems().size(); iSys++) {
    183       char system = OPT->systems()[iSys];
     182    for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) {
     183      char system = _opt->systems()[iSys];
    184184      bool refSatDefined = false;
    185185      t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system);
     
    187187        const t_pppSatObs* satObs = obsVector.at(ii);
    188188        // reference satellite is unchanged
    189         if      (!_obsPool->epoReProcessing() && refSat->prn() == satObs->prn()) {
     189        if      (!_obsPool->refSatChangeRequired() && refSat->prn() == satObs->prn()) {
    190190          refSatDefined = true;
    191191          obsVector[ii]->setAsReference();
     
    193193        }
    194194        // reference satellite has changed
    195         else if (_obsPool->epoReProcessing() && refSat->prn() != satObs->prn()) {
     195        else if ( _obsPool->refSatChangeRequired() && refSat->prn() != satObs->prn()) {
    196196          if (satObs->prn().system() == system) {
    197197            refSatDefined = true;
     
    217217      }
    218218    }
    219     _obsPool->setEpoReProcessing(false); //TODO: später erst nach Trafo false setzen
     219    _obsPool->setRefSatChangeRequired(false);
    220220  }
    221221
     
    252252  bool pseudoObsIono = false;
    253253
    254   if (OPT->_pseudoObsIono) {
     254  if (_opt->_pseudoObsIono) {
    255255    vector<t_pppSatObs*>::iterator it = obsVector.begin();
    256256    while (it != obsVector.end()) {
     
    295295        }
    296296      }
    297       if ( satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
     297      if ( satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
    298298        ++iObs;
    299299        BB[iObs][0] = satObs->xc()[0];
     
    303303      }
    304304    }
    305     if (iObs + 1 < OPT->_minObs) {
     305    if (iObs + 1 < _opt->_minObs) {
    306306      LOG << "t_pppClient::cmpBancroft not enough observations" << endl;
    307307      return failure;
     
    321321      if (satObs->isValid() &&
    322322          satObs->prn().system() == 'G' &&
    323           (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle) ) {
     323          (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle) ) {
    324324        ColumnVector rr = satObs->xc().Rows(1,3) - xyzc.Rows(1,3);
    325325        double res = rr.NormFrobenius() - satObs->obsValue(tLC)
     
    363363  double     offGG = 0.0;
    364364
    365   if (OPT->useSystem('R')) {
     365  if (_opt->useSystem('R')) {
    366366    while (obsVector.size() > 0) {
    367367      offGG = 0.0;
     
    376376            tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
    377377          }
    378           if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= OPT->_minEle)) {
     378          if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
    379379            double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    380380            ++nObs;
     
    465465  bncTime time;
    466466  time = _epoTimeRover;
    467   station->setName(OPT->_roverName);
    468   station->setAntName(OPT->_antNameRover);
     467  station->setName(_opt->_roverName);
     468  station->setAntName(_opt->_antNameRover);
    469469  station->setEpochTime(time);
    470   if (OPT->xyzAprRoverSet()) {
    471     station->setXyzApr(OPT->_xyzAprRover);
     470  if (_opt->xyzAprRoverSet()) {
     471    station->setXyzApr(_opt->_xyzAprRover);
    472472  }
    473473  else {
    474474    station->setXyzApr(xyzc.Rows(1,3));
    475475  }
    476   station->setNeuEcc(OPT->_neuEccRover);
     476  station->setNeuEcc(_opt->_neuEccRover);
    477477
    478478  // Receiver Clock
     
    495495    }
    496496    if (satObs->isValid() &&
    497         satObs->eleSat() >= OPT->_minEle &&
     497        satObs->eleSat() >= _opt->_minEle &&
    498498        modelSetup == success) {
    499       if (satObs->isReference() && OPT->_pseudoObsIono) {
     499      if (satObs->isReference() && _opt->_pseudoObsIono) {
    500500        char system = satObs->prn().system();
    501501        t_pppRefSat* refSat = _obsPool->getRefSatMapElement(system);
     
    519519  try {
    520520    initOutput(output);
    521     _num = 0;
    522     _obsPool->setEpoReProcessing(false); // initialize for epoch
     521    int num = 0;
     522    bool epochReProcessing = false;
    523523
    524524    do {
    525       _num++;
     525      num++;
    526526
    527527      // Prepare Observations of the Rover
     
    550550      // Prepare Pseudo Observations of the Rover
    551551      // ----------------------------------------
    552       _pseudoObsIono = preparePseudoObs(_obsRover);//qDebug() << "_pseudoObsIonoAvailable: " << _pseudoObsIono;
    553 
    554       if (int(_obsRover.size()) < OPT->_minObs) {
     552      _pseudoObsIono = preparePseudoObs(_obsRover);
     553      if (int(_obsRover.size()) < _opt->_minObs) {
    555554        LOG << "t_pppClient::processEpoch not enough observations" << endl;
    556555        return finish(failure);
    557556      }
    558557
    559       if (OPT->_refSatRequired) {
     558      if (_opt->_refSatRequired) {
    560559        LOG.setf(ios::fixed);
    561560        QMapIterator<char, t_pppRefSat*> it(_obsPool->getRefSatMap());
     
    575574      // Process Epoch in Filter
    576575      // -----------------------
    577       if (_filter->processEpoch(_num) != success) {
     576      if (_filter->processEpoch(num) != success) {
    578577        return finish(failure);
    579578      }
    580       // if num > 1 und !obsPool->epoReProcessing() => filter ->datumTransformation
    581     } while (_obsPool->epoReProcessing());
     579
     580      // Epoch re-processing required?
     581      // -----------------------------
     582      if (_obsPool->refSatChangeRequired()) {
     583        epochReProcessing = true;
     584      }
     585      else {
     586        epochReProcessing = false;
     587      }
     588      // Datum transformation required?
     589      // ------------------------------
     590      if (num > 1 && epochReProcessing) {
     591        _filter->datumTransformation();
     592      }
     593
     594    } while (epochReProcessing);
    582595  }
    583596  catch (Exception& exc) {
Note: See TracChangeset for help on using the changeset viewer.