Changeset 210 in ntrip
- Timestamp:
- Oct 6, 2006, 2:38:53 PM (18 years ago)
- Location:
- trunk/BNC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM/RTCM2.cpp
r209 r210 30 30 #include "RTCM2.h" 31 31 32 #include "../bncutils.h" 32 33 33 34 using namespace std; … … 1063 1064 _buffer.append(buffer, bufLen); 1064 1065 1066 int refWeek; 1067 double refSecs; 1068 gpsWeekAndSec(refWeek, refSecs); 1069 1065 1070 while(true) { 1066 1071 PP.getPacket(_buffer); … … 1070 1075 ObsBlock.extract(PP); 1071 1076 if (!ObsBlock.valid()) continue; 1077 1078 int epochWeek; 1079 double epochSecs; 1080 ObsBlock.resolveEpoch(refWeek, refSecs, epochWeek, epochSecs); 1072 1081 1073 1082 for (int iSat=0; iSat < ObsBlock.nSat; iSat++) { … … 1076 1085 1077 1086 obs->SVPRN = ObsBlock.PRN[iSat]; 1078 obs->GPSWeek = 1390;1079 obs->GPSWeeks = ObsBlock.secs;1087 obs->GPSWeek = epochWeek; 1088 obs->GPSWeeks = (int) epochSecs; 1080 1089 obs->sec = ObsBlock.secs; 1081 1090 obs->pCodeIndicator = 0; -
trunk/BNC/bncutils.cpp
r124 r210 53 53 return QDateTime(date,time); 54 54 } 55 56 57 void gpsWeekAndSec(int& week, double& sec) { 58 59 QDate date = QDate::currentDate(); 60 QTime time = QTime::currentTime(); 61 62 double deltat = date.toJulianDay() - 2400000.5 - 44244.0 + 63 ((( time.msec() / 1000.0 64 + time.second() ) / 60.0 65 + time.minute() ) / 60.0 66 + time.hour() ) / 24.0; 67 68 week = (int) floor(deltat/7.0); 69 sec = (deltat - (week)*7.0)*86400.0; 70 } -
trunk/BNC/bncutils.h
r125 r210 10 10 QDateTime dateAndTimeFromGPSweek(int GPSWeek, double GPSWeeks); 11 11 12 void gpsWeekAndSec(int& week, double& sec); 13 12 14 #endif
Note:
See TracChangeset
for help on using the changeset viewer.