Mobile Application Design Midterm
For the glorious and fantastic Mobile Applications Design mid term (and in celebration of the midterm elections of course) I created an application which retrieves location information from a Bluetooth GPS module and displays it on the screen of my mobile device. The application uses the Python programming language and is a proof of concept for a location information visualization and integration with WayMarkr.First, I created a script where the user selects the GPS device from available paired Bluetooth devices, and, once a socket connection is established, the raw data is printed to the screen. I'm using my N72 with the Holux GPSlim236. The script below will accomplish this.
gps_connect.py
The Holux GPSlim236 transmits NMEA data. Example NMEA data from the NavMan (SirfII chip set) is shown below.
$GPGGA,230611.016,3907.3813,N,12102.4635,W,0,04,5.7,507.9,M,,,,0000*11
$GPGLL,3907.3813,N,12102.4635,W,230611.016,V*31
$GPGSA,A,1,27,08,28,13,,,,,,,,,21.7,5.7,20.9*38
$GPGSV,3,1,10,27,68,048,42,08,63,326,43,28,48,239,40,13,39,154,39*7E
$GPGSV,3,2,10,31,38,069,34,10,23,282,,03,12,041,,29,09,319,*7C
$GPGSV,3,3,10,23,07,325,,01,05,145,*7E
$GPRMC,230611.016,V,3907.3813,N,12102.4635,W,0.14,136.40,041002,,*04
$GPVTG,136.40,T,,M,0.14,N,0.3,K*66
$GPGGA,230612.015,3907.3815,N,12102.4634,W,0,04,5.7,508.3,M,,,,0000*13
Next, the NMEA data needs to be parsed. Specifically, we're looking for altitude, latitude, and longitude.Refrencing the NMEA specification we see that the GGA, GLL, and RMC sentences will give us this (and a few other useful items). Finally, the altitude, latitude, and longitude is printed to the screen. This is demonstrated in the following script.
latLonAlt.py
So what's next? - The next step in this process will be to integrate the location information with the existing WayMarkr system.
Credits/Resources - Jürgen and Nick's web site were used extensively as resources. More information about the NMEA specification is available on the GPS Information web site. Also, for those Eclipse junkies, PyDev is a wonderful plugin which enables Python editing in Eclipse. More on Python. Documentation specific to Python for Series 60 is available on the Nokia web site.
Comments:
<< Home
Hey Cyke-
Yea, that's fine. Thanks for posting it. I tried to give credit where it was due in the header of the code. I'm still a Py newbie when you get down to it. We're almost done testing the GPS functionality with WayMarkr, so look for that soon.
Thanks for getting in touch.
-Michael
Post a Comment Yea, that's fine. Thanks for posting it. I tried to give credit where it was due in the header of the code. I'm still a Py newbie when you get down to it. We're almost done testing the GPS functionality with WayMarkr, so look for that soon.
Thanks for getting in touch.
-Michael
<< Home


My Flickr
My del.icio.us