- Timestamp:
- Apr 14, 2013, 6:26:22 PM (12 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/GPSS/hassDecoder.cpp
r5070 r5120 46 46 _GPSweeks = -1.0; 47 47 48 connect(this, SIGNAL(newCorrLine(QString, QString, long)),49 BNC_CORE, SLOT(slotNewCorrLine(QString, QString, long)));48 connect(this, SIGNAL(newCorrLine(QString, QString, bncTime)), 49 BNC_CORE, SLOT(slotNewCorrLine(QString, QString, bncTime))); 50 50 } 51 51 … … 92 92 // Correction Time 93 93 // --------------- 94 bncTime tt; 95 tt.setmjd(daySec, mjd); 94 bncTime coTime; coTime.setmjd(daySec, mjd); 96 95 97 _GPSweeks = tt.gpssec(); 98 long coTime = tt.gpsw() * 7*24*3600 + long(floor(_GPSweeks+0.5)); 96 _GPSweeks = coTime.gpssec(); 99 97 100 98 // Transform Correction … … 118 116 ColumnVector xc(4); 119 117 ColumnVector vv(3); 120 eph->position( tt.gpsw(), tt.gpssec(), xc.data(), vv.data());118 eph->position(coTime.gpsw(), coTime.gpssec(), xc.data(), vv.data()); 121 119 122 120 ColumnVector rao(3); … … 146 144 " %10.5f %10.5f %10.5f %10.5f" 147 145 " %10.5f", 148 messageType, updateInterval, tt.gpsw(), _GPSweeks,146 messageType, updateInterval, coTime.gpsw(), _GPSweeks, 149 147 prn.toAscii().data(), IOD, 150 148 dClk, rao[0], rao[1], rao[2], -
trunk/BNC/src/GPSS/hassDecoder.h
r3578 r5120 16 16 17 17 signals: 18 void newCorrLine(QString line, QString staID, longcoTime);18 void newCorrLine(QString line, QString staID, bncTime coTime); 19 19 20 20 private: -
trunk/BNC/src/RTCM3/RTCM3coDecoder.cpp
r5070 r5120 72 72 _GPSweeks = -1.0; 73 73 74 connect(this, SIGNAL(newCorrLine(QString, QString, long)),75 BNC_CORE, SLOT(slotNewCorrLine(QString, QString, long)));74 connect(this, SIGNAL(newCorrLine(QString, QString, bncTime)), 75 BNC_CORE, SLOT(slotNewCorrLine(QString, QString, bncTime))); 76 76 77 77 connect(this, SIGNAL(newMessage(QByteArray,bool)), … … 254 254 bncTime currTime(currWeek, currSec); 255 255 256 bncTime co rrTime(GPSweek, GPSweeks);257 258 double dt = currTime - co rrTime;256 bncTime coTime(GPSweek, GPSweeks); 257 258 double dt = currTime - coTime; 259 259 const double MAXDT = 10 * 60.0; 260 260 if (fabs(dt) > MAXDT) { … … 263 263 } 264 264 else { 265 long coTime = GPSweek * 7*24*3600 + long(floor(_GPSweeks+0.5));266 265 emit newCorrLine(line, _staID, coTime); 267 266 } -
trunk/BNC/src/RTCM3/RTCM3coDecoder.h
r4428 r5120 50 50 std::ofstream*& out); 51 51 signals: 52 void newCorrLine(QString line, QString staID, longcoTime);52 void newCorrLine(QString line, QString staID, bncTime coTime); 53 53 void newMessage(QByteArray msg, bool showOnScreen); 54 54 -
trunk/BNC/src/bnccore.cpp
r5084 r5120 115 115 _userName = _userName.leftJustified(20, ' ', true); 116 116 117 _lastDumpCoSec = 0; 118 119 _corrs = new QMultiMap<long, QString>; 117 _corrs = new QMultiMap<bncTime, QString>; 120 118 121 119 _currentDateAndTimeGPS = 0; … … 633 631 // 634 632 //////////////////////////////////////////////////////////////////////////// 635 void t_bncCore::slotNewCorrLine(QString line, QString staID, longcoTime) {633 void t_bncCore::slotNewCorrLine(QString line, QString staID, bncTime coTime) { 636 634 637 635 QMutexLocker locker(&_mutex); … … 646 644 647 645 bncSettings settings; 648 _waitCoTime = settings.value("corrTime").to Int();649 if (_waitCoTime < 0 ) {650 _waitCoTime = 0 ;646 _waitCoTime = settings.value("corrTime").toDouble(); 647 if (_waitCoTime < 0.0) { 648 _waitCoTime = 0.0; 651 649 } 652 650 653 651 // First time, set the _lastDumpSec immediately 654 652 // -------------------------------------------- 655 if ( _lastDumpCoSec == 0) {656 _lastDumpCoSec = coTime - 1 ;653 if (!_lastDumpCoSec.valid()) { 654 _lastDumpCoSec = coTime - 1.0; 657 655 } 658 656 659 657 // An old correction - throw it away 660 658 // --------------------------------- 661 if (_waitCoTime > 0 && coTime <= _lastDumpCoSec) {662 if (!_bncComb) {659 if (_waitCoTime > 0.0 && coTime <= _lastDumpCoSec) { 660 /// if (!_bncComb) { 663 661 QString line = staID + ": Correction for one sat neglected because overaged by " + 664 QString().sprintf(" % ldsec",662 QString().sprintf(" %f sec", 665 663 _lastDumpCoSec - coTime + _waitCoTime); 666 664 messagePrivate(line.toAscii()); 667 665 emit( newMessage(line.toAscii(), true) ); 668 }666 /// } 669 667 return; 670 668 } … … 674 672 // Dump Corrections 675 673 // ---------------- 676 if (_waitCoTime == 0 ) {674 if (_waitCoTime == 0.0) { 677 675 dumpCorrs(); 678 676 } … … 685 683 // Dump Complete Correction Epochs 686 684 //////////////////////////////////////////////////////////////////////////// 687 void t_bncCore::dumpCorrs( long minTime, longmaxTime) {688 for ( long sec = minTime; sec <= maxTime; sec++) {685 void t_bncCore::dumpCorrs(bncTime minTime, bncTime maxTime) { 686 for (bncTime sec = minTime; sec <= maxTime; sec = sec + 1.0) { 689 687 QList<QString> allCorrs = _corrs->values(sec); 690 688 dumpCorrs(allCorrs); … … 697 695 void t_bncCore::dumpCorrs() { 698 696 QList<QString> allCorrs; 699 QMutableMapIterator< long, QString> it(*_corrs);697 QMutableMapIterator<bncTime, QString> it(*_corrs); 700 698 while (it.hasNext()) { 701 699 allCorrs << it.next().value(); -
trunk/BNC/src/bnccore.h
r5084 r5120 72 72 void slotNewGlonassEph(glonassephemeris* glonasseph); 73 73 void slotNewGalileoEph(galileoephemeris* galileoeph); 74 void slotNewCorrLine(QString line, QString staID, longcoTime);74 void slotNewCorrLine(QString line, QString staID, bncTime coTime); 75 75 void slotQuit(); 76 76 … … 92 92 void printOutput(bool printFile, QTextStream* stream, 93 93 const QString& strV2, const QString& strV3); 94 void dumpCorrs( long minTime, longmaxTime);94 void dumpCorrs(bncTime minTime, bncTime maxTime); 95 95 void dumpCorrs(); 96 96 void dumpCorrs(const QList<QString>& allCorrs); … … 127 127 QList<QTcpSocket*>* _socketsNMEA; 128 128 bncCaster* _caster; 129 long_lastDumpCoSec;130 long_waitCoTime;131 QMultiMap< long, QString>* _corrs;129 bncTime _lastDumpCoSec; 130 double _waitCoTime; 131 QMultiMap<bncTime, QString>* _corrs; 132 132 QString _confFileName; 133 133 QDate _fileDate;
Note:
See TracChangeset
for help on using the changeset viewer.