gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Flush unconsumed GPS reports in Python


From: Gary E. Miller
Subject: Re: [gpsd-users] Flush unconsumed GPS reports in Python
Date: Wed, 20 Dec 2017 11:49:01 -0800

Yo Alex!

On Wed, 20 Dec 2017 10:16:11 +0000
Alex <address@hidden> wrote:

> I understand the logic of what you say and it was my intention to
> implement something like that. However, given that this is probably a
> common scenario

Nope, never heard of anyone trying the same.

> - I was wondering if I wouldn't be reinventing the bicycle, and if
> there are existing solutions to this problem.

Nope.  None that I know of.  gpsd users are concerned about latency.
Waiting around for the next GPS input, which could take quite a while,
just drives latency way up and annoys the end users.

> I am guessing there are none, so I wrote this, with the intention of
> calling this function every time I need a fresh report. It clears the
> queue, then I can call my regular read function:

Or, instead of clearing the Queue that you yourself created.  Just
close the port 2947, then open it when you want the next readings.

> 1. Is it possible that the speed at which new reports are received is
> much higher than the speed at which they are consumed?  (even without
> any `sleep` calls inside the loop??!)

Nah, it would be rare to see even 10 gpsd reports a second.  Unless
you are using an expensive high rate GPS.

> This is somewhat puzzling, because as you said - it shouldn't be a
> complicated matter.

Yup, you are just making it commpicated.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  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: pgpqBkMyN6c6S.pgp
Description: OpenPGP digital signature


reply via email to

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