1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-24 10:50:29 -05:00
sdrangel/plugins/feature/gs232controller
2022-04-05 16:28:07 +02:00
..
CMakeLists.txt Install debug symbols on Windows for debug builds 2022-02-06 12:56:58 +00:00
gs232controller.cpp Rotator controller and dependent plugins: implemented new message pipes and other fixes. Part of #1154 2022-03-28 20:12:25 +02:00
gs232controller.h Rotator controller and dependent plugins: implemented new message pipes and other fixes. Part of #1154 2022-03-28 20:12:25 +02:00
gs232controllergui.cpp Massive UI revamping (v7): features 2022-04-05 16:28:07 +02:00
gs232controllergui.h Massive UI revamping (v7): created configurations with just Features for now 2022-04-05 16:28:07 +02:00
gs232controllergui.ui Massive UI revamping (v7): features 2022-04-05 16:28:07 +02:00
gs232controllerplugin.cpp Updated versions and changelogs 2022-03-30 22:16:08 +02:00
gs232controllerplugin.h Add ADS-B Demodulator plugin. 2020-10-27 16:22:10 +00:00
gs232controllerreport.h GS-232 Controller updates. 2021-01-13 19:44:53 +00:00
gs232controllersettings.cpp Massive UI revamping (v7): created configurations with just Features for now 2022-04-05 16:28:07 +02:00
gs232controllersettings.h Massive UI revamping (v7): created configurations with just Features for now 2022-04-05 16:28:07 +02:00
gs232controllerwebapiadapter.cpp Fix cut and paste errors from PTT feature 2021-01-15 11:00:03 +00:00
gs232controllerwebapiadapter.h Add ADS-B Demodulator plugin. 2020-10-27 16:22:10 +00:00
gs232controllerworker.cpp Open/close serial ports in worker thread. Fix for #1153 2022-03-03 11:06:18 +00:00
gs232controllerworker.h Open/close serial ports in worker thread. Fix for #1153 2022-03-03 11:06:18 +00:00
readme.md Update API 2021-11-23 12:28:06 +00:00

Rotator Controller Feature Plugin

Introduction

The Rotator Controller feature plugin allows SDRangel to send commands to GS-232 and SPID rotators as well as hamlib's rotctld, via a serial or TCP connection. This allows SDRangel to point antennas mounted on a rotator to a specified azimuth and elevation.

Azimuth and elevation can be set manually by a user in the GUI, via the REST API, or via another plugin, such as the Map Feature, the ADS-B Demodulator, or the Star Tracker.

Interface

Rotator Controller feature plugin GUI

1: Start/Stop plugin

This button starts or stops the plugin. When the plugin is stopped, azimuth and elevation commands will not be sent to the rotator.

When started, the background will be green if the rotator is pointing at target azimuth and elevation within the specified tolerance. When off target (i.e. while rotating) the background will be yellow.

2: Azimuth

Specifies the target azimuth (angle in degrees, clockwise from North) to point the antenna towards. Valid values range from 0 to 450 degrees. The value to the right of the target azimuth, is the current azimuth read from the rotator.

3: Elevation

Specifies the target elevation (angle in degrees) to point the antenna towards. Valid values range from 0 to 180 degrees, where 0 and 180 point towards the horizon and 90 degrees to zenith. The value to the right of the target elevation, is the current elevation read from the rotator.

4: Track

When checked, the target azimuth and elevation will be controlled by the Channel or Feature Source (5). For example, this allows an aircraft to be tracked, by setting the Source to the ADS-B Demodulator plugin, or the Moon to be tracked by settng Source to the Star Tracker plugin.

5: Source

Specify the SDRangel Channel or Feature that that will control the target aziumth and elevation values, when Track (4) is checked.

6: Target

When tracking is enabled, this field will display a name for the target being tracked, as indicated by the selected Source plugin (5). For example, the ADS-B plugin will display the flight number of the target aircraft. The Star Tracker plugin will display Sun, Moon or Star.

7: Protocol

Selects which protocol to use. This can be GS-232, SPID (rot2prog) or rotctld.

8: Connection

Selects whether to use a serial connection or TCP.

9: Serial Port

Specifies the serial port (E.g. COM3 on Windows or /dev/ttyS0 on Linux) that will be used to send commands to the rotator.

10: Baud rate

Specifies the baud rate that will be used to send commands to the rotator. Typically this is 9600 for GS-232.

11: Host

Specifies the hostname / IP address of the computer to connect to.

12: Port

Specifies the TCP port number to connect to.

13: Azimuth Offset

The azimuth offset specifies an angle in degrees that is added to the target azimuth before sending to the controller. This allows for a misalignment of the rotator to be corrected.

14: Elevation Offset

The elevation offset specifies an angle in degrees that is added to the target elevation before sending to the controller. This allows for a misalignment of the rotator to be corrected.

15 and 16: Azimuth Min and Max

The azimuth min and max values specify the minimum and maximum azimuth values (after offset has been applied), that will be sent to the rotator. These values can be used to prevent the rotator from rotating an antenna in to an obstable.

17 and 18: Elevation Min and Max

The elevation min and max values specify the minimum and maximum elevation values (after offset has been applied), that will be sent to the rotator. These values can be used to prevent the rotator from rotating an antenna in to an obstable. If the maximum elevation is set to 0, the controller will only use the M GS-232 command, rather than M and W.

19: Tolerance

Specifies a tolerance in degrees, below which, changes in target azimuth or elevation will not be sent to the rotator. This can prevent some rotators that have a limited accuracy from making unbeneficial movements.

If this set to 0, every target azimuth and elevation received by the controller will be send to the rotator. If it is set to 2, then a change in azimuth of +-1 degree from the previous azimuth, would not be sent to the rotator.

Protocol Implementations

GS-232 Protocol Implementation Notes

The controller uses the Waaa eee command when elevation needs to be set. When only azimuth needs to be set, the Maaa command is used. The C2 command is used to read current azimuth and elevation. A response of AZ=aaaEL=eee is expected.

SPID rot2prog Protocol Implementation

The controller uses the 0x2f set command with PH/PV=2 to set azimuth and elevation. The 0x1f status command is used to read current azimuth and elevation. A 12 byte response is expected for set and status commands. All frames start with 0x57 and end with 0x20.

rotctld Protocol Implementation

The controller uses the 'P' and 'p' commands to set and get azimuth and elevation.

API

Full details of the API can be found in the Swagger documentation. Here is a quick example of how to set the azimuth and elevation from the command line:

curl -X PATCH "http://127.0.0.1:8091/sdrangel/featureset/0/feature/0/settings" -d '{"featureType": "GS232Controller",  "GS232ControllerSettings": { "azimuth": 180, "elevation": 45 }}'

To start sending commands to the rotator:

curl -X POST "http://127.0.0.1:8091/sdrangel/featureset/0/feature/0/run"