Changeset 10251 in ntrip for trunk/BNC/src/PPP/pppSatObs.cpp


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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      }
Note: See TracChangeset for help on using the changeset viewer.