Changeset 1153 in ntrip
- Timestamp:
- Oct 7, 2008, 12:28:51 PM (16 years ago)
- Location:
- trunk/BNC
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/RTCM3Decoder.cpp
r1130 r1153 63 63 //////////////////////////////////////////////////////////////////////////// 64 64 RTCM3Decoder::RTCM3Decoder(const QString& staID) : GPSDecoder() { 65 66 const int LEAPSECONDS = 14; /* only needed for approx. time */67 65 68 66 QSettings settings; … … 95 93 _Parser.rinex3 = 0; 96 94 97 time_t tim;98 tim = time(0) - ((10*365+2+5)*24*60*60 + LEAPSECONDS);99 100 95 memset(&_Parser, 0, sizeof(_Parser)); 101 _Parser.GPSWeek = tim/(7*24*60*60); 102 _Parser.GPSTOW = tim%(7*24*60*60); 96 97 double secGPS; 98 currentGPSWeeks(_Parser.GPSWeek, secGPS); 99 _Parser.GPSTOW = int(secGPS); 103 100 104 101 connect(this, SIGNAL(newGPSEph(gpsephemeris*)), … … 142 139 double sec; 143 140 _newSecGPS = _coDecoder->_epochList[ii]; 144 leapsecGPSWeeks(week, sec);141 currentGPSWeeks(week, sec); 145 142 double dt = fabs(sec - _newSecGPS); 146 143 const double secPerWeek = 7.0 * 24.0 * 3600.0; -
trunk/BNC/bncgetthread.cpp
r1147 r1153 646 646 int week; 647 647 double sec; 648 leapsecGPSWeeks(week, sec);648 currentGPSWeeks(week, sec); 649 649 const double secPerWeek = 7.0 * 24.0 * 3600.0; 650 650 -
trunk/BNC/bncutils.cpp
r1036 r1153 86 86 QTime currTime = currDateTime.time(); 87 87 88 week = int( (double(currDate.toJulianDay()) - 2444244.5) / 7 );89 90 sec = (currDate.dayOfWeek() % 7) * 24.0 * 3600.0 +91 currTime.hour() * 3600.0 +92 currTime.minute() * 60.0 +93 currTime.second() +94 currTime.msec() / 1000.0;95 }96 void leapsecGPSWeeks(int& week, double& sec) {97 98 QDateTime currDateTime = QDateTime::currentDateTime().toUTC();99 QDate currDate = currDateTime.date();100 QTime currTime = currDateTime.time();101 102 88 int leapsecond = 14; 103 89 if (currDate.year() >= 2009) {leapsecond = 15;} -
trunk/BNC/bncutils.h
r1035 r1153 34 34 35 35 void currentGPSWeeks(int& week, double& sec); 36 void leapsecGPSWeeks(int& week, double& sec);37 36 38 37 #endif
Note:
See TracChangeset
for help on using the changeset viewer.