Changeset 668 in ntrip for trunk/BNC


Ignore:
Timestamp:
Jan 30, 2008, 5:32:02 PM (16 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bncgetthread.cpp

    r659 r668  
    107107  // ----------------
    108108  _inspSegm = settings.value("inspSegm").toInt();
    109   _noticeFail = settings.value("noticeFail").toInt();
    110   _noticeReco = settings.value("noticeReco").toInt();
    111   _noticeScript = settings.value("noticeScript").toString();
    112   expandEnvVar(_noticeScript);
     109  _adviseFail = settings.value("adviseFail").toInt();
     110  _adviseReco = settings.value("adviseReco").toInt();
     111  _adviseScript = settings.value("adviseScript").toString();
     112  expandEnvVar(_adviseScript);
    113113
    114114  // RINEX writer
     
    395395    initPause = _inspSegm;
    396396  }
    397   if ( _noticeFail < 1 && _noticeReco < 1 ) {
     397  if ( _adviseFail < 1 && _adviseReco < 1 ) {
    398398    initPause = 0;
    399399  }
     
    448448            if (numSucc>0) {
    449449              secSucc += _inspSegm;
    450               if (secSucc > _noticeReco * 60) {
    451                 secSucc = _noticeReco * 60 + 1;
     450              if (secSucc > _adviseReco * 60) {
     451                secSucc = _adviseReco * 60 + 1;
    452452              }
    453453              numSucc = 0;
     
    459459              secFail += _inspSegm;
    460460              secSucc = 0;
    461               if (secFail > _noticeFail * 60) {
    462                 secFail = _noticeFail * 60 + 1;
     461              if (secFail > _adviseFail * 60) {
     462                secFail = _adviseFail * 60 + 1;
    463463              }
    464464              if (!_decodePause.isValid()) {
     
    478478            // End corrupt threshold
    479479            // ---------------------
    480             if ( begCorrupt && !endCorrupt && secSucc > _noticeReco * 60 ) {
     480            if ( begCorrupt && !endCorrupt && secSucc > _adviseReco * 60 ) {
    481481              emit(newMessage(_staID + ": End_Corrupted, Recovery threshold exceeded"));
    482482              callScript("End_Corrupted");
     
    489489              // Begin corrupt threshold
    490490              // -----------------------
    491               if ( !begCorrupt && secFail > _noticeFail * 60 ) {
     491              if ( !begCorrupt && secFail > _adviseFail * 60 ) {
    492492                emit(newMessage(_staID + ": Begin_Corrupted, Failure threshold exceeded"));
    493493                callScript("Begin_Corrupted");
     
    505505      // End outage threshold
    506506      // --------------------
    507       if ( _decodeStart.isValid() && _decodeStart.secsTo(QDateTime::currentDateTime()) > _noticeReco * 60 ) {
     507      if ( _decodeStart.isValid() && _decodeStart.secsTo(QDateTime::currentDateTime()) > _adviseReco * 60 ) {
    508508        _decodeStart.setDate(QDate());
    509509        _decodeStart.setTime(QTime());
     
    610610      // Begin outage threshold
    611611      // ----------------------
    612       if ( _decodeStop.isValid() && _decodeStop.secsTo(QDateTime::currentDateTime()) > _noticeFail * 60 ) {
     612      if ( _decodeStop.isValid() && _decodeStop.secsTo(QDateTime::currentDateTime()) > _adviseFail * 60 ) {
    613613        _decodeStop.setDate(QDate());
    614614        _decodeStop.setTime(QTime());
     
    626626}
    627627
    628 // Call notice advisory script   
     628// Call advisory notice script   
    629629////////////////////////////////////////////////////////////////////////////
    630630void bncGetThread::callScript(const char* _comment) {
    631   if (!_noticeScript.isEmpty()) {
     631  if (!_adviseScript.isEmpty()) {
    632632#ifdef WIN32
    633     QProcess::startDetached(_noticeScript, QStringList() << _staID << _comment) ;
     633    QProcess::startDetached(_adviseScript, QStringList() << _staID << _comment) ;
    634634#else
    635     QProcess::startDetached("nohup", QStringList() << _noticeScript << _staID << _comment) ;
     635    QProcess::startDetached("nohup", QStringList() << _adviseScript << _staID << _comment) ;
    636636#endif
    637637  }
  • trunk/BNC/bncgetthread.h

    r658 r668  
    7575   QByteArray  _longitude;
    7676   QByteArray  _nmea;
    77    QString     _noticeScript;
     77   QString     _adviseScript;
    7878   int         _inspSegm;
    79    int         _noticeFail;
    80    int         _noticeReco;
     79   int         _adviseFail;
     80   int         _adviseReco;
    8181   int         _timeOut;
    8282   int         _nextSleep;
  • trunk/BNC/bnchelp.html

    r667 r668  
    770770<pre>
    771771[General]
     772adviseFail=15
     773adviseReco=5
     774adviseScript=
    772775casterHost=www.euref-ip.net
    773776casterPassword=pass
     
    780783logFile=/home/user/log.txt
    781784mountPoints=//user:pass@www.euref-ip.net:2101/ACOR0 RTCM_2.3 43.36 351.60 no, //user:pass@www.igs-ip.net:2101/FFMJ3 RTCM_3.0 41.58 1.40 no
    782 noticeFail=15
    783 noticeReco=5
    784 noticeScript=
    785785outEphPort=2102
    786786outFile=/home/user/ascii
  • trunk/BNC/bncmain.cpp

    r658 r668  
    8282    settings.setValue("waitTime",   5);
    8383    settings.setValue("inspSegm",   "15");
    84     settings.setValue("noticeFail", "15");
    85     settings.setValue("noticeReco", "5");
     84    settings.setValue("adviseFail", "15");
     85    settings.setValue("adviseReco", "5");
    8686  }
    8787
  • trunk/BNC/bncwindow.cpp

    r666 r668  
    207207  _inspSegmSpinBox->setSuffix(" sec");
    208208  _inspSegmSpinBox->setWhatsThis(tr("<p>BNC can collect all returns (success or failure) coming from a decoder within a certain short time span (Inspect segment) to then decide whether a stream content is corrupted or not. When a continuous problem is detected, BNC can inform its operator about this event through an Advisory note. A value of about 15 sec (default) as 'Inspect segment' is recommended when handling 1Hz data.</p><p>A value of zero '0' means that you don't want BNC to inform you about incoming data that can not be decoded.</p>"));
    209   _noticeRecoSpinBox = new QSpinBox();
    210   _noticeRecoSpinBox->setMinimum(0);
    211   _noticeRecoSpinBox->setMaximum(60);
    212   _noticeRecoSpinBox->setSingleStep(1);
    213   _noticeRecoSpinBox->setSuffix(" min");
    214   _noticeRecoSpinBox->setMaximumWidth(9*ww);
    215   _noticeRecoSpinBox->setValue(settings.value("noticeReco").toInt());
    216   _noticeRecoSpinBox->setWhatsThis(tr("<p>Following a stream outage or a longer series of corrupted observations, an Advisory note is generated when at least one valid observation is received again within the 'Recovery' threshold time span defined here. A value of about 5min (default) is recommendable.</p><p>A value of zero '0' means that for any stream recovery BNC immediately generates an Advisory note!</p><p>Note that using this function for corrupted streams needs an 'Inspect segment' greater zero '0'.</p>"));
    217   _noticeFailSpinBox = new QSpinBox();
    218   _noticeFailSpinBox->setMinimum(0);
    219   _noticeFailSpinBox->setMaximum(60);
    220   _noticeFailSpinBox->setSingleStep(1);
    221   _noticeFailSpinBox->setSuffix(" min");
    222   _noticeFailSpinBox->setMaximumWidth(9*ww);
    223   _noticeFailSpinBox->setValue(settings.value("noticeFail").toInt());
    224   _noticeFailSpinBox->setWhatsThis(tr("<p>An Advisory note is generated when no (or corrupted) observations are received throughout the 'Failure' threshold time span defined here. A value of about 15 min (default) is recommendable.</p><p>A value of zero '0' means that for any stream failure BNC immediately generates an Advisory note!</p><p>Note that using this function for corrupted streams needs an 'Inspect segment' greater zero '0'.</p>"));
     209  _adviseRecoSpinBox = new QSpinBox();
     210  _adviseRecoSpinBox->setMinimum(0);
     211  _adviseRecoSpinBox->setMaximum(60);
     212  _adviseRecoSpinBox->setSingleStep(1);
     213  _adviseRecoSpinBox->setSuffix(" min");
     214  _adviseRecoSpinBox->setMaximumWidth(9*ww);
     215  _adviseRecoSpinBox->setValue(settings.value("asviseReco").toInt());
     216  _adviseRecoSpinBox->setWhatsThis(tr("<p>Following a stream outage or a longer series of corrupted observations, an Advisory note is generated when at least one valid observation is received again within the 'Recovery' threshold time span defined here. A value of about 5min (default) is recommendable.</p><p>A value of zero '0' means that for any stream recovery BNC immediately generates an Advisory note!</p><p>Note that using this function for corrupted streams needs an 'Inspect segment' greater zero '0'.</p>"));
     217  _adviseFailSpinBox = new QSpinBox();
     218  _adviseFailSpinBox->setMinimum(0);
     219  _adviseFailSpinBox->setMaximum(60);
     220  _adviseFailSpinBox->setSingleStep(1);
     221  _adviseFailSpinBox->setSuffix(" min");
     222  _adviseFailSpinBox->setMaximumWidth(9*ww);
     223  _adviseFailSpinBox->setValue(settings.value("asviseFail").toInt());
     224  _adviseFailSpinBox->setWhatsThis(tr("<p>An Advisory note is generated when no (or corrupted) observations are received throughout the 'Failure' threshold time span defined here. A value of about 15 min (default) is recommendable.</p><p>A value of zero '0' means that for any stream failure BNC immediately generates an Advisory note!</p><p>Note that using this function for corrupted streams needs an 'Inspect segment' greater zero '0'.</p>"));
    225225  _logFileLineEdit    = new QLineEdit(settings.value("logFile").toString());
    226226  _logFileLineEdit->setWhatsThis(tr("<p>Records of BNC's activities are shown in the 'Log' section below. They can be saved into a file when a valid path is specified in the 'Log (full path)' field.</p>"));
    227   _noticeScriptLineEdit    = new QLineEdit(settings.value("noticeScript").toString());
    228   _noticeScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle Advisory notes generated in case of corrupted streams of stream outages. The affected mountpoint and one of the comments 'Begin_Outage', 'End_Outage', 'Begin_Currupted', or 'End_Corrupted' are passed on to the script as two command line parameters.</p><p>The script may be used to send an email to BNC's operator and/or to the affected streamprovider. An empty option field or invalid path means that you don't want to use this option.</p>"));
     227  _adviseScriptLineEdit    = new QLineEdit(settings.value("asviseScript").toString());
     228  _adviseScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle Advisory notes generated in case of corrupted streams of stream outages. The affected mountpoint and one of the comments 'Begin_Outage', 'End_Outage', 'Begin_Currupted', or 'End_Corrupted' are passed on to the script as two command line parameters.</p><p>The script may be used to send an email to BNC's operator and/or to the affected streamprovider. An empty option field or invalid path means that you don't want to use this option.</p>"));
    229229  _mountPointsTable   = new QTableWidget(0,7);
    230230  _mountPointsTable->setWhatsThis(tr("<p>Streams selected for retrieval are listed in the 'Mountpoints' section. Button 'Add Mountpoints' opens a window that allows the user to select data streams from an NTRIP broadcaster according to their mountpoints. To remove a stream from the 'Mountpoints' list, highlight it by clicking on it and hit the 'Delete Mountpoints' button. You can also remove multiple mountpoints simultaneously by highlighting them using +Shift and +Ctrl.</p><p>BNC automatically allocates one of its internal decoders to a stream based on the stream's 'format' and 'format-details' as given in the source-table. However, there might be cases where you need to override the automatic selection due to incorrect source-table for example. BNC allows users to manually select the required decoder by editing the decoder string. Doubleclick on the 'decoder' field, enter your preferred decoder and then hit Enter. The accepted decoder strings are 'RTCM_2.x', 'RTCM_3.x', and 'RTIGS'.</p><p>In case you need to log the raw data as is, BNC allows users to by-pass its decoders and and directly save the input in daily log files. To do this specify the decoder string as 'ZERO'.</p><p>BNC can also retrieve streams from virtual reference stations (VRS). To initiate these streams, an approximate rover position needs to be sent in NMEA format to the NTRIP broadcaster. In return, a user-specific data stream is generated, typically by a Network-RTK software. This stream is customized to the exact latitude and longitude as shown in the 'lat' and 'long' columns under 'Mountpoints'. These VRS streams are indicated by a 'yes' in the 'nmea' column under 'Mountpoints' as well as in the source-table. The default 'lat' and 'long' values are taken from the source-table. However, in most cases you would probably want to change this according to your requirement. Double-click on 'lat' and 'long' fields, enter the values you wish to send and then hit Enter. The format is in positive north latitude degrees (e.g. for northern hemisphere: 52.436, for southern hemisphere: -24.567) and eastern longitude degrees (example: 358.872 or -1.128). Only mountpoints with a 'yes' in its 'nmea' column can be edited. The position must preferably be a point within the service area of the network.</p>"));
     
    362362  layout->addWidget(new QLabel("Advisory thresholds"),           9, 0, 1, 2);
    363363  QBoxLayout* bl2 = new QBoxLayout(QBoxLayout::LeftToRight);
    364   bl2->addWidget(_noticeFailSpinBox);
     364  bl2->addWidget(_adviseFailSpinBox);
    365365  bl2->addWidget(new QLabel("Failure"));
    366   bl2->addWidget(_noticeRecoSpinBox);
     366  bl2->addWidget(_adviseRecoSpinBox);
    367367  bl2->addWidget(new QLabel("Recovery"));
    368368  bl2->addWidget(new QLabel("Inspect segment"));
     
    371371
    372372  layout->addWidget(new QLabel("Advisory script (full path)"),  10, 0, 1, 2);
    373   layout->addWidget(_noticeScriptLineEdit,                      10, 2, 1, 3);
     373  layout->addWidget(_adviseScriptLineEdit,                      10, 2, 1, 3);
    374374
    375375  layout->addWidget(new QLabel("Mountpoints"),                  11, 0, 1, 2);
     
    507507  settings.setValue("waitTime",    _waitTimeSpinBox->value());
    508508  settings.setValue("inspSegm",    _inspSegmSpinBox->value());
    509   settings.setValue("noticeFail",  _noticeFailSpinBox->value());
    510   settings.setValue("noticeReco",  _noticeRecoSpinBox->value());
     509  settings.setValue("adviseFail",  _adviseFailSpinBox->value());
     510  settings.setValue("adviseReco",  _adviseRecoSpinBox->value());
    511511  settings.setValue("outFile",     _outFileLineEdit->text());
    512512  settings.setValue("outPort",     _outPortLineEdit->text());
     
    523523  settings.setValue("ephV3",       _ephV3CheckBox->checkState());
    524524  settings.setValue("logFile",     _logFileLineEdit->text());
    525   settings.setValue("noticeScript",_noticeScriptLineEdit->text());
     525  settings.setValue("adviseScript",_adviseScriptLineEdit->text());
    526526 
    527527QStringList mountPoints;
  • trunk/BNC/bncwindow.h

    r658 r668  
    9393    QSpinBox*  _waitTimeSpinBox;
    9494    QSpinBox*  _inspSegmSpinBox;
    95     QSpinBox*  _noticeFailSpinBox;
    96     QSpinBox*  _noticeRecoSpinBox;
    97     QLineEdit* _noticeScriptLineEdit;
     95    QSpinBox*  _adviseFailSpinBox;
     96    QSpinBox*  _adviseRecoSpinBox;
     97    QLineEdit* _adviseScriptLineEdit;
    9898    QTableWidget* _mountPointsTable;
    9999
Note: See TracChangeset for help on using the changeset viewer.