Changeset 8418 in ntrip


Ignore:
Timestamp:
Jul 13, 2018, 1:14:56 PM (3 days ago)
Author:
stuerze
Message:

some changes to allow 10 Hz observation data real-time processing

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

Legend:

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

    r8273 r8418  
    5353#include "bnccore.h"
    5454#include "bncutils.h"
     55#include "bnctime.h"
    5556#include "bnczerodecoder.h"
    5657#include "bncnetqueryv0.h"
     
    620621        if (!_rawFile) {
    621622          QString prn(obs._prn.toString().c_str());
    622           long iSec = long(floor(obs._time.gpssec() + 0.5));
    623           long obsTime = obs._time.gpsw() * 7 * 24 * 3600 + iSec;
    624           QMap<QString, long>::const_iterator it = _prnLastEpo.find(prn);
     623          bncTime obsTime = obs._time;
     624          QMap<QString, bncTime>::const_iterator it = _prnLastEpo.find(prn);
    625625          if (it != _prnLastEpo.end()) {
    626             long oldTime = it.value();
     626            bncTime oldTime = it.value();
    627627            if (obsTime < oldTime) {
    628               emit(newMessage(_staID + ": old observation " + prn.toAscii(),
    629                   false));
     628              emit(newMessage(_staID + ": old observation " + prn.toLatin1(), false));
    630629              continue;
    631630            } else if (obsTime == oldTime) {
    632               emit(newMessage(
    633                   _staID + ": observation coming more than once "
    634                       + prn.toAscii(), false));
     631              emit(newMessage(_staID + ": observation coming more than once "
     632                              + prn.toLatin1(), false));
    635633              continue;
    636634            }
     
    638636          _prnLastEpo[prn] = obsTime;
    639637        }
     638
    640639
    641640        decoder()->dumpRinexEpoch(obs, _format);
  • branches/BNC_2.12/src/bncgetthread.h

    r8272 r8418  
    138138   bool                       _rawOutput;
    139139   bool                       _latencycheck;
    140    QMap<QString, long>        _prnLastEpo;
     140   QMap<QString, bncTime>     _prnLastEpo;
    141141   QMap<char, QVector<QString> > _rnxTypes;
    142142   QStringList                _gloSlots;
  • branches/BNC_2.12/src/bncrinex.cpp

    r8398 r8418  
    496496  // -------------
    497497  const t_satObs& fObs = obsList.first();
    498   QDateTime datTimNom  = dateAndTimeFromGPSweek(fObs._time.gpsw(), floor(fObs._time.gpssec()+0.5));
     498  QDateTime datTimNom  = dateAndTimeFromGPSweek(fObs._time.gpsw(), fObs._time.gpssec());
    499499
    500500  // Close the file
  • branches/BNC_2.12/src/bnctime.cpp

    r8373 r8418  
    66#include <sstream>
    77#include <iomanip>
     8#include <iostream>
    89
    910#include "bnctime.h"
     
    8283  if(msec/1000.0 < sec - 86400.0)
    8384    ++week;
    84   return set(week, msec/1000.0);
     85  return set(week, double(msec/1000.0));
    8586}
    8687
     
    118119  intsec = sec;
    119120  updatetime(&week, &intsec, msec, 0); /* Moscow -> GPS */
    120   sec = intsec+(msec%1000)/1000.0;
     121  sec = intsec+double((msec%1000)/1000.0);
    121122  return set(week, sec);
    122123}
     
    132133    msec -= 7*24*60*60*1000;
    133134  currentGPSWeeks(week, sec);
    134   if(msec/1000.0 < sec - 86400.0)
     135  if((msec/1000.0) < (sec - 86400.0)) {
    135136    ++week;
    136   return set(week, msec/1000.0);
    137 }
    138 
     137  }
     138  return set(week, double(msec/1000.0));
     139}
    139140//
    140141//////////////////////////////////////////////////////////////////////////////
  • branches/BNC_2.12/src/bncutils.cpp

    r8064 r8418  
    251251bool checkForWrongObsEpoch(bncTime obsEpoch) {
    252252  const double maxDt = 600.0;
    253   long iSec    = long(floor(obsEpoch.gpssec()+0.5));
    254   long obsTime = obsEpoch.gpsw()*7*24*3600 + iSec;
     253  bncTime obsTime = obsEpoch;
    255254  int    week;
    256255  double sec;
    257256  currentGPSWeeks(week, sec);
    258   long currTime = week * 7*24*3600 + long(sec);
     257  bncTime currTime(week, sec);
    259258
    260259  if (fabs(currTime - obsTime) > maxDt) {
     
    575574  const ColumnVector& yi, // vector of the initial y-values
    576575  double dx,              // the step size for the integration
    577   double* acc,            // aditional acceleration
     576  double* acc,            // additional acceleration
    578577  ColumnVector (*der)(double x, const ColumnVector& y, double* acc)
    579578                          // A pointer to a function that computes the
Note: See TracChangeset for help on using the changeset viewer.