micropython-agps
For use with micropython on GPRS module A9/A9G.
Examples
Location over internet connection:
# Enable data connection
import cellular
cellular.gprs("apn", "user", "pass")
# Get location
import agps
agps.get_location_opencellid(cellular.agps_station_data(), "api-token") # Please visit https://opencellid.org for getting your API token
(3.484547378491735, 78.86739615869062)
Location using local database:
Create a binary database of GSM cells:
./bs-dl.py --mcc 234 --mnc 3 --circle=-0.118092,51.509865,3 -v --token api-token # Please visit https://opencellid.org for getting your API token
Filtering is done through entries mcc - mobile country code, mnc - mobile network code and circle - location and radius of a circle with cells.
All entries are optional, however, the full worldwide database is as large as 1Gb.
Providing mcc and mnc will reduce the databse size down to few Mb.
Providing a circle will further filter data towards the circular area specified: 3 km of urban area results in around 10Kb of data.
Note that the token is optional: without a proper token, the script will fall back to a git mirror which may contain outdated data.
Then, upload the database to the module (note the file name):
ampy --port /dev/ttyUSB0 put 234-3.bin
Finally, determine the location (no data connection needed):
# Get location
import agps
import cellular
agps.get_location_local(cellular.agps_station_data(), "234-3.bin")
(3.484547378491735, 78.86739615869062)
Raw data
Please find here.
Release files for micropython-agps 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| micropython-agps-0.1.1.tar.gz | 2.4 kB | Details |
Release files / micropython-agps-0.1.1.tar.gz
| Download URL | micropython-agps-0.1.1.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e0f13beb5b9245479aca9832da8a133fb3ee1403191505316cd554c7738afff
|
|
BLAKE2b-256 checksum How to use checksums |
533330df05885500cdebcd14a39e846374a627b3df650625db0a1c8cc6ec9a52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.5
|