gps backend issues
Jussi Kukkonen
jhkukkon at cc.hut.fi
Tue Jul 10 02:09:07 PDT 2007
I've been playing with the gps backend for a while now, and have some
comments / questions:
First, I just couldn't get my gps (Nokia LD-3W) to work with the
current gps backend: geoclue_position_current_position() calls gps_query
to get coordinates, but my device requires 10-60 such calls before it
gets a fix and starts answering with coordinates.
I've understood this is normal for gps devices -- gps data should in
general be read using a callback (and waiting until there's actual data).
Plan:
* I'll implementing geoclue_position_current_position_changed-signal
using gps_set_callback internally (it uses POSIX threading, I
assume that's ok?)
* current_position should probably use the same gps callback
internally, but dbus timeout may be a problem if geoclue waits for
an actual position before returning... I wonder if asynchronous
method calls have a timeout in dbus?
Second, I'm going to add some code to use libgpsbt and libgpsmgr when
present (they take care of of e.g. starting and stopping gpsd as needed
to preserve resources). At the moment this is maemo specific, but I
assume other mobile linux systems will use them too (it has been
discussed on the openmoko list at least), so I'd like to put the
changes in geoclue proper.
My solution was this, please suggest better ones if this is suboptimal:
* use AC_CHECK_LIB in configure.ac to define HAVE_LIBGPSBT
if the lib is there
* use "#ifdef HAVE_LIBGPSBT" in gps backend code when I want to
call the library
Any comments?
-jussi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/geoclue/attachments/20070710/83136654/attachment.pgp
More information about the GeoClue
mailing list