Changeset 7945 in ntrip for branches


Ignore:
Timestamp:
Jun 2, 2016, 11:18:43 AM (8 years ago)
Author:
stuerze
Message:

the approach how to wait for clock corrections in PPP mode, which was well proven in BNC verson 2.11 is now re-implemented

Location:
branches/BNC_2.12/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/bnchelp.html

    r7914 r7945  
    35843584<p><h4>2.13.3.7 <a name="pppwaitclockcorr">Wait for Clock Corrections - optional</h4></p>
    35853585<p>
    3586 Specifying 'no' for option 'Wait for clock corr.' means that BNC processes each epoch of data immediately after its arrival using satellite clock corrections available at that time. A non-zero value means that epochs of data are buffered and the processing of each epoch is postponed until satellite clock corrections older than 'Wait for clock corr.' seconds are available. Specifying a value of half the update rate of the clock corrections (e.g. 5 sec) may be appropriate. Note that this causes an additional delay of the PPP solutions in the amount of half of the update rate.
     3586Specifying 'no' for option 'Wait for clock corr.' means that BNC processes each epoch of data immediately after its arrival using satellite clock corrections available at that time. A non-zero value means that epochs of data are buffered and the processing of each epoch is postponed until satellite clock corrections not older than 'Wait for clock corr.' seconds are available. Specifying a value of half the update rate of the clock corrections (e.g. 5 sec) may be appropriate. Note that this causes an additional delay of the PPP solutions in the amount of half of the update rate.
    35873587</p>
    35883588<p>
  • branches/BNC_2.12/src/bncmain.cpp

    r7883 r7945  
    228228      "   PPP/minObs       {Minimum number of observations [integer number: 4|5|6]}\n"
    229229      "   PPP/minEle       {Minimum satellite elevation in degrees [integer number: 0-20]}\n"
    230       "   PPP/corrWaitTime {Wait for clock corrections [integer number of seconds: no|1-20]}\n"
     230      "   PPP/corrWaitTime {Wait for clock corrections [integer number of seconds: 0-20]}\n"
    231231      "   PPP/seedingTime  {Seeding time span for Quick Start [integer number of seconds]}\n"
    232232      "\n"
  • branches/BNC_2.12/src/pppMain.cpp

    r7858 r7945  
    178178    opt->_sigmaL1      = settings.value("PPP/sigmaL1").toDouble(); if (opt->_sigmaL1 <= 0.0) opt->_sigmaL1 = 0.01;
    179179    opt->_corrWaitTime = settings.value("PPP/corrWaitTime").toDouble();
     180    if (!_realTime || opt->_corrMount.empty()) {
     181      opt->_corrWaitTime = 0;
     182    }
    180183
    181184    if      (settings.value("PPP/lcGPS").toString() == "P1") {
  • branches/BNC_2.12/src/pppRun.cpp

    r7931 r7945  
    224224  delete _snxtroFile;
    225225  while (!_epoData.empty()) {
    226     delete _epoData.front(); 
     226    delete _epoData.front();
    227227    _epoData.pop_front();
    228228  }
     
    301301  }
    302302
     303  // Make sure the buffer does not grow beyond any limit
     304  // ---------------------------------------------------
     305  const unsigned MAX_EPODATA_SIZE = 120;
     306  if (_epoData.size() > MAX_EPODATA_SIZE) {
     307    delete _epoData.front();
     308    _epoData.pop_front();
     309  }
     310
    303311  // Process the oldest epochs
    304312  // ------------------------
    305   while (_epoData.size() && !waitForCorr(_epoData.front()->_time)) {
     313  while (_epoData.size()) {
    306314
    307315    const vector<t_satObs*>& satObs = _epoData.front()->_satObs;
    308316
    309     t_output output;
    310     _pppClient->processEpoch(satObs, &output);
    311 
    312     if (!output._error) {
    313       QVector<double> xx(6);
    314       xx.data()[0] = output._xyzRover[0];
    315       xx.data()[1] = output._xyzRover[1];
    316       xx.data()[2] = output._xyzRover[2];
    317       xx.data()[3] = output._neu[0];
    318       xx.data()[4] = output._neu[1];
    319       xx.data()[5] = output._neu[2];
    320       emit newPosition(staID, output._epoTime, xx);
    321     }
    322 
    323     delete _epoData.front(); _epoData.pop_front();
    324 
    325     ostringstream log;
    326     if (output._error) {
    327       log << output._log;
     317    // No corrections yet, skip the epoch
     318    // ----------------------------------
     319    if (_opt->_corrWaitTime && !_lastClkCorrTime.valid()) {
     320      return;
     321    }
     322
     323    // Process the front epoch
     324    // -----------------------
     325    if (_opt->_corrWaitTime == 0 ||
     326        _epoData.front()->_time - _lastClkCorrTime < _opt->_corrWaitTime) {
     327
     328      t_output output;
     329      _pppClient->processEpoch(satObs, &output);
     330
     331      if (!output._error) {
     332        QVector<double> xx(6);
     333        xx.data()[0] = output._xyzRover[0];
     334        xx.data()[1] = output._xyzRover[1];
     335        xx.data()[2] = output._xyzRover[2];
     336        xx.data()[3] = output._neu[0];
     337        xx.data()[4] = output._neu[1];
     338        xx.data()[5] = output._neu[2];
     339        emit newPosition(staID, output._epoTime, xx);
     340      }
     341
     342      delete _epoData.front();
     343      _epoData.pop_front();
     344
     345      ostringstream log;
     346      if (output._error) {
     347        log << output._log;
     348      }
     349      else {
     350        log.setf(ios::fixed);
     351        log << string(output._epoTime) << ' ' << staID.data()
     352            << " X = "  << setprecision(4) << output._xyzRover[0]
     353            << " Y = "  << setprecision(4) << output._xyzRover[1]
     354            << " Z = "  << setprecision(4) << output._xyzRover[2]
     355            << " NEU: " << showpos << setw(8) << setprecision(4) << output._neu[0]
     356            << " "      << showpos << setw(8) << setprecision(4) << output._neu[1]
     357            << " "      << showpos << setw(8) << setprecision(4) << output._neu[2]
     358            << " TRP: " << showpos << setw(8) << setprecision(4) << output._trp0
     359            << " "      << showpos << setw(8) << setprecision(4) << output._trp;
     360      }
     361
     362      if (_logFile && output._epoTime.valid()) {
     363        _logFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(),
     364                        QString(output._log.c_str()));
     365      }
     366
     367      if (!output._error) {
     368        QString rmcStr = nmeaString('R', output);
     369        QString ggaStr = nmeaString('G', output);
     370        if (_nmeaFile) {
     371          _nmeaFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(), rmcStr);
     372          _nmeaFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(), ggaStr);
     373        }
     374        emit newNMEAstr(staID, rmcStr.toAscii());
     375        emit newNMEAstr(staID, ggaStr.toAscii());
     376        if (_snxtroFile && output._epoTime.valid()) {
     377          _snxtroFile->write(staID, int(output._epoTime.gpsw()), output._epoTime.gpssec(),
     378                             output._trp0 + output._trp, output._trpStdev);
     379        }
     380      }
     381      emit newMessage(QByteArray(log.str().c_str()), true);
    328382    }
    329383    else {
    330       log.setf(ios::fixed);
    331       log << string(output._epoTime) << ' ' << staID.data()
    332           << " X = "  << setprecision(4) << output._xyzRover[0]
    333           << " Y = "  << setprecision(4) << output._xyzRover[1]
    334           << " Z = "  << setprecision(4) << output._xyzRover[2]
    335           << " NEU: " << showpos << setw(8) << setprecision(4) << output._neu[0]
    336           << " "      << showpos << setw(8) << setprecision(4) << output._neu[1]
    337           << " "      << showpos << setw(8) << setprecision(4) << output._neu[2]
    338           << " TRP: " << showpos << setw(8) << setprecision(4) << output._trp0
    339           << " "      << showpos << setw(8) << setprecision(4) << output._trp;
    340     }
    341 
    342     if (_logFile && output._epoTime.valid()) {
    343       _logFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(),
    344                       QString(output._log.c_str()));
    345     }
    346 
    347     if (!output._error) {
    348       QString rmcStr = nmeaString('R', output);
    349       QString ggaStr = nmeaString('G', output);
    350       if (_nmeaFile) {
    351         _nmeaFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(), rmcStr);
    352         _nmeaFile->write(output._epoTime.gpsw(), output._epoTime.gpssec(), ggaStr);
    353       }
    354       emit newNMEAstr(staID, rmcStr.toAscii());
    355       emit newNMEAstr(staID, ggaStr.toAscii());
    356       if (_snxtroFile && output._epoTime.valid()) {
    357         _snxtroFile->write(staID, int(output._epoTime.gpsw()), output._epoTime.gpssec(),
    358                     output._trp0 + output._trp, output._trpStdev);
    359       }
    360     }
    361 
    362     emit newMessage(QByteArray(log.str().c_str()), true);
    363   }
    364 }
    365 
     384      return;
     385    }
     386  }
     387}
    366388//
    367389////////////////////////////////////////////////////////////////////////////
     
    656678}
    657679
    658 //
    659 ////////////////////////////////////////////////////////////////////////////
    660 bool t_pppRun::waitForCorr(const bncTime& epoTime) const {
    661 
    662   if (!_opt->_realTime || _opt->_corrMount.empty()) {
    663     return false;
    664   }
    665   else if (!_lastClkCorrTime.valid()) {
    666     return true;
    667   }
    668   else {
    669     double dt = epoTime - _lastClkCorrTime;
    670     if (dt > 1.0 && dt < _opt->_corrWaitTime) {
    671       return true;
    672     }
    673     else {
    674       return false;
    675     }
    676   }
    677   return false;
    678 }
  • branches/BNC_2.12/src/pppRun.h

    r7288 r7945  
    6262  };
    6363
    64   bool waitForCorr(const bncTime& epoTime) const;
    65 
    6664  QMutex                 _mutex;
    6765  const t_pppOptions*    _opt;
  • branches/BNC_2.12/src/pppWidgets.cpp

    r7764 r7945  
    163163  _corrWaitTime->setSingleStep(1);
    164164  _corrWaitTime->setSuffix(" sec");
    165   _corrWaitTime->setSpecialValueText("no");
    166165
    167166  _staTable->setColumnCount(10);
     
    194193  // WhatsThis, PPP (3)
    195194  // ------------------
    196   _corrWaitTime->setWhatsThis(tr("<p>Specifying 'no' means that BNC will not wait for satellite clock corrections and process each epoch of observation data immediately after arrival using the corrections available at that time.</p><p>Specifying a non-zero value (i.e. 5 sec) means that data will be buffered and their processing is postponed till corrections not older than '5 sec' (example) become available.</p>"));
     195  _corrWaitTime->setWhatsThis(tr("<p>Zero value means that BNC processes each epoch of data immediately after its arrival using satellite clock corrections available at that time.</p><p> Specifying a non-zero value (i.e. 5 sec) means that the epochs of data are buffered and the processing of each epoch is postponed till the satellite clock corrections not older than '5 sec' (example) become available.<p>"));
    197196  _seedingTime->setWhatsThis(tr("<p>Enter the length of a startup period in seconds for which you want to fix the PPP solutions to known a priori coordinates as introduced through option 'Coordinates file'. Adjust 'Sigma N/E/H' in the PPP Stations table according to the coordinate's precision. Fixing a priori coordinates is done in BNC through setting 'Sigma N/E/H' temporarily to zero.</p><p>This option allows the PPP solution to rapidly converge. It requires that the antenna remains unmoved on the a priori known position throughout the startup period.</p><p>A value of 60 is likely to be an appropriate choice.</p><p>Default is an empty option field, meaning that you don't want BNC to fix PPP solutions during startup to an a priori coordinate.</p>"));
    198197
Note: See TracChangeset for help on using the changeset viewer.