Changeset 1834 in ntrip for trunk/BNC/RTCM3
- Timestamp:
- May 7, 2009, 11:27:19 AM (16 years ago)
- Location:
- trunk/BNC/RTCM3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/RTCM3coDecoder.cpp
r1833 r1834 47 47 #include "bncapp.h" 48 48 #include "bncsettings.h" 49 #include "rtcm3torinex.h" 49 50 50 51 using namespace std; … … 163 164 } 164 165 else { 165 double GPSdaysec = fmod(_GPSweeks, 86400.0); 166 int weekDay = int((_GPSweeks - GPSdaysec) / 86400.0); 167 if (GPSdaysec > _co.GLONASSEpochTime + 3600.0) { 166 167 // Guess GPS week and sec using system time 168 // ---------------------------------------- 169 int week; 170 double sec; 171 currentGPSWeeks(week, sec); 172 int weekDay = int(sec/86400.0); 173 int GPSDaySecHlp = int(sec) - weekDay * 86400; 174 175 // cout << "week, sec " << week << " " << sec << endl; 176 177 // Second of day (GPS time) from Glonass Epoch 178 // ------------------------------------------- 179 QDate date = dateAndTimeFromGPSweek(week, sec).date(); 180 int leapSecond = gnumleap(date.year(), date.month(), date.day()); 181 int GPSDaySec = _co.GLONASSEpochTime + 3 * 3600 + leapSecond; 182 183 // cout << "GlonassEpoch, leapSecond, GPSDaySec " 184 // << _co.GLONASSEpochTime << " " << leapSecond << " " 185 // << GPSDaySec << endl; 186 187 // Handle the difference between system clock and correction epoch 188 // --------------------------------------------------------------- 189 if (GPSDaySec < GPSDaySecHlp - 3600) { 168 190 weekDay += 1; 169 if (weekDay > 6) {170 weekDay = 0;171 GPSweek += 1;172 }173 191 } 174 else if (GPS daysec < _co.GLONASSEpochTime - 3600.0) {192 else if (GPSDaySec > GPSDaySecHlp + 3600) { 175 193 weekDay -= 1; 176 if (weekDay < 0) {177 weekDay = 6; 178 GPSweek -= 1;179 }180 }181 _GPSweeks = weekDay * 86400.0 + _co.GLONASSEpochTime;194 } 195 196 _GPSweeks = weekDay * 86400.0 + GPSDaySec; 197 198 // cout << "weekDay, _GPSweeks " << weekDay << " " 199 // << _GPSweeks << endl; 182 200 } 183 201 -
trunk/BNC/RTCM3/rtcm3torinex.c
r1825 r1834 1 1 /* 2 2 Converter for RTCM3 data to RINEX. 3 $Id: rtcm3torinex.c,v 1.2 3 2009/04/30 11:40:45mervart Exp $3 $Id: rtcm3torinex.c,v 1.24 2009/05/04 10:38:37 mervart Exp $ 4 4 Copyright (C) 2005-2008 by Dirk Stöcker <stoecker@alberding.eu> 5 5 … … 55 55 56 56 /* CVS revision and version */ 57 static char revisionstr[] = "$Revision: 1.2 3$";57 static char revisionstr[] = "$Revision: 1.24 $"; 58 58 59 59 #ifndef COMPILEDATE … … 238 238 } 239 239 240 staticint gnumleap(int year, int month, int day)240 int gnumleap(int year, int month, int day) 241 241 { 242 242 int ls = 0; … … 1689 1689 1690 1690 #ifndef NO_RTCM3_MAIN 1691 static char datestr[] = "$Date: 2009/0 4/30 11:40:45$";1691 static char datestr[] = "$Date: 2009/05/04 10:38:37 $"; 1692 1692 1693 1693 /* The string, which is send as agent in HTTP request */ -
trunk/BNC/RTCM3/rtcm3torinex.h
r1286 r1834 4 4 /* 5 5 Converter for RTCM3 data to RINEX. 6 $Id: rtcm3torinex.h,v 1.1 5 2008/11/26 12:17:13 weberExp $6 $Id: rtcm3torinex.h,v 1.16 2008/12/08 10:50:42 mervart Exp $ 7 7 Copyright (C) 2005-2006 by Dirk Stöcker <stoecker@alberding.eu> 8 8 … … 232 232 #endif /* PRINTFARG */ 233 233 234 int gnumleap(int year, int month, int day); 234 235 void HandleHeader(struct RTCM3ParserData *Parser); 235 236 int RTCM3Parser(struct RTCM3ParserData *handle);
Note:
See TracChangeset
for help on using the changeset viewer.