summaryrefslogtreecommitdiff
path: root/gpstest.py
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2012-05-04 17:59:13 +0100
committerTim Redfern <tim@eclectronics.org>2012-05-04 17:59:13 +0100
commitb5914dd492fa4716737bbe43f4abcad5258b6396 (patch)
treed1d8ac3dac05fb7e99c6d7e08c955f105ab587a2 /gpstest.py
parent3209f698306ab0cf22ef0fe31a722bad22214691 (diff)
working with image maps
Diffstat (limited to 'gpstest.py')
-rw-r--r--gpstest.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/gpstest.py b/gpstest.py
new file mode 100644
index 0000000..88c5198
--- /dev/null
+++ b/gpstest.py
@@ -0,0 +1,14 @@
+import sys,gps
+port = 6
+gps = GPSDevice(port)
+gps.open()
+for record in gps.read_all():
+ if sys.argv[0] == 'forever':
+ print record
+ else:
+ if record['sentence'] == 'GLL':
+ print 'I am hanging out at long %s, lat %s at %s' % (
+ record['longitude'],
+ record['latitude'],
+ record['time'])
+ break \ No newline at end of file