Changeset 222 in ntrip for trunk/BNC/bnccaster.cpp


Ignore:
Timestamp:
Oct 7, 2006, 11:57:05 AM (18 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnccaster.cpp

    r207 r222  
    1515 *
    1616 * -----------------------------------------------------------------------*/
     17
     18#include <math.h>
    1719
    1820#include "bnccaster.h"
     
    9193void bncCaster::slotNewObs(const QByteArray& staID, Observation* obs) {
    9294
    93   long newTime = obs->GPSWeek * 7*24*3600 + obs->GPSWeeks;
     95  long iSec    = long(floor(obs->GPSWeeks+0.5));
     96  long newTime = obs->GPSWeek * 7*24*3600 + iSec;
    9497
    9598  // Rename the Station
     
    103106  }
    104107  bncRinex* rnx = _rinexWriters.find(obs->StatID).value();
    105   if (_samplingRate == 0 || obs->GPSWeeks % _samplingRate == 0) {
     108  if (_samplingRate == 0 || iSec % _samplingRate == 0) {
    106109    rnx->deepCopy(obs);
    107110  }
     
    121124         !settings.value("outPort").toString().isEmpty() ) {
    122125      emit( newMessage(QString("Station %1: old epoch %2 thrown away")
    123                        .arg(staID.data()).arg(obs->GPSWeeks).toAscii()) );
     126                       .arg(staID.data()).arg(iSec).toAscii()) );
    124127    }
    125128    delete obs;
     
    192195            *_out << begEpoch << endl;;
    193196          }
    194           *_out <<       obs->StatID    << " "
    195                 << (int) obs->SVPRN     << " "
    196                 << (int) obs->GPSWeek   << " "
    197                 <<       obs->GPSWeeks  << " "
    198                 <<       obs->sec       << " "
    199                 <<       obs->pCodeIndicator << " "
    200                 <<       obs->cumuLossOfCont << " "
    201                 <<       obs->C1        << " "
    202                 <<       obs->P2        << " "
    203                 <<       obs->L1        << " "
    204                 <<       obs->L2        << endl;
     197          *_out <<  obs->StatID    << " "
     198                <<  obs->SVPRN     << " "
     199                <<  obs->GPSWeek   << " "
     200                <<  obs->GPSWeeks  << " "
     201                <<  obs->C1        << " "
     202                <<  obs->P1        << " "
     203                <<  obs->P2        << " "
     204                <<  obs->L1        << " "
     205                <<  obs->L2        << endl;
    205206          if (!it.hasNext()) {
    206207            *_out << endEpoch << endl;
Note: See TracChangeset for help on using the changeset viewer.