On Mon, Jan 25, 2021 at 10:11:03AM -0800, Gary E. Miller wrote: > Yo Jim! > > On Sun, 24 Jan 2021 18:06:12 -0800 > Jim Pennino <j...@gonzo.specsol.net> wrote: > > > I got a Pi 4 and Adafruit ultimate gps hat to play with and decided > > to see how good it was as a timekeeper. > > You will find it pretty good. With a bit of work it can keep > system time stable to about 100 ns. > > > First weird thing; xgps does not show a skyview but both xgps and cgps > > show at least 10 satellites in use. > > Before that: > > What versions of gpsd and xgps?
gpsd -V gpsd: 3.17 (revision 3.17) ntpd --version ntpd 4.2.8p12@1.3728-o (1) > > From your distro of from source? Distro, totally up to date. > > Did xgps give any warnings on the command line when started from the > command line? xgps Gtk-Message: 13:45:00.966: Failed to load module "canberra-gtk-module" TypeError: Couldn't find foreign struct converter for 'cairo.Context' Makes me think the distro is missing a dependancy. > > > I don't care too much about this one as AFAIK xgps is broken on Pi. > > Nope. Works for me. On buster? > > > Second weird thing; I started the 20 driver in mode 0. ntpq showed > > lots of syntax errors on the $GPGGA message. > > Before that: > > How are you running gpsd? Root? With what command line? sudo systemctl start gpsd sudo systemctl start gpsd.socket > > What version of ntpd? From where? As above. > > How are you running ntpd? Root? With what command line? sudo systemctl start ntp ps -eo euser,egroup,args | grep gps gpsd dialout /usr/sbin/gpsd -n -r /dev/ttyAMA0 /dev/pps0 ps -eo euser,egroup,args | grep ntp ntp ntp /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 115:124 > > Then please copy the errors here. > > > I changed the mode to 29 to deselect $GPGGA; no errors from ntpq. So > > maybe it was a satellite thing, but whatever it was, no more errors. > > We can only guess without seeing what you see. Not a big deal to me if ignoring $GPGGA makes the errors go away. > > > Third and biggest weird thing; I had fudge 127.127.20.0 flag1 1 time1 > > 0.001 in ntp.conf. After everything settled down, the clock was > > showing an offset of -1043. OK, So I changed time1 to 1.044 even > > though it looked too big. ntp wouldn't lie to me... > > It can takes days for ntpd to calibrate your system. How long did you > wait? It your serial port rate from your GNSS is slow, then you can > easily get off one second. Or maybe the receiver does not have the > current leap second yet. The GPS has been powered up since I stuck in the battery for the on board RTC 5+ days ago. How long does it typically take a receiver to have the current leap second. BTW, the GPS has an external antenna with a good view of the sky and cgps alway shows 11+ satellites in view and always 8+ in use. > > > After everything settled down this time the offset was showing an > > average of -738. For grins and giggles I set time1 to 0.738 and now > > the average offset is -584. > > > > time1 offset > > 0.001 -1043 > > 1.044 -738 > > 0.738 -584 > > > > It seems there is no way to get time1 to correct the offset. > > I hope you waited an hour or more between changes? ntpd is a > phase locked loop, it takes time to settle. Of course. > > > Also the jitter times look high. At this moment ntpq shows: > > That is to be expected early on. Don't bother to look at the > jitter until the offset is stable for hours. Right now ntp has been running for about 18 hours. Here is what ntpq is showing now: *127.127.20.0 .GPS. 0 l 7 16 11 0.000 -886.78 27.361 x127.127.28.0 .SHM. 0 l 5 16 377 0.000 -100.40 36.248 x127.127.22.0 .PPS. 0 l 9 16 377 0.000 -4.458 0.720 And this is from peerstats: showpeerstats 127.127.20.0 Count:4133 Avg offset:-0.514542 Std dev: 0.257913 Avg Skew: 0.237029 Std dev: 0.149433 127.127.22.0 Count:4945 Avg offset: 0.00498037 Std dev: 0.0291266 Avg Skew: 0.00530061 Std dev: 0.0110748 127.127.28.0 Count:4948 Avg offset: 0.00237325 Std dev: 0.080877 Avg Skew: 0.0593658 Std dev: 0.0643203 > > > For comparison, a GlobalSat BU-353-S4 USB GPS on a PC ubuntu system > > shows: *SHM(0) .SHM. 0 l 3 16 377 0.000 > > -0.728 1.356 > > Which I assume had been running for months. Yes and no; the system was rebooted 4 days before. > > > Anyone got any suggestions other than to trash the Ulitmate hat and > > get another GlobalSat USB? > > The Ultimate HAT is a much better GNSS than the GlobalSat. The SiRF 4 > is not very sensitive and uses fewer sats and constellations than the > u-blox > > RGDS > GARY > --------------------------------------------------------------------------- > Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703 > g...@rellim.com Tel:+1 541 382 8588 > > Veritas liberabit vos. -- Quid est veritas? > "If you can't measure it, you can't improve it." - Lord Kelvin > _______________________________________________ > questions mailing list > questions@lists.ntp.org > http://lists.ntp.org/listinfo/questions -- Jim Pennino _______________________________________________ questions mailing list questions@lists.ntp.org http://lists.ntp.org/listinfo/questions