[Top][All Lists]

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

Re: [gpsd-users] Correct way to handle 5 Hz on an application

From: Gary E. Miller
Subject: Re: [gpsd-users] Correct way to handle 5 Hz on an application
Date: Mon, 22 Oct 2018 11:29:57 -0700

Yo Lisandro!

On Mon, 22 Oct 2018 11:16:24 -0300
Lisandro Damián Nicanor Pérez Meyer <address@hidden> wrote:

> The situation is the following: gpsd receives NMEA from a GPS device
> from a UDP stream. The GPS device is configured via a µController to
> send updates at 5Hz.

Not too unusual.

> And then I set up a timer to poll every 150ms., which does:

You are not really polling.  gps_waiting() is checking the input queue.

>   - Is polling the right thing to do here?

No, but what you are doing is good.

>   - Is there another way to handle this? I tired dbus and shmem but
> could not make them work 

Many ways to skin the cat, you only need one.

> (running Debian unstable).

Your OS is unimportant.  Just be sure you are using gpsd 3.18.1.

> I don't know if
> it's because the data comes from an UDP feed or something else is
> happening.

You did bot mention any specific problem, so not sure what 'because'
you are talking about.

> I have checked that the Debian package builds with dbus
> andshmem support, but still :-/

When in doubt, build from git head.  We can't support 3rd party packagers.
We have no idea what they did and with what version.

>   - Should I check mGPSData.fix.time to see if the info I received is
> new or gps_read() will only return the latest status?

First check that cgps or xgps works against your running gpsd.  So far
you provided zero info on where in your chain your first failure is, or
what your failure looks like.

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: pgpBReKft3p5w.pgp
Description: OpenPGP digital signature

reply via email to

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