From owner-freebsd-hackers@FreeBSD.ORG Tue Aug 9 21:34:33 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BF2116A42A for ; Tue, 9 Aug 2005 21:34:33 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D99044374 for ; Tue, 9 Aug 2005 21:12:00 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j79L8j9W031191; Tue, 9 Aug 2005 15:08:45 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 09 Aug 2005 15:08:45 -0600 (MDT) Message-Id: <20050809.150845.71119932.imp@bsdimp.com> To: dgilbert@dclg.ca From: Warner Losh In-Reply-To: <17145.469.365833.447736@canoe.dclg.ca> References: <17144.64281.705769.294109@canoe.dclg.ca> <1123613910.9836.15.camel@realtime.exit.com> <17145.469.365833.447736@canoe.dclg.ca> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 09 Aug 2005 15:08:45 -0600 (MDT) Cc: freebsd-hackers@freebsd.org Subject: Re: Bluetooth GPS for timekeeping? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2005 21:34:33 -0000 > The GPS docs "say" that the GPS chipset keep time to within 100ns. > However (and I assume this is to save power) they also say that the > position indication is only sent once per second. 100ns is really horrible GPS performance. However, it is likely more than good enough for using it to track time on a server. ntp over the net is good to the millisecond range anyway, and this is 4 orders of magnitude better. > In my case, the Bluetooth GPS would be talking to a Bluetooth dongle > hanging directly out a port of the server in question. ntpd will require direct access to the device, so it will need to be off the server in question. As to how accurate you'll be, that's another matter altogether. There's propigation delays that will give your system some fixed offset from true time. There's also likely going to be variance in latency due to bluetooth layer good, usb layer goo, interrupts, etc. This will likely be in the several tens to low hundreds of microseconds range given all the interconnect technology that's bettween the GPS receiver and the time keeping device. I don't think that the USB based com ports supports the pps time stamping interface. That's likely going to be what kills your project unless (a) the bluetooth dongle is connected via a sio port or (b) you hack the ucom driver to cope. You'd likely be money ahead by using a simpler, wired GPS receiver directly into a legacy serial port. Warner