Changeset 2990 in ntrip for trunk/BNC/combination
- Timestamp:
- Feb 8, 2011, 6:33:13 PM (14 years ago)
- Location:
- trunk/BNC/combination
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/combination/bnccomb.cpp
r2989 r2990 66 66 } 67 67 68 68 // 69 //////////////////////////////////////////////////////////////////////////// 70 QString cmbParam::toString() const { 71 72 QString outStr; 73 74 if (type == AC_offset) { 75 outStr = "AC offset " + AC; 76 } 77 else if (type == Sat_offset) { 78 outStr = "Sat Offset " + prn; 79 } 80 else if (type == clk) { 81 outStr = "Clk Corr " + prn; 82 } 83 84 return outStr; 85 } 69 86 70 87 // Constructor … … 90 107 91 108 _caster = new cmbCaster(); 92 connect(_caster, SIGNAL(error(const QByteArray)), 93 this, SLOT(slotError(const QByteArray))); 94 connect(_caster, SIGNAL(newMessage(const QByteArray)), 95 this, SLOT(slotMessage(const QByteArray))); 109 connect(this, SIGNAL(newMessage(QByteArray,bool)), 110 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool))); 96 111 97 112 // Initialize Parameters … … 251 266 } 252 267 253 // Print one correction254 ////////////////////////////////////////////////////////////////////////////255 void bncComb::printSingleCorr(const QString& acName, const t_corr* corr) {256 cout.setf(ios::fixed);257 cout << acName.toAscii().data() << " "258 << corr->prn.toAscii().data() << " "259 << corr->tt.timestr() << " "260 << setw(4) << corr->iod << " "261 << setw(8) << setprecision(4) << corr->dClk * t_CST::c << " "262 << setw(8) << setprecision(4) << corr->rao[0] << " "263 << setw(8) << setprecision(4) << corr->rao[1] << " "264 << setw(8) << setprecision(4) << corr->rao[2] << endl;265 }266 267 268 // Send results to caster 268 269 //////////////////////////////////////////////////////////////////////////// … … 325 326 } 326 327 327 // Write an Error Message328 ////////////////////////////////////////////////////////////////////////////329 void bncComb::slotError(const QByteArray msg) {330 cout << msg.data() << endl;331 }332 333 // Write a Message334 ////////////////////////////////////////////////////////////////////////////335 void bncComb::slotMessage(const QByteArray msg) {336 cout << msg.data() << endl;337 }338 339 328 // Change the correction so that it refers to last received ephemeris 340 329 //////////////////////////////////////////////////////////////////////////// … … 370 359 //////////////////////////////////////////////////////////////////////////// 371 360 void bncComb::processEpochs(const QList<cmbEpoch*>& epochs) { 361 362 _log.clear(); 363 364 QTextStream out(&_log, QIODevice::WriteOnly); 365 366 out << "Combination:" << endl 367 << "-----------------------------" << endl; 372 368 373 369 // Predict Parameters Values, Add White Noise … … 441 437 442 438 ll(iObs) = corr->dClk * t_CST::c - DotProduct(AA.Row(iObs), x0); 443 444 printSingleCorr(epo->acName, corr); 439 445 440 delete corr; 446 441 } … … 459 454 } 460 455 } 461 } 462 463 cout << "vv = " << vv.t(); 456 out.setRealNumberNotation(QTextStream::FixedNotation); 457 out.setFieldWidth(8); 458 out.setRealNumberPrecision(4); 459 out << pp->toString() << " " 460 << pp->xx << " +- " << _QQ(pp->index,pp->index) << endl; 461 } 464 462 } 465 463 466 464 dumpResults(resTime, resCorr); 467 465 468 cout << "Corrections processed" << endl << endl;469 } 466 emit newMessage(_log, false); 467 } -
trunk/BNC/combination/bnccomb.h
r2986 r2990 15 15 ~cmbParam(); 16 16 double partial(const QString& acIn, t_corr* corr); 17 QString toString() const; 17 18 parType type; 18 19 int index; … … 34 35 void newMessage(QByteArray msg, bool showOnScreen); 35 36 36 private slots:37 void slotMessage(const QByteArray msg);38 void slotError(const QByteArray msg);39 40 37 private: 41 42 38 class cmbEpoch { 43 39 public: … … 71 67 72 68 void processEpochs(const QList<cmbEpoch*>& epochs); 73 void printSingleCorr(const QString& acName, const t_corr* corr);74 69 void dumpResults(const bncTime& resTime, 75 70 const QMap<QString, t_corr*>& resCorr); … … 85 80 double _sigClk; 86 81 SymmetricMatrix _QQ; 82 QByteArray _log; 87 83 }; 88 84 -
trunk/BNC/combination/cmbcaster.cpp
r2925 r2990 19 19 #include "bncsettings.h" 20 20 #include "bncversion.h" 21 #include "bncapp.h" 21 22 22 23 using namespace std; … … 29 30 _outSocket = 0; 30 31 _sOpenTrial = 0; 32 connect(this, SIGNAL(newMessage(QByteArray,bool)), 33 ((bncApp*)qApp), SLOT(slotMessage(const QByteArray,bool))); 31 34 } 32 35 … … 75 78 delete _outSocket; 76 79 _outSocket = 0; 77 emit(newMessage("Broadcaster: Connect timeout" ));80 emit(newMessage("Broadcaster: Connect timeout", true)); 78 81 return; 79 82 } … … 92 95 delete _outSocket; 93 96 _outSocket = 0; 94 emit(newMessage("Broadcaster: Connection broken" ));97 emit(newMessage("Broadcaster: Connection broken", true)); 95 98 } 96 99 else { 97 emit(newMessage("Broadcaster: Connection opened" ));100 emit(newMessage("Broadcaster: Connection opened", true)); 98 101 _sOpenTrial = 0; 99 102 } -
trunk/BNC/combination/cmbcaster.h
r2925 r2990 14 14 15 15 signals: 16 void error(const QByteArray msg); 17 void newMessage(const QByteArray msg); 16 void newMessage(QByteArray msg, bool showOnScreen); 18 17 19 18 private:
Note:
See TracChangeset
for help on using the changeset viewer.