- Timestamp:
- Mar 4, 2009, 11:15:46 AM (15 years ago)
- Location:
- trunk/BNS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNS/bns.cpp
r1682 r1698 75 75 // ------------------------------------------- 76 76 for (int ic = 1; ic <= 2; ic++) { 77 78 77 QString mountpoint = settings.value(QString("mountpoint_%1").arg(ic)).toString(); 79 78 QString outFileName = settings.value(QString("outFile_%1").arg(ic)).toString(); 80 79 if (!mountpoint.isEmpty() || !outFileName.isEmpty()) { 81 QString refSys = settings.value(QString("refSys_%1").arg(ic)).toString(); 82 83 _caster.push_back(new t_bnscaster(mountpoint, outFileName, refSys, ic)); 80 _caster.push_back(new t_bnscaster(mountpoint, outFileName, ic)); 84 81 connect(_caster.back(), SIGNAL(error(const QByteArray)), 85 82 this, SLOT(slotError(const QByteArray))); … … 373 370 prns << prn; 374 371 if ( _ephList.contains(prn) ) { 375 in >> xx(1) >> xx(2) >> xx(3) >> xx(4) ;372 in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5); 376 373 xx(1) *= 1e3; 377 374 xx(2) *= 1e3; … … 379 376 xx(4) *= 1e-6; 380 377 381 //// in >> xx(1) >> xx(2) >> xx(3) >> xx(4) >> xx(5); xx(4) *= 1e-6; 382 //// 383 //// beg test (zero clock correction for Gerhard Wuebbena) 384 //// xx(4) -= xx(5) / 299792458.0; 385 //// end test 386 //// 387 //// Falls Clocks aus den Broadcast Ephemeris gewuenscht: 388 //// (2nd order relativistic effect taken out for 389 //// compatibility with IGS products?) 390 //// 391 //// if ( Qt::CheckState(settings.value("beClocks1 oder beClocks2").toInt()) == Qt::Checked) { 392 //// ..... 393 //// } 378 // Clocks without corrections 379 // -------------------------- 380 if ( _caster.at(ic)->beClocks() ) { 381 xx(4) -= xx(5) / 299792458.0; 382 } 394 383 395 384 t_ephPair* pair = _ephList[prn]; -
trunk/BNS/bnscaster.cpp
r1668 r1698 24 24 //////////////////////////////////////////////////////////////////////////// 25 25 t_bnscaster::t_bnscaster(const QString& mountpoint, const QString& outFileName, 26 const QString& refSys, const int ic) { 27 28 _mountpoint = mountpoint; 29 _outSocket = 0; 30 _outSocketOpenTrial = 0; 31 _ic = ic; 26 int ic) { 32 27 33 28 bnsSettings settings; 34 29 35 QIODevice::OpenMode oMode; 36 if (Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) { 37 oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append; 38 } 39 else { 40 oMode = QIODevice::WriteOnly | QIODevice::Unbuffered; 41 } 30 _mountpoint = mountpoint; 31 _ic = ic; 32 _outSocket = 0; 33 _sOpenTrial = 0; 42 34 43 35 if (outFileName.isEmpty()) { … … 47 39 else { 48 40 _outFile = new QFile(outFileName); 41 42 QIODevice::OpenMode oMode; 43 if (Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) { 44 oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append; 45 } 46 else { 47 oMode = QIODevice::WriteOnly | QIODevice::Unbuffered; 48 } 49 49 50 if (_outFile->open(oMode)) { 50 51 _outStream = new QTextStream(_outFile); … … 54 55 // Reference frame 55 56 // --------------- 56 _crdTrafo = false; 57 if (refSys == "ETRF2000") { 57 if (settings.value(QString("refSys_%1").arg(_ic)).toString() == "ETRF2000") { 58 58 _crdTrafo = true; 59 } 60 else { 61 _crdTrafo = false; 62 } 63 64 if ( Qt::CheckState(settings.value(QString("beClocks%1").arg(_ic)).toInt()) 65 == Qt::Checked ) { 66 _beClocks = true; 67 } 68 else { 69 _beClocks = false; 59 70 } 60 71 } … … 83 94 delete _outSocket; _outSocket = 0; 84 95 85 double minDt = pow(2.0,_ outSocketOpenTrial);86 if (++_ outSocketOpenTrial > 8) {87 _ outSocketOpenTrial = 8;96 double minDt = pow(2.0,_sOpenTrial); 97 if (++_sOpenTrial > 8) { 98 _sOpenTrial = 8; 88 99 } 89 100 if (_outSocketOpenTime.isValid() && … … 130 141 delete _outSocket; 131 142 _outSocket = 0; 132 // emit(newMessage("t_bnscaster::open socket deleted")); 133 emit(newMessage("Broadcaster: Connection broken")); // weber 143 emit(newMessage("Broadcaster: Connection broken")); 134 144 } 135 145 else { 136 // emit(newMessage("t_bnscaster::open socket OK")); 137 emit(newMessage("Broadcaster: Connection opened")); // weber 138 _outSocketOpenTrial = 0; 146 emit(newMessage("Broadcaster: Connection opened")); 147 _sOpenTrial = 0; 139 148 } 140 149 } -
trunk/BNS/bnscaster.h
r1262 r1698 7 7 Q_OBJECT 8 8 public: 9 t_bnscaster(const QString& mountpoint, const QString& outFileName, 10 const QString& refSys, int ic); 9 t_bnscaster(const QString& mountpoint, const QString& outFileName, int ic); 11 10 virtual ~t_bnscaster(); 12 11 void open(); … … 15 14 bool usedSocket() const {return _outSocket;} 16 15 bool crdTrafo() const {return _crdTrafo;} 16 bool beClocks() const {return _beClocks;} 17 17 int ic() const {return _ic;} 18 18 … … 24 24 QString _mountpoint; 25 25 QTcpSocket* _outSocket; 26 int _ outSocketOpenTrial;26 int _sOpenTrial; 27 27 QDateTime _outSocketOpenTime; 28 28 QFile* _outFile; 29 29 QTextStream* _outStream; 30 30 bool _crdTrafo; 31 bool _beClocks; 31 32 int _ic; 32 33 };
Note:
See TracChangeset
for help on using the changeset viewer.