]> www.average.org Git - loctrkd.git/blobdiff - loctrkd/googlemaps.py
lookaside returns accuracy too
[loctrkd.git] / loctrkd / googlemaps.py
index 6838324bd1c95062df2b4db4a62eb532bc41c8f4..b84b64d18bdb1e19e4ca668f631dccd7ba051c26 100644 (file)
@@ -53,10 +53,14 @@ def lookup(
     mnc: int,
     gsm_cells: List[Tuple[int, int, int]],
     wifi_aps: List[Tuple[str, int]],
-) -> Tuple[float, float]:
+) -> Tuple[float, float, float]:
     result = _lookup(mcc, mnc, gsm_cells, wifi_aps)
     if "location" in result:
-        return result["location"]["lat"], result["location"]["lng"]
+        return (
+            result["location"]["lat"],
+            result["location"]["lng"],
+            result["accuracy"],
+        )
     else:
         raise ValueError("google geolocation: " + str(result))