Changeset 854 in ntrip for trunk/BNS/bnssp3.cpp


Ignore:
Timestamp:
Apr 25, 2008, 3:53:10 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bnssp3.cpp

    r852 r854  
    2929               const QString& intr, int sampl)
    3030  : bnsoutf(prep, ext, path, intr, sampl) {
     31
     32  _lastGPSweek  = 0;
     33  _lastGPSweeks = 0.0;
    3134}
    3235
     
    4447// Write One Epoch
    4548////////////////////////////////////////////////////////////////////////////
    46 void bnsSP3::write(int GPSweek, double GPSweeks, const QString& prn,
     49t_irc bnsSP3::write(int GPSweek, double GPSweeks, const QString& prn,
    4750                   const ColumnVector& xx) {
    4851
    49   bnsoutf::write(GPSweek, GPSweeks, prn, xx);
     52  if ( bnsoutf::write(GPSweek, GPSweeks, prn, xx) == success) {
    5053
    51   if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) {
    52     _lastGPSweek  = GPSweek;
    53     _lastGPSweeks = GPSweeks;
    54 
    55     QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks);
    56     double sec = fmod(GPSweeks, 60.0);
    57 
    58     _out << "*  "
    59          << datTim.toString("yyyy MM dd hh mm").toAscii().data()
    60          << setw(12) << setprecision(8) << sec << endl;
     54    if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) {
     55      _lastGPSweek  = GPSweek;
     56      _lastGPSweeks = GPSweeks;
     57   
     58      QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks);
     59      double sec = fmod(GPSweeks, 60.0);
     60   
     61      _out << "*  "
     62           << datTim.toString("yyyy MM dd hh mm").toAscii().data()
     63           << setw(12) << setprecision(8) << sec << endl;
     64    }
     65    _out << "P" << prn.toAscii().data()
     66         << setw(14) << setprecision(6) << xx(1) / 1000.0
     67         << setw(14) << setprecision(6) << xx(2) / 1000.0
     68         << setw(14) << setprecision(6) << xx(3) / 1000.0
     69         << setw(14) << setprecision(6) << xx(4) * 1e6 << endl;
     70   
     71    return success;
    6172  }
    62   _out << "P" << prn.toAscii().data()
    63        << setw(14) << setprecision(6) << xx(1) / 1000.0
    64        << setw(14) << setprecision(6) << xx(2) / 1000.0
    65        << setw(14) << setprecision(6) << xx(3) / 1000.0
    66        << setw(14) << setprecision(6) << xx(4) * 1e6 << endl;
     73  else {
     74    return failure;
     75  }
    6776}
Note: See TracChangeset for help on using the changeset viewer.