Update GPS_HAT.py
This commit is contained in:
parent
601a95e9d4
commit
13d3a1e8b2
38
GPS_HAT.py
38
GPS_HAT.py
|
@ -35,28 +35,28 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
os.system('clear')
|
os.system('clear')
|
||||||
|
|
||||||
print
|
print ()
|
||||||
print ' GPS reading'
|
print (' GPS reading')
|
||||||
print '----------------------------------------'
|
print ('----------------------------------------')
|
||||||
print 'latitude ' , gpsd.fix.latitude
|
print ('latitude ' , gpsd.fix.latitude)
|
||||||
print 'longitude ' , gpsd.fix.longitude
|
print ('longitude ' , gpsd.fix.longitude)
|
||||||
print 'time utc ' , gpsd.utc,' + ', gpsd.fix.time
|
print ('time utc ' , gpsd.utc,' + ', gpsd.fix.time)
|
||||||
print 'altitude (m)' , gpsd.fix.altitude
|
print ('altitude (m)' , gpsd.fix.altitude)
|
||||||
print 'eps ' , gpsd.fix.eps
|
print ('eps ' , gpsd.fix.eps)
|
||||||
print 'epx ' , gpsd.fix.epx
|
print ('epx ' , gpsd.fix.epx)
|
||||||
print 'epv ' , gpsd.fix.epv
|
print ('epv ' , gpsd.fix.epv)
|
||||||
print 'ept ' , gpsd.fix.ept
|
print ('ept ' , gpsd.fix.ept)
|
||||||
print 'speed (m/s) ' , gpsd.fix.speed
|
print ('speed (m/s) ' , gpsd.fix.speed)
|
||||||
print 'climb ' , gpsd.fix.climb
|
print ('climb ' , gpsd.fix.climb)
|
||||||
print 'track ' , gpsd.fix.track
|
print ('track ' , gpsd.fix.track)
|
||||||
print 'mode ' , gpsd.fix.mode
|
print ('mode ' , gpsd.fix.mode)
|
||||||
print
|
print ()
|
||||||
print 'sats ' , gpsd.satellites
|
print ('sats ' , gpsd.satellites)
|
||||||
|
|
||||||
time.sleep(5) #set to whatever
|
time.sleep(5) #set to whatever
|
||||||
|
|
||||||
except (KeyboardInterrupt, SystemExit): #when you press ctrl+c
|
except (KeyboardInterrupt, SystemExit): #when you press ctrl+c
|
||||||
print "\nKilling Thread..."
|
print ("\nKilling Thread...")
|
||||||
gpsp.running = False
|
gpsp.running = False
|
||||||
gpsp.join() # wait for the thread to finish what it's doing
|
gpsp.join() # wait for the thread to finish what it's doing
|
||||||
print "Done.\nExiting."
|
print ("Done.\nExiting.")
|
||||||
|
|
Loading…
Reference in a new issue