Changeset 1035 in ntrip for trunk/BNC/RTCM3


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

* empty log message *

Location:
trunk/BNC/RTCM3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.