Changeset 7029 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Jul 10, 2015, 11:10:31 AM (9 years ago)
Author:
stuerze
Message:

code bias usage is added for PPP SSR_I mode

Location:
trunk/BNC/src/PPP_SSR_I
Files:
2 edited

Legend:

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

    r6974 r7029  
    5959  _log     = new ostringstream();
    6060  _ephUser = new bncEphUser(false);
     61
     62  for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
     63    _satCodeBiases[ii] = 0;
     64  }
     65
    6166}
    6267
     
    6469////////////////////////////////////////////////////////////////////////////
    6570t_pppClient::~t_pppClient() {
     71
     72  for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
     73    delete _satCodeBiases[ii];
     74  }
     75
    6676  delete _filter;
    6777  delete _epoData;
     
    8090  for (unsigned ii = 0; ii < satObs.size(); ii++) {
    8191    const t_satObs* obs     = satObs[ii];
    82     t_satData*      satData = new t_satData();
     92    t_prn prn = obs->_prn;
     93    t_satData*   satData = new t_satData();
    8394
    8495    if (_epoData->tt.undef()) {
     
    8798
    8899    satData->tt       = obs->_time;
    89     satData->prn      = QString(obs->_prn.toInternalString().c_str());
     100    satData->prn      = QString(prn.toInternalString().c_str());
    90101    satData->slipFlag = false;
    91102    satData->P1       = 0.0;
     
    99110    for (unsigned ifrq = 0; ifrq < obs->_obs.size(); ifrq++) {
    100111      t_frqObs* frqObs = obs->_obs[ifrq];
     112      double cb = 0.0;
     113      const t_satCodeBias* satCB = satCodeBias(prn);
     114      if (satCB && satCB->_bias.size()) {
     115        for (unsigned ii = 0; ii < satCB->_bias.size(); ii++) {
     116          const t_frqCodeBias& bias = satCB->_bias[ii];
     117          if (frqObs && frqObs->_rnxType2ch == bias._rnxType2ch) {
     118            cb  = bias._value;
     119          }
     120        }
     121      }
    101122      if      (frqObs->_rnxType2ch[0] == '1') {
    102         if (frqObs->_codeValid)  satData->P1       = frqObs->_code;
     123        if (frqObs->_codeValid)  satData->P1       = frqObs->_code + cb;
    103124        if (frqObs->_phaseValid) satData->L1       = frqObs->_phase;
    104125        if (frqObs->_slip)       satData->slipFlag = true;
    105126      }
    106127      else if (frqObs->_rnxType2ch[0] == '2') {
    107         if (frqObs->_codeValid)  satData->P2       = frqObs->_code;
     128        if (frqObs->_codeValid)  satData->P2       = frqObs->_code + cb;
    108129        if (frqObs->_phaseValid) satData->L2       = frqObs->_phase;
    109130        if (frqObs->_slip)       satData->slipFlag = true;
    110131      }
    111132      else if (frqObs->_rnxType2ch[0] == '5') {
    112         if (frqObs->_codeValid)  satData->P5       = frqObs->_code;
     133        if (frqObs->_codeValid)  satData->P5       = frqObs->_code + cb;
    113134        if (frqObs->_phaseValid) satData->L5       = frqObs->_phase;
    114135        if (frqObs->_slip)       satData->slipFlag = true;
    115136      }
    116137      else if (frqObs->_rnxType2ch[0] == '7') {
    117               if (frqObs->_codeValid)  satData->P7       = frqObs->_code;
    118               if (frqObs->_phaseValid) satData->L7       = frqObs->_phase;
    119               if (frqObs->_slip)       satData->slipFlag = true;
    120             }
     138        if (frqObs->_codeValid)  satData->P7       = frqObs->_code + cb;
     139        if (frqObs->_phaseValid) satData->L7       = frqObs->_phase;
     140        if (frqObs->_slip)       satData->slipFlag = true;
     141      }
    121142    }
    122143    putNewObs(satData);
     
    311332//
    312333//////////////////////////////////////////////////////////////////////////////
    313 void t_pppClient::putCodeBiases(const std::vector<t_satCodeBias*>& /* satCodeBias */) {
     334void t_pppClient::putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias) {
     335  for (unsigned ii = 0; ii < satCodeBias.size(); ii++) {
     336    putCodeBias(new t_satCodeBias(*satCodeBias[ii]));
     337  }
    314338}
    315339
     
    385409}
    386410
     411void t_pppClient::putCodeBias(t_satCodeBias* satCodeBias) {
     412  int iPrn = satCodeBias->_prn.toInt();
     413  delete _satCodeBiases[iPrn];
     414  _satCodeBiases[iPrn] = satCodeBias;
     415}
  • trunk/BNC/src/PPP_SSR_I/pppClient.h

    r6875 r7029  
    4949  std::ostringstream& log() {return *_log;}
    5050  const t_pppOptions* opt() const {return _opt;}
    51 
     51  void putCodeBias(t_satCodeBias* satCodeBias);
     52  const t_satCodeBias* satCodeBias(const t_prn& prn) const {
     53    return _satCodeBiases[prn.toInt()];
     54  }
    5255 private:
    5356  t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv);
     
    5558  t_irc cmpToT(t_satData* satData);
    5659
     60  t_satCodeBias*       _satCodeBiases[t_prn::MAXPRN+1];
    5761  bncEphUser*         _ephUser;
    5862  t_pppOptions*       _opt;
Note: See TracChangeset for help on using the changeset viewer.