shmpps is a program which uses the shm refclock driver. 
It is referenced on time.qnan.org, and you can get the driver from there.

In ntp, you set ntp to use the shm refclock
Eg in my /etc/ntp.conf I have
server 127.127.28.0 minpoll 4 prefer
fudge 127.127.28.0 refid PPS flag3 1
This tells ntp to use the shm refclock driver ( it is lined to 127.127.28.0)
Then you run the shmpps which checks to see if the ntp time is good to within
a quarter second, and then runs shm_plc2 to start up the PPS program which
writes to the shared memory for ntpd to read.

You do need something else to set the clock to the nearest second.

Now you could use the NMEA refclock driver WITHOUT the PPS to provide the
initial time
server 127.127.20.0



On Mon, 26 Jan 2009, phil.new...@wendysarbys.com wrote:



> Well, I've managed to wind myself completely up in my huggies....
>
> I built a nice little 18x LVC setup this weekend, based on the circuit at
> time.qnan,org.  I successfully get data from the GPS (9600 baud) and a PPS
> signal.  I tried using the gpsd driver and am having no luck with it
> whatsoever.  So, I have to ask at this point, what exactly did you mean
> "just use the shmpps set of routines to set up pps using the shm refclock"?
> I am running Fedora 8 Linux, for what that might be worth....
>
> Thanks for any assistance you can provide!
>
> Phil
>
>
> Debug output from gpsd.  Seems to be communicating OK, but loops with
> "reconfiguring for garmin serial"
>
> gpsd: <= GPS:
> $GPRMC,192734,A,4006.0064,N,08306.3234,W,000.0,203.8,260109,006.5,W,D*19^M
> gpsd: GPRMC starts a reporting cycle.
> gpsd: GPRMC sets mode 2
> gpsd: ntpshm_put: Clock: 1232998054 @ 1232998054.745896
> gpsd: <= GPS:
> $GPGGA,192734,4006.0064,N,08306.3234,W,2,07,2.4,345.2,M,-32.8,M,,*77^M
> gpsd: GPGGA sets status 2 and mode 3 (changed)
> gpsd: <= GPS: $GPGSA,A,3,,,10,,15,,21,24,26,29,30,,4.7,2.4,4.1*3E^M,
> gpsd: GPGSA sets mode 3
> gpsd: <= GPS:
> $GPGSV,3,1,11,02,34,096,18,05,03,217,26,10,64,040,25,12,03,207,18*72^M
> gpsd: Partial satellite data (1 of 3).
> gpsd: <= GPS:
> $GPGSV,3,2,11,15,36,171,40,18,02,239,33,21,16,293,21,24,58,314,24*7D^M
> gpsd: Partial satellite data (2 of 3).
> gpsd: <= GPS: $GPGSV,3,3,11,26,45,149,30,29,60,287,25,30,12,238,32*4C^M
> gpsd: Satellite data OK (3 of 3).,
> gpsd: <= GPS: $PGRMC,A,,100,,,,,,A,,1,2,1,30*4B^M
> gpsd: GPRMC sets mode 0,
> gpsd: found $PGRMC,.
> gpsd: switch_driver(Garmin Serial) called...
> gpsd: Reconfiguring for Garmin Serial...
> gpsd: => GPS: $PGRMC,A,,100,,,,,,A,,1,2,1,30*4B\x0d
>
>
> After running for about the last hour, this is what I continue to see on
> the
>
> [r...@splunk /root]# ntpq -p
>     remote           refid      st t when poll reach   delay   offset
> jitter
> ==============================================================================
> xSHM(0)          .GPS0.           0 l    1   16  377    0.000  -667.98
> 42.005
> SHM(1)          .PPS.            0 l    -   16    0    0.000    0.000
> 0.002
> x10.255.213.232  128.4.40.12      3 u   31   64  377    0.186   -1.647
> 0.429
>
>
>   [r...@splunk /root]# cat /etc/ntp.conf
>
>   driftfile /var/lib/ntp/drift
>   server 127.127.28.0 minpoll 4
>   fudge 127.127.28.0 time1 0.000 refid GPS0
>   server 127.127.28.1 minpoll 4 prefer
>   fudge 127.127.28.1 refid PPS
>   server ntp.wendysi.com iburst
>
>
> $GPRMC,193313,A,4006.0050,N,08306.3246,W,000.0,203.8,260109,006.5,W,D*1B
> $GPGGA,193313,4006.0050,N,08306.3246,W,2,05,2.2,344.7,M,-32.8,M,,*75
> $GPGSA,A,3,,,10,15,,24,29,30,,,,,4.0,2.2,3.3*3D,
> $GPGSV,3,1,11,02,33,098,34,05,02,215,14,10,62,041,18,15,38,170,38*70
> $GPGSV,3,2,11,18,04,241,36,24,60,317,28,29,62,282,27,30,11,236,26*7A
> $GPGSV,3,3,11,07,01,042,00,08,03,077,00,12,01,206,00*44,
>
>
>
>
>> You can just use something like gpsd to use the shm hardware clock to run
> the pps.
>> I would just use the shmpps set of routines to set up pps using the shm
> refclock.
>

-- 
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 |     un...@physics.ubc.ca
Canada V6T 1Z1     |      and Gravity       |  www.theory.physics.ubc.ca/
_______________________________________________
questions mailing list
questions@lists.ntp.org
https://lists.ntp.org/mailman/listinfo/questions

Reply via email to