Changeset 5971 in ntrip


Ignore:
Timestamp:
Aug 17, 2014, 12:50:34 PM (10 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/PPP/pppMain.cpp

    r5959 r5971  
    9494  }
    9595
     96  if (!_realTime) {
     97    cout << "t_pppMain::stop RINEX" << endl;
     98    return;
     99  }
     100
    96101  QListIterator<t_pppThread*> it(_pppThreads);
    97102  while (it.hasNext()) {
     
    126131  _nmeaPort = settings.value("PPP/nmeaPort").toInt();
    127132
    128   bool realTime = false;
     133  _realTime = false;
    129134  if      (settings.value("PPP/dataSource").toString() == "Real-Time Streams") {
    130     realTime = true;
     135    _realTime = true;
    131136  }
    132137  else if (settings.value("PPP/dataSource").toString() == "RINEX Files") {
    133     realTime = false;
     138    _realTime = false;
    134139  }
    135140  else {
     
    147152    t_pppOptions* opt = new t_pppOptions();
    148153
    149     opt->_realTime     = realTime;
     154    opt->_realTime     = _realTime;
    150155    opt->_roverName    = hlp[0].toAscii().data();
    151156    opt->_aprSigCrd[0] = hlp[1].toDouble();
     
    158163    opt->_noiseTrp     = hlp[8].toDouble();
    159164
    160     if (realTime) {
     165    if (_realTime) {
    161166      opt->_corrMount = settings.value("PPP/corrMount").toString().toAscii().data();
    162167    }
  • trunk/BNC/src/PPP/pppMain.h

    r5946 r5971  
    2424  int      _nmeaPort;
    2525  bool     _running;
     26  bool     _realTime;
    2627};
    2728
  • trunk/BNC/src/bncwindow.cpp

    r5968 r5971  
    9494          _bncFigurePPP, SLOT(slotNewPosition(QByteArray, bncTime, QVector<double>)));
    9595
    96   connect(BNC_CORE, SIGNAL(progressRnxPPP(int)), this, SLOT(slotPostProgress(int)));
    97   connect(BNC_CORE, SIGNAL(finishedRnxPPP()), this, SLOT(slotFinishedRnxPPP()));
    98 
    99   _runningRealTime           = false;
    100   _runningPostProcessingReqc = false;
    101   _reqcActionComboBox        = 0; // necessary for enableStartStop()
     96  connect(BNC_CORE, SIGNAL(progressRnxPPP(int)), this, SLOT(slotPostProcessingProgress(int)));
     97  connect(BNC_CORE, SIGNAL(finishedRnxPPP()),    this, SLOT(slotPostProcessingFinished()));
     98
     99  _runningRealTime    = false;
     100  _runningPPP         = false;
     101  _runningEdit        = false;
     102  _runningQC          = false;
     103  _reqcActionComboBox = 0; // necessary for enableStartStop()
    102104
    103105  _mapWin = 0;
     
    16721674  saveOptions();
    16731675  if      ( _pppWidgets._dataSource->currentText() == "RINEX Files") {
     1676    _runningPPP = true;
     1677    enableStartStop();
    16741678    BNC_CORE->startPPP();
    16751679  }
    16761680  else if ( !_reqcActionComboBox->currentText().isEmpty() ) {
    1677     startPostProcessingReqc();
     1681    if (_reqcActionComboBox->currentText() == "Analyze") {
     1682      _runningQC = true;
     1683      t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(this);
     1684      connect(reqcAnalyze, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
     1685      reqcAnalyze->start();
     1686    }
     1687    else {
     1688      _runningEdit = true;
     1689      t_reqcEdit* reqcEdit = new t_reqcEdit(this);
     1690      connect(reqcEdit, SIGNAL(finished()), this, SLOT(slotPostProcessingFinished()));
     1691      reqcEdit->start();
     1692    }
     1693    enableStartStop();
    16781694  }
    16791695  else {
     
    17491765////////////////////////////////////////////////////////////////////////////
    17501766void bncWindow::slotStop() {
    1751   int iRet = QMessageBox::question(this, "Stop", "Stop retrieving data?",
     1767  int iRet = QMessageBox::question(this, "Stop", "Stop retrieving/processing data?",
    17521768                                   QMessageBox::Yes, QMessageBox::No,
    17531769                                   QMessageBox::NoButton);
     
    17581774    delete _casterEph; _casterEph = 0;
    17591775    _runningRealTime = false;
     1776    _runningPPP      = false;
    17601777    enableStartStop();
    17611778  }
     
    23362353// Progress Bar Change
    23372354////////////////////////////////////////////////////////////////////////////
    2338 void bncWindow::slotPostProgress(int nEpo) {
    2339   if (_actStart) {
    2340     _actStart->setText(QString("%1 Epochs").arg(nEpo));
    2341   }
    2342 }
    2343 
    2344 // Start Post-Processing Reqc
    2345 ////////////////////////////////////////////////////////////////////////////
    2346 void bncWindow::startPostProcessingReqc() {
    2347   _runningPostProcessingReqc = true;
     2355void bncWindow::slotPostProcessingProgress(int nEpo) {
     2356  _actStart->setText(QString("%1 Epochs").arg(nEpo));
     2357}
     2358
     2359// Post-Processing Reqc Finished
     2360////////////////////////////////////////////////////////////////////////////
     2361void bncWindow::slotPostProcessingFinished() {
     2362  _runningPPP  = false;
     2363  _runningEdit = false;
     2364  _runningQC   = false;
    23482365  enableStartStop();
    2349   if (_reqcActionComboBox->currentText() == "Analyze") {
    2350     t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(this);
    2351     connect(reqcAnalyze, SIGNAL(finished()),
    2352             this, SLOT(slotFinishedPostProcessingReqc()));
    2353     reqcAnalyze->start();
    2354   }
    2355   else {
    2356     t_reqcEdit* reqcEdit = new t_reqcEdit(this);
    2357     connect(reqcEdit, SIGNAL(finished()),
    2358             this, SLOT(slotFinishedPostProcessingReqc()));
    2359     reqcEdit->start();
    2360   }
    2361 }
    2362 
    2363 // Post-Processing Reqc Finished
    2364 ////////////////////////////////////////////////////////////////////////////
    2365 void bncWindow::slotFinishedPostProcessingReqc() {
    2366   _runningPostProcessingReqc = false;
    2367   if (_reqcActionComboBox->currentText() != "Analyze") {
    2368     QMessageBox::information(this, "Information",
    2369                              "RINEX Processing Thread Finished");
    2370   }
    2371   enableStartStop();
    2372 }
    2373 
    2374 //
    2375 ////////////////////////////////////////////////////////////////////////////
    2376 void bncWindow::slotFinishedRnxPPP() {
    2377   if (_actStart) {
    2378     _actStart->setText(tr("Sta&rt"));
    2379   }
    23802366}
    23812367
     
    23922378////////////////////////////////////////////////////////////////////////////
    23932379void bncWindow::enableStartStop() {
    2394 
    2395   if ( _reqcActionComboBox && !_reqcActionComboBox->currentText().isEmpty() ) {
    2396     if (_runningPostProcessingReqc) {
    2397       _actStart->setEnabled(false);
    2398     }
    2399     else {
    2400       _actStart->setEnabled(true);
    2401     }
     2380  if ( running() ) {
     2381    _actStart->setEnabled(false);
     2382    if (_runningPPP) {
     2383      _actStop->setEnabled(true);
     2384    }
     2385  }
     2386  else {
     2387    _actStart->setEnabled(true);
    24022388    _actStop->setEnabled(false);
    2403   }
    2404   else {
    2405     if (_runningRealTime) {
    2406       _actStart->setEnabled(false);
    2407       _actStop->setEnabled(true);
    2408     }
    2409     else {
    2410       _actStop->setEnabled(false);
    2411       if (_mountPointsTable->rowCount() == 0) {
    2412         _actStart->setEnabled(false);
    2413       }
    2414       else {
    2415         _actStart->setEnabled(true);
    2416       }
    2417     }
    24182389  }
    24192390}
  • trunk/BNC/src/bncwindow.h

    r5943 r5971  
    9393    void slotSetUploadTrafo();
    9494    void slotReqcEditOption();
    95     void slotFinishedPostProcessingReqc();
    96     void slotPostProgress(int);
    97     void slotFinishedRnxPPP();
     95    void slotPostProcessingFinished();
     96    void slotPostProcessingProgress(int);
    9897
    9998  protected:
     
    107106    void enableWidget(bool enable, QWidget* widget);
    108107    void startRealTime();
    109     void startPostProcessingReqc();
    110108    void enableStartStop();
    111109
     
    223221
    224222    bool _runningRealTime;
    225     bool _runningPostProcessingReqc;
     223    bool _runningPPP;
     224    bool _runningEdit;
     225    bool _runningQC;
     226
     227    bool running() {return _runningRealTime || _runningPPP || _runningEdit || _runningQC;}
    226228
    227229    bncMapWin*           _mapWin;
Note: See TracChangeset for help on using the changeset viewer.