View Full Version : [Announce] automatically synchronize your clock to GPS time
gps-clockd is a tiny (14KB) daemon that runs in the background and synchronizes the clock to GPS time whenever GPS is turned on. The daemon is started automatically at boot time. Adjustments are logged to /var/log/gps-clockd.log
[root@nokia ~]# cat /var/log/gps-clockd.log
[Sat Feb 2 20:47:25 2008] *** GPS Clock Daemon started ***
[Sat Feb 2 20:52:07 2008] GPS activated. Time to first fix 01m25s
[Sat Feb 2 20:52:07 2008] Adjusted clock by -0.39 seconds to match GPS time
[Sat Feb 2 21:02:08 2008] Adjusted clock by 0.14 seconds to match GPS time
Download at http://nitapps.com
So with this our clocks will be 24hrs early too ? :-)
dogsbody
02-03-2008, 01:18 PM
Nice! Thank you :)
TA-t3
02-04-2008, 08:46 AM
How accurate is it? I'm asking because when I run both my Palm T3 and my N800 with GPS units and showing the time, the N800 lags by one second approximately.. presumably because the N800 goes through daemons and whatnot while the T3 is more directly connected to the (GPS) iron (or less overhead at least).
jussik
02-04-2008, 09:56 AM
gps-clockd is a tiny (14KB) daemon that runs in the background and synchronizes the clock to GPS time whenever GPS is turned on. The daemon is started automatically at boot time.
Cool (also explains how you stumbled on the gpsd bug). Still, this is yet another reason why gpsmgr and gpsbt being closed source is a bloody stupid idea: this feature should definitely be inside those libs.
anidel
02-04-2008, 10:49 AM
Could you tell us how faster the battery will drain with the GPS being activated all the time ?
In my small test (Map application running) it was not so bad at all.. the GPS was using just a small amount of battery (the indicator was still full at the end of the day, everything off).
How accurate is it? I'm asking because when I run both my Palm T3 and my N800 with GPS units and showing the time, the N800 lags by one second approximately.. presumably because the N800 goes through daemons and whatnot while the T3 is more directly connected to the (GPS) iron (or less overhead at least).
rdate tells me adjustments are accurate to within 0.2 - 0.3 seconds.
Could you tell us how faster the battery will drain with the GPS being activated all the time ?
In my small test (Map application running) it was not so bad at all.. the GPS was using just a small amount of battery (the indicator was still full at the end of the day, everything off).
My N810 lasts about 10 hours with GPS constantly on.
Just to be clear, gps-clockd does not activate GPS when it's running. It piggybacks on other applications that use GPS.
gps-clockd should have a negligible effect on battery life, as it is event driven.
This utility now also logs time to first fix whenever GPS is turned on.
squad_com
03-15-2008, 07:24 PM
I tried to install gps-clockd on my N800 and I got a “incompatible application package” message.
YoDude
03-21-2008, 10:07 AM
I tried to install gps-clockd on my N800 and I got a “incompatible application package” message.
+1... Is there a work around?
The GPS chip/system itself is very conservative on power.
It is all the computation and graphics to display the maps. I've noticed the mapping program I wrote for the Zaurus doesn't kill the battery as much as the built-in mapping program. But I wrote it to be extremely efficient - less CPU time, less power used.
YoDude
03-26-2008, 07:29 PM
+1... Is there a work around?
I guess not.
darethehair
03-27-2008, 02:52 PM
ag2:
Can you tell me how to decode the GPS time value returned from the 'Python-GPSbt' routines i.e. gpsdevice.fix.time? This is described here:
http://pymaemo.garage.maemo.org/documentation/python_gps_examples/index.html
For me, the value returned looks like:
1206643018.0
I guess this is some sort of encoded GPS date/time value?
Thanks
EDIT: I think I found the answer -- in this case, the code is returning the UNIX internal time i.e. the number of seconds elapsed since 1970/010/01. Just to make matters even more confusing, sometimes 'GPS time' is the number of seconds elapsed from 1980/01/06.
isaacs
03-31-2008, 09:38 PM
I guess not.
+2 I can't get it to work either. I really would like to have it working. What is the deal with incompatible package error?
Isaac.S
TA-t3
04-02-2008, 06:21 AM
+2 I can't get it to work either. I really would like to have it working. What is the deal with incompatible package error?
Isaac.S
It's because in the package control file 'Section' is set to 'utils', which won't work with the application manager. It only accepts Sections in 'user'. There are three ways to fix it:
1) - The author modifies the control file and makes a new package
2) - or you install the existing one by downloading, sudo gainroot, dpkg -i gps_clockd_1.0-3_armel.deb
3) - or you try the modified package that I attach here (untested), which is the original but with a very small change: Section is now 'user/utils' instead of 'utils'.
EDIT: Footnote added:
This need for the debian package section to be 'user' or 'user/*' is a specific OS200x/Application Manager issue, and not used by other Linux/Debian platforms. Presumably it's done this way as a method to "filter" packages that are allowed to be installed by the user vs. packages that can only be installed as superuser (root).
isaacs
04-02-2008, 11:08 AM
Thanks for the clarification on that. I have done some linux things but not familiar with all the ways to get around some of the messages on the tablet. I ended up getting it to install by going into red pill mode but it is nice to know how to do it without having to change to red pill.
Isaac.S
YoDude
04-03-2008, 02:40 PM
It's because in the package control file 'Section' is set to 'utils', which won't work with the application manager. It only accepts Sections in 'user'. There are three ways to fix it:
1) - The author modifies the control file and makes a new package
2) - or you install the existing one by downloading, sudo gainroot, dpkg -i gps_clockd_1.0-3_armel.deb
3) - or you try the modified package that I attach here (untested), which is the original but with a very small change: Section is now 'user/utils' instead of 'utils'.
I be synchronized!
TA-t3's package worked as advertised on my N800. Thanks :)
gps-clockd and other apps on nitapps.com should now work with the application manager (I put everything in user/tools). Enjoy.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.