Changeset 7253 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Aug 26, 2015, 4:48:17 PM (9 years ago)
Author:
stuerze
Message:

minor changes to apply ionospheric delay in ppp model only in case of single frequency usage; lc dependent output is added

File:
1 edited

Legend:

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

    r7252 r7253  
    6161  // Select pseudoranges and phase observations
    6262  // ------------------------------------------
    63   const string preferredAttrib = "CWPX_";
     63  const string preferredAttrib = "CWPXI_";
    6464
    6565  for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
     
    396396  // -----------------
    397397  const t_vTec* vTec = PPP_CLIENT->obsPool()->vTec();
    398   if (vTec && (!isValid(t_lc::cIF) || !isValid(t_lc::lIF))) {
    399     double stec = station->stec(vTec, _signalPropagationTime, rSat);
    400     for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
    401       t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
    402       _model._ionoCodeDelay[iFreq] = 40.0 / pow(t_CST::freq(frqType, _channel), 2) * stec * 10.0e16;
     398  bool vTecUsage = true;
     399  for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
     400    t_lc::type tLC = OPT->LCs(_prn.system())[ii];
     401    if (tLC == t_lc::cIF || tLC == t_lc::lIF) {
     402      vTecUsage = false;
     403    }
     404  }
     405  if (vTecUsage) {
     406    if (vTec) {
     407      double stec = station->stec(vTec, _signalPropagationTime, rSat);
     408      for (unsigned iFreq = 1; iFreq < t_frequency::max; iFreq++) {
     409        t_frequency::type frqType = static_cast<t_frequency::type>(iFreq);
     410        _model._ionoCodeDelay[iFreq] = 40.0 / pow(t_CST::freq(frqType, _channel), 2) * stec * 10.0e16;
     411      }
     412    }
     413    else {
     414      _model._set = false;
     415      return failure;
    403416    }
    404417  }
     
    420433////////////////////////////////////////////////////////////////////////////
    421434void t_pppSatObs::printModel() const {
     435
    422436  LOG.setf(ios::fixed);
    423437  LOG << "MODEL for Satellite " << _prn.toString() << endl
     
    440454    }
    441455  }
    442   LOG << "OBS-CMP P3: " << _prn.toString() << " "
    443       << setw(12) << setprecision(3) << obsValue(t_lc::cIF) << " "
    444       << setw(12) << setprecision(3) << cmpValue(t_lc::cIF) << " "
    445       << setw(12) << setprecision(3) << obsValue(t_lc::cIF) - cmpValue(t_lc::cIF) << endl;
    446 
    447   LOG << "OBS-CMP L3: " << _prn.toString() << " "
    448       << setw(12) << setprecision(3) << obsValue(t_lc::lIF) << " "
    449       << setw(12) << setprecision(3) << cmpValue(t_lc::lIF) << " "
    450       << setw(12) << setprecision(3) << obsValue(t_lc::lIF) - cmpValue(t_lc::lIF) << endl;
    451 
     456  for (unsigned ii = 0; ii < OPT->LCs(_prn.system()).size(); ii++) {
     457    t_lc::type tLC = OPT->LCs(_prn.system())[ii];
     458    LOG << "OBS-CMP " << t_lc::toString(tLC) << ": " << _prn.toString() << " "
     459        << setw(12) << setprecision(3) << obsValue(tLC) << " "
     460        << setw(12) << setprecision(3) << cmpValue(tLC) << " "
     461        << setw(12) << setprecision(3) << obsValue(tLC) - cmpValue(tLC) << endl;
     462
     463  }
    452464  LOG << "OBS-CMP MW: " << _prn.toString() << " "
    453465      << setw(12) << setprecision(3) << obsValue(t_lc::MW) << " "
Note: See TracChangeset for help on using the changeset viewer.