Changeset 10384 in ntrip for trunk/BNC/src/PPP/pppParlist.cpp


Ignore:
Timestamp:
Mar 11, 2024, 3:28:32 PM (7 months ago)
Author:
stuerze
Message:

changes regarding PPP

File:
1 edited

Legend:

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

    r10373 r10384  
    7474         const t_pppSatObs* obs = obsVector->at(ii);
    7575         if (obs->prn() == _prn) {
    76            double offGps = 0.0;
    77            if (_prn.system() == 'G' && tLC != t_lc::MW) {
    78              offGps = PPP_CLIENT->offGps();
    79            }
    8076           double offGlo = 0.0;
    8177           if (_prn.system() == 'R' && tLC != t_lc::MW) {
     
    9086             offBds = PPP_CLIENT->offBds();
    9187           }
    92            _x0 = floor((obs->obsValue(tLC) - offGps - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
     88           _x0 = floor((obs->obsValue(tLC) - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
    9389           break;
    9490         }
    9591       }
    9692     }
    97      break;
    98    case offGps:
    99      _epoSpec = true;
    100      _sigma0  = OPT->_aprSigClkOff;
    101      _x0      = PPP_CLIENT->offGps();
    10293     break;
    10394   case offGlo:
     
    180171    if (tLC == t_lc::GIM) {return 0.0;}
    181172    return 1.0;
    182   case offGps:
    183     if (tLC == t_lc::GIM) {return 0.0;}
    184     return (obs->prn().system() == 'G') ? 1.0 : 0.0;
    185173  case offGlo:
    186174    if (tLC == t_lc::GIM) {return 0.0;}
     
    311299    ss << "REC_CLK     ";
    312300    break;
    313   case offGps:
    314     ss << "OFF_GPS     ";
    315     break;
    316301  case offGlo:
    317302    ss << "OFF_GLO     ";
     
    385370             par->type() == t_pppParam::crdX ||
    386371             par->type() == t_pppParam::crdY ||
    387              par->type() == t_pppParam::crdZ) {
     372             par->type() == t_pppParam::crdZ ||
     373             par->type() == t_pppParam::ion  ||
     374             par->type() == t_pppParam::cBiasC1 ||
     375             par->type() == t_pppParam::cBiasC2 ||
     376             par->type() == t_pppParam::cBiasE1 ||
     377             par->type() == t_pppParam::cBiasE2 ||
     378             par->type() == t_pppParam::cBiasR1 ||
     379             par->type() == t_pppParam::cBiasR2 ||
     380             par->type() == t_pppParam::pBiasC1 ||
     381             par->type() == t_pppParam::pBiasC2 ||
     382             par->type() == t_pppParam::pBiasE1 ||
     383             par->type() == t_pppParam::pBiasE2 ||
     384             par->type() == t_pppParam::pBiasR1 ||
     385             par->type() == t_pppParam::pBiasR2) {
    388386      if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 60.0)) {
    389387        remove = true;
    390388      }
    391389    }
    392     else if (par->type() == t_pppParam::ion) {
    393       if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 5.0)) {
    394         remove = true;
    395       }
    396 }
    397390
    398391    if (remove) {
     
    406399      ++it;
    407400    }
    408   }
    409 
    410   // check which systems have observations
    411   // -------------------------------------
    412   _usedSystems['G'] = _usedSystems['R'] = _usedSystems['E'] = _usedSystems['C'] = 0;
    413   for (unsigned jj = 0; jj < obsVector.size(); jj++) {
    414     const t_pppSatObs* satObs = obsVector[jj];
    415     char sys = satObs->prn().system();
    416     _usedSystems[sys]++;
    417401  }
    418402
     
    441425  }
    442426
    443   if (OPT->_ionoModelType == OPT->PPP_RTK || OPT->_pseudoObsIono) {
    444     vector<t_pppParam*>::iterator it = _params.begin();
    445     while (it != _params.end()) {
    446       t_pppParam* par = *it;
    447       // Check if systems have to be presented per biases
    448       // ----------------------------------------------
    449       if ((     par->type() == t_pppParam::cBiasG1 ||
    450                 par->type() == t_pppParam::cBiasG2 ||
    451                 par->type() == t_pppParam::pBiasG1 ||
    452                 par->type() == t_pppParam::pBiasG2) && !_usedSystems.value('G')) {
    453 #ifdef BNC_DEBUG_PPP
    454        //LOG << "remove1 " << par->toString() << std::endl;
    455 #endif
    456         delete par;
    457         it = _params.erase(it);
    458       }
    459       else if ((par->type() == t_pppParam::cBiasR1 ||
    460                 par->type() == t_pppParam::cBiasR2 ||
    461                 par->type() == t_pppParam::pBiasR1 ||
    462                 par->type() == t_pppParam::pBiasR2) && !_usedSystems.value('R')){
    463 #ifdef BNC_DEBUG_PPP
    464         //LOG << "remove1 " << par->toString() << std::endl;
    465 #endif
    466         delete par;
    467         it = _params.erase(it);
    468       }
    469       else if ((par->type() == t_pppParam::cBiasE1 ||
    470                 par->type() == t_pppParam::cBiasE2 ||
    471                 par->type() == t_pppParam::pBiasE1 ||
    472                 par->type() == t_pppParam::pBiasE2) && !_usedSystems.value('E')) {
    473 #ifdef BNC_DEBUG_PPP
    474         //LOG << "remove1 " << par->toString() << std::endl;
    475 #endif
    476         delete par;
    477         it = _params.erase(it);
    478       }
    479       else if ((par->type() == t_pppParam::cBiasC1 ||
    480                 par->type() == t_pppParam::cBiasC2 ||
    481                 par->type() == t_pppParam::pBiasC1 ||
    482                 par->type() == t_pppParam::pBiasC2) && !_usedSystems.value('C')) {
    483 #ifdef BNC_DEBUG_PPP
    484         //LOG << "remove1 " << par->toString() << std::endl;
    485 #endif
    486         delete par;
    487         it = _params.erase(it);
    488       }
    489       else {
    490         ++it;
    491       }
    492     }
    493   }
    494 
    495427  // Required Set of Parameters
    496428  // --------------------------
     
    509441  // GLONASS Clock Offset
    510442  // --------------------
    511   if ( _usedSystems.value('R')  &&
    512       (_usedSystems.value('G') || _usedSystems.value('E') || _usedSystems.value('C'))) {
     443  if (OPT->useSystem('R')) {
    513444    required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy));
    514   }
    515   else {
    516     PPP_CLIENT->resetOffGlo();
    517445  }
    518446
    519447  // Galileo Clock Offset
    520448  // --------------------
    521   if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') >= OPT->_minObs) {
     449  if (OPT->useSystem('E')) {
    522450    required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy));
    523   }
    524   else {
    525     PPP_CLIENT->resetOffGal();
    526   }
    527 
    528   // GPS Clock Offset
    529   // --------------------
    530   if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') < OPT->_minObs) {
    531     required.push_back(new t_pppParam(t_pppParam::offGps, t_prn(), t_lc::dummy));
    532   }
    533   else {
    534     PPP_CLIENT->resetOffGps();
    535451  }
    536452
    537453  // BDS Clock Offset
    538454  // ----------------
    539   if (_usedSystems.contains('C')  &&
    540       (_usedSystems.contains('G') || _usedSystems.contains('E'))) {
     455  if (OPT->useSystem('C')) {
    541456    required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy));
    542   }
    543   else {
    544     PPP_CLIENT->resetOffBds();
    545457  }
    546458
     
    577489  // Receiver Code Biases
    578490  // --------------------
    579   if (OPT->_ionoModelType == OPT->PPP_RTK) {
     491    if (OPT->_ionoModelType == OPT->PPP_RTK) {
    580492    std::vector<t_lc::type> lc;
    581     if (_usedSystems.contains('G')) {
     493    if (OPT->useSystem('G')) {
    582494      lc = OPT->LCs('G');
    583495      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
     
    588500      }
    589501    }
    590     if (_usedSystems.contains('R')) {
     502    if (OPT->useSystem('R')) {
    591503      lc = OPT->LCs('R');
    592504      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
     
    597509      }
    598510    }
    599     if (_usedSystems.contains('E')) {
     511    if (OPT->useSystem('E')) {
    600512      lc = OPT->LCs('E');
    601513      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
     
    606518      }
    607519    }
    608     if (_usedSystems.contains('C')) {
     520    if (OPT->useSystem('C')) {
    609521      lc = OPT->LCs('C');
    610522      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
     
    616528    }
    617529  }
     530
    618531  if (OPT->_pseudoObsIono) {
    619532    std::vector<t_lc::type> lc;
    620     if (_usedSystems.contains('G')) {
     533    if (OPT->useSystem('G')) {
    621534      lc = OPT->LCs('G');
    622535      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
     
    624537      }
    625538    }
    626     if (_usedSystems.contains('R')) {
     539    if (OPT->useSystem('R')) {
    627540      lc = OPT->LCs('R');
    628541      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
     
    630543      }
    631544    }
    632     if (_usedSystems.contains('E')) {
     545    if (OPT->useSystem('E')) {
    633546      lc = OPT->LCs('E');
    634547      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
     
    636549      }
    637550    }
    638     if (_usedSystems.contains('C')) {
     551    if (OPT->useSystem('C')) {
    639552      lc = OPT->LCs('C');
    640553      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
     
    644557  }
    645558
    646   // Receiver Phase Biases
    647   // ---------------------
    648559  if (OPT->_ionoModelType == OPT->PPP_RTK) {
    649560    std::vector<t_lc::type> lc;
    650     if (_usedSystems.contains('G')) {
     561    if (OPT->useSystem('G')) {
    651562      lc = OPT->LCs('G');
    652563      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
     
    657568      }
    658569    }
    659     if (_usedSystems.contains('R')) {
     570    if (OPT->useSystem('R')) {
    660571      lc = OPT->LCs('R');
    661572      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
     
    666577      }
    667578    }
    668     if (_usedSystems.contains('E')) {
     579    if (OPT->useSystem('E')) {
    669580      lc = OPT->LCs('E');
    670581      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
     
    675586      }
    676587    }
    677     if (_usedSystems.contains('C')) {
     588    if (OPT->useSystem('C')) {
    678589      lc = OPT->LCs('C');
    679590      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
Note: See TracChangeset for help on using the changeset viewer.