|
From: | David Huichen Dai |
Subject: | Re: [gpsd-dev] Minimum working example for libgps |
Date: | Sat, 4 Nov 2017 15:13:31 +0800 |
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="" href="http://www.catb.org/~esr/" rel="noreferrer" target="_blank">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.
[Prev in Thread] | Current Thread | [Next in Thread] |