Re: Re: Using gpsd
Bill Unruh <[email protected]>
| Newsgroups | gmane.comp.time.chrony.user |
|---|---|
| Message-ID | <[email protected]> |
There are three problems with NMEA for timing. One is the length of time that an NMEA phrase takes to communicate. (hundres of milliseconds). Second is that the length of the NMEA sentence varies, and thus that time is not constant and will fluctuate by many milliseconds. Third, the gps module places a low priority on the NMEA sentences and sends them only when all other calculations it does on the signals have finished, as I understand it. Again, many milliseconds, esp if you are tracking a variable number of sattelites. IF you want accurate timing(sub millisecond), use PPS (good to microseconds or hundred nanoseconds with a bit of work). If say a tenth of a second accuracy is fine, then use NMEA. William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273 Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324 UBC, Vancouver,BC _|_ Program in Cosmology |____ [email protected] Canada V6T 1Z1 ____|____ and Gravity ______|_ theory.physics.ubc.ca/ On Wed, 20 Mar 2024, [email protected] wrote: > [CAUTION: Non-UBC Email] > > On Tue, Mar 19, 2024 at 11:48:24PM -0700, Bill Unruh wrote: > >>> FWIW, I'm testing a daemon that reads an *i2c* gps device and >>> feeds to chrony, and I need to bias it by about 0.250s -- I think >>> it is just that slow to read the bytes from i2c. But I'm still >>> looking for a foolish logic error like you suggest. > >> That would surprize me very much, unless you are doing a very slow >> polling of the gps pps. .125 sec sound like the original IBMPC I >> bought in 1980. Maybe if you told us the hardware you are using and >> the OS you are using someone could help more. Now if it is not PPS >> but is rather reading the NMEA, then a slow baud rate could give you >> that, since the sentences can be about that long at 600Bd. Also, you >> really only need the NMEA for the first few seconds until the system >> knows the seconds. > > I can't (easily) use the PPS line because it's a separate pin, not > available over i2c. So yes, collecting NMEA lines. > > Hardware: Raspberry Pi 3B+ with this gadget: > > https://learn.adafruit.com/adafruit-mini-gps-pa1010d-module > > running legacy (32 bit) raspbian, and my hack here: > > https://gist.github.com/nobrowser/285d63410b9c2aec77a53587020cf2b6 > > I still want to try reading i2c with a super-slim C program instead, > but I'm not too optimistic about it. > > -- > Ian > > -- > To unsubscribe email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org > with "unsubscribe" in the subject. > For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org > with "help" in the subject. > Trouble? Email [email protected] > > -- To unsubscribe email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org with "unsubscribe" in the subject. For help email chrony-users-request-kWFZVVI9zxvPqho9SqqRMmD2FQJk+8+b@public.gmane.org with "help" in the subject. Trouble? Email [email protected]