Which gps library would you recommend for python?

Apparently the python module that comes with gpsd is the best module to go with for us. For a start look here (site redirects to spam).

The gps module coming with the gpsd has some very useful functions. The first one is getting the data from gpsd and transforming those data in a usable data structure. Then the moduls give you access to your speed, and your current heading relative to north. Also included is a function for calculating the distance between two coordinates on the earth taking the spherical nature of earth into account.

The functions that are missing for our special case are:

  • Calculating the heading between to points. Means I am at point a facing north to which degree do I have to turn to face the point I want to navigate to.

  • Taking the data of the first function and our current heading to calculate a turn in degrees that we have to do to face a desired point (not a big deal because it is mostly only a subtraction)

The biggest problem for working with this library is that it is mostly a wrapper for the gpsd so if you are programming on a different OS then you gpscode should work on like Windows or MacOS you are not able to run the code or to install the module.


I'm not sure I understand your exact requirements, but, depending on your device &c, there seem to be many possible candidates, such as:

  • S60 GPS Info Viewer
  • pygarmin
  • pygps (mirror)

If what you mean is that you've already obtained the GPS' unit output and just need to parse it &c, I suspect that one or more of the above examples (which unfortunately I have not tried) will contain well-isolated modules for that task, which, depending on licensing conditions, you could repurpose; this SO question might also help if that's what you're doing.


The book "Beginning Python Visualization" includes just such an example - parsing GPS data and inferring speed and location from it. Its source code is available online at http://www.apress.com/

Tags:

Python

Gps

Gpsd