Skip to content

Instantly share code, notes, and snippets.

@maluta
Forked from tinti/python_gpsd.py
Created September 2, 2013 21:10
Show Gist options
  • Save maluta/6417301 to your computer and use it in GitHub Desktop.
Save maluta/6417301 to your computer and use it in GitHub Desktop.
# install gpsd gps-clients and python
import gps
gpsd = gps.gps()
gpsd.stream(gps.WATCH_ENABLE|gps.WATCH_NEWSTYLE)
for report in gpsd:
if report['class'] == 'TPV':
print report['lat']
print report['lon']
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment