Changeset 10251 in ntrip for trunk/BNC/src/PPP


Ignore:
Timestamp:
Nov 20, 2023, 10:23:42 PM (21 months ago)
Author:
stuerze
Message:

changes regarding PPP: allow single frequency PPP and allow to select the frequency bands that are used

Location:
trunk/BNC/src/PPP
Files:
5 edited

Legend:

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

    r10237 r10251  
    231231  while (it != obsVector.end()) {
    232232    t_pppSatObs* pppSatObs = *it;
    233     char sys = pppSatObs->prn().system();
    234233    bool codeBiasesAvailable = false;
    235     t_frequency::type fType1 = t_lc::toFreq(sys,t_lc::c1);
    236     t_frequency::type fType2 = t_lc::toFreq(sys,t_lc::c2);
    237     if (pppSatObs->getCodeBias(fType1) &&
    238         pppSatObs->getCodeBias(fType2)) {
    239       codeBiasesAvailable = true;
     234    if (pppSatObs->getCodeBias(pppSatObs->fType1()) &&
     235        pppSatObs->getCodeBias(pppSatObs->fType2())) {
     236        codeBiasesAvailable = true;
    240237    }
    241238    if (codeBiasesAvailable) {
     
    247244    }
    248245  }
    249 
     246  return;
    250247}
    251248
  • trunk/BNC/src/PPP/pppFilter.cpp

    r10250 r10251  
    307307                                    const vector<t_pppSatObs*> &obsVector) {
    308308
    309   const double SLIP = 20.0;
     309  const double SLIP = 200.0;
    310310  string epoTimeStr = string(_epoTime);
    311311  const vector<t_pppParam*> &params = _parlist->params();
  • trunk/BNC/src/PPP/pppParlist.cpp

    r10232 r10251  
    179179        else {
    180180          if      (_tLC == t_lc::l1) {
    181             return obs->lambda(t_lc::l1) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
     181            return obs->lambda(t_lc::l1) * phaseCoeff[obs->fType1()];
    182182          }
    183183          else if (_tLC == t_lc::l2) {
    184             return obs->lambda(t_lc::l2) * phaseCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
     184            return obs->lambda(t_lc::l2) * phaseCoeff[obs->fType2()];
    185185          }
    186186        }
     
    198198    if (obs->prn() == _prn) {
    199199      if      (tLC == t_lc::c1) {
    200         return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c1)];
     200        return ionoCoeff[obs->fType1()];
    201201      }
    202202      else if (tLC == t_lc::c2) {
    203         return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::c2)];
     203        return ionoCoeff[obs->fType2()];
    204204      }
    205205      else if (tLC == t_lc::l1) {
    206         return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l1)];
     206        return ionoCoeff[obs->fType1()];
    207207      }
    208208      else if (tLC == t_lc::l2) {
    209         return ionoCoeff[t_lc::toFreq(obs->prn().system(),t_lc::l2)];
     209        return ionoCoeff[obs->fType2()];
    210210      }
    211211      else if (tLC == t_lc::GIM) {
     
    414414  }
    415415
    416   if (OPT->_obsModelType == OPT->PPPRTK || OPT->_pseudoObsIono) {
     416  if (OPT->_ionoModelType == OPT->PPP_RTK || OPT->_pseudoObsIono) {
    417417    vector<t_pppParam*>::iterator it = _params.begin();
    418418    while (it != _params.end()) {
     
    502502  // Ionosphere
    503503  // ----------
    504   if (OPT->_obsModelType == OPT->UncombPPP) {
     504  if (OPT->_ionoModelType == OPT->est) {
    505505    for (unsigned jj = 0; jj < obsVector.size(); jj++) {
    506506      const t_pppSatObs* satObs = obsVector[jj];
    507       required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));
     507      char sys = satObs->prn().system();
     508      std::vector<t_lc::type> LCs = OPT->LCs(sys);
     509      if (std::find(LCs.begin(), LCs.end(), t_lc::cIF) == LCs.end() &&
     510          std::find(LCs.begin(), LCs.end(), t_lc::lIF) == LCs.end()) {
     511        required.push_back(new t_pppParam(t_pppParam::ion, satObs->prn(), t_lc::dummy));
     512      }
    508513    }
    509514  }
     
    512517  for (unsigned jj = 0; jj < obsVector.size(); jj++) {
    513518    const t_pppSatObs*  satObs = obsVector[jj];
    514     const vector<t_lc::type>& ambLCs = OPT->ambLCs(satObs->prn().system());
     519    char sys = satObs->prn().system();
     520    const vector<t_lc::type>& ambLCs = OPT->ambLCs(sys);
    515521    for (unsigned ii = 0; ii < ambLCs.size(); ii++) {
    516522      required.push_back(new t_pppParam(t_pppParam::amb, satObs->prn(), ambLCs[ii], &obsVector));
     
    520526  // Receiver Code Biases
    521527  // --------------------
    522   if (OPT->_obsModelType == OPT->PPPRTK) {
     528  if (OPT->_ionoModelType == OPT->PPP_RTK) {
    523529    std::vector<t_lc::type> lc;
    524530    if (_usedSystems.contains('G')) {
     
    589595  // Receiver Phase Biases
    590596  // ---------------------
    591   if (OPT->_obsModelType == OPT->PPPRTK) {
     597  if (OPT->_ionoModelType == OPT->PPP_RTK) {
    592598    std::vector<t_lc::type> lc;
    593599    if (_usedSystems.contains('G')) {
  • trunk/BNC/src/PPP/pppSatObs.cpp

    r10231 r10251  
    4646  _stecSat    = 0.0;
    4747  _signalPriorities = QString::fromStdString(OPT->_signalPriorities);
    48   if (!_signalPriorities.size()) {
    49     _signalPriorities = "G:12&CWPSLX R:12&CP E:1&CBX E:5&QIX C:26&IQX";
    50   }
    51 
    5248  for (unsigned ii = 0; ii < t_frequency::max; ii++) {
    5349    _obs[ii] = 0;
     
    6662//
    6763////////////////////////////////////////////////////////////////////////////
    68 void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) {
     64void t_pppSatObs::prepareObs(const t_satObs& pppSatObs) {//cout << "SATELLITE: " << _prn.toString() << endl;
    6965
    7066  _model.reset();
     67
     68  std::vector<char> bb = OPT->frqBands(_prn.system());
     69  char frqNum1 = '0';
     70  if (bb.size() >= 1) {
     71    frqNum1 = bb[0];
     72  }
     73  char frqNum2 = '0';
     74  if (bb.size() == 2) {
     75    frqNum2 = bb[1];
     76  }
    7177
    7278  // Select pseudo-ranges and phase observations
     
    7480  QStringList priorList = _signalPriorities.split(" ", QString::SkipEmptyParts);
    7581  string preferredAttrib;
    76   char obsSys = pppSatObs._prn.system();  //cout << "SATELLITE: " << pppSatObs._prn.toString() << endl;
    7782  for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
    7883    t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
    7984    char frqSys = t_frequency::toString(frqType)[0]; //cout << "frqSys: " << frqSys << endl;
    8085    char frqNum = t_frequency::toString(frqType)[1]; //cout << "frqNum: " << frqNum << endl;
    81     if (obsSys != frqSys) {
     86    if (frqSys != _prn.system()) {
     87      continue;
     88    }
     89    if (frqNum != frqNum1 &&
     90        frqNum != frqNum2 ) {
    8291      continue;
    8392    }
     
    100109            //cout << "observation2char: " << obs->_rnxType2ch << " vs. " << obsType.toStdString().c_str()<< endl;
    101110            if (obs->_rnxType2ch == obsType.toStdString() &&
    102                 obs->_codeValid && obs->_code &&
     111                obs->_codeValid  && obs->_code &&
    103112                obs->_phaseValid && obs->_phase) {
    104113              _obs[iFreq] = new t_frqObs(*obs); //cout << "================> newObs: " << obs->_rnxType2ch <<endl;
     
    112121  // Used frequency types
    113122  // --------------------
    114   _fType1 = t_lc::toFreq(_prn.system(),t_lc::l1);
    115   _fType2 = t_lc::toFreq(_prn.system(),t_lc::l2);
     123  _fType1 = t_frqBand::toFreq(_prn.system(), frqNum1);
     124  _fType2 = t_frqBand::toFreq(_prn.system(), frqNum2);
    116125
    117126  // Check whether all required frequencies available
     
    524533        }
    525534        const t_frqObs* obs = _obs[iFreq];
    526         if (obs && obs->_rnxType2ch == bias._rnxType2ch) {
     535        if (obs &&
     536            obs->_rnxType2ch == bias._rnxType2ch) {
    527537          _model._codeBias[iFreq]  = bias._value;
    528538        }
     
    551561        }
    552562        const t_frqObs* obs = _obs[iFreq];
    553         if (obs && obs->_rnxType2ch == bias._rnxType2ch) {
     563        if (obs &&
     564            obs->_rnxType2ch == bias._rnxType2ch) {
    554565          _model._phaseBias[iFreq]  = bias._value;
    555566        }
     
    606617  _model._set = true;
    607618
    608   //printModel();
     619  printModel();
    609620
    610621  return success;
     
    619630
    620631      << "\n======================= " << endl
    621      << "PPP STRATEGY  : " <<  OPT->_obsmodelTypeStr.at((int)OPT->_obsModelType).toLocal8Bit().constData()
     632      << "PPP "
    622633      <<  ((OPT->_pseudoObsIono) ? " with pseudo-observations for STEC" : "")          << endl
    623634      << "RHO           : " << setw(12) << setprecision(3) << _model._rho              << endl
     
    701712      t_frequency::type tFreq = it->first;
    702713      dispPart += it->second * (_model._antPCO[tFreq] - _model._codeBias[tFreq]);
    703       if (OPT->PPPRTK) {
     714      if (OPT->PPP_RTK) {
    704715        dispPart += it->second * (_model._ionoCodeDelay[tFreq]);
    705716      }
     
    709720      dispPart += it->second * (_model._antPCO[tFreq] - _model._phaseBias[tFreq] +
    710721                                _model._windUp * t_CST::lambda(tFreq, _channel));
    711       if (OPT->PPPRTK) {
     722      if (OPT->PPP_RTK) {
    712723        dispPart += it->second * (- _model._ionoCodeDelay[tFreq]);
    713724      }
  • trunk/BNC/src/PPP/pppSatObs.h

    r10034 r10251  
    5050  double              getIonoCodeDelay(t_frequency::type freq) {return _model._ionoCodeDelay[freq];}
    5151  double              getCodeBias(t_frequency::type freq) {return _model._codeBias[freq];}
     52  t_frequency::type   fType1() const {return _fType1;}
     53  t_frequency::type   fType2() const {return _fType2;}
    5254
    5355  // RINEX
Note: See TracChangeset for help on using the changeset viewer.