Q wrote:
I wonder if someone would be kind enough to help me out a little here. I have done lots of googleing and found nothing that helps me out with the issues I'm seeing.

I am trying to reduce the PPS offset & delay (Which seem quite high for a local device) and stop the NMEA driver from swinging and becoming a false ticker.

Any ideas please would be great. This is only a personal project, but I was expecting slightly better results! Below are debug outputs, configs and some other 'useful' stuff if you could take a look over them and let me know what I could be doing wrong, or would otherwise benefit from changing.

Cheers!

GPS;
GPS18x - NMEA outputting GPRMC to serial port.
GPS18x - PPS outputting to Pin 1 of serial port.

BAUD Rate - 115200, 8N1
NMEA Sentences output - GPRMC
PPS Length: 200msec
PPS Mode 1Hz
NMEA Output time - 1 sec
NMEA Mode 2.30 - ON

Using NetBSD-5

I found gpsd useful for debugging but just used the normal gps
type 20 driver and type 22 for pps

######
tos mindist 0.4

server 127.127.20.0 mode 1 prefer minpoll 6 maxpoll 8
fudge  127.127.20.0 time1 0.651 refid GPSb

server 127.127.22.0 minpoll 4 maxpoll 6
fudge  127.127.22.0 refid PPSb flag3 1

#######

For some time I was using parallel port for pps but didn't
find much difference parallel/serial or kernel/ppsapi.

Offset would be a few microseconds.

There are differences between versions of ntpd so that required
fudge values may not be same.


David



Machine;
Very old AMD Duron 1Ghz CPU
384Mb RAM
Serial - '3: uart:16550A port:000002E8 irq:3 tx:20052 rx:32887544 fe:976 pe:1318 brk:3 oe:132 RTS|DTR'

gpsd;
Sample of debug output (/usr/local/sbin/gpsd -n -b -N -D2 /dev/ttyS3)

gpsd: speed 115200, 8N1
gpsd: gpsd_activate(): opened GPS (fd 4)
gpsd: NTPD ntpd_link_activate: 1
gpsd: /dev/ttyS3 identified as type Generic NMEA (0.107275 sec @ 115200bps)
gpsd: => Probing device subtype 0
gpsd: GPS on /dev/ttyS3 is offline (0.000727 sec since data)
gpsd: PPS cycle: -753943806, duration: -753943806 @ 1293067869.993730
gpsd: PPS pulse rejected
gpsd: PPS cycle: -753743809, duration: 199997 @ 1293067870.193727
gpsd: PPS pulse rejected
gpsd: => Probing device subtype 1
gpsd: GPS on /dev/ttyS3 is offline (0.000267 sec since data)
gpsd: PPS cycle: 1000010, duration: 800013 @ 1293067870.993740
gpsd: PPS pulse rejected
<some log missing because its just too long to post here>
gpsd: GPS on /dev/ttyS3 is offline (0.000185 sec since data)
gpsd: PPS cycle: 999985, duration: 799986 @ 1293067891.993654
gpsd: PPS cycle: 999986, duration: 200000 @ 1293067892.193654
gpsd: PPS pulse rejected


ntp.conf;
restrict default kod nomodify notrap nopeer noquery
restrict 127.0.0.1

server Private1
server Private2
server Private3
server Private4
server Private5
server Private6
server Private7
server Private8
server Private9
server Private10
server Private11

broadcast 224.0.1.1 key 6
manycastserver 239.255.254.254

#Local Clock
server  127.127.1.0
fudge   127.127.1.0 stratum 10

#NMEA
server 127.127.28.0
fudge 127.127.28.0 time1 0.500 refid GPS

#PPS
server 127.127.28.1
fudge 127.127.28.1 refid PPS

driftfile /var/lib/ntp/drift
keys /etc/ntp/keys
trustedkey 6


Output of 'ntpq -p' (Several days clean running);

remote refid st t when poll reach delay offset jitter
==============================================================================
+Private1   .GPS.            1 u  984 1024  377   14.012    0.205   0.101
-Private2  .GPS.              1 u 1017 1024  377   14.113    0.393   0.445
-Private3     .GPS.           1 u  974 1024  377    9.706    0.208   0.256
-Privat4     .MSF.            1 u 1013 1024  377   10.875    1.662   0.040
-Private5     .PPS.            1 u 1020 1024  377   19.916   -0.660   0.475
-Private6     .DCFa.         1 u 1004 1024  377    9.496    0.276   0.226
-Private7  195.66.241.2   2 u 1004 1024  377   14.690    0.970   0.163
 Private8 .GPS.                1 u   5h 1024    0   23.721   -0.517   0.000
-Private9  .PPS.               1 u 1022 1024  377   14.671   -3.016   0.012
+Private10  .PPS.            1 u 1006 1024  377   15.811   -0.262   0.020
-Private11 .CDMA.         1 u   56 1024  377   86.819   -4.640   0.101
 NTP.MCAST.NET   .MCST. 16 u    -   64    0    0.000    0.000   0.001
 LOCAL(0)        .LOCL. 10 l   40   64  377    0.000    0.000   0.001
xSHM(0)          .GPS.      0 l   57   64  377    0.000  -35.284  19.872
*SHM(1)          .PPS.      0 l   32   64  377    0.000   -0.488   0.046


At the moment the NMEA is being reported as a flase ticker - the offset swings violently from + to - sometimes its a valid ticker, others it not.

A few more readings - after the poll

xSHM(0) .GPS. 0 l 18 64 377 0.000 -33.130 19.161 *SHM(1) .PPS. 0 l 59 64 377 0.000 -0.542 0.063 xSHM(0) .GPS. 0 l 10 64 377 0.000 -45.655 15.924 *SHM(1) .PPS. 0 l 48 64 377 0.000 -0.541 0.051 xSHM(0) .GPS. 0 l 27 64 377 0.000 -26.448 13.995 *SHM(1) .PPS. 0 l 1 64 377 0.000 -0.573 0.060

If I give it another half hour the NMEA will be 'ok' and the offset would have swung the other way into +ive land.

Now I know that NMEA is 'slow' but I wouldn't of expected it to wander all over the place like that.

The PPS also appears to have a rather large offset - If I fudge it it will break in a nasty way.

All of those stats are after a good few days running without being touched - I have mrtg graphs if they are of any help.


Fresh from an ntp restart I get the following;

SHM(0) .GPS. 0 l 10 64 7 0.000 -12.028 18.019 SHM(1) .PPS. 0 l 10 64 7 0.000 -0.763 0.034 -SHM(0) .GPS. 0 l 20 64 17 0.000 -14.131 13.111 *SHM(1) .PPS. 0 l 18 64 17 0.000 -0.755 0.033 -SHM(0) .GPS. 0 l 58 64 17 0.000 -14.131 13.111 -SHM(1) .PPS. 0 l 56 64 17 0.000 -0.755 0.033 *SHM(0) .GPS. 0 l 14 64 37 0.000 -36.112 17.250 +SHM(1) .PPS. 0 l 12 64 37 0.000 -0.576 0.199 +SHM(0) .GPS. 0 l 21 64 77 0.000 -16.348 12.642 *SHM(1) .PPS. 0 l 20 64 77 0.000 2.978 3.713 +SHM(0) .GPS. 0 l 9 64 177 0.000 -27.085 10.346 *SHM(1) .PPS. 0 l 8 64 177 0.000 4.194 4.527 xSHM(0) .GPS. 0 l 1 64 377 0.000 -37.895 16.898 *SHM(1) .PPS. 0 l 2 64 377 0.000 6.115 5.954

'ntpq -c rv'
assID=0 status=09b4 leap_none, sync_telephone, 11 events, event_peer/strat_chg,
version="ntpd 4.2....@1.1570-o Sat Dec 19 00:58:16 UTC 2009 (1)",
processor="i686", system="Linux/2.6.18-194.11.3.el5", leap=00,
stratum=1, precision=-20, rootdelay=0.000, rootdispersion=14.620,
peer=23623, refid=PPS,
reftime=d0c347f4.c01e663d  Mon, Dec 27 2010 17:14:28.750, poll=6,
clock=d0c34822.437c3419  Mon, Dec 27 2010 17:15:14.263, state=4,
offset=3.465, frequency=-20.530, jitter=6.901, noise=7.660,
stability=0.189, tai=0











_______________________________________________
questions mailing list
questions@lists.ntp.org
http://lists.ntp.org/listinfo/questions

Reply via email to