Changeset 7278 in ntrip for trunk/BNC/src/pppRun.cpp
- Timestamp:
- Sep 15, 2015, 4:48:34 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/pppRun.cpp
r7231 r7278 36 36 * Created: 29-Jul-2014 37 37 * 38 * Changes: 38 * Changes: 39 39 * 40 40 * -----------------------------------------------------------------------*/ … … 67 67 _opt = opt; 68 68 69 connect(this, SIGNAL(newMessage(QByteArray,bool)), 69 connect(this, SIGNAL(newMessage(QByteArray,bool)), 70 70 BNC_CORE, SLOT(slotMessage(const QByteArray,bool))); 71 71 … … 91 91 connect(BNC_CORE, SIGNAL(newGPSEph(t_ephGPS)), 92 92 this, SLOT(slotNewGPSEph(t_ephGPS)),conType); 93 93 94 94 connect(BNC_CORE, SIGNAL(newGlonassEph(t_ephGlo)), 95 95 this, SLOT(slotNewGlonassEph(t_ephGlo)),conType); 96 96 97 97 connect(BNC_CORE, SIGNAL(newGalileoEph(t_ephGal)), 98 98 this, SLOT(slotNewGalileoEph(t_ephGal)),conType); … … 120 120 connect(this, SIGNAL(progressRnxPPP(int)), BNC_CORE, SIGNAL(progressRnxPPP(int))); 121 121 connect(this, SIGNAL(finishedRnxPPP()), BNC_CORE, SIGNAL(finishedRnxPPP())); 122 connect(BNC_CORE, SIGNAL(mapSpeedSliderChanged(int)), 122 connect(BNC_CORE, SIGNAL(mapSpeedSliderChanged(int)), 123 123 this, SLOT(slotSetSpeed(int))); 124 124 connect(BNC_CORE, SIGNAL(stopRinexPPP()), this, SLOT(slotSetStopFlag())); 125 125 } 126 126 127 127 _stopFlag = false; 128 128 … … 183 183 } 184 184 185 // 185 // 186 186 //////////////////////////////////////////////////////////////////////////// 187 187 void t_pppRun::slotNewGPSEph(t_ephGPS eph) { … … 190 190 } 191 191 192 // 192 // 193 193 //////////////////////////////////////////////////////////////////////////// 194 194 void t_pppRun::slotNewGlonassEph(t_ephGlo eph) { … … 196 196 _pppClient->putEphemeris(&eph); 197 197 } 198 199 // 198 199 // 200 200 //////////////////////////////////////////////////////////////////////////// 201 201 void t_pppRun::slotNewGalileoEph(t_ephGal eph) { … … 220 220 } 221 221 222 // Loop over all obse vations (possible different epochs)222 // Loop over all observations (possible different epochs) 223 223 // ----------------------------------------------------- 224 224 QListIterator<t_satObs> it(obsList); … … 276 276 277 277 delete _epoData.front(); _epoData.pop_front(); 278 278 279 279 ostringstream log; 280 280 if (output._error) { … … 295 295 296 296 if (_logFile && output._epoTime.valid()) { 297 _logFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(), 298 QString(output._log.c_str())); 297 _logFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(), 298 QString(output._log.c_str())); 299 299 } 300 300 … … 335 335 } 336 336 337 // 337 // 338 338 //////////////////////////////////////////////////////////////////////////// 339 339 void t_pppRun::slotNewOrbCorrections(QList<t_orbCorr> orbCorr) { … … 352 352 } 353 353 354 _pppClient->putOrbCorrections(corrections); 355 } 356 357 // 354 _pppClient->putOrbCorrections(corrections); 355 356 for (unsigned ii = 0; ii < corrections.size(); ii++) { 357 delete corrections[ii]; 358 } 359 } 360 361 // 358 362 //////////////////////////////////////////////////////////////////////////// 359 363 void t_pppRun::slotNewClkCorrections(QList<t_clkCorr> clkCorr) { … … 372 376 _lastClkCorrTime = clkCorr[ii]._time; 373 377 } 374 _pppClient->putClkCorrections(corrections); 375 } 376 377 // 378 _pppClient->putClkCorrections(corrections); 379 380 for (unsigned ii = 0; ii < corrections.size(); ii++) { 381 delete corrections[ii]; 382 } 383 } 384 385 // 378 386 //////////////////////////////////////////////////////////////////////////// 379 387 void t_pppRun::slotNewCodeBiases(QList<t_satCodeBias> codeBiases) { … … 392 400 } 393 401 394 _pppClient->putCodeBiases(biases); 395 } 396 397 // 402 _pppClient->putCodeBiases(biases); 403 404 for (unsigned ii = 0; ii < biases.size(); ii++) { 405 delete biases[ii]; 406 } 407 } 408 409 // 398 410 //////////////////////////////////////////////////////////////////////////// 399 411 void t_pppRun::processFiles() { … … 468 480 for (unsigned iObs = 0; iObs < epo->rnxSat.size(); iObs++) { 469 481 const t_rnxObsFile::t_rnxSat& rnxSat = epo->rnxSat[iObs]; 470 482 471 483 t_satObs obs; 472 484 t_rnxObsFile::setObsFromRnx(_rnxObsFile, epo, rnxSat, obs); … … 479 491 emit progressRnxPPP(nEpo); 480 492 } 481 493 482 494 QCoreApplication::processEvents(); 483 495 } … … 493 505 } 494 506 495 // 507 // 496 508 //////////////////////////////////////////////////////////////////////////// 497 509 void t_pppRun::slotSetSpeed(int speed) { … … 500 512 } 501 513 502 // 514 // 503 515 //////////////////////////////////////////////////////////////////////////// 504 516 void t_pppRun::slotSetStopFlag() { … … 507 519 } 508 520 509 // 521 // 510 522 //////////////////////////////////////////////////////////////////////////// 511 523 QString t_pppRun::nmeaString(char strType, const t_output& output) { 512 524 513 double ell[3]; 525 double ell[3]; 514 526 xyz2ell(output._xyzRover, ell); 515 527 double phiDeg = ell[0] * 180 / M_PI; … … 520 532 phiDeg = -phiDeg; 521 533 phiCh = 'S'; 522 } 534 } 523 535 char lamCh = 'E'; 524 536 if (lamDeg < 0) { 525 537 lamDeg = -lamDeg; 526 538 lamCh = 'W'; 527 } 539 } 528 540 529 541 ostringstream out; … … 532 544 if (strType == 'R') { 533 545 string datestr = output._epoTime.datestr(0); // yyyymmdd 534 out << "GPRMC," 546 out << "GPRMC," 535 547 << output._epoTime.timestr(0,0) << ",A," 536 << setw(2) << setfill('0') << int(phiDeg) 537 << setw(6) << setprecision(3) << setfill('0') 548 << setw(2) << setfill('0') << int(phiDeg) 549 << setw(6) << setprecision(3) << setfill('0') 538 550 << fmod(60*phiDeg,60) << ',' << phiCh << ',' 539 << setw(3) << setfill('0') << int(lamDeg) 540 << setw(6) << setprecision(3) << setfill('0') 551 << setw(3) << setfill('0') << int(lamDeg) 552 << setw(6) << setprecision(3) << setfill('0') 541 553 << fmod(60*lamDeg,60) << ',' << lamCh << ",,," 542 554 << datestr[6] << datestr[7] << datestr[4] << datestr[5] … … 544 556 } 545 557 else if (strType == 'G') { 546 out << "GPGGA," 558 out << "GPGGA," 547 559 << output._epoTime.timestr(0,0) << ',' 548 << setw(2) << setfill('0') << int(phiDeg) 549 << setw(10) << setprecision(7) << setfill('0') 560 << setw(2) << setfill('0') << int(phiDeg) 561 << setw(10) << setprecision(7) << setfill('0') 550 562 << fmod(60*phiDeg,60) << ',' << phiCh << ',' 551 << setw(3) << setfill('0') << int(lamDeg) 552 << setw(10) << setprecision(7) << setfill('0') 553 << fmod(60*lamDeg,60) << ',' << lamCh 563 << setw(3) << setfill('0') << int(lamDeg) 564 << setw(10) << setprecision(7) << setfill('0') 565 << fmod(60*lamDeg,60) << ',' << lamCh 554 566 << ",1," << setw(2) << setfill('0') << output._numSat << ',' 555 567 << setw(3) << setprecision(1) << output._pDop << ',' … … 569 581 } 570 582 571 // 583 // 572 584 //////////////////////////////////////////////////////////////////////////// 573 585 bool t_pppRun::waitForCorr(const bncTime& epoTime) const {
Note:
See TracChangeset
for help on using the changeset viewer.