Changeset 939 in ntrip for trunk/BNC/RTCM3
- Timestamp:
- Jun 9, 2008, 3:06:12 PM (16 years ago)
- Location:
- trunk/BNC/RTCM3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/RTCM3/RTCM3Decoder.cpp
r913 r939 54 54 #endif 55 55 56 // 57 //////////////////////////////////////////////////////////////////////////// 58 ephSender::ephSender() { 56 // Error Handling 57 //////////////////////////////////////////////////////////////////////////// 58 void RTCM3Error(const char*, ...) { 59 } 60 61 // Constructor 62 //////////////////////////////////////////////////////////////////////////// 63 RTCM3Decoder::RTCM3Decoder(const QString& fileName) : GPSDecoder() { 64 65 const int LEAPSECONDS = 14; /* only needed for approx. time */ 66 67 // Ensure, that the Decoder uses the "old" convention for the data structure for Rinex2. Perlt 68 _Parser.rinex3 = 0; 69 70 time_t tim; 71 tim = time(0) - ((10*365+2+5)*24*60*60 + LEAPSECONDS); 72 73 memset(&_Parser, 0, sizeof(_Parser)); 74 _Parser.GPSWeek = tim/(7*24*60*60); 75 _Parser.GPSTOW = tim%(7*24*60*60); 76 59 77 connect(this, SIGNAL(newGPSEph(gpsephemeris*)), 60 78 (bncApp*) qApp, SLOT(slotNewGPSEph(gpsephemeris*))); 61 79 connect(this, SIGNAL(newGlonassEph(glonassephemeris*)), 62 80 (bncApp*) qApp, SLOT(slotNewGlonassEph(glonassephemeris*))); 63 }64 65 // Error Handling66 ////////////////////////////////////////////////////////////////////////////67 void RTCM3Error(const char*, ...) {68 }69 70 // Constructor71 ////////////////////////////////////////////////////////////////////////////72 RTCM3Decoder::RTCM3Decoder(const QString& fileName) : GPSDecoder() {73 74 const int LEAPSECONDS = 14; /* only needed for approx. time */75 76 // Ensure, that the Decoder uses the "old" convention for the data structure for Rinex2. Perlt77 _Parser.rinex3 = 0;78 79 time_t tim;80 tim = time(0) - ((10*365+2+5)*24*60*60 + LEAPSECONDS);81 82 memset(&_Parser, 0, sizeof(_Parser));83 _Parser.GPSWeek = tim/(7*24*60*60);84 _Parser.GPSTOW = tim%(7*24*60*60);85 81 86 82 // Sub-Decoder for Clock and Orbit Corrections … … 211 207 decoded = true; 212 208 gpsephemeris* ep = new gpsephemeris(_Parser.ephemerisGPS); 213 emit _ephSender.newGPSEph(ep);209 emit newGPSEph(ep); 214 210 } 215 211 … … 219 215 decoded = true; 220 216 glonassephemeris* ep = new glonassephemeris(_Parser.ephemerisGLONASS); 221 emit _ephSender.newGlonassEph(ep);217 emit newGlonassEph(ep); 222 218 } 223 219 } -
trunk/BNC/RTCM3/RTCM3Decoder.h
r880 r939 33 33 } 34 34 35 class ephSender : public QObject {36 Q_OBJECT37 public:38 ephSender();39 friend class RTCM3Decoder;40 signals:41 void newGPSEph(gpsephemeris* gpseph);42 void newGlonassEph(glonassephemeris* glonasseph);43 } ;44 45 35 class RTCM3coDecoder; 46 36 47 class RTCM3Decoder : public GPSDecoder { 37 class RTCM3Decoder : public QObject, public GPSDecoder { 38 Q_OBJECT 48 39 public: 49 40 RTCM3Decoder(const QString& fileName); 50 41 virtual ~RTCM3Decoder(); 51 42 virtual t_irc Decode(char* buffer = 0, int bufLen = 0); 43 signals: 44 void newGPSEph(gpsephemeris* gpseph); 45 void newGlonassEph(glonassephemeris* glonasseph); 52 46 private: 53 47 struct RTCM3ParserData _Parser; 54 ephSender _ephSender;55 48 RTCM3coDecoder* _coDecoder; 56 49 } ;
Note:
See TracChangeset
for help on using the changeset viewer.