<br><br><div><span class="gmail_quote">On 7/10/07, <b class="gmail_sendername">Jussi Kukkonen</b> <<a href="mailto:jhkukkon@cc.hut.fi">jhkukkon@cc.hut.fi</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've been playing with the gps backend for a while now, and have some<br>comments / questions:<br><br><br> First, I just couldn't get my gps (Nokia LD-3W) to work with the<br>current gps backend: geoclue_position_current_position() calls gps_query
<br>to get coordinates, but my device requires 10-60 such calls before it<br>gets a fix and starts answering with coordinates.<br> I've understood this is normal for gps devices -- gps data should in<br>general be read using a callback (and waiting until there's actual data).
<br> Plan:<br> * I'll implementing geoclue_position_current_position_changed-signal<br> using gps_set_callback internally (it uses POSIX threading, I<br> assume that's ok?)</blockquote><div><br>This is a good idea and should be the prefered method of getting a Signal.
<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> * current_position should probably use the same gps callback<br> internally, but dbus timeout may be a problem if geoclue waits for
<br> an actual position before returning... I wonder if asynchronous<br> method calls have a timeout in dbus?</blockquote><div><br>current_position shouldn't be asynchronous. If it does not have the position it should return that it doesn't and then the application should listen for the signal of position changed.
<br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Second, I'm going to add some code to use libgpsbt and libgpsmgr when
<br>present (they take care of of e.g. starting and stopping gpsd as needed<br>to preserve resources). At the moment this is maemo specific, but I<br>assume other mobile linux systems will use them too (it has been<br>discussed on the openmoko list at least), so I'd like to put the
<br>changes in geoclue proper.<br> My solution was this, please suggest better ones if this is suboptimal:<br> * use AC_CHECK_LIB in <a href="http://configure.ac">configure.ac</a> to define HAVE_LIBGPSBT<br> if the lib is there
<br> * use "#ifdef HAVE_LIBGPSBT" in gps backend code when I want to<br> call the library<br><br>Any comments?</blockquote><div><br>This sounds fine as long as it is an optional dependency.<br><br><br><br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> -jussi<br><br><br><br>_______________________________________________<br>GeoClue mailing list
<br><a href="mailto:GeoClue@lists.freedesktop.org">GeoClue@lists.freedesktop.org</a><br><a href="http://lists.freedesktop.org/mailman/listinfo/geoclue">http://lists.freedesktop.org/mailman/listinfo/geoclue</a><br><br><br>
</blockquote></div><br>