Changeset 9561 in ntrip


Ignore:
Timestamp:
Dec 3, 2021, 12:22:40 PM (2 years ago)
Author:
stuerze
Message:

update regarding PPP

Location:
trunk/BNC/src
Files:
7 edited

Legend:

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

    r9560 r9561  
    356356}
    357357
    358 // Compute A Priori GPS-Glonass Offset
    359 //////////////////////////////////////////////////////////////////////////////
    360 double t_pppClient::cmpOffGR(vector<t_pppSatObs*>& obsVector) {
    361 
    362   t_lc::type tLC   = t_lc::dummy;
    363   double     offGR = 0.0;
    364 
    365   if (_opt->useSystem('R')) {
    366     while (obsVector.size() > 0) {
    367       offGR = 0.0;
    368       double   maxRes      = 0.0;
    369       int      maxResIndex = -1;
    370       t_prn    maxResPrn;
    371       unsigned nObs        = 0;
    372       for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    373         const t_pppSatObs* satObs = obsVector.at(ii);
    374         if (satObs->prn().system() == 'R') {
    375           if (tLC == t_lc::dummy) {
    376             tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
    377           }
    378           if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
    379             double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    380             ++nObs;
    381             offGR += ll;
    382             if (fabs(ll) > fabs(maxRes)) {
    383               maxRes      = ll;
    384               maxResIndex = ii;
    385               maxResPrn   = satObs->prn();
    386             }
    387           }
    388         }
    389       }
    390 
    391       if (nObs > 0) {
    392         offGR = offGR / nObs;
    393       }
    394       else {
    395         offGR = 0.0;
    396       }
    397       if (fabs(maxRes) > OPT->_aprSigOGC) {
    398         LOG << "t_pppClient::cmpOffGR outlier " << maxResPrn.toString() << " " << maxRes << endl;
    399         delete obsVector.at(maxResIndex);
    400         obsVector.erase(obsVector.begin() + maxResIndex);
    401       }
    402       else {
    403         break;
    404       }
    405     }
    406   }
    407   return offGR;
    408 }
    409 
    410 // Compute A Priori GPS-Galileo Offset
    411 //////////////////////////////////////////////////////////////////////////////
    412 double t_pppClient::cmpOffGE(vector<t_pppSatObs*>& obsVector) {
    413 
    414   t_lc::type tLC   = t_lc::dummy;
    415   double     offGE = 0.0;
    416 
    417   if (_opt->useSystem('E')) {
    418     while (obsVector.size() > 0) {
    419       offGE = 0.0;
    420       double   maxRes      = 0.0;
    421       int      maxResIndex = -1;
    422       t_prn    maxResPrn;
    423       unsigned nObs        = 0;
    424       for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    425         const t_pppSatObs* satObs = obsVector.at(ii);
    426         if (satObs->prn().system() == 'E') {
    427           if (tLC == t_lc::dummy) {
    428             tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
    429           }
    430           if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
    431             double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    432             ++nObs;
    433             offGE += ll;
    434             if (fabs(ll) > fabs(maxRes)) {
    435               maxRes      = ll;
    436               maxResIndex = ii;
    437               maxResPrn   = satObs->prn();
    438             }
    439           }
    440         }
    441       }
    442 
    443       if (nObs > 0) {
    444         offGE = offGE / nObs;
    445       }
    446       else {
    447         offGE = 0.0;
    448       }
    449 
    450       if (fabs(maxRes) > OPT->_aprSigOGE) {
    451         LOG << "t_pppClient::cmpOffGE outlier " << maxResPrn.toString() << " " << maxRes << endl;
    452         delete obsVector.at(maxResIndex);
    453         obsVector.erase(obsVector.begin() + maxResIndex);
    454       }
    455       else {
    456         break;
    457       }
    458     }
    459   }
    460   return offGE;
    461 }
    462 
    463 // Compute A Priori GPS-BDS Offset
    464 //////////////////////////////////////////////////////////////////////////////
    465 double t_pppClient::cmpOffGC(vector<t_pppSatObs*>& obsVector) {
    466 
    467   t_lc::type tLC   = t_lc::dummy;
    468   double     offGC = 0.0;
    469 
    470   if (_opt->useSystem('C')) {
    471     while (obsVector.size() > 0) {
    472       offGC = 0.0;
    473       double   maxRes      = 0.0;
    474       int      maxResIndex = -1;
    475       t_prn    maxResPrn;
    476       unsigned nObs        = 0;
    477       for (unsigned ii = 0; ii < obsVector.size(); ii++) {
    478         const t_pppSatObs* satObs = obsVector.at(ii);
    479         if (satObs->prn().system() == 'C') {
    480           if (tLC == t_lc::dummy) {
    481             tLC = satObs->isValid(t_lc::cIF) ? t_lc::cIF : t_lc::c1;
    482           }
    483           if (satObs->isValid(tLC) && (!satObs->modelSet() || satObs->eleSat() >= _opt->_minEle)) {
    484             double ll = satObs->obsValue(tLC) - satObs->cmpValue(tLC);
    485             ++nObs;
    486             offGC += ll;
    487             if (fabs(ll) > fabs(maxRes)) {
    488               maxRes      = ll;
    489               maxResIndex = ii;
    490               maxResPrn   = satObs->prn();
    491             }
    492           }
    493         }
    494       }
    495 
    496       if (nObs > 0) {
    497         offGC = offGC / nObs;
    498       }
    499       else {
    500         offGC = 0.0;
    501       }
    502 
    503       if (fabs(maxRes) > OPT->_aprSigOGC) {
    504         LOG << "t_pppClient::cmpOffGC outlier " << maxResPrn.toString() << " " << maxRes << endl;
    505         delete obsVector.at(maxResIndex);
    506         obsVector.erase(obsVector.begin() + maxResIndex);
    507       }
    508       else {
    509         break;
    510       }
    511     }
    512   }
    513   return offGC;
    514 }
    515 
    516358//
    517359//////////////////////////////////////////////////////////////////////////////
  • trunk/BNC/src/PPP/pppClient.h

    r9560 r9561  
    6262  t_irc cmpBancroft(const bncTime& epoTime, std::vector<t_pppSatObs*>& obsVector,
    6363                    ColumnVector& xyzc, bool print);
    64   double cmpOffGR(std::vector<t_pppSatObs*>& obsVector);
    65   double cmpOffGE(std::vector<t_pppSatObs*>& obsVector);
    66   double cmpOffGC(std::vector<t_pppSatObs*>& obsVector);
    6764  t_irc handleRefSatellites(std::vector<t_pppSatObs*>& obsVector);
    6865  void setRefSatellites(std::vector<t_pppSatObs*>& obsVector);
  • trunk/BNC/src/PPP/pppParlist.cpp

    r9559 r9561  
    102102      _noise   = OPT->_noiseIon;
    103103     break;
    104    case cBiasG1:   case cBiasE1:   case cBiasC1:
    105    case cBiasG2:   case cBiasE2:   case cBiasC2:
     104   case cBiasG1:   case cBiasR1:   case cBiasE1:   case cBiasC1:
     105   case cBiasG2:   case cBiasR2:   case cBiasE2:   case cBiasC2:
    106106     _epoSpec = false;
    107107     _sigma0  = OPT->_aprSigCodeBias;
    108108     _noise   = OPT->_noiseCodeBias;
    109109     break;
    110    case pBiasG1:   case pBiasE1:   case pBiasC1:
    111    case pBiasG2:   case pBiasE2:   case pBiasC2:
     110   case pBiasG1:   case pBiasR1:   case pBiasE1:   case pBiasC1:
     111   case pBiasG2:   case pBiasR2:   case pBiasE2:   case pBiasC2:
    112112     _epoSpec = false;
    113113     _sigma0  = OPT->_aprSigPhaseBias;
     
    246246    if ((obs->prn().system() == 'G') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
    247247    break;
     248  case cBiasR1:
     249    if ((obs->prn().system() == 'R') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
     250    break;
    248251  case cBiasE1:
    249252    if ((obs->prn().system() == 'E') && (tLC == t_lc::c1)) {return 1.0;} else {return 0.0;}
     
    254257  case cBiasG2:
    255258    if ((obs->prn().system() == 'G') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
     259    break;
     260  case cBiasR2:
     261    if ((obs->prn().system() == 'R') && (tLC == t_lc::c2)) {return 1.0;} else {return 0.0;}
    256262    break;
    257263  case cBiasE2:
     
    264270    if ((obs->prn().system() == 'G') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
    265271    break;
     272  case pBiasR1:
     273    if ((obs->prn().system() == 'R') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
     274    break;
    266275  case pBiasE1:
    267276    if ((obs->prn().system() == 'E') && (tLC == t_lc::l1)) {return 1.0;} else {return 0.0;}
     
    272281  case pBiasG2:
    273282    if ((obs->prn().system() == 'G') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
     283    break;
     284  case pBiasR2:
     285    if ((obs->prn().system() == 'R') && (tLC == t_lc::l2)) {return 1.0;} else {return 0.0;}
    274286    break;
    275287  case pBiasE2:
     
    322334  case cBiasG2:  case pBiasG2:
    323335    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " G  ";
     336    break;
     337  case cBiasR1:  case pBiasR1:
     338  case cBiasR2:  case pBiasR2:
     339    ss << "BIA  " << left << setw(3) << t_lc::toString(_tLC) << right << " R  ";
    324340    break;
    325341  case cBiasE1:  case pBiasE1:
     
    509525        it = _params.erase(it);
    510526      }
     527      else if ((par->type() == t_pppParam::cBiasR1 ||
     528                par->type() == t_pppParam::cBiasR2 ||
     529                par->type() == t_pppParam::pBiasR1 ||
     530                par->type() == t_pppParam::pBiasR2) && !usedSystems().contains('R')) {
     531#ifdef BNC_DEBUG_PPP
     532        LOG << "remove1 " << par->toString() << std::endl;
     533#endif
     534        delete par;
     535        it = _params.erase(it);
     536      }
    511537      else if ((par->type() == t_pppParam::cBiasE1 ||
    512538                par->type() == t_pppParam::cBiasE2 ||
     
    576602      }
    577603    }
     604    if (_usedSystems.contains('R')) {
     605      lc = OPT->LCs('R');
     606      if (std::find(lc.begin(), lc.end(), t_lc::c1) != lc.end()) {
     607        required.push_back(new t_pppParam(t_pppParam::cBiasR1, t_prn(), t_lc::c1));
     608      }
     609      if (std::find(lc.begin(), lc.end(), t_lc::c2) != lc.end()) {
     610        required.push_back(new t_pppParam(t_pppParam::cBiasR2, t_prn(), t_lc::c2));
     611      }
     612    }
    578613    if (_usedSystems.contains('E')) {
    579614      lc = OPT->LCs('E');
     
    608643      if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
    609644        required.push_back(new t_pppParam(t_pppParam::pBiasG2, t_prn(), t_lc::l2));
     645      }
     646    }
     647    if (_usedSystems.contains('R')) {
     648      lc = OPT->LCs('R');
     649      if (std::find(lc.begin(), lc.end(), t_lc::l1) != lc.end()) {
     650        required.push_back(new t_pppParam(t_pppParam::pBiasR1, t_prn(), t_lc::l1));
     651      }
     652      if (std::find(lc.begin(), lc.end(), t_lc::l2) != lc.end()) {
     653        required.push_back(new t_pppParam(t_pppParam::pBiasR2, t_prn(), t_lc::l2));
    610654      }
    611655    }
  • trunk/BNC/src/PPP/pppParlist.h

    r9559 r9561  
    1616 public:
    1717  enum e_type {crdX, crdY, crdZ, rClkG, rClkR, rClkE, rClkC, trp, ion, amb,
    18                cBiasG1, cBiasE1, cBiasC1, pBiasG1, pBiasE1, pBiasC1,
    19                cBiasG2, cBiasE2, cBiasC2, pBiasG2, pBiasE2, pBiasC2};
     18               cBiasG1, cBiasR1, cBiasE1, cBiasC1, pBiasG1, pBiasR1, pBiasE1, pBiasC1,
     19               cBiasG2, cBiasR2, cBiasE2, cBiasC2, pBiasG2, pBiasR2, pBiasE2, pBiasC2};
    2020
    2121  t_pppParam(e_type type, const t_prn& prn, t_lc::type tLC, const std::vector<t_pppSatObs*>* obsVector = 0);
  • trunk/BNC/src/PPP/pppSatObs.cpp

    r9560 r9561  
    353353  retVal = sqrt(retVal);
    354354
    355   // Elevation-Dependent Weighting
    356   // -----------------------------
    357   double cEle = 1.0;
    358   if ( (OPT->_eleWgtCode  && t_lc::includesCode(tLC)) ||
    359        (OPT->_eleWgtPhase && t_lc::includesPhase(tLC)) ) {
    360     double eleD = eleSat()*180.0/M_PI;
    361     double hlp  = fabs(90.0 - eleD);
    362     cEle = (1.0 + hlp*hlp*hlp*0.000004);
    363   }
    364 
    365   return cEle * retVal;
     355  return retVal;
    366356}
    367357
  • trunk/BNC/src/pppMain.cpp

    r9559 r9561  
    216216      opt->_obsModelType = t_pppOptions::DCMcodeBias;
    217217      opt->_refSatRequired = true;
    218       opt->_noiseCodeBias  = 1000.0;
     218      opt->_noiseCodeBias  = 100.0;
    219219      opt->_noiseIon = 0.1;
    220220    }
     
    222222      opt->_obsModelType = t_pppOptions::DCMphaseBias;
    223223      opt->_refSatRequired = true;
    224       opt->_noisePhaseBias = 1000.0;
     224      opt->_noisePhaseBias = 100.0;
    225225      opt->_noiseIon = 0.1;
    226226    }
     
    420420    // -------------------
    421421    opt->_aprSigAmb       = 1000.0;
    422     opt->_aprSigIon       = 1000.0;
    423422    opt->_aprSigClk       = 1000.0;
    424     opt->_aprSigOGR       = 1000.0;
    425     opt->_aprSigOGE       = 1000.0;
    426     opt->_aprSigOGC       = 1000.0;
    427     opt->_aprSigCodeBias  = 1000.0;
    428     opt->_aprSigPhaseBias = 1000.0;
     423    opt->_aprSigIon       = 100.0;
     424    opt->_aprSigCodeBias  = 100.0;
     425    opt->_aprSigPhaseBias = 100.0;
    429426
    430427    _options << opt;
  • trunk/BNC/src/pppOptions.h

    r9552 r9561  
    6363  double                  _aprSigTrp;
    6464  double                  _aprSigIon;
    65   double                  _aprSigOGR;
    66   double                  _aprSigOGE;
    67   double                  _aprSigOGC;
    6865  double                  _aprSigAmb;
    6966  double                  _aprSigCodeBias;
Note: See TracChangeset for help on using the changeset viewer.