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.
Metadata
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 | Provenance | Actions |
|---|---|---|---|---|
| micropython-agps-0.1.1.tar.gz | 2.4 kB | Without provenance | Details for micropython-agps-0.1.1.tar.gz |
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
|
Security for micropython-agps 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.