Changeset 3635 in ntrip
- Timestamp:
- Jan 23, 2012, 2:54:50 PM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncpppclient.cpp
r3521 r3635 48 48 #include "bncconst.h" 49 49 #include "bncmodel.h" 50 #include " bncsettings.h"50 #include "pppopt.h" 51 51 52 52 using namespace std; … … 54 54 // Constructor 55 55 //////////////////////////////////////////////////////////////////////////// 56 bncPPPclient::bncPPPclient(QByteArray staID) { 57 58 bncSettings settings; 59 60 if ( Qt::CheckState(settings.value("pppGLONASS").toInt()) == Qt::Checked) { 61 _useGlonass = true; 56 bncPPPclient::bncPPPclient(QByteArray staID, t_pppOpt* opt) { 57 58 if (opt) { 59 _opt = opt; 60 _optOwner = false; 62 61 } 63 62 else { 64 _useGlonass = false; 65 } 66 67 if ( Qt::CheckState(settings.value("pppGalileo").toInt()) == Qt::Checked) { 68 _useGalileo = true; 69 } 70 else { 71 _useGalileo = false; 72 } 73 74 if (settings.value("pppSPP").toString() == "PPP") { 75 _pppMode = true; 76 } 77 else { 78 _pppMode = false; 79 } 63 _opt = new t_pppOpt(); 64 _optOwner = true; 65 } 66 67 _staID = staID; 68 _model = new bncModel(staID); 80 69 81 70 connect(this, SIGNAL(newMessage(QByteArray,bool)), … … 85 74 this, SLOT(slotNewCorrections(QList<QString>))); 86 75 87 _staID = staID;88 _model = new bncModel(staID);89 76 connect(_model, SIGNAL(newNMEAstr(QByteArray)), 90 77 this, SIGNAL(newNMEAstr(QByteArray))); 91 92 _pppCorrMount = settings.value("pppCorrMount").toString();93 78 } 94 79 … … 111 96 delete ib.value(); 112 97 } 98 if (_optOwner) { 99 delete _opt; 100 } 113 101 } 114 102 … … 119 107 120 108 if (obs.satSys == 'R') { 121 if (!_ useGlonass) return;109 if (!_opt->useGlonass) return; 122 110 } 123 111 else if (obs.satSys == 'E') { 124 if (!_ useGalileo) return;112 if (!_opt->useGalileo) return; 125 113 } 126 114 else if (obs.satSys != 'G') { … … 265 253 // Check the Mountpoint (source of corrections) 266 254 // -------------------------------------------- 267 if (!_ pppCorrMount.isEmpty()) {255 if (!_opt->pppCorrMount.isEmpty()) { 268 256 QMutableListIterator<QString> itm(corrList); 269 257 while (itm.hasNext()) { … … 271 259 if (hlp.size() > 0) { 272 260 QString mountpoint = hlp[hlp.size()-1]; 273 if (mountpoint != _ pppCorrMount) {261 if (mountpoint != _opt->pppCorrMount) { 274 262 itm.remove(); 275 263 } … … 368 356 if (_eph.contains(prn)) { 369 357 370 if (_ pppMode) {358 if (_opt->pppMode) { 371 359 if (_corr.contains(prn)) { 372 360 t_corr* cc = _corr.value(prn); … … 483 471 void bncPPPclient::processEpochs() { 484 472 485 // Synchronization threshold (not used in SPP mode)486 // ------------------------------------------------487 bncSettings settings;488 double maxDt = settings.value("pppSync").toDouble();489 if (!_pppMode) {490 maxDt = 0.0;491 }492 493 473 // Make sure the buffer does not grow beyond any limit 494 474 // --------------------------------------------------- … … 507 487 // No corrections yet, skip the epoch 508 488 // ---------------------------------- 509 if ( maxDt!= 0.0 && !_corr_tt.valid()) {489 if (_opt->corrSync != 0.0 && !_corr_tt.valid()) { 510 490 return; 511 491 } … … 513 493 // Process the front epoch 514 494 // ----------------------- 515 if ( maxDt == 0 || frontEpoData->tt - _corr_tt < maxDt) {495 if (_opt->corrSync == 0 || frontEpoData->tt - _corr_tt < _opt->corrSync) { 516 496 processFrontEpoch(); 517 497 delete _epoData.front(); -
trunk/BNC/bncpppclient.h
r3535 r3635 31 31 32 32 class bncModel; 33 class t_pppOpt; 33 34 34 35 class t_satData { … … 121 122 122 123 public: 123 bncPPPclient(QByteArray staID );124 bncPPPclient(QByteArray staID, t_pppOpt* opt = 0); 124 125 ~bncPPPclient(); 125 126 void putNewObs(const t_obs& pp); … … 156 157 t_irc cmpToT(t_satData* satData); 157 158 159 t_pppOpt* _opt; 160 bool _optOwner; 158 161 QByteArray _staID; 159 162 QMap<QString, t_corr*> _corr; … … 162 165 std::queue<t_epoData*> _epoData; 163 166 bncModel* _model; 164 bool _useGlonass;165 bool _useGalileo;166 bool _pppMode;167 167 QMap<QString, slipInfo> _slips; 168 QString _pppCorrMount;169 168 }; 170 169 -
trunk/BNC/pppopt.cpp
r3633 r3635 63 63 antEccNEU[2] = settingsToDouble("pppRefdU"); 64 64 maxSolGap = settingsToDouble("pppMaxSolGap"); 65 quickStart = settingsToDouble("pppQuickStart"); if (!refCrdSet()) quickStart = 0.0;66 corrSync = settingsToDouble("pppSync"); if (!pppMode) corrSync = 0.0;65 quickStart = settingsToDouble("pppQuickStart"); 66 corrSync = settingsToDouble("pppSync"); 67 67 68 68 pppCorrMount = settings.value("pppCorrMount").toString(); … … 77 77 useGlonass = settingsChecked("pppGLONASS"); 78 78 useGalileo = settingsChecked("pppGalileo"); 79 80 if (!refCrdSet()) quickStart = 0.0; 81 if (!pppMode) corrSync = 0.0; 79 82 } 80 83
Note:
See TracChangeset
for help on using the changeset viewer.