On Thursday 18 October 2007, Simon Arlott wrote:
> On Thu, October 18, 2007 12:32, Chuck wrote:
> > i am looking for the best way to use a garmin gps18lvc. i have it running
just
> > fine using the gpsd driver however i guess my question is, if i patch the
> > kernel for the pps option, would that be any more accurate? or is it a
don't
> > care situation?
> >
> > personal preferences aside, are there technical/accuracy reasons why one
may
> > be better over the other?
>
> In-kernel code doesn't need a context switch to userspace to store the time
the
> PPS signal was received. I don't think it would make any noticeable
difference
> as long as gpsd was set to realtime priority.
>
> Other processing (e.g. parsing NMEA message) could be running while the PPS
> interrupt came in - that would affect it. However gpsd's code looks ok:
>
> /* wait for status change on the device's carrier-detect line */
> while (ioctl(session->gpsdata.gps_fd, TIOCMIWAIT, pps_device) == 0) {
> (void)gettimeofday(&tv,NULL);
>
> This part doesn't:
>
> if (getuid() == 0) {
> (void)nice(-10); /* for precise timekeeping increase priority */
>
> gpsd never sets realtime priority:
> ~/gpsd $ grep sched_setscheduler *
> ~/gpsd $ ls
>
> That's a bug that should be fixed before PPS can be used reliably.
>
maybe that's why my offset on the pps kept drifting between -5 to +5
microseconds. it seemed to do that about every 4 or 6 hours. maybe when it
switched to different satellites? or are gps geostationary?
there are a lot of reasons, first of which this is an old motherboard i did
the tests with. the cmos battery was dead.
since gentoo has gpsd in its packaging, i will have to change that source line
and recompile it myself (maybe nice -15 ?). the final destination machine
runs nothing else but ntpd and a program that runs by default at nice 19 and
it drops at the first sign of cpu need until the cpu is idle again.
> --
> Simon Arlott
> _______________________________________________
> timekeepers mailing list
> [email protected]
> https://fortytwo.ch/mailman/cgi-bin/listinfo/timekeepers
>
--
Chuck
"...and the hordes of M$*ft users descended upon me in their anger,
and asked 'Why do you not get the viruses or the BlueScreensOfDeath
or insecure system troubles and slowness or pay through the nose
for an OS as *we* do?!!', and I answered...'I use Linux'. "
The Book of John, chapter 1, page 1, and end of book
_______________________________________________
timekeepers mailing list
[email protected]
https://fortytwo.ch/mailman/cgi-bin/listinfo/timekeepers