View Single Post
gnuite's Avatar
Posts: 1,245 | Thanked: 421 times | Joined on Dec 2005
#249
Originally Posted by indio
Thanks Gnuite for your reply. I bow to your trully elite C skill .

I am trying to get some basic information through my GPS receiver using python. What I want to do is just get my current position, compare it with another waypoint's coordinates and get the distance.

Could point our some documentation I could study? I am too new to GPS so I dont know where to start. I think getting just the difference of two coords(the current fix and an arbitrary point) will be less difficult than navigating a map.
If you use rfcomm, accessing the GPS Receiver is as easy as opening a file (and the interface is the same). Most likely the input stream will be in ASCII following the NMEA protocol, so google it for info about that.

Once you have your current position (from, e.g., the RMC sentence in the NMEA protocol), it's easy to calculate the surface distance between two points - there are numerous code examples on the web.

The code for maemo mapper is not all that complex, especially the parts that do the NMEA parsing and geographical calculations. The hard part is the matter of proper UI design considering the form factor.