- Timestamp:
- Jan 24, 2012, 11:15:21 AM (13 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncmodel.cpp
r3636 r3638 45 45 46 46 #include "bncmodel.h" 47 #include "bncpppclient.h" 47 48 #include "bncapp.h" 48 49 #include "bncpppclient.h" … … 138 139 // Constructor 139 140 //////////////////////////////////////////////////////////////////////////// 140 bncModel::bncModel(QByteArray staID, const t_pppOpt* opt) { 141 142 _staID = staID; 143 _opt = opt; 141 bncModel::bncModel(bncPPPclient* pppClient) { 142 143 _pppClient = pppClient; 144 _staID = pppClient->staID(); 145 _opt = pppClient->opt(); 144 146 145 147 connect(this, SIGNAL(newMessage(QByteArray,bool)), … … 171 173 _antex = new bncAntex(); 172 174 if (_antex->readFile(_opt->antexFile) != success) { 173 emit newMessage("wrong ANTEX file", true);175 _pppClient->emitNewMessage("wrong ANTEX file", true); 174 176 delete _antex; 175 177 _antex = 0; … … 338 340 phaseCenter = _antex->pco(_opt->antennaName, satData->eleSat, found); 339 341 if (!found) { 340 emit newMessage("ANTEX: antenna >"342 _pppClient->emitNewMessage("ANTEX: antenna >" 341 343 + _opt->antennaName.toAscii() + "< not found", true); 342 344 } … … 577 579 // ---------------------- 578 580 if (update_p(epoData) != success) { 579 emit newMessage(_log, false);581 _pppClient->emitNewMessage(_log, false); 580 582 return failure; 581 583 } … … 624 626 strB << '\n'; 625 627 _log += strB.str().c_str(); 626 emit newMessage(_log, false);628 _pppClient->emitNewMessage(_log, false); 627 629 628 630 // Final Message (both log file and screen) … … 657 659 } 658 660 659 emit newMessage(QByteArray(strC.str().c_str()), true);661 _pppClient->emitNewMessage(QByteArray(strC.str().c_str()), true); 660 662 661 663 if (_opt->pppAverage == 0.0) { … … 714 716 << setw(14) << setprecision(3) << mean[2] + _opt->refCrd[2] << " +- " 715 717 << setw(6) << setprecision(3) << std[2]; 716 emit newMessage(QByteArray(strD.str().c_str()), true);718 _pppClient->emitNewMessage(QByteArray(strD.str().c_str()), true); 717 719 718 720 ostringstream strE; strE.setf(ios::fixed); … … 725 727 << setw(14) << setprecision(3) << mean[5] << " +- " 726 728 << setw(6) << setprecision(3) << std[5]; 727 emit newMessage(QByteArray(strE.str().c_str()), true);729 _pppClient->emitNewMessage(QByteArray(strE.str().c_str()), true); 728 730 729 731 if (_opt->estTropo) { … … 733 735 << setw(13) << setprecision(3) << mean[6] << " +- " 734 736 << setw(6) << setprecision(3) << std[6] << endl; 735 emit newMessage(QByteArray(strF.str().c_str()), true);737 _pppClient->emitNewMessage(QByteArray(strF.str().c_str()), true); 736 738 } 737 739 } … … 852 854 } 853 855 854 emit newNMEAstr(outStr.toAscii());856 _pppClient->emitNewNMEAstr(outStr.toAscii()); 855 857 } 856 858 -
trunk/BNC/bncmodel.h
r3636 r3638 37 37 class bncAntex; 38 38 class t_pppOpt; 39 class bncPPPclient; 39 40 40 41 class bncParam { … … 56 57 57 58 class bncModel : public QObject { 58 Q_OBJECT59 59 public: 60 bncModel( QByteArray staID, const t_pppOpt* opt);60 bncModel(bncPPPclient* pppClient); 61 61 ~bncModel(); 62 62 t_irc update(t_epoData* epoData); … … 88 88 const DiagonalMatrix& PP, 89 89 SymmetricMatrix& QQ, ColumnVector& dx); 90 91 signals:92 void newMessage(QByteArray msg, bool showOnScreen);93 void newNMEAstr(QByteArray str);94 90 95 91 private: … … 136 132 }; 137 133 134 bncPPPclient* _pppClient; 138 135 const t_pppOpt* _opt; 139 136 bncTime _time; -
trunk/BNC/bncpppclient.cpp
r3636 r3638 66 66 67 67 _staID = staID; 68 _model = new bncModel(staID, _opt); 68 69 _model = new bncModel(this); 69 70 70 71 connect(this, SIGNAL(newMessage(QByteArray,bool)), -
trunk/BNC/bncpppclient.h
r3635 r3638 128 128 ColumnVector& vv); 129 129 QByteArray staID() const {return _staID;} 130 const t_pppOpt* opt() const {return _opt;} 131 void emitNewMessage(QByteArray msg, bool showOnScreen) { 132 emit newMessage(msg, showOnScreen); 133 } 134 void emitNewNMEAstr(QByteArray str) { 135 emit newNMEAstr(str); 136 } 130 137 131 138 public slots:
Note:
See TracChangeset
for help on using the changeset viewer.