diff --git a/owrx/eibi.py b/owrx/eibi.py index 6a14e31c..d7a438de 100644 --- a/owrx/eibi.py +++ b/owrx/eibi.py @@ -84,10 +84,14 @@ class EIBI(object): )] # Describe transmitter locations if "src" in b and b["src"] in EIBI_Locations: + pm = Config.get() + rxPos = (pm["receiver_gps"]["lat"], pm["receiver_gps"]["lon"]) description += [( "Transmitting from " + - ", ".join([x["name"] for x in EIBI_Locations[b["src"]]]) + - "." + ", ".join([ + "{0} ({1}km)".format(x["name"], EIBI.distKm(rxPos, (x["lat"], x["lon"]))) + for x in EIBI_Locations[b["src"]] + ]) + "." )] # Done return " ".join(description) diff --git a/owrx/repeaters.py b/owrx/repeaters.py index a1d50a14..6f052296 100644 --- a/owrx/repeaters.py +++ b/owrx/repeaters.py @@ -75,7 +75,12 @@ class Repeaters(object): description = [] # Add information from the entry to the description if "status" in entry: - description += [entry["status"] + "."] + pm = Config.get() + rxPos = (pm["receiver_gps"]["lat"], pm["receiver_gps"]["lon"]) + description += ["{0}, {1}km away.".format( + entry["status"], + Repeaters.distKm(rxPos, (entry["lat"], entry["lon"])) + )] if "updated" in entry: description += ["Last updated " + entry["updated"] + "."] if "comment" in entry: