Changeset 505 in ntrip


Ignore:
Timestamp:
Oct 14, 2007, 4:59:27 PM (17 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC/RTCM3
Files:
3 edited

Legend:

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

    r504 r505  
    5151#endif
    5252
    53 #define LEAPSECONDS     14 /* only needed for approx. time */
    54 
    5553// Error Handling
    5654////////////////////////////////////////////////////////////////////////////
    5755void RTCM3Error(const char*, ...) {
     56}
    5857
     58// Standard Output
     59////////////////////////////////////////////////////////////////////////////
     60void RTCM3Text(const char*, ...) {
    5961}
    6062
     
    6264////////////////////////////////////////////////////////////////////////////
    6365RTCM3Decoder::RTCM3Decoder() : GPSDecoder() {
    64   memset(&_Parser, 0, sizeof(_Parser));
     66
     67  const int LEAPSECONDS = 14; /* only needed for approx. time */
     68
    6569  time_t tim;
    6670  tim = time(0) - ((10*365+2+5)*24*60*60 + LEAPSECONDS);
     71
     72  memset(&_Parser, 0, sizeof(_Parser));
    6773  _Parser.GPSWeek = tim/(7*24*60*60);
    6874  _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;
    6986}
    7087
     
    7895void RTCM3Decoder::Decode(char* buffer, int bufLen) {
    7996  for (int ii = 0; ii < bufLen; ii++) {
     97
     98    // Direct file output
     99    // ------------------
     100    HandleByte(&_Parser2, (unsigned int) buffer[ii]);
    80101
    81102    _Parser.Message[_Parser.MessageSize++] = buffer[ii];
  • trunk/BNC/RTCM3/RTCM3Decoder.h

    r504 r505  
    3939private:
    4040  struct RTCM3ParserData _Parser;
     41  struct RTCM3ParserData _Parser2;
    4142} ;
    4243
  • trunk/BNC/RTCM3/rtcm3torinex.c

    r504 r505  
    11/*
    22  Converter for RTCM3 data to RINEX.
    3   $Id: rtcm3torinex.c,v 1.24 2007/10/08 13:29:45 stoecker Exp $
     3  $Id: rtcm3torinex.c,v 1.1 2007/10/14 13:02:20 mervart Exp $
    44  Copyright (C) 2005-2006 by Dirk Stoecker <stoecker@alberding.eu>
    55
     
    5151
    5252/* CVS revision and version */
    53 static char revisionstr[] = "$Revision: 1.24 $";
     53static char revisionstr[] = "$Revision: 1.1 $";
    5454
    5555#ifndef COMPILEDATE
     
    806806#endif
    807807
     808#ifndef NO_RTCM3_MAIN
    808809void RTCM3Text(const char *fmt, ...)
    809810{
     
    813814  va_end(v);
    814815}
     816#endif
    815817
    816818static int HandleRunBy(char *buffer, int buffersize, const char **u,
     
    15341536
    15351537#ifndef NO_RTCM3_MAIN
    1536 static char datestr[]     = "$Date: 2007/10/08 13:29:45 $";
     1538static char datestr[]     = "$Date: 2007/10/14 13:02:20 $";
    15371539
    15381540/* The string, which is send as agent in HTTP request */
Note: See TracChangeset for help on using the changeset viewer.