Changeset 939 in ntrip for trunk/BNC/RTCM3


Ignore:
Timestamp:
Jun 9, 2008, 3:06:12 PM (16 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC/RTCM3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/RTCM3Decoder.cpp

    r913 r939  
    5454#endif
    5555
    56 //
    57 ////////////////////////////////////////////////////////////////////////////
    58 ephSender::ephSender() {
     56// Error Handling
     57////////////////////////////////////////////////////////////////////////////
     58void RTCM3Error(const char*, ...) {
     59}
     60
     61// Constructor
     62////////////////////////////////////////////////////////////////////////////
     63RTCM3Decoder::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
    5977  connect(this, SIGNAL(newGPSEph(gpsephemeris*)),
    6078          (bncApp*) qApp, SLOT(slotNewGPSEph(gpsephemeris*)));
    6179  connect(this, SIGNAL(newGlonassEph(glonassephemeris*)),
    6280          (bncApp*) qApp, SLOT(slotNewGlonassEph(glonassephemeris*)));
    63 }
    64 
    65 // Error Handling
    66 ////////////////////////////////////////////////////////////////////////////
    67 void RTCM3Error(const char*, ...) {
    68 }
    69 
    70 // Constructor
    71 ////////////////////////////////////////////////////////////////////////////
    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. Perlt
    77   _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);
    8581
    8682  // Sub-Decoder for Clock and Orbit Corrections
     
    211207          decoded = true;
    212208          gpsephemeris* ep = new gpsephemeris(_Parser.ephemerisGPS);
    213           emit _ephSender.newGPSEph(ep);
     209          emit newGPSEph(ep);
    214210        }
    215211
     
    219215          decoded = true;
    220216          glonassephemeris* ep = new glonassephemeris(_Parser.ephemerisGLONASS);
    221           emit _ephSender.newGlonassEph(ep);
     217          emit newGlonassEph(ep);
    222218        }
    223219      }
  • trunk/BNC/RTCM3/RTCM3Decoder.h

    r880 r939  
    3333}
    3434
    35 class ephSender : public QObject {
    36 Q_OBJECT
    37  public:
    38   ephSender();
    39   friend class RTCM3Decoder;
    40  signals:
    41   void newGPSEph(gpsephemeris* gpseph);
    42   void newGlonassEph(glonassephemeris* glonasseph);
    43 } ;
    44 
    4535class RTCM3coDecoder;
    4636
    47 class RTCM3Decoder : public GPSDecoder {
     37class RTCM3Decoder : public QObject, public GPSDecoder {
     38Q_OBJECT
    4839 public:
    4940  RTCM3Decoder(const QString& fileName);
    5041  virtual ~RTCM3Decoder();
    5142  virtual t_irc Decode(char* buffer = 0, int bufLen = 0);
     43 signals:
     44  void newGPSEph(gpsephemeris* gpseph);
     45  void newGlonassEph(glonassephemeris* glonasseph);
    5246 private:
    5347  struct RTCM3ParserData _Parser;
    54   ephSender              _ephSender;
    5548  RTCM3coDecoder*        _coDecoder;
    5649} ;
Note: See TracChangeset for help on using the changeset viewer.