![]() |
Re: read cellID from N900 using python?
I tried the example python file after adding python-location on my n900.
When i run it i get: Code:
lat = 52.200000, long = 5.300000 Anyone know what could be wrong? |
Re: read cellID from N900 using python?
I also had this problem, it seems that the sample code does not check if the GPS fix is real.
I have changed the line before print lat long to this: if (device.fix[1] & location.GPS_DEVICE_LATLONG_SET) and not (device.status & location.GPS_DEVICE_STATUS_NO_FIX): I haven't tested much after the change, but this seems to work better. Search for GPS_DEVICE_STATUS_NO_FIX in http://wiki.maemo.org/PyMaemo/Using_Location_API |
Re: read cellID from N900 using python?
I tried the change on the bus home, and made one more addition to that line:
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): N.B: I don't know if these changes have negative effects on battery drain or something else. Try these changes at your own risk. |
Re: read cellID from N900 using python?
Works like a charm! Thanks!
It also seems to shutdown the GPS chipset after it's done. The only issue is when it can't get a fix, you'll need to force quit. |
Re: read cellID from N900 using python?
Not sure if anyone cares... but i got cell_info with python like this:
Code:
import dbus |
All times are GMT. The time now is 02:23. |
vBulletin® Version 3.8.8