Changeset 7218 in ntrip for trunk


Ignore:
Timestamp:
Aug 18, 2015, 10:28:08 AM (9 years ago)
Author:
stuerze
Message:

minor re-organisation of PPP parts

Location:
trunk/BNC/src/PPP
Files:
2 added
2 edited

Legend:

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

    r7203 r7218  
    4444
    4545#include "pppClient.h"
     46#include "pppUtils.h"
    4647#include "bncephuser.h"
    4748#include "bncutils.h"
     
    5354////////////////////////////////////////////////////////////////////////////
    5455t_pppClient::t_pppClient(const t_pppOptions* opt) {
    55 
    56   _opt     = new t_pppOptions(*opt);
    57   _filter  = new t_pppFilter(this);
    58   _epoData = new t_epoData();
    59   _log     = new ostringstream();
    60   _ephUser = new bncEphUser(false);
    61 
    62   for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
    63     _satCodeBiases[ii] = 0;
    64   }
    65 
     56  _opt      = new t_pppOptions(*opt);
     57  _filter   = new t_pppFilter(this);
     58  _epoData  = new t_epoData();
     59  _log      = new ostringstream();
     60  _ephUser  = new bncEphUser(false);
     61  _pppUtils = new t_pppUtils();
    6662}
    6763
     
    6965////////////////////////////////////////////////////////////////////////////
    7066t_pppClient::~t_pppClient() {
    71 
    72   for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) {
    73     delete _satCodeBiases[ii];
    74   }
    75 
    7667  delete _filter;
    7768  delete _epoData;
     
    112103      t_frqObs* frqObs = obs->_obs[ifrq];
    113104      double cb = 0.0;
    114       const t_satCodeBias* satCB = satCodeBias(prn);
     105      const t_satCodeBias* satCB = _pppUtils->satCodeBias(prn);
    115106      if (satCB && satCB->_bias.size()) {
    116107        for (unsigned ii = 0; ii < satCB->_bias.size(); ii++) {
     
    337328void t_pppClient::putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias) {
    338329  for (unsigned ii = 0; ii < satCodeBias.size(); ii++) {
    339     putCodeBias(new t_satCodeBias(*satCodeBias[ii]));
     330    _pppUtils->putCodeBias(new t_satCodeBias(*satCodeBias[ii]));
    340331  }
    341332}
     
    412403  return failure;
    413404}
    414 
    415 void t_pppClient::putCodeBias(t_satCodeBias* satCodeBias) {
    416   int iPrn = satCodeBias->_prn.toInt();
    417   delete _satCodeBiases[iPrn];
    418   _satCodeBiases[iPrn] = satCodeBias;
    419 }
  • trunk/BNC/src/PPP/pppClient.h

    r7203 r7218  
    3232#include "pppOptions.h"
    3333#include "pppFilter.h"
     34#include "pppUtils.h"
    3435
    3536class bncEphUser;
     
    4950  std::ostringstream& log() {return *_log;}
    5051  const t_pppOptions* opt() const {return _opt;}
    51   void putCodeBias(t_satCodeBias* satCodeBias);
    52   const t_satCodeBias* satCodeBias(const t_prn& prn) const {
    53     return _satCodeBiases[prn.toInt()];
    54   }
     52  //void putCodeBias(t_satCodeBias* satCodeBias);
     53  //const t_satCodeBias* satCodeBias(const t_prn& prn) const {
     54  //  return _satCodeBiases[prn.toInt()];
     55  //}
    5556 private:
    5657  t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv);
     
    5859  t_irc cmpToT(t_satData* satData);
    5960
    60   t_satCodeBias*       _satCodeBiases[t_prn::MAXPRN+1];
     61//  t_satCodeBias*       _satCodeBiases[t_prn::MAXPRN+1];
    6162  bncEphUser*         _ephUser;
    6263  t_pppOptions*       _opt;
    6364  t_epoData*          _epoData;
    6465  t_pppFilter*        _filter;
     66  t_pppUtils*         _pppUtils;
    6567  std::ostringstream* _log;
    6668};
Note: See TracChangeset for help on using the changeset viewer.