|
|
2015-02-19
, 19:20
|
|
|
Posts: 1,974 |
Thanked: 1,834 times |
Joined on Mar 2013
@ india
|
#2
|
|
|
2015-02-19
, 19:27
|
|
|
Posts: 4,118 |
Thanked: 8,901 times |
Joined on Aug 2010
@ Ruhrgebiet, Germany
|
#3
|

)
|
|
2015-02-22
, 16:17
|
|
Posts: 89 |
Thanked: 194 times |
Joined on Feb 2010
|
#4
|
|
|
2015-02-22
, 19:34
|
|
|
Posts: 6,446 |
Thanked: 20,981 times |
Joined on Sep 2012
@ UK
|
#5
|
| The Following 2 Users Say Thank You to pichlo For This Useful Post: | ||
|
|
2015-02-28
, 12:45
|
|
Posts: 89 |
Thanked: 194 times |
Joined on Feb 2010
|
#6
|
It does! Albeit indirectly. It uses NTP, utilizing GPS as one of the clock sources. Read about the strata in the linked article.
| The Following User Says Thank You to JohnHughes For This Useful Post: | ||
#!/usr/bin/python import location import gobject from sys import stderr def on_error(control, error, data): stderr.write("location error: %d... quitting" % error) data.quit() def on_changed(device, data): if not device: return if device.fix: if device.fix[1] & location.GPS_DEVICE_TIME_SET: timestamp, accuracy = device.fix[2:4] if accuracy == 0: print "%d" % timestamp data.stop() def on_stop(control, data): data.quit() def start_location(data): data.start() return False method = location.METHOD_USER_SELECTED loop = gobject.MainLoop() control = location.GPSDControl.get_default() device = location.GPSDevice() control.set_properties(preferred_method=method, preferred_interval=location.INTERVAL_DEFAULT) control.connect("error-verbose", on_error, loop) device.connect("changed", on_changed, control) control.connect("gpsd-stopped", on_stop, loop) gobject.idle_add(start_location, control) loop.run()