replace receiver_qra setting with locator calculation

This commit is contained in:
Jakob Ketterl 2019-10-03 18:10:46 +02:00
parent 3e8e2182a8
commit e9f9bbb9c0
2 changed files with 3 additions and 2 deletions

View File

@ -1220,7 +1220,7 @@ function on_ws_recv(evt)
case "receiver_details": case "receiver_details":
var r = json.value; var r = json.value;
e('webrx-rx-title').innerHTML = r.receiver_name; e('webrx-rx-title').innerHTML = r.receiver_name;
e('webrx-rx-desc').innerHTML = r.receiver_location + ' | Loc: ' + r.receiver_qra + ', ASL: ' + r.receiver_asl + ' m, <a href="https://www.google.hu/maps/place/' + r.receiver_gps[0] + ',' + r.receiver_gps[1] + '" target="_blank" onclick="dont_toggle_rx_photo();">[maps]</a>'; e('webrx-rx-desc').innerHTML = r.receiver_location + ' | Loc: ' + r.locator + ', ASL: ' + r.receiver_asl + ' m, <a href="https://www.google.hu/maps/place/' + r.receiver_gps[0] + ',' + r.receiver_gps[1] + '" target="_blank" onclick="dont_toggle_rx_photo();">[maps]</a>';
e('webrx-rx-photo-title').innerHTML = r.photo_title; e('webrx-rx-photo-title').innerHTML = r.photo_title;
e('webrx-rx-photo-desc').innerHTML = r.photo_desc; e('webrx-rx-photo-desc').innerHTML = r.photo_desc;
break; break;

View File

@ -5,6 +5,7 @@ from owrx.version import openwebrx_version
from owrx.bands import Bandplan from owrx.bands import Bandplan
from owrx.bookmarks import Bookmarks from owrx.bookmarks import Bookmarks
from owrx.map import Map from owrx.map import Map
from owrx.locator import Locator
from multiprocessing import Queue from multiprocessing import Queue
import json import json
import threading import threading
@ -89,13 +90,13 @@ class OpenWebRxReceiverClient(Client):
receiver_keys = [ receiver_keys = [
"receiver_name", "receiver_name",
"receiver_location", "receiver_location",
"receiver_qra",
"receiver_asl", "receiver_asl",
"receiver_gps", "receiver_gps",
"photo_title", "photo_title",
"photo_desc", "photo_desc",
] ]
receiver_details = dict((key, pm.getPropertyValue(key)) for key in receiver_keys) receiver_details = dict((key, pm.getPropertyValue(key)) for key in receiver_keys)
receiver_details["locator"] = Locator.fromCoordinates(receiver_details["receiver_gps"])
self.write_receiver_details(receiver_details) self.write_receiver_details(receiver_details)
profiles = [ profiles = [