maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Snuggle : Geolocation using CellID and Google APIs (https://talk.maemo.org/showthread.php?t=72497)

Saturn 2011-04-25 10:54

[Announce] Snuggle : Geolocation using CellID and Google APIs
 
The Snuggle application (http://maemo.org/packages/view/snuggle/) uses the cell tower information to locate the geolocation coordinates.
It captures the CellID parameters (available from the connected GSM network) and by using Google APIs translates those to locate your position in a map.


In detail:
  • The application makes use of the CellID parameters extracted using the dbus call (seen it here, thanks BluesLee) and
  • Two Google APIs to lookup in the online cellid db, locate your position and show it in a map.

Usage description:

The user interface shows four buttons;
  • The "CellID" button, makes a dbus call to get the CellID information (requires a GSM connection).
  • The "Coordinates" button, makes an access to (the hidden) mmap Google API to get the latitude and longitude coordinates of the connected cell tower (requires a network connection).
  • The "Image" button, grabs from google maps an image of your location and opens a new window for the user to see it (requires a network connection).
  • The "Browser" button, opens the browser on googlemaps with the location coordinates found (requires a network connection).

When I get some time will create a wiki to give additional information on the usage, settings and implications.

The application is in extras-devel at the moment. Feel free to post comments and ideas for additions as well as any ideas for a better name :)


Future Plans:

Primary objective was to give a quick access at the location present.
In my opinion this has been accomplished in the version at extras-testing.

Next version (which is running on my device and needs some more work to be ready for upload) has in addition a daemon in the background logging silently the cells the device connects continuously. This part is ready and has been running for more than 2 weeks in my device without any significant power consumption.
All data are stored in a SQL DB. A configurable tracker will be available that grabs from a Google API the geolocation data for the Cell IDs recorded and updates the DB automatically on selected network connections and date/time settings.

An additional panel allows the user to grab from another Google API the locations between two dates and creates a KML file that can be directly uploaded in google maps and show the path/places visited. This part is missing the date/time selector but the rest of the code is ready.

CrckMc 2011-04-25 11:28

Re: [Announce] Geolocation using CellID and Google APIs
 
testing right now and nothing happens when i press "Coordinates"
"CellID" worked fine. How long does it take normally?

Saturn 2011-04-25 11:36

Re: [Announce] Geolocation using CellID and Google APIs
 
Quote:

Originally Posted by CrckMc (Post 994958)
testing right now and nothing happens when i press "Coordinates"
"CellID" worked fine. How long does it take normally?

In the next version will add some information banners on what is happening and if it wasn't possible to make a location match.

Do you have a network connection active?

If yes, can you run it from xterm and pm me with the messages you get?

Code:

/opt/locatefromcell/Locate_From_Cell

jd4200 2011-04-25 11:48

Re: [Announce] Geolocation using CellID and Google APIs
 
Tesing it, and it all seems to work fine for me.
Thanks!

Screeny:
http://img821.imageshack.us/img821/2...1042512443.png

CrckMc 2011-04-25 11:52

Re: [Announce] Geolocation using CellID and Google APIs
 
Code:

$ /opt/locatefromcell/Locate_From_Cell
262 3 4666 37920
262 3 4666 61000
en
Traceback (most recent call last):
  File "/opt/locatefromcell/locatefromcell.py", line 210, in doGetLocation
  File "/opt/locatefromcell/locatefromcell.py", line 276, in get_location_by_cell
  File "/usr/lib/python2.5/struct.py", line 87, in unpack
    return o.unpack(s)
struct.error: unpack requires a string argument of length 25

this is the output in xterm and yes i have a network connection.

Alfred 2011-04-25 12:01

Re: [Announce] Geolocation using CellID and Google APIs
 
Works really great and fast as ****. Thanks a lot, although there are some bugs. No portrait mode.

nicholes 2011-04-25 12:27

Re: [Announce] Geolocation using CellID and Google APIs
 
Quote:

Originally Posted by CrckMc (Post 994958)
testing right now and nothing happens when i press "Coordinates"
"CellID" worked fine. How long does it take normally?

same happened with me but i solved it
just go to settings>phone>network and change network mode by GSM and it worked for me! it did not work for me on 3G mode!!!!!

Saturn 2011-04-25 14:33

Re: [Announce] Geolocation using CellID and Google APIs
 
Uploaded a new version (1.2-1) with better info and some small new features.

Changelog:
  • Added several information banners to show actions/failures.
  • Added an Edit Mode in the menu to manually enter the information.
  • Added some UI settings for correct display.

Saturn 2011-04-25 14:40

Re: [Announce] Geolocation using CellID and Google APIs
 
Quote:

Originally Posted by CrckMc (Post 994969)
Code:

$ /opt/locatefromcell/Locate_From_Cell
262 3 4666 37920
262 3 4666 61000
en
Traceback (most recent call last):
  File "/opt/locatefromcell/locatefromcell.py", line 210, in doGetLocation
  File "/opt/locatefromcell/locatefromcell.py", line 276, in get_location_by_cell
  File "/usr/lib/python2.5/struct.py", line 87, in unpack
    return o.unpack(s)
struct.error: unpack requires a string argument of length 25

this is the output in xterm and yes i have a network connection.

The cell tower info you show don't follow the expected values (in specific the Local Area Code).
Maybe I need to add some padding for cases like this in the code but I don't know really what is needed yet.

Thanks for the fail case.

Saturn 2011-04-25 15:05

Re: [Announce] Geolocation using CellID and Google APIs
 
Quote:

Originally Posted by Alfred (Post 994972)
Works really great and fast as ****. Thanks a lot, although there are some bugs. No portrait mode.

Thanks!
Yes it's fast (especially if the network is wifi) since the data are not much.
Including the image grabbed, it is still < 100 kB.

About the portrait mode, The application responds to the movement of the device (check the About window that works nicely). For the main window I haven't found any info on how to instruct the Qt Designer to produce a layout that works on both modes. my question is similar to that made here for example: http://maemo.org/community/maemo-dev...bfae7bae1bae1/

Any help appreciated.


All times are GMT. The time now is 21:09.

vBulletin® Version 3.8.8