-
Notifications
You must be signed in to change notification settings - Fork 1
5. UDP Broadcast Messages
This page provides some documentation on the UDP broadcast formats used by the horus_utils (and other) software. There are two UDP broadcast message types, we'll call them 'Horus Utils' messages, and 'OziMux' messages.
- 'Horus Utils' messages were originally intended for communication between the LoRaUDPServer application and HorusGroundStation, but have since expanded to cover over roles, such as emission of 'Payload Summary' messages, and car position information.
- 'OziMux' messages, which are used to pass telemetry information from data sources into the OziMux application, and then onwards to OziPlotter.
To Be Completed. Some information on the format is available here: https://github.com/projecthorus/oziplotter/wiki/3---Data-Sources
UDP Port 55672, send to the local subnet's broadcast address. Any device on the same subnet should be able to receive these messages.
(If anyone encounters a clash with another service on this port, please let me know!)
Each packet contains a single JSON-encoded object.
The general format is as follows:
{
'type': 'PACKET_TYPE',
'field1': data1,
'field2': data2,
... etc
}
horuslib.listener.UDPListener provides a Python class which will listen for packets and pass them on to a user-defined callback function. An example of how to use this class is available here.
Emitted by:
- OziMux - Sent on receipt of payload telemetry data from the selected data source.
- radiosonde_auto_rx - Sent if the appropriate config setting is enabled.
Used to send a 'summary' of payload telemetry data, for easy parsing and usage by various 'side-car' applications.
{
'type' : 'PAYLOAD_SUMMARY', # Packet Type
'callsign' : callsign, # Arbitrary text field, usually the payload callsign or serial number.
'latitude' : latitude, # float, Decimal Degrees
'longitude' : longitude, # float, Decimal Degrees
'altitude' : altitude, # int, Metres
'speed' : speed, # int, kph, if provided by the payload, otherwise -1
'heading': heading, # int, degrees 0-359, if provided by the payload, otherwise -1
'time' : packet_time, # Packet timestamp, ideally from the payload itself, as 'HH:MM:SS', in UTC time.
'comment' : comment # An optional comment field. This may not always be provided.
}
Example:
{u'speed': -1, u'altitude': 7760, u'longitude': 138.73863, u'callsign': u'Radiosonde Auto RX', u'time': u'23:42:58', u'latitude': -34.94502, u'type': u'PAYLOAD_SUMMARY', u'heading': -1}
Payload Summary packets produced by radiosonde_auto_rx contain the following additional fields:
'model': radiosonde_model, # string, Radiosonde model, i.e. RS92 or RS41
'freq': frequency, # string, Sonde TX frequency, i.e. '401.500 MHz'
'temp': temperature # float, Reported temperature. -273.0 if no data available.
Packets produced by radiosonde_auto_rx also have the 'comment' field set to 'radiosonde'.
Emitted by:
- ChaseTracker
- ChaseTracker_NoGUI
Used to send an update of the chase car's position into the network, for use by applications like SummaryGUI, which need it to determine the payload's relative heading/elevation/range.
{
'type' : 'GPS', # Packet Type
'latitude': lat, # float, Decimal Degrees
'longitude': lon, # float, Decimal Degrees
'altitude': alt, # float, metres
'speed': speed, # float, kph
'valid': position_valid # boolean - True if there is GPS lock, False otherwise (probably redundant...)
}
Example:
{u'type': u'GPS', u'altitude': 94.9, u'longitude': 138.6, u'valid': True, u'latitude': -34.7, u'speed': 0.0}
Note: These are NOT the same as the OziMux telemetry described above! Sorry about the confusion...
Emitted by:
- OziMux - Sent on receipt of telemetry data from any data source.
These packets are somewhat redundant as all regular OziMux telemetry data (above) is now sent via UDP broadcast (it used to be host-to-host). They were used to allow display of all data sources on a handheld 'pre-flight check' device - the code for this is available here.
{
'type': 'OZIMUX', # Packet Type
'source_name': source_name, # string, Data source name, as defined in the [OziMux config file](https://github.com/projecthorus/horus_utils/wiki/2.-Configuration#ozimuxcfg).
'latitude': latitude, # float, Decimal Degrees
'longitude': longitude, # float, Decimal Degrees
'altitude': altitude, # float, metres
'time' : packet_time, # Packet timestamp, ideally from the payload itself, as 'HH:MM:SS', in UTC time.
'comment': comment, # Optional comment field.
}
Example:
{u'comment': u'Via OziMux', u'source_name': u'Radiosonde Auto RX', u'altitude': 11353, u'longitude': 138.83992, u'time': u'23:53:53', u'latitude': -34.95271, u'type': u'OZIMUX'}
There are a few packet types that are only used for communications between LoRaUDPServer and HorusGroundStation (for the Project Horus LoRa payloads), so are not described in full on this page. Information about these packet formats is available here.