Changeset 6055 in ntrip for trunk


Ignore:
Timestamp:
Sep 7, 2014, 8:48:53 AM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/PPP_free
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP_free/bncmodel.cpp

    r6054 r6055  
    5454#include "pppopt.h"
    5555
     56using namespace BNC_PPP;
    5657using namespace std;
    5758
  • trunk/BNC/src/PPP_free/bncmodel.h

    r6054 r6055  
    3636class t_satData;
    3737class bncAntex;
    38 class t_pppOpt;
     38
     39namespace BNC_PPP {
     40
     41class t_pppOptions;
    3942class bncPPPclient;
    4043
     
    143146
    144147  bncPPPclient*         _pppClient;
    145   const t_pppOpt*       _opt;
     148  const t_pppOptions*   _opt;
    146149  bncTime               _time;
    147150  bncTime               _lastTimeOK;
     
    165168};
    166169
     170}
     171
    167172#endif
  • trunk/BNC/src/PPP_free/bncpppclient.cpp

    r6054 r6055  
    4848#include "bncconst.h"
    4949#include "bncmodel.h"
    50 #include "pppopt.h"
    51 
     50#include "pppOptions.h"
     51
     52using namespace BNC_PPP;
    5253using namespace std;
    5354
    5455// Constructor
    5556////////////////////////////////////////////////////////////////////////////
    56 bncPPPclient::bncPPPclient(QByteArray staID, t_pppOpt* opt, bool connectSlots) :
     57bncPPPclient::bncPPPclient(QByteArray staID, t_pppOptions* opt, bool connectSlots) :
    5758  bncEphUser(connectSlots) {
    5859
     
    6263  }
    6364  else {
    64     _opt      = new t_pppOpt();
     65    _opt      = new t_pppOptions();
    6566    _optOwner = true;
    6667  }
     
    111112
    112113  if      (obs.satSys == 'R') {
    113     if (!_opt->useGlonass) return;
     114    if (!_opt->useSystem('R')) return;
    114115  }
    115116  else if (obs.satSys == 'E') {
    116     if (!_opt->useGalileo) return;
     117    if (!_opt->useSystem('E')) return;
    117118  }
    118119  else if (obs.satSys != 'G') {
     
    210211    if (satData->P1 != 0.0 && satData->P2 != 0.0 &&
    211212        satData->L1 != 0.0 && satData->L2 != 0.0 ) {
    212       double f1 = t_CST::f1(obs.satSys, obs.slotNum);
    213       double f2 = t_CST::f2(obs.satSys, obs.slotNum);
     213      t_frequency::type fType1 = t_lc::toFreq(obs.satSys,t_lc::l1);
     214      t_frequency::type fType2 = t_lc::toFreq(obs.satSys,t_lc::l2);
     215      double f1 = t_CST::freq(fType1, obs.slotNum);
     216      double f2 = t_CST::freq(fType2, obs.slotNum);
    214217      double a1 =   f1 * f1 / (f1 * f1 - f2 * f2);
    215218      double a2 = - f2 * f2 / (f1 * f1 - f2 * f2);
     
    235238    if (satData->P1 != 0.0 && satData->P5 != 0.0 &&
    236239        satData->L1 != 0.0 && satData->L5 != 0.0 ) {
    237       double f1 = t_CST::freq1;
    238       double f5 = t_CST::freq5;
     240      double f1 = t_CST::freq(t_frequency::E1, 0);
     241      double f5 = t_CST::freq(t_frequency::E5, 0);
    239242      double a1 =   f1 * f1 / (f1 * f1 - f5 * f5);
    240243      double a5 = - f5 * f5 / (f1 * f1 - f5 * f5);
     
    259262  // Check the Mountpoint (source of corrections)
    260263  // --------------------------------------------
    261   if (!_opt->pppCorrMount.isEmpty()) {
     264  if (!_opt->_corrMount.empty()) {
    262265    QMutableListIterator<QString> itm(corrList);
    263266    while (itm.hasNext()) {
     
    265268      if (hlp.size() > 0) {
    266269        QString mountpoint = hlp[hlp.size()-1];
    267         if (mountpoint != _opt->pppCorrMount) {
     270        if (mountpoint != QString(_opt->_corrMount.c_str())) {
    268271          itm.remove();     
    269272        }
     
    323326  if (_eph.contains(prn)) {
    324327
    325     if (_opt->pppMode && prn[0] != 'E') {
     328    if (_opt->useOrbClkCorr() && prn[0] != 'E') {
    326329      if (_corr.contains(prn)) {
    327330        t_corr* cc = _corr.value(prn);
     
    514517    // No corrections yet, skip the epoch
    515518    // ----------------------------------
    516     if (_opt->corrSync != 0.0 && !_corr_tt.valid()) {
     519    if (_opt->useOrbClkCorr() && !_corr_tt.valid()) {
    517520      return;
    518521    }
     
    520523    // Process the front epoch
    521524    // -----------------------
    522     if (_opt->corrSync == 0 || frontEpoData->tt - _corr_tt < _opt->corrSync) {
     525    if (_opt->_corrWaitTime == 0.0 || frontEpoData->tt - _corr_tt >= _opt->_corrWaitTime) {
    523526      processFrontEpoch();
    524527      delete _epoData.front();
     
    536539  QMutexLocker locker(&_mutex);
    537540
    538   if (mountPoint != _opt->pppCorrMount) {
     541  if (mountPoint != QString(_opt->_corrMount.c_str())) {
    539542    return;
    540543  }
  • trunk/BNC/src/PPP_free/bncpppclient.h

    r6054 r6055  
    2828#include <queue>
    2929#include "bncephuser.h"
    30 #include "RTCM/GPSDecoder.h"
     30#include "GPSDecoder.h"
    3131
     32
     33namespace BNC_PPP {
     34 
    3235class bncModel;
    33 class t_pppOpt;
     36class t_pppOptions;
    3437
    3538class t_satData {
     
    117120
    118121 public:
    119   bncPPPclient(QByteArray staID, t_pppOpt* opt = 0, bool connectSlots = true);
     122  bncPPPclient(QByteArray staID, t_pppOptions* opt = 0, bool connectSlots = true);
    120123  ~bncPPPclient();
    121124  void putNewObs(const t_obs& pp);
     
    123126                         ColumnVector& vv);
    124127  QByteArray staID() const {return _staID;}
    125   const t_pppOpt* opt() const {return _opt;}
     128  const t_pppOptions* opt() const {return _opt;}
    126129  void emitNewMessage(QByteArray msg, bool showOnScreen) {
    127130    emit newMessage(msg, showOnScreen);
     
    160163  t_irc cmpToT(t_satData* satData);
    161164
    162   t_pppOpt*               _opt;
     165  t_pppOptions*           _opt;
    163166  bool                    _optOwner;
    164167  QByteArray              _staID;
     
    171174};
    172175
     176}
     177
    173178#endif
Note: See TracChangeset for help on using the changeset viewer.