[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] Minimum working example for libgps
From: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] Minimum working example for libgps |
Date: |
Sat, 4 Nov 2017 13:01:29 -0700 |
Yo David!
On Sat, 4 Nov 2017 15:13:31 +0800
David Huichen Dai <address@hidden> wrote:
> Thanks for your reply. Why do you say that my sensor reports at
> 1-second interval? I set the gps_waiting time to 2 seconds, which
> means I wait for up to 2 seconds to get the coordinates, not sampling
> every 2 seconds, right?
gps_waiting is client side. But your GPS just sends data when it wants to,
usualy PVT once a second, and gpsd passes it on when it sees it. Thus you
should get PVT once a second.
> Do I need a separate thread to sample the coordinates, store them in a
> variable, and access it from other thread when I need the
> coordinates? Is this the common way to use the libgps?
Nah, the OS buffers the socket for you. Just poll the gpsd interface in
you main loop.
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
pgpbQS4vGC9Qx.pgp
Description: OpenPGP digital signature
- [gpsd-dev] Minimum working example for libgps, David Huichen Dai, 2017/11/03
- Re: [gpsd-dev] Minimum working example for libgps, Michael J. Tubby B.Sc. MIET, 2017/11/03
- Re: [gpsd-dev] Minimum working example for libgps, Eric S. Raymond, 2017/11/03
- Re: [gpsd-dev] Minimum working example for libgps, Hal Murray, 2017/11/03
- Re: [gpsd-dev] Minimum working example for libgps, David Huichen Dai, 2017/11/04
- Re: [gpsd-dev] Minimum working example for libgps, Eric S. Raymond, 2017/11/04
- Re: [gpsd-dev] Minimum working example for libgps,
Gary E. Miller <=
- Re: [gpsd-dev] Minimum working example for libgps, David Huichen Dai, 2017/11/05
- Re: [gpsd-dev] Minimum working example for libgps, Gary E. Miller, 2017/11/06
- Re: [gpsd-dev] Minimum working example for libgps, Hal Murray, 2017/11/07
- Re: [gpsd-dev] Minimum working example for libgps, Gary E. Miller, 2017/11/07
- Re: [gpsd-dev] Minimum working example for libgps, Hal Murray, 2017/11/07
- Re: [gpsd-dev] Minimum working example for libgps, Gary E. Miller, 2017/11/07
- Re: [gpsd-dev] Minimum working example for libgps, Hal Murray, 2017/11/08
- Re: [gpsd-dev] Minimum working example for libgps, Gary E. Miller, 2017/11/08
Re: [gpsd-dev] Minimum working example for libgps, Gary E. Miller, 2017/11/03