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


Ignore:
Timestamp:
Mar 12, 2024, 3:10:17 PM (6 months ago)
Author:
stuerze
Message:

changes regarding PPP

File:
1 edited

Legend:

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

    r10387 r10388  
    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           }
    7680           double offGlo = 0.0;
    7781           if (_prn.system() == 'R' && tLC != t_lc::MW) {
     
    8690             offBds = PPP_CLIENT->offBds();
    8791           }
    88            _x0 = floor((obs->obsValue(tLC) - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
     92           _x0 = floor((obs->obsValue(tLC) - offGps - offGlo - offGal - offBds - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
    8993           break;
    9094         }
    9195       }
    9296     }
     97     break;
     98   case offGps:
     99     _epoSpec = true;
     100     _sigma0  = OPT->_aprSigClkOff;
     101     _x0      = PPP_CLIENT->offGps();
    93102     break;
    94103   case offGlo:
     
    171180    if (tLC == t_lc::GIM) {return 0.0;}
    172181    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;
    173185  case offGlo:
    174186    if (tLC == t_lc::GIM) {return 0.0;}
     
    298310  case rClk:
    299311    ss << "REC_CLK     ";
     312    break;
     313  case offGps:
     314    ss << "OFF_GPS     ";
    300315    break;
    301316  case offGlo:
     
    401416  }
    402417
     418  // check which systems have observations
     419  // -------------------------------------
     420  _usedSystems['G'] = _usedSystems['R'] = _usedSystems['E'] = _usedSystems['C'] = 0;
     421  for (unsigned jj = 0; jj < obsVector.size(); jj++) {
     422    const t_pppSatObs* satObs = obsVector[jj];
     423    char sys = satObs->prn().system();
     424    _usedSystems[sys]++;
     425  }
     426
    403427  // Check whether parameters have observations
    404428  // ------------------------------------------
     
    435459  required.push_back(new t_pppParam(t_pppParam::crdZ, t_prn(), t_lc::dummy));
    436460
    437   // Receiver Clock
    438   // --------------
     461  // Receiver Clocks
     462  // ---------------
    439463  required.push_back(new t_pppParam(t_pppParam::rClk, t_prn(), t_lc::dummy));
    440464
    441465  // GLONASS Clock Offset
    442466  // --------------------
    443   if ((OPT->useSystem('G') && OPT->useSystem('R')) ||
    444       (OPT->useSystem('E') && OPT->useSystem('R')) ||
    445       (OPT->useSystem('C') && OPT->useSystem('R')) ) {
     467  if ( _usedSystems.value('R')  &&
     468      (_usedSystems.value('G') || _usedSystems.value('E') || _usedSystems.value('C'))) {
    446469    required.push_back(new t_pppParam(t_pppParam::offGlo, t_prn(), t_lc::dummy));
     470  }
     471  else {
     472    PPP_CLIENT->resetOffGlo();
    447473  }
    448474
    449475  // Galileo Clock Offset
    450476  // --------------------
    451   if (OPT->useSystem('G') && OPT->useSystem('E')) {
     477  if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') >= OPT->_minObs) {
    452478    required.push_back(new t_pppParam(t_pppParam::offGal, t_prn(), t_lc::dummy));
     479  }
     480  else {
     481    PPP_CLIENT->resetOffGal();
     482  }
     483
     484  // GPS Clock Offset
     485  // --------------------
     486  if (_usedSystems.value('E') && _usedSystems.value('G') && _usedSystems.value('G') < OPT->_minObs) {
     487    required.push_back(new t_pppParam(t_pppParam::offGps, t_prn(), t_lc::dummy));
     488  }
     489  else {
     490    PPP_CLIENT->resetOffGps();
    453491  }
    454492
    455493  // BDS Clock Offset
    456494  // ----------------
    457   if ((OPT->useSystem('G') && OPT->useSystem('C')) ||
    458       (OPT->useSystem('E') && OPT->useSystem('C'))) {
     495  if (_usedSystems.contains('C')  &&
     496      (_usedSystems.contains('G') || _usedSystems.contains('E'))) {
    459497    required.push_back(new t_pppParam(t_pppParam::offBds, t_prn(), t_lc::dummy));
     498  }
     499  else {
     500    PPP_CLIENT->resetOffBds();
    460501  }
    461502
Note: See TracChangeset for help on using the changeset viewer.