View Single Post
Posts: 214 | Thanked: 140 times | Joined on Aug 2010
#182
Right, I should have been clearer in my description that "link above" reffered to the google api download posted a few posts above mine. Duh. I edited my post to reflect this (which will make this thread poshumusly hard to follow, but hey )

I wonder if some Smart Person could turn the google python api's into a package.... assuming the google api distribution rules allow this....(?)

As for GPS, all the changes I did were the following:

#1: Change the mode from METHOD_ACWP to METHOD_AGNSS (See documentation of python location API at http://wiki.maemo.org/PyMaemo/Using_Location_API ). Another choice would be METHOD_USER_SELECTED which seems to take it from some configuration.

#2: Tell it to ignore any gps point with an accuracy worse than 150 meters (actually, variable "acclimit" in the code is set to this, I was actually planning to make it an option, but never did, you could change "acclimit" to whatever accuracy you think is appropriate by just editing line 112 in the code)

Frankly, I don't know the GPS api well enough to know exactly what happens and if it will try endlessly to find satellites or not. Probably. There is, most certainly, no clever code in this snippet to try to do anything intelligent here, for sure.

For me, I have a low wooden house so I have quite OK GPS signal also indoors, and since I deem non-GPS coordinates to be useless, for me it is a "feature" that it never uses cell tower locations at all (then "last known good" GPS coord is better, IMHO).

But you are quite right about that if you are in a bunker, it will quite probably try for way too long. Especially since my extremely simplictic implementation of the "once" option, is that it stops after the first successful fix (with successful being "better than 150 meter accuracy").

So I'm guessing it will never actually exit properly for a cell tower location.

All these are things that could be fixed, but, hey, this was just a hack for my own use, and I'm just poking at this thing with a stick with very little understanding anway, so.....

((For example, does anyone know, that if I set the longest interval for getting GPS point - unfortunately 120 seconds seems the max - the GPS icon is still on all the time. Does this mean the GPS radio is actually on consuming battery... OR.... does it mean that it is only on in bursts every two minutes? This is completely unknown to me, unfortunately, but would be helpful to know. Also how to set longer durations than 120 seconds, because then all this AlarmeD nonsense would be unnecessary))

/Z

Last edited by MasterZap; 2011-04-28 at 08:39.
 

The Following 2 Users Say Thank You to MasterZap For This Useful Post: