Changeset 1237 in ntrip for trunk/rtcm3torinex


Ignore:
Timestamp:
Nov 26, 2008, 11:14:46 AM (15 years ago)
Author:
stoecker
Message:

some BNC related fixes

Location:
trunk/rtcm3torinex
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/rtcm3torinex/rtcm3torinex.c

    r1097 r1237  
    11/*
    22  Converter for RTCM3 data to RINEX.
    3   $Id: rtcm3torinex.c,v 1.32 2008/09/02 07:45:48 stoecker Exp $
     3  $Id: rtcm3torinex.c,v 1.19 2008/11/18 08:57:51 weber Exp $
    44  Copyright (C) 2005-2008 by Dirk Stöcker <stoecker@alberding.eu>
    55
     
    5151
    5252/* CVS revision and version */
    53 static char revisionstr[] = "$Revision: 1.32 $";
     53static char revisionstr[] = "$Revision: 1.19 $";
    5454
    5555#ifndef COMPILEDATE
     
    176176
    177177#define SKIPBITS(b) { LOADBITS(b) numbits -= (b); }
     178
     179/* extract byte-aligned byte from data stream,
     180   b = variable to store size, s = variable to store string pointer */
     181#define GETSTRING(b, s) \
     182{ \
     183  b = *(data++); \
     184  s = (char *) data; \
     185  data += b; \
     186  size -= b+1; \
     187}
    178188
    179189struct leapseconds { /* specify the day of leap second */
     
    273283  int ret=0;
    274284
     285#ifdef NO_RTCM3_MAIN
     286  if(GetMessage(handle)) /* don't repeat */
     287#else
    275288  while(!ret && GetMessage(handle))
     289#endif /* NO_RTCM3_MAIN */
    276290  {
    277291    /* using 64 bit integer types, as it is much easier than handling
     
    284298    GETBITS(type,12)
    285299#ifdef NO_RTCM3_MAIN
    286     handle->typeList[handle->typeSize] = type;           /* RTCM message types */
    287     if(handle->typeSize < 100) {handle->typeSize += 1;}  /* RTCM message types */
     300    handle->blocktype = type;
    288301#endif /* NO_RTCM3_MAIN */
    289302    switch(type)
    290303    {
     304#ifdef NO_RTCM3_MAIN
     305    default:
     306      ret = type;
     307      break;
     308    case 1005: case 1006:
     309      {
     310        SKIPBITS(22)
     311        GETBITSSIGN(handle->antX, 38)
     312        SKIPBITS(2)
     313        GETBITSSIGN(handle->antY, 38)
     314        SKIPBITS(2)
     315        GETBITSSIGN(handle->antZ, 38)
     316        if(type == 1006)
     317          GETBITS(handle->antH, 16)
     318        ret = type;
     319      }
     320      break;
     321    case 1007: case 1008: case 1033:
     322      {
     323        char *antenna;
     324        int antnum;
     325
     326        SKIPBITS(12)
     327        GETSTRING(antnum,antenna)
     328        memcpy(handle->antenna, antenna, antnum);
     329        handle->antenna[antnum] = 0;
     330        ret = type;
     331      }
     332      break;
     333#endif /* NO_RTCM3_MAIN */
    291334    case 1019:
    292335      {
     
    16221665
    16231666#ifndef NO_RTCM3_MAIN
    1624 static char datestr[]     = "$Date: 2008/09/02 07:45:48 $";
     1667static char datestr[]     = "$Date: 2008/11/18 08:57:51 $";
    16251668
    16261669/* The string, which is send as agent in HTTP request */
  • trunk/rtcm3torinex/rtcm3torinex.h

    r1097 r1237  
    44/*
    55  Converter for RTCM3 data to RINEX.
    6   $Id: rtcm3torinex.h,v 1.8 2008/09/02 07:45:48 stoecker Exp $
     6  $Id: rtcm3torinex.h,v 1.14 2008/11/10 18:07:35 weber Exp $
    77  Copyright (C) 2005-2006 by Dirk Stöcker <stoecker@alberding.eu>
    88
     
    195195  int    lastlockl2[64];
    196196#ifdef NO_RTCM3_MAIN
    197   int    typeSize;       /* RTCM message types */
    198   int    typeList[101];  /* RTCM message types */
     197  double antX;
     198  double antY;
     199  double antZ;
     200  double antH;
     201  char   antenna[256+1];
     202  int    blocktype;
    199203#endif /* NO_RTCM3_MAIN */
    200204  int    datapos[RINEXENTRY_NUMBER];
Note: See TracChangeset for help on using the changeset viewer.