Changeset 6082 in ntrip for trunk/BNC/src/PPP_free
- Timestamp:
- Sep 7, 2014, 6:22:27 PM (10 years ago)
- Location:
- trunk/BNC/src/PPP_free
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/PPP_free/bncpppclient.cpp
r6081 r6082 221 221 // 222 222 //////////////////////////////////////////////////////////////////////////// 223 void bncPPPclient::put NewCorrections(QList<QString> corrList) {223 void bncPPPclient::putOrbCorrections(const std::vector<t_orbCorr*>& corr) { 224 224 QMutexLocker locker(&_mutex); 225 226 // Check the Mountpoint (source of corrections) 227 // -------------------------------------------- 228 if (!_opt->_corrMount.empty()) { 229 QMutableListIterator<QString> itm(corrList); 230 while (itm.hasNext()) { 231 QStringList hlp = itm.next().split(" "); 232 if (hlp.size() > 0) { 233 QString mountpoint = hlp[hlp.size()-1]; 234 if (mountpoint != QString(_opt->_corrMount.c_str())) { 235 itm.remove(); 236 } 237 } 238 } 239 } 240 241 if (corrList.size() == 0) { 242 return; 243 } 244 245 QListIterator<QString> it(corrList); 246 while (it.hasNext()) { 247 QString line = it.next(); 248 249 QTextStream in(&line); 250 int messageType; 251 int updateInterval; 252 int GPSweek; 253 double GPSweeks; 254 QString prn; 255 in >> messageType >> updateInterval >> GPSweek >> GPSweeks >> prn; 256 257 if ( t_corr::relevantMessageType(messageType) ) { 258 t_corr* cc = 0; 259 if (_corr.contains(prn)) { 260 cc = _corr.value(prn); 261 } 262 else { 263 cc = new t_corr(); 264 _corr[prn] = cc; 265 } 266 cc->readLine(line); 267 _corr_tt = cc->tClk; 268 } 269 else if ( messageType == BTYPE_GPS || messageType == BTYPE_GLONASS ) { 270 t_bias* bb = 0; 271 if (_bias.contains(prn)) { 272 bb = _bias.value(prn); 273 } 274 else { 275 bb = new t_bias(); 276 _bias[prn] = bb; 277 } 278 bb->readLine(line); 279 } 280 } 225 } 226 227 // 228 //////////////////////////////////////////////////////////////////////////// 229 void bncPPPclient::putClkCorrections(const std::vector<t_clkCorr*>& corr) { 230 QMutexLocker locker(&_mutex); 281 231 } 282 232 … … 298 248 } 299 249 300 //301 ////////////////////////////////////////////////////////////////////////////302 t_irc bncPPPclient::applyCorr(const bncTime& tt, const t_corr* cc,303 ColumnVector& xc, ColumnVector& vv) {304 305 double dtRao = tt - cc->tRao;306 307 // Position308 // --------309 ColumnVector raoHlp = cc->rao + cc->dotRao * dtRao;310 311 if (raoHlp.norm_Frobenius() > 20.0) {312 return failure;313 }314 315 ColumnVector dx(3);316 RSW_to_XYZ(xc.Rows(1,3), vv, raoHlp, dx);317 xc[0] -= dx[0];318 xc[1] -= dx[1];319 xc[2] -= dx[2];320 321 // Velocity322 // --------323 ColumnVector dotRaoHlp = cc->dotRao;324 325 ColumnVector dv(3);326 RSW_to_XYZ(xc.Rows(1,3), vv, dotRaoHlp, dv);327 vv[0] -= dv[0];328 vv[1] -= dv[1];329 vv[2] -= dv[2];330 331 // Clocks332 // ------333 double dtClk = tt - cc->tClk;334 335 xc[3] += cc->dClk + cc->dotDClk * dtClk + cc->dotDotDClk * dtClk * dtClk336 + cc->hrClk;337 338 return success;339 }340 341 250 // Correct Time of Transmission 342 251 //////////////////////////////////////////////////////////////////////////// -
trunk/BNC/src/PPP_free/bncpppclient.h
r6080 r6082 39 39 class t_epoData; 40 40 class t_output; 41 class t_orbCorr; 42 class t_clkCorr; 41 43 42 44 class bncPPPclient : public bncEphUser { … … 45 47 ~bncPPPclient(); 46 48 void processEpoch(const std::vector<t_satObs*>& satObs, t_output* output); 47 void putNewCorrections(QList<QString> corrList); 49 void putOrbCorrections(const std::vector<t_orbCorr*>& corr); 50 void putClkCorrections(const std::vector<t_clkCorr*>& corr); 48 51 QByteArray staID() const {return _staID;} 49 52 const t_pppOptions* opt() const {return _opt;} … … 66 69 void putNewObs(t_satData* satData); 67 70 t_irc cmpToT(t_satData* satData); 68 static t_irc applyCorr(const bncTime& tt, const t_corr* cc, ColumnVector& xc, ColumnVector& vv);69 71 70 72 const t_pppOptions* _opt; -
trunk/BNC/src/PPP_free/pppClient.cpp
r6073 r6082 103 103 ////////////////////////////////////////////////////////////////////////////// 104 104 void t_pppClient::putOrbCorrections(const vector<t_orbCorr*>& corr) { 105 _client->putOrbCorrections(corr); 105 106 } 106 107 … … 108 109 ////////////////////////////////////////////////////////////////////////////// 109 110 void t_pppClient::putClkCorrections(const vector<t_clkCorr*>& corr) { 111 _client->putClkCorrections(corr); 110 112 } 111 113
Note:
See TracChangeset
for help on using the changeset viewer.