Changeset 3538 in ntrip


Ignore:
Timestamp:
Dec 22, 2011, 12:09:30 PM (10 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/ephemeris.cpp

    r3280 r3538  
    395395////////////////////////////////////////////////////////////////////////////
    396396int t_ephGlo::IOD() const {
    397 
    398   bool old = false;
    399 
    400   if (old) { // 5 LSBs of iod are equal to 5 LSBs of tb
    401     unsigned int tb  = int(fmod(_GPSweeks,86400.0)); //sec of day
    402     const int shift = sizeof(tb) * 8 - 5;
    403     unsigned int iod = tb << shift;
    404     return (iod >> shift);
    405   }
    406   else     { 
    407     bncTime tGPS(_GPSweek, _GPSweeks);
    408     int hlpWeek = _GPSweek;
    409     int hlpSec  = int(_GPSweeks);
    410     int hlpMsec = int(_GPSweeks * 1000);
    411     updatetime(&hlpWeek, &hlpSec, hlpMsec, 0);
    412     bncTime tHlp(hlpWeek, hlpSec);
    413     double diffSec = tGPS - tHlp;
    414     bncTime tMoscow = tGPS + diffSec;
    415     return int(tMoscow.daysec() / 900);
    416   }
     397  bncTime tGPS(_GPSweek, _GPSweeks);
     398  bncTime tMoscow = tGPS - _gps_utc + 3 * 3600.0;
     399  return int(tMoscow.daysec() / 900);
    417400}
    418401
Note: See TracChangeset for help on using the changeset viewer.