Changeset 1036 in ntrip
- Timestamp:
- Aug 15, 2008, 6:38:33 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncutils.cpp
r464 r1036 94 94 currTime.msec() / 1000.0; 95 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 int leapsecond = 14; 103 if (currDate.year() >= 2009) {leapsecond = 15;} 104 105 week = int( (double(currDate.toJulianDay()) - 2444244.5) / 7 ); 106 107 sec = (currDate.dayOfWeek() % 7) * 24.0 * 3600.0 + 108 currTime.hour() * 3600.0 + 109 currTime.minute() * 60.0 + 110 currTime.second() + 111 currTime.msec() / 1000.0 + 112 leapsecond; 113 }
Note:
See TracChangeset
for help on using the changeset viewer.