Changeset 7029 in ntrip for trunk/BNC/src
- Timestamp:
- Jul 10, 2015, 11:10:31 AM (9 years ago)
- Location:
- trunk/BNC/src/PPP_SSR_I
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_SSR_I/pppClient.cpp
r6974 r7029 59 59 _log = new ostringstream(); 60 60 _ephUser = new bncEphUser(false); 61 62 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) { 63 _satCodeBiases[ii] = 0; 64 } 65 61 66 } 62 67 … … 64 69 //////////////////////////////////////////////////////////////////////////// 65 70 t_pppClient::~t_pppClient() { 71 72 for (unsigned ii = 0; ii <= t_prn::MAXPRN; ii++) { 73 delete _satCodeBiases[ii]; 74 } 75 66 76 delete _filter; 67 77 delete _epoData; … … 80 90 for (unsigned ii = 0; ii < satObs.size(); ii++) { 81 91 const t_satObs* obs = satObs[ii]; 82 t_satData* satData = new t_satData(); 92 t_prn prn = obs->_prn; 93 t_satData* satData = new t_satData(); 83 94 84 95 if (_epoData->tt.undef()) { … … 87 98 88 99 satData->tt = obs->_time; 89 satData->prn = QString( obs->_prn.toInternalString().c_str());100 satData->prn = QString(prn.toInternalString().c_str()); 90 101 satData->slipFlag = false; 91 102 satData->P1 = 0.0; … … 99 110 for (unsigned ifrq = 0; ifrq < obs->_obs.size(); ifrq++) { 100 111 t_frqObs* frqObs = obs->_obs[ifrq]; 112 double cb = 0.0; 113 const t_satCodeBias* satCB = satCodeBias(prn); 114 if (satCB && satCB->_bias.size()) { 115 for (unsigned ii = 0; ii < satCB->_bias.size(); ii++) { 116 const t_frqCodeBias& bias = satCB->_bias[ii]; 117 if (frqObs && frqObs->_rnxType2ch == bias._rnxType2ch) { 118 cb = bias._value; 119 } 120 } 121 } 101 122 if (frqObs->_rnxType2ch[0] == '1') { 102 if (frqObs->_codeValid) satData->P1 = frqObs->_code ;123 if (frqObs->_codeValid) satData->P1 = frqObs->_code + cb; 103 124 if (frqObs->_phaseValid) satData->L1 = frqObs->_phase; 104 125 if (frqObs->_slip) satData->slipFlag = true; 105 126 } 106 127 else if (frqObs->_rnxType2ch[0] == '2') { 107 if (frqObs->_codeValid) satData->P2 = frqObs->_code ;128 if (frqObs->_codeValid) satData->P2 = frqObs->_code + cb; 108 129 if (frqObs->_phaseValid) satData->L2 = frqObs->_phase; 109 130 if (frqObs->_slip) satData->slipFlag = true; 110 131 } 111 132 else if (frqObs->_rnxType2ch[0] == '5') { 112 if (frqObs->_codeValid) satData->P5 = frqObs->_code ;133 if (frqObs->_codeValid) satData->P5 = frqObs->_code + cb; 113 134 if (frqObs->_phaseValid) satData->L5 = frqObs->_phase; 114 135 if (frqObs->_slip) satData->slipFlag = true; 115 136 } 116 137 else if (frqObs->_rnxType2ch[0] == '7') { 117 if (frqObs->_codeValid) satData->P7 = frqObs->_code;118 119 120 138 if (frqObs->_codeValid) satData->P7 = frqObs->_code + cb; 139 if (frqObs->_phaseValid) satData->L7 = frqObs->_phase; 140 if (frqObs->_slip) satData->slipFlag = true; 141 } 121 142 } 122 143 putNewObs(satData); … … 311 332 // 312 333 ////////////////////////////////////////////////////////////////////////////// 313 void t_pppClient::putCodeBiases(const std::vector<t_satCodeBias*>& /* satCodeBias */) { 334 void t_pppClient::putCodeBiases(const std::vector<t_satCodeBias*>& satCodeBias) { 335 for (unsigned ii = 0; ii < satCodeBias.size(); ii++) { 336 putCodeBias(new t_satCodeBias(*satCodeBias[ii])); 337 } 314 338 } 315 339 … … 385 409 } 386 410 411 void t_pppClient::putCodeBias(t_satCodeBias* satCodeBias) { 412 int iPrn = satCodeBias->_prn.toInt(); 413 delete _satCodeBiases[iPrn]; 414 _satCodeBiases[iPrn] = satCodeBias; 415 } -
trunk/BNC/src/PPP_SSR_I/pppClient.h
r6875 r7029 49 49 std::ostringstream& log() {return *_log;} 50 50 const t_pppOptions* opt() const {return _opt;} 51 51 void putCodeBias(t_satCodeBias* satCodeBias); 52 const t_satCodeBias* satCodeBias(const t_prn& prn) const { 53 return _satCodeBiases[prn.toInt()]; 54 } 52 55 private: 53 56 t_irc getSatPos(const bncTime& tt, const QString& prn, ColumnVector& xc, ColumnVector& vv); … … 55 58 t_irc cmpToT(t_satData* satData); 56 59 60 t_satCodeBias* _satCodeBiases[t_prn::MAXPRN+1]; 57 61 bncEphUser* _ephUser; 58 62 t_pppOptions* _opt;
Note:
See TracChangeset
for help on using the changeset viewer.