gpsd-users
[Top][All Lists]
Advanced

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

Re: [gpsd-users] Raspberry Pi, GPIO PPS and NTP


From: Gary E. Miller
Subject: Re: [gpsd-users] Raspberry Pi, GPIO PPS and NTP
Date: Fri, 10 Jun 2016 11:51:54 -0700

Yo Chris!

On Fri, 10 Jun 2016 16:19:23 +0100
Chris Hastie <address@hidden> wrote:

> On 09/06/16 19:25, Gary E. Miller wrote:
> >> Intrigued now :)  
> > 
> > Then read the comments at the top of ntpd/refclock_gpsdjson.c
> > 
> > And ponder this config fragment, it is the only gpsd json config
> > that works stably:
> > 
> >     # gpsd JSON
> >     server 127.127.46.128 minpoll 4 maxpoll 4
> >     fudge 127.127.46.128  time1 0.001500
> >     server 127.127.46.0 minpoll 4 maxpoll 4
> >     fudge 127.127.46.0 time1 0.142  
> 
> I've tried something very similar, but to no avail

You were warned.  I'll warn you again.

The place for this is really in the ntpsec list as this never worked and
they need to fix it.

>   # GPSD-NG driver
>   server 127.127.46.0 minpoll 4 noselect
>   fudge 127.127.46.0 time2 0.625 stratum 5 refid GPSD
>   server 127.127.46.128 minpoll 4 maxpoll 4
>   fudge 127.127.46.128 time1 0.00013 flag1 1 stratum 0 refid PPS
> 
> I see the serial clock OK, but the PPS clock continues to report a
> reach of 0.

First run gpspipe and see if you see a PPS in there.  BUt more
on your problemm below.

> This is what led me to wonder if getting the PPS from
> GPIO instead of a serial link was the problem. For things to work at
> all gpsd has to be started with the arguments /dev/gps0 /dev/pps0,

Yeah, for now.  It gets confuses with some of Eric's recent optimizations.

> but I can't see a way to associate pps0 with gps0.

Well, I warned you about the undocumented thing.  Refclock 46
is just not ready for real users.

I am pretty sure the answer is in your ntpd logs.  I forgot that
magic fu, but I remember that is how I found it.  I thing you need a
link, like gpps0 to your pps0, then use that on the gpsd command line.

> can see that gpsd checks the path attribute of /dev/pps0, but I can
> see no way to alter that. I did spot a comment from you at
> https://lists.nongnu.org/archive/html/gpsd-users/2015-07/msg00012.html

That is about the SHM driver, the one that works.

> > If you look at the gpsd INSTALL doc you'll find how to associate the
> > /dev/ppsX directly with the serial port to save the extra effort.  
> 
> but I failed to see anything in INSTALL that looked like it might fit.

Line 361 in my copy:

"For the RasPi only, the /dev/pps0 will be auto detected and used
for PPS if available.  You can verify the autodection worked by
running ntpshmmon:"

I should prolly add back in the explicit reference to /dev/pps0, but
you got it right.

> > ntpd often goes crazy when you restart it.  Sometimes scary crazy.
> > Do not look at it for at least 24 hours after a restart.  Maybe
> > 48.  
> 
> Well things were very much improved by adding a minpoll 4 here:
>   server 127.127.28.2 prefer minpoll 4

Cool.

> so I think I might stick with SHM for now.

Yup.  No win with the gpsdjson even when it works.

> > To keep from going crazy staring at ntpq, you need to install this:
> > 
> >     https://github.com/ddrown/chrony-graph  
> 
> I'll take a look at that when I have time. It looks to be written for
> chrony—does it work with ntpd too?

There is an ntp branch.  Dan needs to get it unified better.  YOu can see
my using it on a pi3 here:

    http://pi3.rellim.com/

> I have a bunch of graph scripts
> I've been using for years for ntpd which I hastily adapted to keep an
> eye on this project

A crying need.  Take a look at Dan's project and see if you can contribute.

> http://ntp.oak-wood.co.uk/blackthorn.offsets.php

I like that yours can select time ranges, etc.

I like Dan's in that he computes and displays the offsets and 90%/95%
error lines.

> > WHat I also see is a strong 24 hour cycle in the data.  This is due
> > to the GPS birds returning to the exact same geometry every
> > sidereal day! So make no judgements on less than several days of
> > combined data.  
> 
> Interesting. I had assumed the diurnal cycle was about the temperature
> going up and down in my office.

Me too.  But if you look at my graphs, unheated/uncooled room, the 
drift on the order of days correlates to the room temp.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  Tel:+1 541 382 8588

Attachment: pgpx2FfOuCnua.pgp
Description: OpenPGP digital signature


reply via email to

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