Changeset 6109 in ntrip for trunk/BNC/src
- Timestamp:
- Sep 8, 2014, 3:49:16 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/RTCM/rtcm_utils.cpp
r2492 r6109 36 36 // -------------- 37 37 rho = 0.0; 38 eph->position(GPSWeek, GPSWeeks, xSat, ySat, zSat, clkSat); 38 ColumnVector xc(4); 39 ColumnVector vv(3); 40 eph->getCrd(bncTime(GPSWeek, GPSWeeks), xc, vv, false); 41 xSat = xc(1); 42 ySat = xc(2); 43 zSat = xc(3); 44 clkSat = xc(4); 39 45 40 46 ////cout << "----- cmpRho -----\n"; … … 77 83 } 78 84 79 eph->position(GPSWeek_tot, GPSWeeks_tot, xSat, ySat, zSat, clkSat); 85 eph->getCrd(bncTime(GPSWeek_tot, GPSWeeks_tot), xc, vv, false); 86 xSat = xc(1); 87 ySat = xc(2); 88 zSat = xc(3); 89 clkSat = xc(4); 80 90 81 91 dx = xRec - xSat; -
trunk/BNC/src/combination/bnccomb.cpp
r5867 r6109 412 412 ColumnVector oldXC(4); 413 413 ColumnVector oldVV(3); 414 corr->eph->position(corr->tRao.gpsw(), corr->tRao.gpssec(), 415 oldXC.data(), oldVV.data()); 414 corr->eph->getCrd(corr->tRao, oldXC, oldVV, false); 416 415 417 416 ColumnVector newXC(4); 418 417 ColumnVector newVV(3); 419 lastEph->position(corr->tRao.gpsw(), corr->tRao.gpssec(), 420 newXC.data(), newVV.data()); 418 lastEph->getCrd(corr->tRao, newXC, newVV, false); 421 419 422 420 ColumnVector dX = newXC.Rows(1,3) - oldXC.Rows(1,3); … … 640 638 const t_eph* eph = corr->eph; 641 639 if (eph) { 642 double xx, yy, zz, cc; 643 eph->position(_resTime.gpsw(), _resTime.gpssec(), xx, yy, zz, cc); 640 ColumnVector xc(4); 641 ColumnVector vv(3); 642 eph->getCrd(_resTime, xc, vv, false); 644 643 645 644 out << _resTime.datestr().c_str() << " " … … 648 647 out << "Full Clock " << corr->prn << " " << corr->iod << " "; 649 648 out.setFieldWidth(14); 650 out << ( cc+ corr->dClk) * t_CST::c << endl;649 out << (xc(4) + corr->dClk) * t_CST::c << endl; 651 650 out.setFieldWidth(0); 652 651 } … … 679 678 ColumnVector xc(4); 680 679 ColumnVector vv(3); 681 corr->eph->position(_resTime.gpsw(), _resTime.gpssec(), 682 xc.data(), vv.data()); 680 corr->eph->getCrd(_resTime, xc, vv, false); 683 681 684 682 // Correction Phase Center --> CoM -
trunk/BNC/src/ephemeris.cpp
r6044 r6109 40 40 // 41 41 //////////////////////////////////////////////////////////////////////////// 42 t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc, 43 ColumnVector& vv, bool useCorr) const { 42 t_irc t_eph::getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const { 44 43 xc.ReSize(4); 45 44 vv.ReSize(3); -
trunk/BNC/src/ephemeris.h
r5853 r6109 25 25 virtual ~t_eph() {}; 26 26 27 static bool earlierTime(const t_eph* eph1, const t_eph* eph2) { 28 return eph1->_TOC < eph2->_TOC; 29 } 30 31 virtual e_type type() const = 0; 27 virtual e_type type() const = 0; 32 28 virtual QString toString(double version) const = 0; 33 virtual void position(int GPSweek, double GPSweeks, 34 double* xc, double* vv) const = 0; 35 virtual int IOD() const = 0; 36 37 bool ok() const {return _ok;} 29 virtual int IOD() const = 0; 30 virtual int slotNum() const {return 0;} 31 bool ok() const {return _ok;} 38 32 bncTime TOC() const {return _TOC;} 39 bool isNewerThan(const t_eph* eph) const { 40 return earlierTime(eph, this); 41 } 42 t_prn prn() const {return _prn;} 33 bool isNewerThan(const t_eph* eph) const {return earlierTime(eph, this);} 34 t_prn prn() const {return _prn;} 35 t_irc getCrd(const bncTime& tt, ColumnVector& xc, ColumnVector& vv, bool useCorr) const; 36 void setOrbCorr(const BNC_PPP::t_orbCorr* orbCorr); 37 void setClkCorr(const BNC_PPP::t_clkCorr* clkCorr); 43 38 const QDateTime& receptDateTime() const {return _receptDateTime;} 44 45 void position(int GPSweek, double GPSweeks, 46 double& xx, double& yy, double& zz, double& cc) const { 47 double tmp_xx[4]; 48 double tmp_vv[4]; 49 position(GPSweek, GPSweeks, tmp_xx, tmp_vv); 50 51 xx = tmp_xx[0]; 52 yy = tmp_xx[1]; 53 zz = tmp_xx[2]; 54 cc = tmp_xx[3]; 55 } 56 57 t_irc getCrd(const bncTime& tt, ColumnVector& xc, 58 ColumnVector& vv, bool useCorr) const; 59 void setOrbCorr(const BNC_PPP::t_orbCorr* orbCorr); 60 void setClkCorr(const BNC_PPP::t_clkCorr* clkCorr); 61 virtual int slotNum() const {return 0;} 62 63 static QString rinexDateStr(const bncTime& tt, const t_prn& prn, 64 double version); 65 66 static QString rinexDateStr(const bncTime& tt, const QString& prnStr, 67 double version); 39 static QString rinexDateStr(const bncTime& tt, const t_prn& prn, double version); 40 static QString rinexDateStr(const bncTime& tt, const QString& prnStr, double version); 41 static bool earlierTime(const t_eph* eph1, const t_eph* eph2) {return eph1->_TOC < eph2->_TOC;} 68 42 69 43 protected: 70 t_prn _prn; 71 bncTime _TOC; 72 QDateTime _receptDateTime; 73 bool _ok; 44 virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const = 0; 45 t_prn _prn; 46 bncTime _TOC; 47 QDateTime _receptDateTime; 48 bool _ok; 74 49 BNC_PPP::t_orbCorr* _orbCorr; 75 50 BNC_PPP::t_clkCorr* _clkCorr; … … 85 60 86 61 virtual e_type type() const {return t_eph::GPS;} 87 88 62 virtual QString toString(double version) const; 89 63 virtual int IOD() const { return static_cast<int>(_IODC); } 90 64 void set(const gpsephemeris* ee); 91 92 virtual void position(int GPSweek, double GPSweeks,93 double* xc,94 double* vv) const;95 96 virtual int IOD() const { return static_cast<int>(_IODC); }97 98 65 double TGD() const {return _TGD;} // Timing Group Delay (P1-P2 DCB) 99 66 100 67 private: 68 virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const; 69 101 70 double _clock_bias; // [s] 102 71 double _clock_drift; // [s/s] … … 142 111 t_ephGlo() { _xv.ReSize(6); } 143 112 t_ephGlo(float rnxVersion, const QStringList& lines); 144 145 113 virtual ~t_ephGlo() {} 146 114 147 115 virtual e_type type() const {return t_eph::GLONASS;} 148 149 116 virtual QString toString(double version) const; 150 151 virtual void position(int GPSweek, double GPSweeks,152 double* xc,153 double* vv) const;154 155 117 virtual int IOD() const; 156 118 virtual int slotNum() const {return int(_frequency_number);} 157 119 void set(const glonassephemeris* ee); 158 120 159 virtual int slotNum() const {return int(_frequency_number);}160 161 121 private: 162 static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv,163 122 virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const; 123 static ColumnVector glo_deriv(double /* tt */, const ColumnVector& xv, double* acc); 164 124 165 125 mutable bncTime _tt; // time … … 195 155 196 156 virtual QString toString(double version) const; 197 198 157 virtual e_type type() const {return t_eph::Galileo;} 199 158 virtual int IOD() const { return static_cast<int>(_IODnav); } 200 159 void set(const galileoephemeris* ee); 201 160 202 virtual void position(int GPSweek, double GPSweeks,203 double* xc,204 double* vv) const;205 206 virtual int IOD() const { return static_cast<int>(_IODnav); }207 208 161 private: 162 virtual void position(int GPSweek, double GPSweeks, double* xc, double* vv) const; 163 209 164 double _clock_bias; // [s] 210 165 double _clock_drift; // [s/s] -
trunk/BNC/src/rinex/reqcanalyze.cpp
r6017 r6109 554 554 555 555 if (eph) { 556 double xSat, ySat, zSat, clkSat;557 eph->position(oneObs->_GPSWeek, oneObs->_GPSWeeks,558 xSat, ySat, zSat, clkSat);556 ColumnVector xc(4); 557 ColumnVector vv(3); 558 eph->getCrd(bncTime(oneObs->_GPSWeek, oneObs->_GPSWeeks), xc, vv, false); 559 559 560 560 double rho, eleSat, azSat; 561 topos(xyzSta(1), xyzSta(2), xyzSta(3), 562 xSat, ySat, zSat, rho, eleSat, azSat); 561 topos(xyzSta(1), xyzSta(2), xyzSta(3), xc(1), xc(2), xc(3), rho, eleSat, azSat); 563 562 564 563 aziDeg = azSat * 180.0/M_PI; … … 764 763 if (eph) { 765 764 ++nSatUsed; 766 ColumnVector xSat(3); 767 double clkSat; 768 eph->position(_currEpo->tt.gpsw(), _currEpo->tt.gpssec(), 769 xSat(1), xSat(2), xSat(3), clkSat); 770 ColumnVector dx = xSat - xyzSta; 765 ColumnVector xSat(4); 766 ColumnVector vv(3); 767 eph->getCrd(_currEpo->tt, xSat, vv, false); 768 ColumnVector dx = xSat.Rows(1,3) - xyzSta; 771 769 double rho = dx.norm_Frobenius(); 772 770 AA(nSatUsed,1) = dx(1) / rho; -
trunk/BNC/src/src.pri
r6095 r6109 116 116 } 117 117 118 exists(PPP ) {118 exists(PPPxxx) { 119 119 INCLUDEPATH += PPP 120 120 HEADERS += PPP/pppClient.h PPP/pppObsPool.h PPP/pppEphPool.h \ -
trunk/BNC/src/upload/bncrtnetuploadcaster.cpp
r5776 r6109 647 647 ColumnVector xB(4); 648 648 ColumnVector vB(3); 649 eph-> position(GPSweek, GPSweeks, xB.data(), vB.data());649 eph->getCrd(bncTime(GPSweek, GPSweeks), xB, vB, false); 650 650 651 651 // Precise Position
Note:
See TracChangeset
for help on using the changeset viewer.