![]() |
2010-03-24
, 00:43
|
|
Posts: 118 |
Thanked: 67 times |
Joined on Dec 2009
@ Saint Louis, MO, USA
|
#1
|
![]() |
2010-03-24
, 00:55
|
Posts: 35 |
Thanked: 17 times |
Joined on Aug 2009
|
#2
|
![]() |
2010-03-24
, 00:59
|
|
Posts: 501 |
Thanked: 292 times |
Joined on Nov 2009
|
#3
|
![]() |
2010-03-24
, 01:04
|
|
Posts: 3,203 |
Thanked: 1,391 times |
Joined on Nov 2009
@ Worthing, England
|
#4
|
![]() |
2010-03-24
, 01:12
|
Posts: 35 |
Thanked: 17 times |
Joined on Aug 2009
|
#5
|
![]() |
2010-03-24
, 02:42
|
|
Posts: 118 |
Thanked: 67 times |
Joined on Dec 2009
@ Saint Louis, MO, USA
|
#6
|
![]() |
2010-04-22
, 18:39
|
Posts: 287 |
Thanked: 165 times |
Joined on Oct 2009
@ The Netherlands
|
#7
|
I modified the script to output that value as well (its the next field in the fix array after lat/lon).
I did exactly as you suggested and added an additonal check to the If statement to only output a value if device.fix[6] is less than a constant number (mine was consistently returning NaN for the first iteration), and it works exactly as expected.
![]() |
2010-07-12
, 01:37
|
Posts: 1 |
Thanked: 0 times |
Joined on Jul 2010
@ Ontario
|
#8
|
x = 0 def on_changed(device, data): if not device: return if device.fix: if (device.fix[1] & location.GPS_DEVICE_LATLONG_SET) and (device.fix[1] & location.GPS_DEVICE_TIME_SET) and not (device.status & location.GPS_DEVICE_STATUS_NO_FIX): print "%f, %f, %dm above sea level" % (device.fix[4:6] + (device.fix[7],)) print " satellites in use: %d" % (device.satellites_in_use) global x x = x + 1 if x == 6: data.stop()
![]() |
2010-11-07
, 13:19
|
Posts: 7 |
Thanked: 1 time |
Joined on Sep 2009
|
#9
|