Observatory Code

The observatory control software can be found on the following machines, in the /obs directory.

  • smerd
  • mills
  • ellis
  • newsmerd
  • sille

Originally written for the Sun machines, it now runs on Linux, and since the plan is to phase out the Suns, this page will describe how the observatory control code is organised under Linux.

Code organisation

The top level directory /obs has the following important directories:

  • applic: code that controls things like the antenna, rakbus, sampler etc.
  • bin: the location of the executables
  • doc: documentation on telescope systems and the observatory sites
  • generic: code for non-telescope specific libraries
  • hardware: code for controlling telescope hardware
  • lib: the location of the compiled telescope and generic libraries
  • psos: code for controlling the PSOS machines
  • scripts: useful scripts
  • telescop: code for telescope specific libraries

Under the applic directory is the following observatory software:

  • The antenna directory (under applic) has software for controlling the antenna (vdesk and bruce) and monitoring the antenna parameters (antenna_monitor).
  • The obslog directory has software to monitor the PSOS targets for system messages that they emit, and to write them to a log.
  • The optical directory has software to determine the telescope pointing accuracy using data collected from a small optical telescope mounted on the telescope's optical axis.
  • The rakbus directory has software to control the rakbus functions, such as the alarms, calibrator control, weather and remote reboot system.
  • The sampler directory has software to control the firing of the noise diode and measure the system temperature.
  • The sattrk directory has software to allow the telescope to track satellites.
  • The test directory has software to test the functionality of the rakbus, sampler and drive PC.
  • The vela directory has a program to track the Vela pulsar.

Compilation

To compile the code, use the Makefile in the top level /obs directory. There is an ineffective clean block in the Makefile, so to ensure that all code is compiled from scratch, all the object files will need to be deleted manually. The easiest way to do this is to execute the following command in the /obs directory:
rm -f `find . -name '*.o'`

The Makefile first compiles the code required for the telescope and generic libraries. First it makes the generic library libgen. This library contains code for network communication (netio and packdata), user input (reqlib), screen handling (scrlib), string manipulation (strlib), logging (sysmsg), coordinate handling (coord), time handling (time), system configuration (sys_cfg), linked list handling (linklist) and statistical routines (stats).

Next the telescope library libtel is compiled. This library contains code for controlling the antenna, including the commands it understands, the limits, coordinate systems, pointing corrections and source tracking (antenna), network communications (net and packmon), time handling under PSOS (psostime), controlling the rakbus (rakbus) and sampler (sampler), and code specific to the old 14m system (sp14m).

After these libraries are compiled, making the files /obs/lib/libgen.a and /obs/lib/libtel.a, the station software can be compiled. This software is all in the applic directory.

Notes

  1. Although the PSOS drive PC code will not compile on Linux, the directory is required as the Linux software needs many of the definitions made by the PSOS code.
  2. The code that is used to monitor the Mt Pleasant drive PC mostly works with the Ceduna drive PC. Unfortunately the weather information from the Ceduna drive PC is at a different offset from the data start address than the information from the Mt Pleasant drive PC. So the /obs tree on sille is slightly different from the tree on newsmerd. As at 30 Nov 2008 the trees have not been merged, since effort is being put into making the drive PC software run on a Linux PC.