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')
|
||||
|
||||
print
|
||||
print ' GPS reading'
|
||||
print '----------------------------------------'
|
||||
print 'latitude ' , gpsd.fix.latitude
|
||||
print 'longitude ' , gpsd.fix.longitude
|
||||
print 'time utc ' , gpsd.utc,' + ', gpsd.fix.time
|
||||
print 'altitude (m)' , gpsd.fix.altitude
|
||||
print 'eps ' , gpsd.fix.eps
|
||||
print 'epx ' , gpsd.fix.epx
|
||||
print 'epv ' , gpsd.fix.epv
|
||||
print 'ept ' , gpsd.fix.ept
|
||||
print 'speed (m/s) ' , gpsd.fix.speed
|
||||
print 'climb ' , gpsd.fix.climb
|
||||
print 'track ' , gpsd.fix.track
|
||||
print 'mode ' , gpsd.fix.mode
|
||||
print
|
||||
print 'sats ' , gpsd.satellites
|
||||
print ()
|
||||
print (' GPS reading')
|
||||
print ('----------------------------------------')
|
||||
print ('latitude ' , gpsd.fix.latitude)
|
||||
print ('longitude ' , gpsd.fix.longitude)
|
||||
print ('time utc ' , gpsd.utc,' + ', gpsd.fix.time)
|
||||
print ('altitude (m)' , gpsd.fix.altitude)
|
||||
print ('eps ' , gpsd.fix.eps)
|
||||
print ('epx ' , gpsd.fix.epx)
|
||||
print ('epv ' , gpsd.fix.epv)
|
||||
print ('ept ' , gpsd.fix.ept)
|
||||
print ('speed (m/s) ' , gpsd.fix.speed)
|
||||
print ('climb ' , gpsd.fix.climb)
|
||||
print ('track ' , gpsd.fix.track)
|
||||
print ('mode ' , gpsd.fix.mode)
|
||||
print ()
|
||||
print ('sats ' , gpsd.satellites)
|
||||
|
||||
time.sleep(5) #set to whatever
|
||||
|
||||
except (KeyboardInterrupt, SystemExit): #when you press ctrl+c
|
||||
print "\nKilling Thread..."
|
||||
print ("\nKilling Thread...")
|
||||
gpsp.running = False
|
||||
gpsp.join() # wait for the thread to finish what it's doing
|
||||
print "Done.\nExiting."
|
||||
print ("Done.\nExiting.")
|
||||
|
|
Loading…
Reference in a new issue