Expand description
W3C Geolocation API with Coordinate Math, OS Provider Bridge, NMEA-0183 / GeoClue2 / GeoIP payload decoders, and Great-Circle Distance Solving.
Structs§
- GeoCoordinates
- W3C Geographic coordinates.
- Geolocation
- Thread-safe Geolocation controller.
- Geolocation
Options - Options for acquiring geolocation.
- Geolocation
Position - A complete W3C Geolocation position snapshot.
Enums§
- Geolocation
Error - Errors occurring during geolocation lookups.
- Geolocation
Source - Origin source that produced a
GeolocationPositionfix.
Functions§
- haversine_
distance_ meters - Calculates great-circle distance between two WGS84 coordinates using the Haversine formula. Returns distance in meters.
- initial_
bearing_ degrees - Calculates the initial bearing (forward azimuth) from coordinate 1 to coordinate 2 in degrees [0, 360).
- parse_
env_ lat_ lon - Parses
"lat,lon","lat,lon,alt_m", or"lat,lon,alt_m,accuracy_m"(used forSTRATA_GEO_LAT_LONdeterministic overrides). - parse_
geoclue_ dbus_ output - Parses
gdbus call --method org.freedesktop.DBus.Properties.GetAllorkey=valueGeoClue2 / XDG PortalLocationdictionary payloads intoGeoCoordinates. - parse_
gpsd_ tpv_ json - Parses a
gpsdJSONTPVreport line intoGeoCoordinates. - parse_
ip_ geolocation_ json - Parses common HTTPS GeoIP JSON payloads (
ipwho.is,ipapi.co,ipinfo.io) into coarse desktopGeoCoordinates. - parse_
nmea_ sentence - Validates and parses an NMEA-0183
$GPGGA/$GNGGAor$GPRMC/$GNRMCsentence into WGS84GeoCoordinates.
Type Aliases§
- OsGeolocation
Provider - Callback signature for process-wide OS geolocation provider hooks (e.g.
strata_device).