Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from sys import argv
import gps
import requests
#Listen on port 2947 of gpsd
session = gps.gps("localhost", "2947")
session.stream(gps.WATCH_ENABLE | gps.WATCH_NEWSTYLE)
while True :
rep = session.next()
try :
if (rep["class"] == "TPV") :
print(str(rep.lat) + "," + str(rep.lon))
except Exception as e :
print("Got exception " + str(e))
@davidssand

This comment has been minimized.

Copy link

commented Feb 20, 2019

Where do I get this gps module you import?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.