Changeset 1035 in ntrip


Ignore:
Timestamp:
Aug 15, 2008, 6:31:34 PM (16 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM/GPSDecoder.h

    r1030 r1035  
    103103  QList<p_obs> _obsList;
    104104  QList<int> _typeList; // RTCM message types
     105  QList<int> _epochList; // RTCM message types
    105106};
    106107
  • trunk/BNC/RTCM3/RTCM3Decoder.cpp

    r1034 r1035  
    4747#include "bncconst.h"
    4848#include "bncapp.h"
     49#include "bncutils.h" /* Weber, for latencies */
    4950
    5051using namespace std;
     
    6768  QSettings settings;
    6869  _checkMountPoint = settings.value("messTypes").toString();
     70  _corrLate = settings.value("corrLate").toInt();
    6971  _staID = staID;
    7072
     
    110112    if ( _coDecoder->Decode(buffer, bufLen) == success ) {
    111113      decoded = true;
     114
     115      // Latency, Weber
     116      // -------
     117      if ( _corrLate == 2 ) {
     118        if (0<_coDecoder->_epochList.size()) {
     119          for (int ii=0;ii<_coDecoder->_epochList.size();ii++) {
     120            int week;
     121            double sec;
     122            double secGPS = _coDecoder->_epochList[ii];
     123            leapsecGPSWeeks(week, sec);
     124            double dt = fabs(sec - secGPS);
     125            const double secPerWeek = 7.0 * 24.0 * 3600.0;
     126            if (dt > 0.5 * secPerWeek) {
     127              if (sec > secGPS) {
     128                sec  -= secPerWeek;
     129              } else {
     130                sec  += secPerWeek;
     131              }
     132            }
     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() ) );
     137            }
     138          }
     139        }
     140      }
     141      _coDecoder->_epochList.clear();
     142
    112143      if (_mode == unknown) {
    113144        _mode = corrections;
  • trunk/BNC/RTCM3/RTCM3Decoder.h

    r1034 r1035  
    5050  QString                _staID;
    5151  QString                _checkMountPoint;
     52  int                    _corrLate;
    5253  struct RTCM3ParserData _Parser;
    5354  RTCM3coDecoder*        _coDecoder;
     
    5657
    5758#endif
     59
  • trunk/BNC/RTCM3/RTCM3coDecoder.cpp

    r1023 r1035  
    139139      double GPSweeks;
    140140      currentGPSWeeks(GPSweek, GPSweeks);
     141
     142      for (int kk = 0; kk < _co.epochSize; kk++) {
     143        _epochList.push_back(_co.epochGPS[kk]);     /* Weber, for latency */
     144      }
    141145
    142146      if (_co.NumberOfGPSSat > 0) {
  • trunk/BNC/RTCM3/clock_orbit_rtcm.c

    r879 r1035  
    33        Name:           clock_orbit_rtcm.c
    44        Project:        RTCM3
    5         Version:        $Id$
     5        Version:        $Id: clock_orbit_rtcm.c,v 1.2 2008/05/06 15:07:41 mervart Exp $
    66        Authors:        Dirk Stöcker
    77        Description:    state space approach for RTCM3
     
    495495    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
    496496    G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
     497    co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
     498    if(co->epochSize < 100) {co->epochSize += 1;}     /* Weber, for latency */
    497499    G_MULTIPLE_MESSAGE_INDICATOR(mmi)
    498500    G_RESERVED6
     
    521523    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
    522524    G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
     525    co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
     526    if(co->epochSize < 100) {co->epochSize += 1;}     /* Weber, for latency */
    523527    G_MULTIPLE_MESSAGE_INDICATOR(mmi)
    524528    G_RESERVED6
     
    539543    if(!co) return -5;
    540544    G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
     545    co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
     546    if(co->epochSize < 100) {co->epochSize += 1;}     /* Weber, for latency */
    541547    G_MULTIPLE_MESSAGE_INDICATOR(mmi)
    542548    G_RESERVED6
  • trunk/BNC/RTCM3/clock_orbit_rtcm.h

    r879 r1035  
    66        Name:           clock_orbit_rtcm.h
    77        Project:        RTCM3
    8         Version:        $Id$
     8        Version:        $Id: clock_orbit_rtcm.h,v 1.2 2008/05/06 15:07:41 mervart Exp $
    99        Authors:        Dirk Stöcker
    1010        Description:    state space approach for RTCM3
     
    5252  int ClockDataSupplied;            /* boolean */
    5353  int OrbitDataSupplied;            /* boolean */
     54  int epochGPS[101];                /* Weber, for latency */
     55  int epochSize;                    /* Weber, for latency */
    5456  enum SatelliteReferencePoint SatRefPoint;
    5557  enum SatelliteReferenceDatum SatRefDatum;
  • trunk/BNC/bncapp.cpp

    r1029 r1035  
    631631  // ---------------------------------
    632632  if (coTime <= _lastDumpCoSec) {
    633     QString line = "old correction: " + staID +
    634                     QString().sprintf(" age %ld",
     633    QString line = staID + ": Correction overaged by " +
     634                    QString().sprintf(" %ld sec",
    635635                    _lastDumpCoSec - coTime + _waitCoTime);
    636636    messagePrivate(line.toAscii());
  • trunk/BNC/bncgetthread.cpp

    r1030 r1035  
    418418  double maxLat = -maxDt;
    419419  double curLat = 0.;
    420   double leapsec = 14.;  // Leap second for latency estimation
    421420
    422421  _decodeTime = QDateTime::currentDateTime();
     
    570569          int week;
    571570          double sec;
    572           currentGPSWeeks(week, sec);
     571          leapsecGPSWeeks(week, sec);
    573572          const double secPerWeek = 7.0 * 24.0 * 3600.0;
    574573
     
    635634                  }
    636635                }
    637                 curLat = sec - obs->_o.GPSWeeks + leapsec;
     636                curLat = sec - obs->_o.GPSWeeks;
    638637                sumLat += curLat;
    639638                if (curLat < minLat) minLat = curLat;
     
    671670              type =  QString("%1 ").arg(_decoder->_typeList[ii]);
    672671              if (type != "") {
    673                 emit(newMessage(_staID + ": Received message type " + type.toAscii() ));              }
     672                emit(newMessage(_staID + ": Received message type " + type.toAscii() ));
     673              }
    674674            }
    675675          }
  • trunk/BNC/bnchelp.html

    r1031 r1035  
    9595&nbsp; &nbsp; &nbsp; 3.8.3. <a href=#corrport>Port</a><br>
    9696&nbsp; &nbsp; &nbsp; 3.8.4. <a href=#corrwait>Wait for Full Epoch</a><br>
     97&nbsp; &nbsp; &nbsp; 3.8.5. <a href=#corrlate>Latency Log</a><br>
    97983.9. <a href=#advnote>Monitor</a><br>
    9899&nbsp; &nbsp; &nbsp; 3.9.1. <a href=#obsrate>Observation Rate</a><br>
     
    476477<p><a name="corrwait"><h4>3.8.4 Wait for Full Epoch - mandatory if 'Port' is set</h4></p>
    477478<p>
    478 When feeding a real-time GNSS engine waiting for Ephemeris Corrections, BNC drops whatever is received later than 'Wait for full epoch' seconds. A value of 2 to 5 seconds could be an appropriate choice for that, depending on the latency of the incoming Ephemeris Corrections stream and the delay acceptable by your application. Default value for 'Wait for full epoch' is '0' seconds meaning that BNC will output whatever becomes available immediately and not drop any Ephemeris Correction.
     479When feeding a real-time GNSS engine waiting for Ephemeris Corrections, BNC drops (only concering IP port output) whatever is received later than 'Wait for full epoch' seconds. A value of 2 to 5 seconds could be an appropriate choice for that, depending on the latency of the incoming Ephemeris Corrections stream and the delay acceptable by your application.
     480</p>
     481<p><a name="corrlate"><h4>3.8.5 Latency Log - optional</h4></p>
     482<p>
     483Message latencies are logged for streams carrying orbit and clock corrections to Broadcast Ephemeris if option 'Latency log' is ticked.
    479484</p>
    480485
     
    564569</pre>
    565570<p>
    566  BNC can average the latencies per stream over a certain period of GPS time, the 'Performance log' interval. Mean latencies are calculated from the individual latencies of at most one (first incoming) observation per second. Note that computing correct latencies requires the clock of the host computer to be properly synchronized.
     571 BNC can average the latencies of observations per stream over a certain period of GPS time, the 'Performance log' interval. Mean latencies are calculated from the individual latencies of at most one (first incoming) observation per second. Note that computing correct latencies requires the clock of the host computer to be properly synchronized.
    567572</p>
    568573<p>
     
    570575</p>
    571576<p>
    572 Latencies and statistical information can be recorded in the Log file/section at the end of each 'Performance log' interval. A typical output from a 1 hour 'Performance log' interval would be:
     577Latencies of observations and statistical information can be recorded in the Log file/section at the end of each 'Performance log' interval. A typical output from a 1 hour 'Performance log' interval would be:
    573578</p>
    574579<pre>
     
    586591<p><a name="messmount"><h4>3.10.1 Mountpoint - optional</h4></p>
    587592<p>
    588 Specify the mountpoint of an RTCM Version 3.x stream to log the numbers of incoming message types. Logged time stamps refer to message reception time and allow to understand repetition rates. Enter 'ALL' if you want to log message type numbers of all configured streams. Beware that the size of the logfile can rapidly increase depending on the number of incoming RTCM Version 3.x streams.
     593Specify the mountpoint of an RTCM Version 3.x stream to log the numbers of incoming message types. Logged time stamps refer to message reception time and allow to understand repetition rates. Enter 'ALL' if you want to log message type numbers of all configured streams. Beware that the size of the logfile can rapidly increase depending on the number of incoming RTCM Version 3.x streams. 
    589594</p>
    590595<p>This option is primarily meant for testing and evaluation. Use it to figure out what exactly is produced by a specific GNSS receiver's configuration. An empty option field (default) means that you don't want BNC to print the message type numbers carried in RTCM Version 3.x streams.
  • trunk/BNC/bncmain.cpp

    r1030 r1035  
    8181    settings.setValue("corrIntr",   "1 day");
    8282    settings.setValue("rnxSkel",    "SKL");
    83     settings.setValue("waitTime",   5);
     83    settings.setValue("waitTime",   "5");
    8484    settings.setValue("makePause",  0);
    8585    settings.setValue("obsRate",    "");
     
    8787    settings.setValue("adviseReco", "5");
    8888    settings.setValue("perfIntr",   "");
    89     settings.setValue("waitCorr",   0);
    90     settings.setValue("messTypes",   "");
     89    settings.setValue("corrTime",   "5");
     90    settings.setValue("messTypes",  "");
     91    settings.setValue("corrLate",   0);
    9192  }
    9293
  • trunk/BNC/bncutils.h

    r464 r1035  
    3434
    3535void currentGPSWeeks(int& week, double& sec);
     36void leapsecGPSWeeks(int& week, double& sec);
    3637
    3738#endif
  • trunk/BNC/bncwindow.cpp

    r1030 r1035  
    109109  _proxyPortLineEdit->setMaximumWidth(9*ww);
    110110  _messTypesLineEdit  = new QLineEdit(settings.value("messTypes").toString());
    111   _messTypesLineEdit->setMaximumWidth(9*ww);
     111//_messTypesLineEdit->setMaximumWidth(20*ww);
    112112  _waitTimeSpinBox   = new QSpinBox();
    113113  _waitTimeSpinBox->setMinimum(1);
     
    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()));
    129132
    130133  _rnxV3CheckBox = new QCheckBox();
     
    163166  }
    164167  _corrTimeSpinBox   = new QSpinBox();
    165   _corrTimeSpinBox->setMinimum(0);
     168  _corrTimeSpinBox->setMinimum(1);
    166169  _corrTimeSpinBox->setMaximum(30);
    167170  _corrTimeSpinBox->setSingleStep(1);
     
    306309  _outEphPortLineEdit->setWhatsThis(tr("BNC can produce ephemeris data in RINEX ASCII format on your local host through an IP port. Specify a port number here to activate this function."));
    307310  _corrPortLineEdit->setWhatsThis(tr("BNC can produce Broadcast Ephemeris Corrections on your local host through an IP port. Specify a port number here to activate this function."));
    308   _corrTimeSpinBox->setWhatsThis(tr("BNC drops Broadcast Ephemeris Corrections received later than 'Wait for full epoch' seconds. Default value is '0' seconds meaning that BNC will output whatever becomes available immediately and not drop any Ephemeris Correction."));
     311  _corrTimeSpinBox->setWhatsThis(tr("Concerning output through IP port, BNC drops Broadcast Ephemeris Corrections received later than 'Wait for full epoch' seconds. A value of 2 to 5 seconds is recommended, depending on the latency of the incoming correction stream(s) and the delay acceptable to your real-time application."));
    309312  _rnxPathLineEdit->setWhatsThis(tr("Here you specify the path to where the RINEX Observation files will be stored. If the specified directory does not exist, BNC will not create RINEX Observation files."));
    310313  _ephPathLineEdit->setWhatsThis(tr("Specify the path for saving Broadcast Ephemeris data as RINEX Navigation files. If the specified directory does not exist, BNC will not create RINEX Navigation files."));
     
    312315  _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>"));
    313316  _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>"));
    314318  _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>"));
    315319  _rnxIntrComboBox->setWhatsThis(tr("<p>Select the length of the RINEX Observation file.</p>"));
     
    324328  _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."));
    325329  _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>"));
    326   _perfIntrComboBox->setWhatsThis(tr("<p>BNC can average all 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>"));
     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>"));
    327331  _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>"));
    328332  _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."));
     
    470474  cLayout->addWidget(new QLabel("Wait for full epoch"),           3, 0);
    471475  cLayout->addWidget(_corrTimeSpinBox,                            3, 1);
    472   cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),4,0,1,2,Qt::AlignLeft);
    473   cLayout->addWidget(new QLabel("    "),5,0);
     476  cLayout->addWidget(new QLabel("Latency log"),                   4, 0);
     477  cLayout->addWidget(_corrLateCheckBox,                           4, 1);
     478  cLayout->addWidget(new QLabel("Saving Broadcast Ephemeris correction files and correction output through IP port."),5,0,1,2,Qt::AlignLeft);
    474479  cgroup->setLayout(cLayout);
    475480
     
    627632  settings.setValue("rnxSkel",     _rnxSkelLineEdit->text());
    628633  settings.setValue("rnxAppend",   _rnxAppendCheckBox->checkState());
     634  settings.setValue("corrLate",    _corrLateCheckBox->checkState());
    629635  settings.setValue("rnxV3",       _rnxV3CheckBox->checkState());
    630636  settings.setValue("ephV3",       _ephV3CheckBox->checkState());
  • trunk/BNC/bncwindow.h

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