Changeset 1184 in ntrip for trunk/BNC/RTCM3


Ignore:
Timestamp:
Nov 10, 2008, 7:01:41 PM (15 years ago)
Author:
weber
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/rtcm3torinex.c

    r1130 r1184  
    11/*
    22  Converter for RTCM3 data to RINEX.
    3   $Id: rtcm3torinex.c,v 1.16 2008/09/02 14:14:33 weber Exp $
     3  $Id: rtcm3torinex.c,v 1.17 2008/09/22 09:39:49 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.16 $";
     53static char revisionstr[] = "$Revision: 1.17 $";
    5454
    5555#ifndef COMPILEDATE
     
    290290    {
    291291#ifdef NO_RTCM3_MAIN
    292     double antX, antY, antZ, antH; /* Antenna XYZ-H */
     292    case 1005:
     293      {
     294        double antX, antY, antZ; /* Antenna XYZ */
     295        SKIPBITS(22)
     296        GETBITSSIGN(antX, 38)
     297        SKIPBITS(2)
     298        GETBITSSIGN(antY, 38)
     299        SKIPBITS(2)
     300        GETBITSSIGN(antZ, 38)
     301        handle->antList5[handle->antSize5 + 0] = antX;
     302        handle->antList5[handle->antSize5 + 1] = antY;
     303        handle->antList5[handle->antSize5 + 2] = antZ;
     304        if(handle->antSize5 < 100 - 5 ) {handle->antSize5 += 3;}
     305        ret = 1005;
     306      }
     307      break;
    293308    case 1006:
    294309      {
    295         SKIPBITS(22);
    296         GETBITSSIGN(antX, 38); SKIPBITS(2);
    297         GETBITSSIGN(antY, 38); SKIPBITS(2);
    298         GETBITSSIGN(antZ, 38);
    299         GETBITS(    antH, 16);
    300         handle->antList[handle->antSize + 0] = antX;
    301         handle->antList[handle->antSize + 1] = antY;
    302         handle->antList[handle->antSize + 2] = antZ;
    303         handle->antList[handle->antSize + 3] = antH;
    304         if(handle->antSize < 100 - 6 ) {handle->antSize += 4;}
     310        double antX, antY, antZ, antH; /* Antenna XYZ-H */
     311        SKIPBITS(22)
     312        GETBITSSIGN(antX, 38)
     313        SKIPBITS(2)
     314        GETBITSSIGN(antY, 38)
     315        SKIPBITS(2)
     316        GETBITSSIGN(antZ, 38)
     317        GETBITS(    antH, 16)
     318        handle->antList6[handle->antSize6 + 0] = antX;
     319        handle->antList6[handle->antSize6 + 1] = antY;
     320        handle->antList6[handle->antSize6 + 2] = antZ;
     321        handle->antList6[handle->antSize6 + 3] = antH;
     322        if(handle->antSize6 < 100 - 6 ) {handle->antSize6 += 4;}
     323        ret = 1006;
     324      }
     325      break;
     326    case 1007:
     327      {
     328        char *antC = '\0'; /* Antenna Descriptor */
     329        char *antS = '\0';
     330        antC = (char*) malloc(32);   
     331        antS  = (char*) malloc(32);   
     332        uint32_t antN;
     333        uint32_t antD;
     334        uint32_t jj;
     335
     336        SKIPBITS(12)
     337        GETBITS(antN, 8)
     338        if ((antN>0) && (antN<32)) {
     339          for (jj = 0; jj < antN; jj++) {
     340            GETBITS(antD, 8)
     341            sprintf(antS,"%c",antD);
     342            if (jj<1) {
     343              strcpy(antC,antS);
     344            } else {
     345              strcat(antC,antS);
     346            }
     347          }
     348          handle->antType[handle->antSize] = antC;
     349          if(handle->antSize < 100) {handle->antSize += 1;}
     350        }
     351        ret = 1007;
     352      }
     353      break;
     354    case 1008:
     355      {
     356        char *antC = '\0'; /* Antenna Descriptor */
     357        char *antS = '\0';
     358        antC = (char*) malloc(32);   
     359        antS  = (char*) malloc(32);   
     360        uint32_t antN;
     361        uint32_t antD;
     362        uint32_t jj;
     363
     364        SKIPBITS(12)
     365        GETBITS(antN, 8)
     366        if ((antN>0) && (antN<32)) {
     367          for (jj = 0; jj < antN; jj++) {
     368            GETBITS(antD, 8)
     369            sprintf(antS,"%c",antD);
     370            if (jj<1) {
     371              strcpy(antC,antS);
     372            } else {
     373              strcat(antC,antS);
     374            }
     375          }
     376          handle->antType[handle->antSize] = antC;
     377          if(handle->antSize < 100) {handle->antSize += 1;}
     378        }
     379        ret = 1008;
    305380      }
    306381      break;
     
    16391714
    16401715#ifndef NO_RTCM3_MAIN
    1641 static char datestr[]     = "$Date: 2008/09/02 14:14:33 $";
     1716static char datestr[]     = "$Date: 2008/09/22 09:39:49 $";
    16421717
    16431718/* The string, which is send as agent in HTTP request */
Note: See TracChangeset for help on using the changeset viewer.