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


Ignore:
Timestamp:
Mar 30, 2021, 9:59:17 AM (3 years ago)
Author:
stuerze
Message:

update regarding PPP

File:
1 edited

Legend:

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

    r9386 r9395  
    634634          return finish(failure);
    635635        }
    636         if (_obsPool->refSatChanged()) {
     636        if (_obsPool->refSatChanged() &&
     637            _opt->_obsModelType  != t_pppOptions::UncombPPP) {
    637638            epochReProcessing = true;
    638639            continue;
     
    665666      // Epoch re-processing required?
    666667      // -----------------------------
    667       if (_obsPool->refSatChangeRequired()) {//SLIP
     668      if (_obsPool->refSatChangeRequired() && //SLIP
     669          _opt->_obsModelType  != t_pppOptions::UncombPPP) {
    668670        epochReProcessing = true;
    669671        _obsPool->deleteLastEpoch();
     
    777779//////////////////////////////////////////////////////////////////////////////
    778780void t_pppClient::setRefSatellites(std::vector<t_pppSatObs*>& obsVector) {
    779 
     781  t_irc  refSatReDefinition = success;
    780782  // reference satellite definition per system
    781783  for (unsigned iSys = 0; iSys < _opt->systems().size(); iSys++) {
     
    789791      }
    790792      // reference satellite is unchanged
     793      // ================================
    791794      if      (!_obsPool->refSatChangeRequired(sys) && refSat->prn() == satObs->prn()) {
    792795        refSatDefined = true;
     
    797800      }
    798801      // reference satellite has changed
    799       else if ( _obsPool->refSatChangeRequired(sys) &&
    800                 refSat->prn() != satObs->prn() &&
    801                 !_historicalRefSats[sys].contains(satObs->prn())) {
     802      // ===============================
     803      else if ( _obsPool->refSatChangeRequired(sys) && refSat->prn() != satObs->prn()) {
    802804        if (satObs->prn().system() == sys) {
    803           refSatDefined = true;
    804           obsVector[ii]->setAsReference();
    805           refSat->setPrn(satObs->prn());
     805          if (!_historicalRefSats[sys].contains(satObs->prn())) {
     806            refSatDefined = true;
     807            obsVector[ii]->setAsReference();
     808            refSat->setPrn(satObs->prn());
    806809#ifdef BNC_DEBUG_PPP
    807810          LOG << "=> set refsatprn: "  <<  satObs->prn().toString() << endl;
    808811#endif
     812          }
     813          else if ( _historicalRefSats[sys].contains(satObs->prn())) {
     814            refSatReDefinition = failure;
     815          }
    809816        }
    810817      }
     
    816823      }
    817824    }
     825
     826    if ((!refSatDefined) && (refSatReDefinition == failure)) {
     827      refSat->setPrn(t_prn(sys, 99));
     828      continue;
     829    }
     830
    818831    // reference satellite has to be initialized
     832    // =========================================
    819833    if (!refSatDefined) {
    820834      for (unsigned ii = 0; ii < obsVector.size(); ii++) {
     
    823837          continue;
    824838        }
    825         if (satObs->prn().system() == sys &&
    826             !_historicalRefSats[sys].contains(satObs->prn())) {
     839        if (satObs->prn().system() == sys) {
    827840          obsVector[ii]->setAsReference();
    828841          refSat->setPrn(satObs->prn());
     
    838851      }
    839852    }
    840     if (!refSatDefined) {
     853
     854    if (!refSatDefined) { // no observations for that system
    841855      refSat->setPrn(t_prn());
    842856    }
     
    858872    char  sys = it.key();
    859873    t_prn prn = it.value()->prn();
    860     if (prn.number() == 0) {
     874    if      (prn.number() ==  0) { // no obs for that system available
     875      continue;
     876    }
     877    else if (prn.number() == 99) { // refSat re-definition not possible
    861878      return failure;
    862879    }
     
    885902      _historicalRefSats[sys].append(prn);
    886903    }
    887   }
    888 }
     904  }}
    889905
    890906//
Note: See TracChangeset for help on using the changeset viewer.