Changeset 5752 in ntrip for trunk/BNC/src/PPP/parlist.cpp


Ignore:
Timestamp:
Aug 3, 2014, 11:52:30 AM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

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

    r5743 r5752  
    77#include "parlist.h"
    88#include "satobs.h"
     9
    910#include "station.h"
    10 #include "tropo.h"
    11 #include "iono.h"
    12 #include "utils.h"
    13 #include "genconst.h"
     11#include "bncutils.h"
     12#include "bncconst.h"
     13#include "pppClient.h"
    1414
    1515using namespace BNC;
     
    3333   case crdX:
    3434     _epoSpec = true;
    35      _sigma0  = OPT->sigmaCrd();
     35     _sigma0  = OPT->_sigCrd[0];
    3636     break;
    3737   case crdY:
    3838     _epoSpec = true;
    39      _sigma0  = OPT->sigmaCrd();
     39     _sigma0  = OPT->_sigCrd[1];
    4040     break;
    4141   case crdZ:
    4242     _epoSpec = true;
    43      _sigma0  = OPT->sigmaCrd();
     43     _sigma0  = OPT->_sigCrd[2];
    4444     break;
    4545   case clkR:
     
    5757             offGG = PPP_CLIENT->offGG();
    5858           }
    59            _x0 = nint((obs->obsValue(tLC) - offGG - obs->cmpValue(tLC)) / obs->lambda(tLC));
     59           _x0 = floor((obs->obsValue(tLC) - offGG - obs->cmpValue(tLC)) / obs->lambda(tLC) + 0.5);
    6060           break;
    6161         }
     
    7272   case trp:
    7373     _epoSpec = false;
    74      _sigma0  = OPT->sigmaTropo();
    75      _noise   = OPT->noiseTropo();
    76      break;
    77    case iono:
    78      if (OPT->noiseIono() > 0.0) {
    79        _epoSpec = false;
    80      }
    81      else {
    82        _epoSpec = true;
    83      }
    84      _sigma0  = OPT->sigmaIono();
    85      _noise   = OPT->noiseIono();
     74     _sigma0  = OPT->_sigTropo;
     75     _noise   = OPT->_noiseTropo;
    8676     break;
    8777   case bias:
     
    10090//
    10191////////////////////////////////////////////////////////////////////////////
    102 double t_param::partial(const bncTime& epoTime, const t_satObs* obs,
     92double t_param::partial(const bncTime& /* epoTime */, const t_satObs* obs,
    10393                        const t_lc::type& tLC) const {
    10494
     
    144134    return 0.0;
    145135  case trp:
    146     return t_tropo::mf(OPT->tropoMF(), epoTime, sta->ellApr()[0],
    147                        sta->ellApr()[1], sta->ellApr()[2], obs->eleSat());
    148   case iono:
    149     if (obs->prn() == _prn) {
    150       return t_iono::dLCdI(tLC, obs->prn().system(), obs->channel());
    151     }
    152     else {
    153       return 0.0;
    154     }
     136    return 1.0 / sin(obs->eleSat());
    155137  case bias:
    156138    if (tLC == _tLC && obs->prn().system() == _prn.system()) {
     
    191173    ss << "TRP        ";
    192174    break;
    193   case iono:
    194     ss << "IONO " << _prn.toString();
    195     break;
    196175  case bias:
    197176    ss << "BIAS " << _prn.system() << ' ' << left << setw(3) << t_lc::toString(_tLC);
     
    237216    }
    238217
    239     else if (par->type() == t_param::amb || par->type() == t_param::iono) {
     218    else if (par->type() == t_param::amb) {
    240219      if (par->lastObsTime().valid() && (epoTime - par->lastObsTime() > 3600.0)) {
    241220        remove = true;
     
    298277  // Receiver Biases
    299278  // ---------------
    300   for (unsigned ii = 0; ii < OPT->estBias().size(); ii++) {
    301     const t_options::t_optBias& optBias = OPT->estBias()[ii];
     279  for (unsigned ii = 0; ii < OPT->_estBias.size(); ii++) {
     280    const t_options::t_optBias& optBias = OPT->_estBias[ii];
    302281    required.push_back(new t_param(t_param::bias, t_prn(optBias._system, 1), optBias._tLC));
    303282  }
     
    316295      const t_satObs* satObs = obsVector[jj];
    317296      required.push_back(new t_param(t_param::amb, satObs->prn(), tLC, &obsVector));
    318     }
    319   }
    320 
    321   // Stochastic Ionosphere
    322   //----------------------
    323   if (OPT->estIono()) {
    324     for (unsigned jj = 0; jj < obsVector.size(); jj++) {
    325       const t_satObs* satObs = obsVector[jj];
    326       required.push_back(new t_param(t_param::iono, satObs->prn(), t_lc::dummy));
    327297    }
    328298  }
     
    365335  }
    366336
    367   return t_irc::success;
     337  return success;
    368338}
    369339
     
    398368          << setw(8)  << setprecision(4) << sqrt(QQ[ind][ind]);
    399369      if (par->type() == t_param::amb) {
    400         LOG << " el = " << setw(6) << setprecision(2) << par->ambEleSat() * t_genConst::rho_deg
     370        LOG << " el = " << setw(6) << setprecision(2) << par->ambEleSat() * 180.0 / M_PI
    401371            << " epo = " << setw(4) << par->ambNumEpo();
    402372      }
Note: See TracChangeset for help on using the changeset viewer.