Changeset 5749 in ntrip
- Timestamp:
- Aug 3, 2014, 10:55:00 AM (11 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP/ephpool.cpp
r5743 r5749 49 49 ///////////////////////////////////////////////////////////////////////////// 50 50 void t_ephPool::putEphemeris(t_eph* eph) { 51 if (eph && eph-> isOK()) {51 if (eph && eph->ok()) { 52 52 _satEphPool[eph->prn().toInt()].putEphemeris(_maxQueueSize, eph); 53 53 } … … 119 119 for (unsigned ii = 0; ii < _ephs.size(); ii++) { 120 120 t_eph* eph = _ephs[ii]; 121 if (eph->IOD() == corr->IOD() || corr->absClk()) {121 if (eph->IOD() == corr->IOD()) { 122 122 eph->setClkCorr(corr); 123 123 } … … 133 133 t_eph* eph = _ephs[ii]; 134 134 t_irc irc = eph->getCrd(tt, xc, vv); 135 if (irc == t_irc::success) {136 if (eph-> prn().system() == 'R') {137 double age = tt - eph-> toc();135 if (irc == success) { 136 if (eph->system() == 'R') { 137 double age = tt - eph->TOC(); 138 138 if (fabs(age) > 3600.0) { 139 139 continue; … … 143 143 } 144 144 } 145 return t_irc::failure;145 return failure; 146 146 } 147 147 … … 150 150 int t_ephPool::t_satEphPool::getChannel() const { 151 151 if (_ephs.size() > 0) { 152 return _ephs[0]-> getChannel();152 return _ephs[0]->slotNum(); 153 153 } 154 154 return 0; -
trunk/BNC/src/PPP/ppp.h
r5747 r5749 54 54 class t_orbCorr { 55 55 public: 56 t_prn prn() const {return _prn;} 57 unsigned short IOD() const {return _iod;} 56 58 t_prn _prn; 57 59 unsigned short _iod; … … 64 66 class t_clkCorr { 65 67 public: 68 t_prn prn() const {return _prn;} 69 unsigned short IOD() const {return _iod;} 66 70 t_prn _prn; 67 71 unsigned short _iod; 68 72 bncTime _time; 69 bool _absClk;70 73 double _dClk; 71 74 double _dotDClk; -
trunk/BNC/src/ephemeris.cpp
r5738 r5749 12 12 #include "bnctime.h" 13 13 #include "bnccore.h" 14 14 #include "PPP/ppp.h" 15 16 using namespace BNC; 15 17 using namespace std; 16 18 … … 30 32 } 31 33 return crc; 34 } 35 36 // Constructor 37 //////////////////////////////////////////////////////////////////////////// 38 t_eph::t_eph() { 39 _ok = false; 40 _orbCorr = 0; 41 _clkCorr = 0; 42 } 43 44 // 45 //////////////////////////////////////////////////////////////////////////// 46 void t_eph::setOrbCorr(const BNC::t_orbCorr* orbCorr) { 47 delete _orbCorr; 48 _orbCorr = new t_orbCorr(*orbCorr); 49 } 50 51 // 52 //////////////////////////////////////////////////////////////////////////// 53 void t_eph::setClkCorr(const BNC::t_clkCorr* clkCorr) { 54 delete _clkCorr; 55 _clkCorr = new t_clkCorr(*clkCorr); 56 } 57 58 // 59 //////////////////////////////////////////////////////////////////////////// 60 t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc, 61 ColumnVector& vv, bool noCorr) const { 62 xc.ReSize(4); 63 vv.ReSize(3); 64 position(tt.gpsw(), tt.gpssec(), xc.data(), vv.data()); 65 if (!noCorr) { 66 throw "t_eph::getCrd: not yet implemented"; 67 } 68 return success; 32 69 } 33 70 -
trunk/BNC/src/ephemeris.h
r5738 r5749 7 7 #include <string> 8 8 #include "bnctime.h" 9 #include "bncconst.h" 9 10 extern "C" { 10 11 #include "rtcm3torinex.h" 11 12 } 12 13 14 namespace BNC { 15 class t_orbCorr; 16 class t_clkCorr; 17 } 18 13 19 class t_eph { 14 20 public: … … 16 22 enum e_type {unknown, GPS, GLONASS, Galileo}; 17 23 18 t_eph() {_ok = false;}24 t_eph(); 19 25 virtual ~t_eph() {}; 20 26 … … 36 42 } 37 43 QString prn() const {return _prn;} 44 char system() const {return _prn[0].toAscii();} 38 45 const QDateTime& receptDateTime() const {return _receptDateTime;} 39 46 … … 50 57 } 51 58 59 t_irc getCrd(const bncTime& tt, ColumnVector& xc, 60 ColumnVector& vv, bool noCorr = false) const; 61 void setOrbCorr(const BNC::t_orbCorr* orbCorr); 62 void setClkCorr(const BNC::t_clkCorr* clkCorr); 63 virtual int slotNum() const {return 0;} 64 52 65 static QString rinexDateStr(const bncTime& tt, const QString& prn, 53 66 double version); 54 67 55 68 protected: 56 QString _prn; 57 bncTime _TOC; 58 QDateTime _receptDateTime; 59 bool _ok; 69 QString _prn; 70 bncTime _TOC; 71 QDateTime _receptDateTime; 72 bool _ok; 73 BNC::t_orbCorr* _orbCorr; 74 BNC::t_clkCorr* _clkCorr; 60 75 }; 61 76 … … 143 158 void set(const glonassephemeris* ee); 144 159 145 intslotNum() const {return int(_frequency_number);}160 virtual int slotNum() const {return int(_frequency_number);} 146 161 147 162 private:
Note:
See TracChangeset
for help on using the changeset viewer.