Changeset 8417 in ntrip for trunk/BNC


Ignore:
Timestamp:
Jul 13, 2018, 1:14:18 PM (6 years ago)
Author:
stuerze
Message:

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

Location:
trunk/BNC/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncgetthread.cpp

    r8271 r8417  
    5656#include "bnccore.h"
    5757#include "bncutils.h"
     58#include "bnctime.h"
    5859#include "bnczerodecoder.h"
    5960#include "bncnetqueryv0.h"
     
    624625        if (!_rawFile) {
    625626          QString prn(obs._prn.toString().c_str());
    626           long iSec = long(floor(obs._time.gpssec() + 0.5));
    627           long obsTime = obs._time.gpsw() * 7 * 24 * 3600 + iSec;
    628           QMap<QString, long>::const_iterator it = _prnLastEpo.find(prn);
     627          bncTime obsTime = obs._time;
     628          QMap<QString, bncTime>::const_iterator it = _prnLastEpo.find(prn);
    629629          if (it != _prnLastEpo.end()) {
    630             long oldTime = it.value();
     630            bncTime oldTime = it.value();
    631631            if (obsTime < oldTime) {
    632               emit(newMessage(_staID + ": old observation " + prn.toLatin1(),
    633                   false));
     632              emit(newMessage(_staID + ": old observation " + prn.toLatin1(), false));
    634633              continue;
    635634            } else if (obsTime == oldTime) {
    636               emit(newMessage(
    637                   _staID + ": observation coming more than once "
    638                       + prn.toLatin1(), false));
     635              emit(newMessage(_staID + ": observation coming more than once "
     636                              + prn.toLatin1(), false));
    639637              continue;
    640638            }
  • trunk/BNC/src/bncgetthread.h

    r8271 r8417  
    139139   bool                       _rawOutput;
    140140   bool                       _latencycheck;
    141    QMap<QString, long>        _prnLastEpo;
     141   QMap<QString, bncTime>     _prnLastEpo;
    142142   QMap<char, QVector<QString> > _rnxTypes;
    143143   QStringList                _gloSlots;
  • trunk/BNC/src/bncrinex.cpp

    r8397 r8417  
    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
  • trunk/BNC/src/bnctime.cpp

    r8372 r8417  
    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  return set(week, double(msec/1000.0));
    137139}
    138140
  • trunk/BNC/src/bncutils.cpp

    r8203 r8417  
    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.