Crate libreloc_client
source ·Expand description
Client. Fetches location data from GNSS (GPS), Mobile Country Code from GSM, WiFi/Bluetooth/GSM cell based geolocation from the Libreloc server, and GeoIP from RIPE NCC. It estimates the location using heuristics.
Structs§
- AppState 🔒
- Cache 🔒
- Conf 🔒Configuration
- DashRow 🔒
- Dashboard
- Source 🔒An internal source of geolocation data
- Tpv 🔒
- Update 🔒
Enums§
Functions§
- Remote lookup with caching
- Estimate rough accuracy from older location based on their age. E.g. if it’s from 1 hour ago the device is likely to be within kms and cannot be on the opposite side of the Earth.
- Fetch the MCC (Mobile Country Code) from a GSM if present
- Uses 3rd party services to fetch the current public IP address and resolve it to a geolocation. RIPE IPmap uses many methods including crowdsourced data, latency and anycast and other heuristics to identify a location.
- Geolocate blips using remote server and caching
- Serve basic statistics
- Loads configuration from file. Supports simple overrides.
- load_csv 🔒Read CSV and insert values into a BloomHashStore
- main 🔒
- Receives a /v2/geosubmit POST and upload the WiFi data to a Libreloc server
- Run a local HTTP service to provide MLS-compatible location, geosubmit, a UI, stats etc
- Scan for WiFi devices around
- Serve dashboard
- Serve location
- Upload datapoints to server
- Upload random data
- Locate using WiFi