Changeset 3638 in ntrip


Ignore:
Timestamp:
Jan 24, 2012, 11:15:21 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncmodel.cpp

    r3636 r3638  
    4545
    4646#include "bncmodel.h"
     47#include "bncpppclient.h"
    4748#include "bncapp.h"
    4849#include "bncpppclient.h"
     
    138139// Constructor
    139140////////////////////////////////////////////////////////////////////////////
    140 bncModel::bncModel(QByteArray staID, const t_pppOpt* opt) {
    141 
    142   _staID = staID;
    143   _opt   = opt;
     141bncModel::bncModel(bncPPPclient* pppClient) {
     142
     143  _pppClient = pppClient;
     144  _staID     = pppClient->staID();
     145  _opt       = pppClient->opt();
    144146
    145147  connect(this, SIGNAL(newMessage(QByteArray,bool)),
     
    171173    _antex = new bncAntex();
    172174    if (_antex->readFile(_opt->antexFile) != success) {
    173       emit newMessage("wrong ANTEX file", true);
     175      _pppClient->emitNewMessage("wrong ANTEX file", true);
    174176      delete _antex;
    175177      _antex = 0;
     
    338340    phaseCenter = _antex->pco(_opt->antennaName, satData->eleSat, found);
    339341    if (!found) {
    340       emit newMessage("ANTEX: antenna >"
     342      _pppClient->emitNewMessage("ANTEX: antenna >"
    341343                      + _opt->antennaName.toAscii() + "< not found", true);
    342344    }
     
    577579  // ----------------------
    578580  if (update_p(epoData) != success) {
    579     emit newMessage(_log, false);
     581    _pppClient->emitNewMessage(_log, false);
    580582    return failure;
    581583  }
     
    624626  strB << '\n';
    625627  _log += strB.str().c_str();
    626   emit newMessage(_log, false);
     628  _pppClient->emitNewMessage(_log, false);
    627629
    628630  // Final Message (both log file and screen)
     
    657659  }
    658660
    659   emit newMessage(QByteArray(strC.str().c_str()), true);
     661  _pppClient->emitNewMessage(QByteArray(strC.str().c_str()), true);
    660662
    661663  if (_opt->pppAverage == 0.0) {
     
    714716             << setw(14) << setprecision(3) << mean[2] + _opt->refCrd[2] << " +- "
    715717             << setw(6)  << setprecision(3) << std[2];
    716         emit newMessage(QByteArray(strD.str().c_str()), true);
     718        _pppClient->emitNewMessage(QByteArray(strD.str().c_str()), true);
    717719
    718720        ostringstream strE; strE.setf(ios::fixed);
     
    725727             << setw(14) << setprecision(3) << mean[5]  << " +- "
    726728             << setw(6)  << setprecision(3) << std[5];
    727         emit newMessage(QByteArray(strE.str().c_str()), true);
     729        _pppClient->emitNewMessage(QByteArray(strE.str().c_str()), true);
    728730
    729731        if (_opt->estTropo) {
     
    733735               << setw(13) << setprecision(3) << mean[6]  << " +- "
    734736               << 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);
    736738        }
    737739      }
     
    852854  }
    853855
    854   emit newNMEAstr(outStr.toAscii());
     856  _pppClient->emitNewNMEAstr(outStr.toAscii());
    855857}
    856858
  • trunk/BNC/bncmodel.h

    r3636 r3638  
    3737class bncAntex;
    3838class t_pppOpt;
     39class bncPPPclient;
    3940
    4041class bncParam {
     
    5657
    5758class bncModel : public QObject {
    58  Q_OBJECT
    5959 public:
    60   bncModel(QByteArray staID, const t_pppOpt* opt);
     60  bncModel(bncPPPclient* pppClient);
    6161  ~bncModel();
    6262  t_irc update(t_epoData* epoData);
     
    8888                     const DiagonalMatrix& PP,
    8989                     SymmetricMatrix& QQ, ColumnVector& dx);
    90 
    91  signals:
    92   void newMessage(QByteArray msg, bool showOnScreen);
    93   void newNMEAstr(QByteArray str);
    9490
    9591 private:
     
    136132  };
    137133
     134  bncPPPclient*         _pppClient;
    138135  const t_pppOpt*       _opt;
    139136  bncTime               _time;
  • trunk/BNC/bncpppclient.cpp

    r3636 r3638  
    6666
    6767  _staID = staID;
    68   _model = new bncModel(staID, _opt);
     68
     69  _model = new bncModel(this);
    6970
    7071  connect(this, SIGNAL(newMessage(QByteArray,bool)),
  • trunk/BNC/bncpppclient.h

    r3635 r3638  
    128128                         ColumnVector& vv);
    129129  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  }
    130137
    131138 public slots:
Note: See TracChangeset for help on using the changeset viewer.