]> www.average.org Git - loctrkd.git/blobdiff - loctrkd/opencellid.py
lookaside returns accuracy too
[loctrkd.git] / loctrkd / opencellid.py
index ff193fd27a5f511787c9b3b671a22ce217f06a58..e05648e2d50bcbfd48c671a57d507bf82acdc7ef 100644 (file)
@@ -23,7 +23,7 @@ def shut() -> None:
 
 def lookup(
     mcc: int, mnc: int, gsm_cells: List[Tuple[int, int, int]], __: Any
-) -> Tuple[float, float]:
+) -> Tuple[float, float, float]:
     assert ldb is not None
     lc = ldb.cursor()
     lc.execute("""attach database ":memory:" as mem""")
@@ -52,4 +52,4 @@ def lookup(
     nsigs = [1 / sig / sumsig for _, _, sig in data]
     avlat = sum([lat * nsig for (lat, _, _), nsig in zip(data, nsigs)])
     avlon = sum([lon * nsig for (_, lon, _), nsig in zip(data, nsigs)])
-    return avlat, avlon
+    return avlat, avlon, 99.9  # TODO estimate accuracy for real