|
|
2008-03-28
, 21:24
|
|
Posts: 53 |
Thanked: 24 times |
Joined on Jan 2008
|
#2
|
import gpsbt, time
context = gpsbt.start()
time.sleep(2.0) # Wait for GPS to come up
gps = gpsbt.gps()
while gps.get_position() == (0,0):
time.sleep(5.0) # We don't have a fix so we wait for one
print gps.get_position() # should be != (0,0)
| The Following User Says Thank You to Tantris For This Useful Post: | ||
|
|
2008-03-28
, 21:32
|
|
Posts: 95 |
Thanked: 16 times |
Joined on Feb 2008
|
#3
|
|
|
2008-03-29
, 09:46
|
|
Posts: 111 |
Thanked: 31 times |
Joined on May 2007
|
#4
|
|
|
2008-03-29
, 10:09
|
|
Posts: 53 |
Thanked: 24 times |
Joined on Jan 2008
|
#5
|
|
|
2008-03-30
, 14:08
|
|
Posts: 53 |
Thanked: 24 times |
Joined on Jan 2008
|
#6
|
import time, gpsbt
def has_a_fix(gps):
gps.get_fix()
return gps.satellites_used > 0
con = gpsbt.start()
time.sleep(2.0) # wait for gps to come up
gps = gpsbt.gps()
print "Waiting for the sun... err... a fix"
while not has_a_fix(gps):
print "Wai-ting..."
time.sleep(5)
# do something
gpsbt.stop(con)
|
|
2008-04-07
, 20:16
|
|
Posts: 35 |
Thanked: 5 times |
Joined on Sep 2007
|
#7
|
|
|
2008-04-07
, 20:37
|
|
Posts: 53 |
Thanked: 24 times |
Joined on Jan 2008
|
#8
|
My it: n810 with latest os 2008