[Top][All Lists]

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

Re: gpsd NMEA message parsing

From: Gary E. Miller
Subject: Re: gpsd NMEA message parsing
Date: Tue, 11 Jan 2022 10:34:52 -0800

Yo Vikash!

On Tue, 11 Jan 2022 16:43:09 +0100
Vikash Jha <> wrote:

> I would like to understand some behaviors of gpsd python module. I am
> calling it in streaming mode:
>      self.session = gps.gps("localhost", port="2947")
>      # WATCH_NEWSTYLE is to force json report streaming

Have you looked at any of the gpsd python clients?  Like gegps, gpscsv, etc?

> The behavior I observe when I call is:
> I receive the following classes in order: tpv, sky, sky, sky, tpv in
> one second.

You subject line says NMEA, but now you mention the JSON?

> The GNSS sensor sends these values in one second to gpsd over serial
> in the form of NMEA messages.

Facts not in evidence.

> Now, what I expected to see is that gpsd combines all the information
> received from GNSS sensor in one second and presents it as a single
> class rather than 5 separate classes: tpv,sky,sky,sky,tpv.


> And let's say if this is correct behavior then how should I combine
> them together?

If they could be combined together, gpsd would have done so already.

The real questions, is what is you want from the data?  Depending
on your use case you will do things differently.

> Does gpsd output some separator which can be used to
> group them?

Yes, it is called JSON.  JSON is a standard.

> If I use a timestamp field to group messages then I can
> not mark the end until I receive the next timestamp which will cause
> a delay of 1 second.

Maybe, maybe not.  Use case dependent.
> Could you please let me know what am I missing here?

At this distance my powers of mind reading are dull.  If you explain your
use case that helps a lot.

> Any help would be
> appreciated.

We'll try.  But you also have to help yourself.  Read the doc, and the
example Python clients.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgp2dsgzy5nkO.pgp
Description: OpenPGP digital signature

reply via email to

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