Changeset 4296 in ntrip


Ignore:
Timestamp:
Jun 23, 2012, 8:17:01 AM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
2 edited

Legend:

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

    r4278 r4296  
    2828bncSP3::bncSP3(const QString& sklFileName, const QString& intr, int sampl)
    2929  : bncoutf(sklFileName, intr, sampl) {
    30 
    31   _lastGPSweek  = 0;
    32   _lastGPSweeks = 0.0;
    3330}
    3431
     
    4542  if (reopen(GPSweek, GPSweeks) == success) {
    4643
    47     if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) {
    48       _lastGPSweek  = GPSweek;
    49       _lastGPSweeks = GPSweeks;
    50    
    51       QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks);
    52       double sec = fmod(GPSweeks, 60.0);
    53    
    54       _out << datTim.toString("*  yyyy MM dd hh mm").toAscii().data()
    55            << setw(12) << setprecision(8) << sec << endl;
     44    bncTime epoTime(GPSweek, GPSweeks);
     45
     46    if (epoTime != _lastEpoTime) {
     47
     48      // Check the sampling interval (print empty epochs)
     49      // ------------------------------------------------
     50      if (_lastEpoTime.valid()) {
     51        for (bncTime ep = _lastEpoTime +_sampl; ep < epoTime; ep = ep +_sampl) {
     52          _out << "*  " << ep.datestr(' ') << ep.timestr(8, ' ') << endl;
     53        }
     54      }
     55
     56      // Print the new epoch
     57      // -------------------
     58      _out << "*  " << epoTime.datestr(' ') << epoTime.timestr(8, ' ') << endl;
     59
     60      _lastEpoTime = epoTime;
    5661    }
     62
    5763    _out << "P" << prn.toAscii().data()
    5864         << setw(14) << setprecision(6) << xx(1) / 1000.0
  • trunk/BNC/src/bncsp3.h

    r4278 r4296  
    77
    88#include "bncoutf.h"
     9#include "bnctime.h"
    910
    1011class bncSP3 : public bncoutf {
     
    1819  virtual void writeHeader(const QDateTime& datTim);
    1920  virtual void closeFile();
    20   int    _lastGPSweek;
    21   double _lastGPSweeks;
     21  bncTime _lastEpoTime;
    2222};
    2323
Note: See TracChangeset for help on using the changeset viewer.