Changeset 744 in ntrip for trunk/rtcm3torinex


Ignore:
Timestamp:
Mar 25, 2008, 4:10:48 PM (16 years ago)
Author:
stoecker
Message:

Fixed INVALID data bug reported by Edgar Johansen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/rtcm3torinex/rtcm3torinex.c

    r646 r744  
    11/*
    22  Converter for RTCM3 data to RINEX.
    3   $Id: rtcm3torinex.c,v 1.25 2007/10/25 09:37:42 stoecker Exp $
    4   Copyright (C) 2005-2006 by Dirk Stoecker <stoecker@alberding.eu>
     3  $Id: rtcm3torinex.c,v 1.26 2007/12/20 10:42:10 stoecker Exp $
     4  Copyright (C) 2005-2008 by Dirk Stöcker <stoecker@alberding.eu>
    55
    66  This software is a complete NTRIP-RTCM3 to RINEX converter as well as
     
    5151
    5252/* CVS revision and version */
    53 static char revisionstr[] = "$Revision: 1.25 $";
     53static char revisionstr[] = "$Revision: 1.26 $";
    5454
    5555#ifndef COMPILEDATE
     
    110110  if(e-m < 3)
    111111    handle->NeedBytes = 3;
    112  
     112
    113113  /* copy buffer to front */
    114114  i = m - handle->Message;
     
    182182  int year;
    183183  int taicount;
    184 }; 
     184};
    185185static const int months[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};
    186186static const struct leapseconds leap[] = {
     
    459459          }
    460460          GETBITS(l1range, 24);
    461           if((l1range&((1<<24)-1)) != 0x80000)
    462           {
    463             gnss->dataflags[num] |= c;
    464             gnss->measdata[num][ce] = l1range*0.02;
    465           }
    466461          GETBITSSIGN(i, 20);
    467462          if((i&((1<<20)-1)) != 0x80000)
    468463          {
    469             gnss->dataflags[num] |= l;
     464            gnss->dataflags[num] |= (c|l);
     465            gnss->measdata[num][ce] = l1range*0.02;
    470466            gnss->measdata[num][le] = l1range*0.02+i*0.0005;
    471467          }
     
    622618          }
    623619          GETBITS(l1range, 25)
    624           if((l1range&((1<<25)-1)) != 0x80000)
    625           {
    626             gnss->dataflags[num] |= c;
    627             gnss->measdata[num][ce] = l1range*0.02;
    628           }
    629620          GETBITSSIGN(i, 20)
    630621          if((i&((1<<20)-1)) != 0x80000)
    631622          {
    632             gnss->dataflags[num] |= l;
     623            /* Handle this like GPS. Actually for GLONASS L1 range is always
     624               valid. To be on the save side, we handle it as invalid like we
     625               do for GPS and also remove range in case of 0x80000. */
     626            gnss->dataflags[num] |= (c|l);
     627            gnss->measdata[num][ce] = l1range*0.02;
    633628            gnss->measdata[num][le] = l1range*0.02+i*0.0005;
    634629          }
     
    898893  "         .0000         .0000         .0000                  "
    899894  "ANTENNA: DELTA H/E/N";
    900  
     895
    901896  hdata.data.named.wavelength = Parser->rinex3 ? 0 :
    902897  "     1     1                                                "
     
    15361531
    15371532#ifndef NO_RTCM3_MAIN
    1538 static char datestr[]     = "$Date: 2007/10/25 09:37:42 $";
     1533static char datestr[]     = "$Date: 2007/12/20 10:42:10 $";
    15391534
    15401535/* The string, which is send as agent in HTTP request */
     
    20972092      {
    20982093        if(numbytes >= 17 && !strncmp(buf, "RTSP/1.0 200 OK\r\n", 17))
    2099         {
     2094        {
    21002095          int serverport = 0, session = 0;
    21012096          const char *portcheck = "server_port=";
     
    23332328            if(numbytes > 17 && (!strncmp(buf, "HTTP/1.1 200 OK\r\n", 17)
    23342329            || !strncmp(buf, "HTTP/1.0 200 OK\r\n", 17)))
    2335             {
     2330            {
    23362331              const char *datacheck = "Content-Type: gnss/data\r\n";
    23372332              const char *chunkycheck = "Transfer-Encoding: chunked\r\n";
Note: See TracChangeset for help on using the changeset viewer.