Changeset 1079 in ntrip


Ignore:
Timestamp:
Aug 29, 2008, 4:43:59 PM (16 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/RTCM3Decoder.cpp

    r1044 r1079  
    6868  QSettings settings;
    6969  _checkMountPoint = settings.value("messTypes").toString();
    70   _corrLate = settings.value("corrLate").toInt();
    7170  _staID = staID;
     71
     72  // Latency
     73  _numLat = 0;
     74  _minLat = 1000.;
     75  _maxLat = -1000.;
     76  _sumLat = 0.;
     77  _sumLatQ = 0.;
     78  _followSec = false;
     79  _meanDiff = 0.;
     80  _diffSecGPS= 0.;
     81  _numGaps = 0;
     82  _oldSecGPS = 0.;
     83  _newSecGPS = 0.;
     84  _curLat = 0.;
     85  _perfIntr = 86400;
     86  if ( settings.value("perfIntr").toString().isEmpty() ) { _perfIntr = 0; }
     87  if ( settings.value("perfIntr").toString().indexOf("1 min") != -1 ) { _perfIntr = 60; }
     88  if ( settings.value("perfIntr").toString().indexOf("5 min") != -1 ) { _perfIntr = 300; }
     89  if ( settings.value("perfIntr").toString().indexOf("15 min") != -1 ) { _perfIntr = 900; }
     90  if ( settings.value("perfIntr").toString().indexOf("1 hour") != -1 ) { _perfIntr = 3600; }
     91  if ( settings.value("perfIntr").toString().indexOf("6 hours") != -1 ) { _perfIntr = 21600; }
     92  if ( settings.value("perfIntr").toString().indexOf("1 day") != -1 ) { _perfIntr = 86400; }
    7293
    7394  // Ensure, that the Decoder uses the "old" convention for the data structure for Rinex2. Perlt
     
    113134      decoded = true;
    114135
    115       // Latency, Weber
     136      // Latency
    116137      // -------
    117       if ( _corrLate == 2 ) {
     138      if (_perfIntr>0) {
    118139        if (0<_coDecoder->_epochList.size()) {
    119140          for (int ii=0;ii<_coDecoder->_epochList.size();ii++) {
    120141            int week;
    121142            double sec;
    122             double secGPS = _coDecoder->_epochList[ii];
     143            _newSecGPS = _coDecoder->_epochList[ii];
    123144            leapsecGPSWeeks(week, sec);
    124             double dt = fabs(sec - secGPS);
     145            double dt = fabs(sec - _newSecGPS);
    125146            const double secPerWeek = 7.0 * 24.0 * 3600.0;
    126147            if (dt > 0.5 * secPerWeek) {
    127               if (sec > secGPS) {
     148              if (sec > _newSecGPS) {
    128149                sec  -= secPerWeek;
    129150              } else {
     
    131152              }
    132153            }
    133             QString late;
    134             late = QString("%1 ").arg(int((sec - secGPS)*100.)/100.);
    135             if (late != "") {
    136               emit(newMessage(QString(_staID + ": Latency " + late + "sec").toAscii() ) );
     154            if (_newSecGPS != _oldSecGPS) {
     155              if (int(_newSecGPS) % _perfIntr < int(_oldSecGPS) % _perfIntr) {
     156                if (_numLat>0) {
     157                  QString late;
     158                  if (_meanDiff>0.) {
     159                    late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs, %6 gaps")
     160                    .arg(int(_sumLat/_numLat*100)/100.)
     161                    .arg(int(_minLat*100)/100.)
     162                    .arg(int(_maxLat*100)/100.)
     163                    .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.)
     164                    .arg(_numLat)
     165                    .arg(_numGaps);
     166                    emit(newMessage(QString(_staID + late ).toAscii() ) );
     167                  } else {
     168                  late = QString(": Mean latency %1 sec, min %2, max %3, rms %4, %5 epochs")
     169                    .arg(int(_sumLat/_numLat*100)/100.)
     170                    .arg(int(_minLat*100)/100.)
     171                    .arg(int(_maxLat*100)/100.)
     172                    .arg(int((sqrt((_sumLatQ - _sumLat * _sumLat / _numLat)/_numLat))*100)/100.)
     173                    .arg(_numLat);
     174                  emit(newMessage(QString(_staID + late ).toAscii() ) );
     175                  }
     176                }
     177                _meanDiff = int(_diffSecGPS)/_numLat;
     178                _diffSecGPS = 0.;
     179                _numGaps = 0;
     180                _sumLat = 0.;
     181                _sumLatQ = 0.;
     182                _numLat = 0;
     183                _minLat = 1000.;
     184                _maxLat = -1000.;
     185              }
     186              if (_followSec) {
     187                _diffSecGPS += _newSecGPS - _oldSecGPS;
     188                if (_meanDiff>0.) {
     189                  if (_newSecGPS - _oldSecGPS > 1.5 * _meanDiff) {
     190                    _numGaps += 1;
     191                  }
     192                }
     193              }
     194              _curLat = sec - _newSecGPS;
     195              _sumLat += _curLat;
     196              _sumLatQ += _curLat * _curLat;
     197              if (_curLat < _minLat) {_minLat = _curLat;}
     198              if (_curLat >= _maxLat) {_maxLat = _curLat;}
     199              _numLat += 1;
     200              _oldSecGPS = _newSecGPS;
     201              _followSec = true;
    137202            }
    138203          }
  • trunk/BNC/RTCM3/RTCM3Decoder.h

    r1035 r1079  
    5050  QString                _staID;
    5151  QString                _checkMountPoint;
    52   int                    _corrLate;
    5352  struct RTCM3ParserData _Parser;
    5453  RTCM3coDecoder*        _coDecoder;
    5554  t_mode                 _mode;
     55  int _perfIntr;
     56  int _numLat;
     57  int _numGaps;
     58  bool _followSec;
     59  double _curLat;
     60  double _sumLat;
     61  double _sumLatQ;
     62  double _minLat;
     63  double _maxLat;
     64  double _newSecGPS;
     65  double _oldSecGPS;
     66  double _diffSecGPS;
     67  double _meanDiff;
    5668} ;
    5769
  • trunk/BNC/bncmain.cpp

    r1035 r1079  
    8989    settings.setValue("corrTime",   "5");
    9090    settings.setValue("messTypes",  "");
    91     settings.setValue("corrLate",   0);
    9291  }
    9392
  • trunk/BNC/bncwindow.cpp

    r1044 r1079  
    127127  _ephPathLineEdit    = new QLineEdit(settings.value("ephPath").toString());
    128128  _corrPathLineEdit    = new QLineEdit(settings.value("corrPath").toString());
    129   _corrLateCheckBox  = new QCheckBox();
    130   _corrLateCheckBox->setCheckState(Qt::CheckState(
    131                                     settings.value("corrLate").toInt()));
    132129
    133130  _rnxV3CheckBox = new QCheckBox();
     
    315312  _rnxScrpLineEdit->setWhatsThis(tr("<p>Whenever a RINEX Observation file is saved, you might want to compress, copy or upload it immediately via FTP. BNC allows you to execute a script/batch file to carry out these operations. To do that specify the full path of the script/batch file here. BNC will pass the full RINEX Observation file path to the script as a command line parameter (%1 on Windows systems, $1 onUnix/Linux systems).</p><p>The triggering event for calling the script or batch file is the end of a RINEX Observation file 'Interval'. If that is overridden by a stream outage, the triggering event is the stream reconnection.</p>"));
    316313  _rnxSkelLineEdit->setWhatsThis(tr("<p>Whenever BNC starts generating RINEX Observation files (and then once every day at midnight), it first tries to retrieve information needed for RINEX headers from so-called public RINEX header skeleton files which are derived from sitelogs. However, sometimes public RINEX header skeleton files are not available, its contents is not up to date, or you need to put additional/optional records in the RINEX header.</p><p>For that BNC allows using personal skeleton files that contain the header records you would like to include. You can derive a personal RINEX header skeleton file from the information given in an up to date sitelog. A file in the RINEX 'Directory' with the RINEX 'Skeleton extension' is interpreted by BNC as a personal RINEX header skeleton file for the corresponding stream.</p>"));
    317   _corrLateCheckBox->setWhatsThis(tr("<p>Log latency of Broadcast Ephemeris Corrections.</p>"));
    318314  _rnxAppendCheckBox->setWhatsThis(tr("<p>When BNC is started, new files are created by default and any existing files with the same name will be overwritten. However, users might want to append already existing files following a restart of BNC, a system crash or when BNC crashed. Tick 'Append files' to continue with existing files and keep what has been recorded so far.</p>"));
    319315  _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file.</p>"));
     
    328324  _logFileLineEdit->setWhatsThis(tr("Records of BNC's activities are shown in the Log section on the bottom of this window. They can be saved into a file when a valid path is specified in the 'Logfile (full path)' field."));
    329325  _adviseScriptLineEdit->setWhatsThis(tr("<p>Specify the full path to a script or batch file to handle advisory notes generated in the event of corrupted streams or stream outages. The affected mountpoint and one of the comments 'Begin_Outage', 'End_Outage', 'Begin_Corrupted', or 'End_Corrupted' are passed on to the script as command line parameters.</p><p>The script can be configured to send an email to BNC's operator and/or to the affected stream provider. An empty option field (default) or invalid path means that you don't want to use this option.</p><p> Note that for using this function you need to specify the 'Observation rate'.</p>"));
    330   _perfIntrComboBox->setWhatsThis(tr("<p>BNC can average all observation latencies per stream over a certain period of GPS time. The resulting mean latencies of observations are recorded in the Log file/section at the end of each 'Performance log' interval together with results of a statistical evaluation (approximate number of covered epochs, data gaps).</p><p>Select a 'Performance log' interval or select the empty option field if you do not want BNC to log latencies and statistical information.</p>"));
     326  _perfIntrComboBox->setWhatsThis(tr("<p>BNC can average latencies per stream over a certain period of GPS time. The resulting mean latencies are recorded in the Log file/section at the end of each 'Performance log' interval together with results of a statistical evaluation (approximate number of covered epochs, data gaps).</p><p>Select a 'Performance log' interval or select the empty option field if you do not want BNC to log latencies and statistical information.</p>"));
    331327  _mountPointsTable->setWhatsThis(tr("<p>Streams selected for retrieval are listed in the 'Mountpoints' section. Clicking on 'Add Mountpoints' button will open 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 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 sourcetable. However, there might be cases where you need to override the automatic selection due to incorrect sourcetable for example. BNC allows users to manually select the required decoder by editing the decoder string. Double click 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 GGA message 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 sourcetable. The default 'lat' and 'long' values are taken from the sourcetable. 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 (e.g.: 358.872 or -1.128). Only mountpoints with a 'yes' in its 'nmea' column can be edited. The position should preferably be a point within the coverage of the network.</p>"));
    332328  _log->setWhatsThis(tr("Records of BNC's activities are shown in the Log section. The message log covers the communication status between BNC and the NTRIP broadcaster as well as any problems that occur in the communication link, stream availability, stream delay, stream conversion etc."));
     
    466462  cLayout->addWidget(new QLabel("Wait for full epoch"),           3, 0);
    467463  cLayout->addWidget(_corrTimeSpinBox,                            3, 1);
    468   cLayout->addWidget(new QLabel("Latency log"),                   4, 0);
    469   cLayout->addWidget(_corrLateCheckBox,                           4, 1);
    470   cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),5,0,1,2,Qt::AlignLeft);
     464  cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),4,0,1,2,Qt::AlignLeft);
     465  cLayout->addWidget(new QLabel("    "),5,0);
    471466  cgroup->setLayout(cLayout);
    472467
     
    624619  settings.setValue("rnxSkel",     _rnxSkelLineEdit->text());
    625620  settings.setValue("rnxAppend",   _rnxAppendCheckBox->checkState());
    626   settings.setValue("corrLate",    _corrLateCheckBox->checkState());
    627621  settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
    628622  settings.setValue("ephV3",       _ephV3CheckBox->checkState());
  • trunk/BNC/bncwindow.h

    r1035 r1079  
    116116    QSpinBox*  _binSamplSpinBox;
    117117    QCheckBox* _rnxAppendCheckBox;
    118     QCheckBox* _corrLateCheckBox;
    119118    QCheckBox* _makePauseCheckBox;
    120119    QSpinBox*  _waitTimeSpinBox;
Note: See TracChangeset for help on using the changeset viewer.