mirror of
https://github.com/projecthorus/sondehub-infra.git
synced 2024-12-19 21:27:55 +00:00
Get real TTN gateway ID if data arriving via a packetbroker
This commit is contained in:
parent
4fdf302329
commit
e8957337d7
@ -228,6 +228,13 @@ def upload_ttn(event, context):
|
||||
|
||||
hotspot_telem['uploader_callsign'] = hotspot['gateway_ids']['gateway_id']
|
||||
|
||||
# Handle telemetry arriving via a packetbroker, and try and get the real gateway ID
|
||||
if hotspot_telem['uploader_callsign'] == "packetbroker":
|
||||
try:
|
||||
hotspot_telem['uploader_callsign'] = hotspot['packet_broker']['forwarder_gateway_id']
|
||||
except:
|
||||
pass
|
||||
|
||||
# Frequency and modulation metadata is common to all packets
|
||||
# Frequency is in Hz
|
||||
hotspot_telem['frequency'] = float(payload['uplink_message']['settings']['frequency'])/1e6
|
||||
|
Loading…
Reference in New Issue
Block a user