Skip to content

Rotator Control

Mark Jessop edited this page Mar 13, 2022 · 4 revisions

As of v0.3.5, Horus-GUI has some limited ability to command an Azimuth/Elevation antenna rotator to point towards a Horus Binary payload. While the Horus Binary telemetry is so robust that a directional antenna is almost never required, there are cases where you may have other payloads in the same flight (e.g. Wenet, DVB-S) that require more SNR. Being able to use the Horus Binary signal to point antenna gain towards the payloads can be quite useful!

Supported Rotator Control Systems

As I did not want to go too deep into the weeds with rotator control in Horus-GUI, I have limited rotator control support to Hamlib's rotctld protocol, and PSTRotator's UDP protocol only. This keeps the code in Horus-GUI fairly simple. I have also not implemented any reading of rotator positions - Horus-GUI just sends commands, and does not check for position feedback.

As all rotator control is via network protocols, the computer connected to the rotator does not necessarily need to be the same one running Horus-GUI.

HamLib rotctld

HamLib provides an abstraction layer for a wide range of radios and rotators. It's 'rotctld' (rotator control) daemon connects to a rotator via serial, and provides a network server with a very simple command protocol on TCP port 4533.

A list of supported rotators is available here, along with some known quirks for some selected models.

On Linux / OSX systems, rotctld is usually available via various package management utilities (apt, macports, homebrew), under the 'hamlib' package.

Starting up a rotctld server is generally done with a command of the form:

$ rotctld -m <model> -r <device> -s <baud_rate>

As an example, to control a GS232B compatible rotator present on /dev/ttyUSB0, at 9600 baud, you would use:

$ rotctld -m 603 -r /dev/ttyUSB0 -s 9600

Some other rotators require some more twiddling. I use a Spid Rot2Prog driving a RF HamDesign SPX-02 rotator, and I need to use the following command:

$ rotctld -m 901 -r /dev/ttyUSB0 -s 600 -C az_resolution=2,el_resolution=2,post_write_delay=300

(The options at the end provide information on the step size of the rotator, and slow down some commands for reliability).

To test that the server is working, you can use 'netcat' to send the command p to query a position, and P <az> <el> to set a position:

$ nc localhost 4533
p
0.000000
0.000000
P 10.0 10.0
RPRT 0

PSTRotator

PSTRotator is closed-source Windows-only software that supports a wide range of rotators. Support has been added for this software primarily as it's fairly popular on Windows platforms, and it provides a simple UDP network interface for remote control. A user manual for PSTRotator can be found here

To configure PSTRotator to receive UDP commands, go to the Communication Menu, then click UDP Control Setup. Set the IP address to whatever your computers IP address is (if running Horus-GUI and PSTRotator on the same machine, just set this to 127.0.0.1, and click 'Save Settings'. You can then enable UDP control from the Setup menu, by clicking UDP Control. A tick should be present next to it when it is enabled.

Configuring Horus-GUI for Rotator Control

In short:

  • Make sure your latitude and longitude are set correctly in the 'Habitat' tab.
  • Go to the 'Rotator' tab in the Horus-GUI settings area (bottom left of the window)
  • Select the appropriate rotator type from the drop-down list (rotctld or PSTRotator)
  • Enter the hostname where the rotator server is running. This might be localhost, or some other address on your network.
  • If using rotctld, set the port to 4533, if using PSTRotator, set the port to 12000.
  • Once you are receiving telemetry, click 'Start'.
  • For rotctld, if the server connection was successful, the Status will change to Connected. As PSTRotator uses UDP packets, there's no way of knowing if the connection is successful...
  • As Horus Binary packets are received, the rotator will be commanded to point to the calculated azimuth and elevation!
  • To stop rotator control, click 'Stop'.