gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] [PATCH] Fix RTCM2 detection in packet.c


From: Eric S. Raymond
Subject: Re: [gpsd-dev] [PATCH] Fix RTCM2 detection in packet.c
Date: Thu, 8 Jan 2015 14:43:39 -0500
User-agent: Mutt/1.5.21 (2010-09-15)

Ahti Heinla <address@hidden>:
> Hi,
> 
>       RTCM2 support seems to be practically broken, if the stream
> frequently includes the 0x40 byte. This byte causes packet.c to
> temporarily think it is an AT1 stream, and stop calling rtcm2_decode()
> while it thinks so.
> 
>       I have an RTCM stream from station id 0, and this particular station ID
> causes the 0x40 byte to appear in virtually every RTCM message, so for that
> stream, I have to wait through hundreds of RTCM messages before it is
> positively identified and RTCM decoding starts to work.
> 
>       Patch attached, works for me.
> 
> Ahti Heinla

> diff --git a/packet.c b/packet.c
> index d5220fd..7a5d89e 100644
> --- a/packet.c
> +++ b/packet.c
> @@ -224,6 +224,12 @@ static void nextstate(struct gps_lexer_t *lexer, 
> unsigned char c)
>  #endif /* NMEA_ENABLE */
>  #if defined(TNT_ENABLE) || defined(GARMINTXT_ENABLE) || 
> defined(ONCORE_ENABLE)
>       if (c == '@') {
> +#ifdef RTCM104V2_ENABLE
> +         if (rtcm2_decode(lexer, c) == ISGPS_MESSAGE) {
> +             lexer->state = RTCM2_RECOGNIZED;
> +             break;
> +         }
> +#endif /* RTCM104V2_ENABLE */
>           lexer->state = AT1_LEADER;
>           break;
>       }

Merged and pushed.  Thanks for the fix; it will ship in the upcoming 
point release.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]