gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] Minimum working example for libgps


From: Eric S. Raymond
Subject: Re: [gpsd-dev] Minimum working example for libgps
Date: Fri, 3 Nov 2017 09:26:54 -0400
User-agent: Mutt/1.5.24 (2015-08-30)

David Huichen Dai <address@hidden>:
> 2. This is only a toy program. In my project, I need to have the latest
> coordinates immediately whenever I want, I dont want to wait for any time
> before I can have the coordinates, also not in a loop as in this toy
> program. How could I achieve this?

You can never have this at all.

The problem is that your sensor only reports at 1-second intervals.  The best
you can do is sample at least once per second (0.5s is optimal) and cache
the last result.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>

My work is funded by the Internet Civil Engineering Institute: https://icei.org
Please visit their site and donate: the civilization you save might be your own.





reply via email to

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