Commit 5ef84209 authored by Thomas Telkamp's avatar Thomas Telkamp
Browse files

add pointing source and time

parent d26779f2
......@@ -79,13 +79,17 @@ def make_sigmf(iqfile, no_rename=False):
apilink = urlopen("https://www.camras.nl/pointing.php")
pointingdata = json.loads(apilink.read().decode())
global_meta["camras:pointing:source"] = "https://www.camras.nl/pointing.php"
global_meta["camras:pointing:tracking"] = pointingdata[
'setpoint'].strip('"')
global_meta[
"camras:pointing:az_deg"] = f"{(pointingdata['az'] + 180) % 360:.4f}"
global_meta["camras:pointing:el_deg"] = f"{pointingdata['el']:.4f}"
global_meta["camras:offset_str"] = f"{pointingdata['offset']}"
global_meta["camras:pointing:datetime"] = Time.now(
).datetime.isoformat()
else:
global_meta["camras:pointing:source"] = "DT controller"
tracker = dt.tracker.replace("console/", "")
global_meta["camras:pointing:tracking"] = dt.tracker
global_meta[
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment