Changeset 4296 in ntrip for trunk/BNC/src/bncsp3.cpp


Ignore:
Timestamp:
Jun 23, 2012, 8:17:01 AM (12 years ago)
Author:
mervart
Message:
 
File:
1 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
Note: See TracChangeset for help on using the changeset viewer.