- Timestamp:
- Sep 21, 2015, 2:44:44 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r7208 r7291 35 35 * Created: 29-Aug-2006 36 36 * 37 * Changes: 37 * Changes: 38 38 * 39 39 * -----------------------------------------------------------------------*/ … … 44 44 #include <cmath> 45 45 46 #include "bnccore.h" 47 #include "bncutils.h" 48 #include "bncrinex.h" 49 #include "bncsettings.h" 50 #include "bncversion.h" 51 #include "ephemeris.h" 52 #include "rinex/rnxobsfile.h" 53 #include "rinex/rnxnavfile.h" 46 #include "bnccore.h" 47 #include "bncutils.h" 48 #include "bncrinex.h" 49 #include "bncsettings.h" 50 #include "bncversion.h" 51 #include "ephemeris.h" 52 #include "rinex/rnxobsfile.h" 53 #include "rinex/rnxnavfile.h" 54 54 #include "pppMain.h" 55 55 56 56 #ifdef USE_COMBINATION 57 # include "combination/bnccomb.h" 57 # include "combination/bnccomb.h" 58 58 #endif 59 59 60 60 using namespace std; 61 61 62 // Singleton 62 // Singleton 63 63 //////////////////////////////////////////////////////////////////////////// 64 64 t_bncCore* t_bncCore::instance() { … … 176 176 if ( !logFileName.isEmpty() ) { 177 177 expandEnvVar(logFileName); 178 _logFile = new QFile(logFileName + "_" + 178 _logFile = new QFile(logFileName + "_" + 179 179 currDate.toString("yyMMdd").toAscii().data()); 180 180 _fileDate = currDate; … … 203 203 } 204 204 205 // 205 // 206 206 //////////////////////////////////////////////////////////////////////////// 207 207 t_irc t_bncCore::checkPrintEph(t_eph* eph) { … … 221 221 } 222 222 223 // New GPS Ephemeris 223 // New GPS Ephemeris 224 224 //////////////////////////////////////////////////////////////////////////// 225 225 void t_bncCore::slotNewGPSEph(t_ephGPS eph) { … … 228 228 } 229 229 } 230 230 231 231 // New Glonass Ephemeris 232 232 //////////////////////////////////////////////////////////////////////////// … … 272 272 273 273 if ( Qt::CheckState(settings.value("ephV3").toInt()) == Qt::Checked) { 274 _rinexVers = 3; 274 _rinexVers = 3; 275 275 } 276 276 else { … … 298 298 bool ephV3filenames = settings.value("ephV3filenames").toBool(); 299 299 300 QString hlpStr = bncRinex::nextEpochStr(datTim, 300 QString hlpStr = bncRinex::nextEpochStr(datTim, 301 301 settings.value("ephIntr").toString(), ephV3filenames); 302 302 … … 381 381 QString line; 382 382 line.sprintf( 383 "%9.2f%11sN: GNSS NAV DATA M: Mixed%12sRINEX VERSION / TYPE\n", 384 3.0, "", "");383 "%9.2f%11sN: GNSS NAV DATA M: Mixed%12sRINEX VERSION / TYPE\n", 384 t_rnxNavFile::defaultRnxNavVersion3, "", ""); 385 385 *_ephStreamGPS << line; 386 386 387 387 QString hlp = currentDateAndTimeGPS().toString("yyyyMMdd hhmmss UTC").leftJustified(20, ' ', true); 388 *_ephStreamGPS << _pgmName.toAscii().data() 389 << _userName.toAscii().data() 390 << hlp.toAscii().data() 388 *_ephStreamGPS << _pgmName.toAscii().data() 389 << _userName.toAscii().data() 390 << hlp.toAscii().data() 391 391 << "PGM / RUN BY / DATE" << endl; 392 392 393 393 line.sprintf("%60sEND OF HEADER\n", ""); 394 394 *_ephStreamGPS << line; 395 395 396 396 _ephStreamGPS->flush(); 397 397 } … … 406 406 t_rnxNavFile::defaultRnxNavVersion2, "", ""); 407 407 *_ephStreamGPS << line; 408 408 409 409 QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true); 410 *_ephStreamGPS << _pgmName.toAscii().data() 411 << _userName.toAscii().data() 412 << hlp.toAscii().data() 410 *_ephStreamGPS << _pgmName.toAscii().data() 411 << _userName.toAscii().data() 412 << hlp.toAscii().data() 413 413 << "PGM / RUN BY / DATE" << endl; 414 414 … … 423 423 t_rnxNavFile::defaultRnxNavVersion2, "", ""); 424 424 *_ephStreamGlonass << line; 425 425 426 426 QString hlp = currentDateAndTimeGPS().date().toString("dd-MMM-yyyy").leftJustified(20, ' ', true); 427 *_ephStreamGlonass << _pgmName.toAscii().data() 428 << _userName.toAscii().data() 429 << hlp.toAscii().data() 427 *_ephStreamGlonass << _pgmName.toAscii().data() 428 << _userName.toAscii().data() 429 << hlp.toAscii().data() 430 430 << "PGM / RUN BY / DATE" << endl; 431 431 … … 538 538 } 539 539 540 // 540 // 541 541 //////////////////////////////////////////////////////////////////////////// 542 542 void t_bncCore::slotQuit() { … … 545 545 } 546 546 547 // 547 // 548 548 //////////////////////////////////////////////////////////////////////////// 549 549 void t_bncCore::slotNewOrbCorrections(QList<t_orbCorr> orbCorrections) { … … 552 552 if (_socketsCorr) { 553 553 ostringstream out; 554 t_orbCorr::writeEpoch(&out, orbCorrections); 554 t_orbCorr::writeEpoch(&out, orbCorrections); 555 555 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 556 556 while (is.hasNext()) { … … 570 570 } 571 571 572 // 572 // 573 573 //////////////////////////////////////////////////////////////////////////// 574 574 void t_bncCore::slotNewClkCorrections(QList<t_clkCorr> clkCorrections) { … … 577 577 if (_socketsCorr) { 578 578 ostringstream out; 579 t_clkCorr::writeEpoch(&out, clkCorrections); 579 t_clkCorr::writeEpoch(&out, clkCorrections); 580 580 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 581 581 while (is.hasNext()) { … … 595 595 } 596 596 597 // 597 // 598 598 //////////////////////////////////////////////////////////////////////////// 599 599 void t_bncCore::slotNewCodeBiases(QList<t_satCodeBias> codeBiases) { … … 602 602 if (_socketsCorr) { 603 603 ostringstream out; 604 t_satCodeBias::writeEpoch(&out, codeBiases); 604 t_satCodeBias::writeEpoch(&out, codeBiases); 605 605 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 606 606 while (is.hasNext()) { … … 620 620 } 621 621 622 // 622 // 623 623 //////////////////////////////////////////////////////////////////////////// 624 624 void t_bncCore::slotNewPhaseBiases(QList<t_satPhaseBias> phaseBiases) { … … 627 627 if (_socketsCorr) { 628 628 ostringstream out; 629 t_satPhaseBias::writeEpoch(&out, phaseBiases); 629 t_satPhaseBias::writeEpoch(&out, phaseBiases); 630 630 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 631 631 while (is.hasNext()) { … … 645 645 } 646 646 647 // 647 // 648 648 //////////////////////////////////////////////////////////////////////////// 649 649 void t_bncCore::slotNewTec(t_vTec vTec) { … … 652 652 if (_socketsCorr) { 653 653 ostringstream out; 654 t_vTec::write(&out, vTec); 654 t_vTec::write(&out, vTec); 655 655 QMutableListIterator<QTcpSocket*> is(*_socketsCorr); 656 656 while (is.hasNext()) { … … 670 670 } 671 671 672 // 672 // 673 673 //////////////////////////////////////////////////////////////////////////// 674 674 void t_bncCore::setConfFileName(const QString& confFileName) { 675 675 if (confFileName.isEmpty()) { 676 _confFileName = QDir::homePath() + QDir::separator() 676 _confFileName = QDir::homePath() + QDir::separator() 677 677 + ".config" + QDir::separator() 678 678 + qApp->organizationName() + QDir::separator() … … 704 704 } 705 705 706 // 706 // 707 707 //////////////////////////////////////////////////////////////////////////// 708 708 void t_bncCore::initCombination() { … … 716 716 } 717 717 718 // 718 // 719 719 //////////////////////////////////////////////////////////////////////////// 720 720 void t_bncCore::stopCombination() {
Note:
See TracChangeset
for help on using the changeset viewer.