Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try:
- gpsd = gps.gps(mode=gps.WATCH_ENABLE)
- while True:
- # Read the GPS state from the laptop
- gpsd.next()
- if (gpsd.valid & gps.LATLON_SET) != 0:
- print "Latitude: %s" % gpsd.fix.latitude
- print "Longitude: %s" % gpsd.fix.longitude
- time.sleep(2)
Add Comment
Please, Sign In to add comment