Guest User

Untitled

a guest
Nov 24th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. try:
  2. gpsd = gps.gps(mode=gps.WATCH_ENABLE)
  3.  
  4. while True:
  5. # Read the GPS state from the laptop
  6. gpsd.next()
  7.  
  8. if (gpsd.valid & gps.LATLON_SET) != 0:
  9. print "Latitude: %s" % gpsd.fix.latitude
  10. print "Longitude: %s" % gpsd.fix.longitude
  11.  
  12. time.sleep(2)
Add Comment
Please, Sign In to add comment