Control software for the ??SRT telescope
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Norman Gray http://nxg.me.uk

This is a control program for the Glasgow University AR 1420 telescope.

Version qp 0.7-SNAPSHOT (6b2b6ddfce01 v0.7b2+7, 2017-07-18 17:57 +0100), released 2017 XXX XX.


The details below are provisional, and the interface will almost certainly change between releases, with no respect for backward compatibility before release 1.0.

The source code is on bitbucket.


The control program starts off with no memory of previous operations. It has a set of calibrations hard-coded into it which are approximately correct for the Glasgow observatory, but these are intended to be sane rather than accurate. The following procedure should be adopted by a user-facing control program operating this one.

  1. Calibration. The command c starts a calibration run, which estimates the speed at which the axis motors can drive the telescope. At the end of this process, it prints out a line of the form >c n n. If this line, with these numbers, is supplied to the system at startup, instead of the bare c command, it will recreate the calculated calibration.

    NOTE: this is probably not necessary, since release 0.6, since the scaling here is now handled completely by the Kalman filters on the two drives. Better than a calibration run, therefore, is to send the telescope to its home position (as below), and then 'warm up' the filters by slewing to two or three points about a radian apart. TBC.

  2. Time: the current time should be supplied using the T command.
  3. Observatory: The observatory location, and the actual pointing of the telescope 'home position' should be supplied using the long form of the O command. This should happen after the time is set, in order to calculate local sidereal time correctly.
  4. Send the telescope to the home position with gH. This should be done even though the calibration step leaves the telescope approximately in this position, since the action of homing the telescope also resets the system's internal state concerning the telescope's actual pointing.


The controller is controlled by sending commands via the serial line, running at 115200 baud. Each of the commands consists of a one- or two-letter command followed by zero or more arguments, which may be letters, integers or floats, as appropriate; the commands are case-sensitive. Each line should be terminated by a newline (or carriage-return); blanks lines are ignored. The numbers should be separated from other arguments by spaces. Numbers which are required to be floats are required to have a decimal point. There is little error-checking.

The system returns a variety of status responses. These are either comma-separated values with a 'type' code in the first column (details to come), or else are generally human-readable responses, with the first character indicating the type of response.

The available commands are as below. Some commands return confirmation of their action, and possibly some further information. Successful responses are those marked with ‘_Reply_’ below. All commands may additionally report comments as noted above. Commands may instead report an error as above, instead of a successful response.

Status output

The CSV status outputs from the running program are as follows (note that these are still rather unstable.

As well as these commands, if the system detects an exclamation mark (!) in the input, then it regards this as a recoverable fault, clears the input buffer, and jumps to (and then immediately leaves) the fault handler. This is an 'emergency-stop' feature. The x command, in contrast, is handled as a normal command, and should be used in preference for 'normal' stop actions.

The set of commands, and their behaviour, is still somewhat in flux.

Release notes

v0.7b3, 2017 XXX XX

v0.7b2, 2017 January 22

v0.7b1, 2016 Dec 19

v0.6, 2015 October 4

v0.5, 2015 September 18

v0.4, 2015 August 16

v0.3.1, 2015 August 5

v0.3, 2015 August 4

v0.2, 2015 July 30

v0.1, 2015 July 24

Initial release