Changeset 2260 in ntrip


Ignore:
Timestamp:
Jan 16, 2010, 12:01:04 PM (14 years ago)
Author:
mervart
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bnseph.cpp

    r2017 r2260  
    2020#include "bnsutils.h"
    2121#include "bnssettings.h"
     22#include "bnctime.h"
     23extern "C" {
     24#include "RTCM/rtcm3torinex.h"
     25}
    2226
    2327#define PI          3.1415926535898
     
    493497     
    494498      if (year < 100) year += 2000;
     499
     500      bncTime tHlp;
     501      tHlp.set(int(year), int(month), int(day),
     502               int(hour), int(minute), second);
    495503     
    496       QDateTime* dateTime = new QDateTime(QDate(int(year), int(month), int(day)),
    497                                           QTime(int(hour), int(minute), int(second)), Qt::UTC);
    498 
    499       GPSweekFromDateAndTime(*dateTime, _GPSweek, _GPSweeks);
    500  
    501       delete dateTime;
    502 
    503       //// beg test
    504       //// _gps_utc = 14.0;
    505       //// end test
    506 
     504      _GPSweek  = tHlp.gpsw();
     505      _GPSweeks = tHlp.gpssec();
     506
     507      // Correct UTC -> GPS;
     508      // -------------------
     509      _gps_utc = gnumleap(int(year), int(month), int(day));
    507510      _GPSweeks += _gps_utc;
     511      if (_GPSweeks > 86400.0) {
     512        _GPSweek  += 1;
     513        _GPSweeks -= 86400.0;
     514      }
    508515    }
    509516    else if (ii == 2) {
Note: See TracChangeset for help on using the changeset viewer.