Changeset 8373 in ntrip


Ignore:
Timestamp:
Jun 13, 2018, 2:46:20 PM (6 months ago)
Author:
stuerze
Message:

minor changes to allow 10 Hz observation data processing (latency checker) and resampling (RINEX files, feed engine)

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

Legend:

Unmodified
Added
Removed
  • branches/BNC_2.12/src/GPSDecoder.cpp

    r6448 r8373  
    4545#include "bncsettings.h"
    4646#include "bncrinex.h"
     47#include "bncutils.h"
    4748
    4849using namespace std;
     
    8081void GPSDecoder::dumpRinexEpoch(const t_satObs& obs, const QByteArray& format) {
    8182  if (_rnx) {
    82     long iSec    = long(floor(obs._time.gpssec()+0.5));
    83     if (_rnx->samplingRate() == 0 || iSec % _rnx->samplingRate() == 0) {
     83    int sec = int(nint(obs._time.gpssec()*10));
     84    if (_rnx->samplingRate() == 0 || sec % (_rnx->samplingRate()*10) == 0) {
    8485      _rnx->deepCopy(obs);
    8586    }
  • branches/BNC_2.12/src/bnccaster.cpp

    r8120 r8373  
    303303    if (epoTime <= maxTime) {
    304304      const QList<t_satObs>& allObs = itEpo.value();
    305       int sec = int(nint(epoTime.gpssec()));
    306       if ( (_out || _sockets) && (_samplingRate == 0 || sec % _samplingRate == 0) ) {
    307 
     305      int sec = int(nint(epoTime.gpssec()*10));
     306      if ( (_out || _sockets) && (_samplingRate == 0 || sec % (_samplingRate*10) == 0) ) {
    308307        QListIterator<t_satObs> it(allObs);
    309308        bool firstObs = true;
  • branches/BNC_2.12/src/bnctime.cpp

    r7138 r8373  
    3737  int  deltad;
    3838  int  dow = 0;
    39   while ( gpssec >= 86400 ) {
    40     gpssec-=86400;
     39  while ( gpssec >= 86400.0 ) {
     40    gpssec-=86400.0;
    4141    dow++;
    4242  }
    43   while ( gpssec <  0 ) {
    44     gpssec+=86400;
     43  while ( gpssec <  0.0 ) {
     44    gpssec+=86400.0;
    4545    dow--;
    4646  }
     
    5959  gpssec += 14.0;
    6060  gpsw   += 1356.0;
    61   while ( gpssec >= 86400 ) {
    62     gpssec-=86400;
     61  while ( gpssec >= 86400.0 ) {
     62    gpssec-=86400.0;
    6363    dow++;
    6464  }
    65   while ( gpssec <  0 ) {
    66     gpssec+=86400;
     65  while ( gpssec <  0.0 ) {
     66    gpssec+=86400.0;
    6767    dow--;
    6868  }
     
    142142  _sec = daysec;
    143143  _mjd = mjd;
    144   while ( _sec >= 86400 ) {
    145     _sec-=86400;
     144  while ( _sec >= 86400.0 ) {
     145    _sec-=86400.0;
    146146    _mjd++;
    147147  }
    148   while ( _sec <  0 ) {
    149     _sec+=86400;
     148  while ( _sec <  0.0 ) {
     149    _sec+=86400.0;
    150150    _mjd--;
    151151  }
  • branches/BNC_2.12/src/latencychecker.cpp

    r8272 r8373  
    327327      const t_satObs& obs = it.next();
    328328      bool wrongObservationEpoch = checkForWrongObsEpoch(obs._time);
    329       l._newSec = static_cast<int>(obs._time.gpssec());
     329      l._newSec = static_cast<int>(nint(obs._time.gpssec()*10));
    330330      if (l._newSec > l._oldSec && !wrongObservationEpoch) {
    331         if (l._newSec % _miscIntr < l._oldSec % _miscIntr) {
     331        if (l._newSec % _miscIntr < l._oldSec % (_miscIntr * 10)) {
     332 
    332333          if (l._numLat > 0) {
    333334            if (l._meanDiff > 0.0) {
  • branches/BNC_2.12/src/rinex/reqcedit.cpp

    r8370 r8373  
    336336        }
    337337
    338         if (_samplingRate == 0 ||
    339             fmod(round(epo->tt.gpssec()), _samplingRate) == 0) {
     338        int sec = int(nint(epo->tt.gpssec()*10));
     339        if (_samplingRate == 0 || sec % (_samplingRate*10) == 0) {
    340340          applyLLI(obsFile, epo);
    341341          outObsFile.writeEpoch(epo);
Note: See TracChangeset for help on using the changeset viewer.