Changeset 6099 in ntrip for trunk/BNC/src/PPP_free
- Timestamp:
- Sep 8, 2014, 8:36:22 AM (10 years ago)
- Location:
- trunk/BNC/src/PPP_free
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_free/pppClient.cpp
r6098 r6099 45 45 #include "pppClient.h" 46 46 #include "pppFilter.h" 47 #include " pppOptions.h"47 #include "bncephuser.h" 48 48 #include "bncutils.h" 49 #include "bncconst.h"50 49 51 50 using namespace BNC_PPP; … … 64 63 // Constructor 65 64 //////////////////////////////////////////////////////////////////////////// 66 t_pppClient::t_pppClient(const t_pppOptions* opt) : bncEphUser(false){65 t_pppClient::t_pppClient(const t_pppOptions* opt) { 67 66 68 67 _opt = new t_pppOptions(*opt); … … 70 69 _epoData = new t_epoData(); 71 70 _log = new ostringstream(); 71 _ephUser = new bncEphUser(false); 72 72 _staID = QByteArray(_opt->_roverName.c_str()); 73 73 … … 81 81 delete _epoData; 82 82 delete _opt; 83 delete _ephUser; 83 84 delete _log; 84 85 } … … 87 88 //////////////////////////////////////////////////////////////////////////// 88 89 void t_pppClient::processEpoch(const vector<t_satObs*>& satObs, t_output* output) { 89 QMutexLocker locker(&_mutex);90 90 91 91 // Convert and store observations … … 176 176 int channel = 0; 177 177 if (satData->system() == 'R') { 178 if (_eph.contains(satData->prn)) {179 t_eph* eLast =_eph.value(satData->prn)->last;180 channel = e Last->slotNum();178 const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(satData->prn); 179 if (ephPair) { 180 channel = ephPair->last->slotNum(); 181 181 } 182 182 else { … … 229 229 //////////////////////////////////////////////////////////////////////////// 230 230 void t_pppClient::putOrbCorrections(const std::vector<t_orbCorr*>& corr) { 231 QMutexLocker locker(&_mutex);232 231 for (unsigned ii = 0; ii < corr.size(); ii++) { 233 232 QString prn = QString(corr[ii]->_prn.toString().c_str()); 234 if (_eph.contains(prn)) { 235 t_eph* eLast = _eph.value(prn)->last; 236 t_eph* ePrev = _eph.value(prn)->prev; 233 const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn); 234 if (ephPair) { 235 t_eph* eLast = ephPair->last; 236 t_eph* ePrev = ephPair->prev; 237 237 if (eLast && eLast->IOD() == corr[ii]->_iod) { 238 238 eLast->setOrbCorr(corr[ii]); … … 248 248 //////////////////////////////////////////////////////////////////////////// 249 249 void t_pppClient::putClkCorrections(const std::vector<t_clkCorr*>& corr) { 250 QMutexLocker locker(&_mutex);251 250 for (unsigned ii = 0; ii < corr.size(); ii++) { 252 251 QString prn = QString(corr[ii]->_prn.toString().c_str()); 253 if (_eph.contains(prn)) { 254 t_eph* eLast = _eph.value(prn)->last; 255 t_eph* ePrev = _eph.value(prn)->prev; 252 const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn); 253 if (ephPair) { 254 t_eph* eLast = ephPair->last; 255 t_eph* ePrev = ephPair->prev; 256 256 if (eLast && eLast->IOD() == corr[ii]->_iod) { 257 257 eLast->setClkCorr(corr[ii]); … … 276 276 const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph); 277 277 if (ephGPS) { 278 putNewEph(new t_ephGPS(*ephGPS));278 _ephUser->putNewEph(new t_ephGPS(*ephGPS)); 279 279 } 280 280 else if (ephGlo) { 281 putNewEph(new t_ephGlo(*ephGlo));281 _ephUser->putNewEph(new t_ephGlo(*ephGlo)); 282 282 } 283 283 else if (ephGal) { 284 putNewEph(new t_ephGal(*ephGal));284 _ephUser->putNewEph(new t_ephGal(*ephGal)); 285 285 } 286 286 } … … 290 290 t_irc t_pppClient::getSatPos(const bncTime& tt, const QString& prn, 291 291 ColumnVector& xc, ColumnVector& vv) { 292 if (_eph.contains(prn)) { 293 t_eph* eLast = _eph.value(prn)->last; 294 t_eph* ePrev = _eph.value(prn)->prev; 292 293 const bncEphUser::t_ephPair* ephPair = _ephUser->ephPair(prn); 294 if (ephPair) { 295 t_eph* eLast = ephPair->last; 296 t_eph* ePrev = ephPair->prev; 295 297 if (eLast && eLast->getCrd(tt, xc, vv, _opt->useOrbClkCorr()) == success) { 296 298 return success; -
trunk/BNC/src/PPP_free/pppClient.h
r6093 r6099 27 27 28 28 #include <vector> 29 #include "bncephuser.h" 29 #include <QtCore> 30 31 #include "pppInclude.h" 32 #include "pppOptions.h" 33 34 class bncEphUser; 35 class t_eph; 30 36 31 37 namespace BNC_PPP { 32 38 33 39 class t_pppFilter; 34 class t_pppOptions;35 class t_satObs;36 class t_satData;37 class t_epoData;38 class t_output;39 class t_orbCorr;40 class t_clkCorr;41 class t_satBias;42 43 class t_pppClient : public bncEphUser {44 public:45 t_pppClient(const t_pppOptions* opt);46 ~t_pppClient();47 void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output);48 void putEphemeris(const t_eph* eph);49 void putOrbCorrections(const std::vector<t_orbCorr*>& corr);50 void putClkCorrections(const std::vector<t_clkCorr*>& corr);51 void putBiases(const std::vector<t_satBias*>& satBias);52 QByteArray staID() const {return _staID;}53 const t_pppOptions* opt() const {return _opt;}54 static t_pppClient* instance();55 std::ostringstream& log() {return *_log;}56 57 private:58 t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv);59 void putNewObs(t_satData* satData);60 t_irc cmpToT(t_satData* satData);61 62 t_pppOptions* _opt;63 QByteArray _staID;64 t_epoData* _epoData;65 t_pppFilter* _filter;66 std::ostringstream* _log;67 };68 40 69 41 class t_satData { … … 148 120 }; 149 121 122 class t_pppClient { 123 public: 124 t_pppClient(const t_pppOptions* opt); 125 ~t_pppClient(); 126 void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output); 127 void putEphemeris(const t_eph* eph); 128 void putOrbCorrections(const std::vector<t_orbCorr*>& corr); 129 void putClkCorrections(const std::vector<t_clkCorr*>& corr); 130 void putBiases(const std::vector<t_satBias*>& satBias); 131 QByteArray staID() const {return _staID;} 132 const t_pppOptions* opt() const {return _opt;} 133 static t_pppClient* instance(); 134 std::ostringstream& log() {return *_log;} 135 136 private: 137 t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv); 138 void putNewObs(t_satData* satData); 139 t_irc cmpToT(t_satData* satData); 140 141 bncEphUser* _ephUser; 142 t_pppOptions* _opt; 143 QByteArray _staID; 144 t_epoData* _epoData; 145 t_pppFilter* _filter; 146 std::ostringstream* _log; 147 }; 148 150 149 } 151 150
Note:
See TracChangeset
for help on using the changeset viewer.