Changeset 505 in ntrip for trunk/BNC/RTCM3/RTCM3Decoder.cpp
- Timestamp:
- Oct 14, 2007, 4:59:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/RTCM3Decoder.cpp
r504 r505 51 51 #endif 52 52 53 #define LEAPSECONDS 14 /* only needed for approx. time */54 55 53 // Error Handling 56 54 //////////////////////////////////////////////////////////////////////////// 57 55 void RTCM3Error(const char*, ...) { 56 } 58 57 58 // Standard Output 59 //////////////////////////////////////////////////////////////////////////// 60 void RTCM3Text(const char*, ...) { 59 61 } 60 62 … … 62 64 //////////////////////////////////////////////////////////////////////////// 63 65 RTCM3Decoder::RTCM3Decoder() : GPSDecoder() { 64 memset(&_Parser, 0, sizeof(_Parser)); 66 67 const int LEAPSECONDS = 14; /* only needed for approx. time */ 68 65 69 time_t tim; 66 70 tim = time(0) - ((10*365+2+5)*24*60*60 + LEAPSECONDS); 71 72 memset(&_Parser, 0, sizeof(_Parser)); 67 73 _Parser.GPSWeek = tim/(7*24*60*60); 68 74 _Parser.GPSTOW = tim%(7*24*60*60); 75 76 // _Parser2 is used for direct file output 77 // --------------------------------------- 78 memset(&_Parser2, 0, sizeof(_Parser2)); 79 _Parser2.GPSWeek = tim/(7*24*60*60); 80 _Parser2.GPSTOW = tim%(7*24*60*60); 81 82 _Parser2.headerfile = strdup("TEST_HEADERFILE"); 83 _Parser2.glonassephemeris = strdup("TEST_GLONASSEPHEMERIS"); 84 _Parser2.gpsephemeris = strdup("TEST_GPSEPHEMERIS"); 85 _Parser2.rinex3 = 1; 69 86 } 70 87 … … 78 95 void RTCM3Decoder::Decode(char* buffer, int bufLen) { 79 96 for (int ii = 0; ii < bufLen; ii++) { 97 98 // Direct file output 99 // ------------------ 100 HandleByte(&_Parser2, (unsigned int) buffer[ii]); 80 101 81 102 _Parser.Message[_Parser.MessageSize++] = buffer[ii];
Note:
See TracChangeset
for help on using the changeset viewer.