Changeset 2323 in ntrip for trunk/clock_and_orbit


Ignore:
Timestamp:
Feb 22, 2010, 2:42:26 PM (12 years ago)
Author:
stoecker
Message:

fixed bug

Location:
trunk/clock_and_orbit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/clock_and_orbit/clock_orbit_rtcm.c

    r1842 r2323  
    33        Name:           clock_orbit_rtcm.c
    44        Project:        RTCM3
    5         Version:        $Id: clock_orbit_rtcm.c,v 1.15 2009/05/14 13:24:13 stoecker Exp $
     5        Version:        $Id: clock_orbit_rtcm.c,v 1.8 2009/05/14 13:24:41 stoecker Exp $
    66        Authors:        Dirk Stöcker
    77        Description:    state space approach for RTCM3
     
    1010#include <stdio.h>
    1111#include <string.h>
     12#ifndef sparc
    1213#include <stdint.h>
     14#else
     15#include <sys/types.h>
     16#endif
    1317#include "clock_orbit_rtcm.h"
    1418
     
    227231      left = nums - 28;
    228232      nums = 28;
     233    }
     234    else
     235    {
     236      left = 0;
    229237    }
    230238    while(nums)
     
    420428int moremessagesfollow, char *buffer, size_t size)
    421429{
    422   int gps, glo, mmi, i, j;
     430  int gps=0, glo=0, mmi, i, j;
    423431
    424432  STARTDATA
     
    600608  case COTYPE_GPSORBIT:
    601609    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     610    co->messageType = COTYPE_GPSORBIT;
    602611    G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
    603612    co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
     
    650659  case COTYPE_GPSCLOCK:
    651660    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     661    co->messageType = COTYPE_GPSCLOCK;
    652662    G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
    653663    co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
     
    683693  case COTYPE_GPSCOMBINED:
    684694    if(!co) return -5;
     695    co->messageType = COTYPE_GPSCOMBINED;
    685696    G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
    686697    co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
     
    720731  case COTYPE_GPSURA:
    721732    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     733    co->messageType = COTYPE_GPSURA;
    722734    G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
    723735    co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
     
    741753  case COTYPE_GPSHR:
    742754    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     755    co->messageType = COTYPE_GPSHR;
    743756    G_GPS_EPOCH_TIME(co->GPSEpochTime, co->NumberOfGPSSat)
    744757    co->epochGPS[co->epochSize] = co->GPSEpochTime;   /* Weber, for latency */
     
    763776  case COTYPE_GLONASSORBIT:
    764777    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     778    co->messageType = COTYPE_GLONASSORBIT;
    765779    G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
    766780    G_SSR_UPDATE_INTERVAL(co->UpdateInterval)
     
    811825  case COTYPE_GLONASSCLOCK:
    812826    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     827    co->messageType = COTYPE_GLONASSCLOCK;
    813828    G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
    814829    G_SSR_UPDATE_INTERVAL(co->UpdateInterval)
     
    842857  case COTYPE_GLONASSCOMBINED:
    843858    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     859    co->messageType = COTYPE_GLONASSCOMBINED;
    844860    G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
    845861    G_SSR_UPDATE_INTERVAL(co->UpdateInterval)
     
    877893  case COTYPE_GLONASSURA:
    878894    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     895    co->messageType = COTYPE_GLONASSURA;
    879896    G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
    880897    G_MULTIPLE_MESSAGE_INDICATOR(mmi)
     
    896913  case COTYPE_GLONASSHR:
    897914    if(!co) return GCOBR_NOCLOCKORBITPARAMETER;
     915    co->messageType = COTYPE_GLONASSHR;
    898916    G_GLONASS_EPOCH_TIME(co->GLONASSEpochTime, co->NumberOfGLONASSSat)
    899917    G_SSR_UPDATE_INTERVAL(co->UpdateInterval)
     
    916934  case BTYPE_GPS:
    917935    if(!b) return GCOBR_NOBIASPARAMETER;
     936    b->messageType = BTYPE_GPS;
    918937    G_GPS_EPOCH_TIME(b->GPSEpochTime, b->NumberOfGPSSat)
    919938    G_SSR_UPDATE_INTERVAL(b->UpdateInterval)
     
    940959  case BTYPE_GLONASS:
    941960    if(!b) return GCOBR_NOBIASPARAMETER;
     961    b->messageType = BTYPE_GLONASS;
    942962    G_GLONASS_EPOCH_TIME(b->GLONASSEpochTime, b->NumberOfGLONASSSat)
    943963    G_SSR_UPDATE_INTERVAL(b->UpdateInterval)
  • trunk/clock_and_orbit/clock_orbit_rtcm.h

    r1842 r2323  
    66        Name:           clock_orbit_rtcm.h
    77        Project:        RTCM3
    8         Version:        $Id: clock_orbit_rtcm.h,v 1.11 2009/05/14 13:24:13 stoecker Exp $
     8        Version:        $Id: clock_orbit_rtcm.h,v 1.6 2009/05/14 13:24:41 stoecker Exp $
    99        Authors:        Dirk Stöcker
    1010        Description:    state space approach for RTCM3
     
    5050struct ClockOrbit
    5151{
     52  enum ClockOrbitType messageType;
    5253  int GPSEpochTime;                 /* 0 .. 604799 s */
    5354  int GLONASSEpochTime;             /* 0 .. 86399 s (86400 for leap second) */
     
    9192struct Bias
    9293{
     94  enum BiasType messageType;
    9395  int GPSEpochTime;                 /* 0 .. 604799 s */
    9496  int GLONASSEpochTime;             /* 0 .. 86399 s (86400 for leap second) */
Note: See TracChangeset for help on using the changeset viewer.