The Radio Telescope
Helsinki University of Technology operates a 15 meter microwave radio telescope at the Metsahovi Radio Research Station, Kylmala, Finland. The telescope is mounted on altitude and azimuth axes and consists of a paraboloid primary dish and a secondary hyperboloid mirror mounted on struts in the usual Cassegrain fashion. The whole telescope is enclosed in a plastic radome.
The telescope is used both for technically oriented research such as telecommunications studies, and for astronomical observation by several universities in Finland, as well as in international collaborations such as very long baseline interferometry. The mirrors and dome were manufactured by ESSCO Space Systems (USA). The receivers are mostly made in Finland. Observation is usually at millimetric wavelengths (frequencies around 100 GHz).
Software Requirements and Performance
The real time control programs for the telescope are written in DEC Ada and run on a MicroVAX II under VMS. In terms of size, this is a small application, created and maintained by a group of one to three programmers and used by 10 to 20 users. There are several different programs for different kinds of observations; e.g., quasar intensity measurement, solar microwave burst monitoring, observation of microwave spectra from interstellar and circumstellar molecular clouds, etc.
The main function of the programs is to compute azimuth and elevation commands for the antenna position servo. This is done at a 10 Hz rate using Ada tasks and delay statements. The actual servo loop is part of the telescope hardware electronics. Data acquisition samples analog voltages at rates from 1 Hz to some 1000 Hz. For the higher rates VMS DMA drivers are used. Ada tasks are used for low rate sampling, on line data reduction and calibration, and the user interface.
Earlier control systems at this site used an HP2100 mini with HP BASIC and, later, HP Algol, with a home brewed tasking system. I programmed on both of the earlier systems and participated in the transfer to Ada. In my opinion, Ada was just right for the job. There has been significant reuse and sharing of packages across different programs. The tasking facilities of Ada 83 were sufficient. Most of the hardware twiddling was successfully hidden in packages of in line routines. Finally, and as has often been reported, most programs that compiled correctly also ran correctly. This was a pleasant change compared to the earlier languages.
Two descriptions of typical programs, by Merja Tornikoski of Metsahovi, follow.
The current Solar observing system SMART (Solar Microwave Activity Research Tool) is able to perform all types of Solar observations normally done at Metsahovi: Solar map measurements, sweeps through the Solar surface, and tracking a certain region on the Sun. SMART is a knowledge system that serves as both an observing program and an expert. The program has knowledge for identifying, classifying, and prioritizing active Solar regions. It uses some basic artificial intelligence methods to predict the activity development of the regions and to suggest further observing targets. SMART is designed to identify and eliminate problems like inaccurate telescope pointing and varying weather conditions. It also performs the initial data reduction on line, even though more profound data reduction is normally done afterwards and on other computers.
The SMART system is actually a collection of several Ada programs that are run by a DCL script. The script calls the different programs when they are needed to initially calculate Solar coordinates, measure a Solar map, analyze the map, print a draft of the map, track active regions, etc. Only the programs which analyze maps (old or new) and the observing data are "intelligent;" the others just perform routine tasks like moving the telescope, sampling the A/D converter, etc.
Experience has shown that SMART can actually outsmart the more inexperienced observer. For an expert observer, SMART is useful for quickly giving very much information and also giving suggestions for further actions, which one may then follow or disregard. The program has been in use almost daily since 1990; use decreases during the darkest winter months, but is used several times a day in the summer. There are approximately eight people who use the program; there are users who are inexperienced with both computers and observing and users who are experienced astrophysicists and computer users.
For the programmer, the most useful Ada features are the packaging, tasking and exception mechanisms. The tasking system is mainly useful in the ”nonintelligent” part of mapping and tracking, where lots of things need to be done quickly and simultaneously. Exceptions were extremely useful for designing ways to recover from problematic situations and unexpected user response. Packages were useful both for keeping things neatly in order and reusing some previously designed low level routines (mostly hardware related routines).
The task of this program is to measure the total or “continuum” intensity of radio radiation emitted (within the bandwidth of the receiver) by a compact celestial radio source, such as a quasar. The “control” part of the program directs the position of the telescope (the antenna). The “acquisition” part measures the intensity of radio radiation received by the antenna.
For continuum observations of quasars, no AI methods were needed, since the problem space is well-defined and the solutions for increasing the degree of automation of these observations actually only consisted of straightforward implementations of some new functions. We concentrated on reducing user interaction to the point where input is required mainly in the very beginning of the observing session and, after that, observations may run automatically or semi-automatically.
For the programmer, the quasar observing program was not as challenging as the solar observing program, because less “intelligence” was needed and also because the timing requirements are not as tight as for the Solar observations. In the quasar observations the antenna tracking system needs to be very accurate, but the data sampling rates are much lower (1 Hz) compared to the 20 Hz or more used in the Solar observations; quasar observations do not require as much optimizing as other, more time sensitive observations.
The semi-automatic quasar observing Ada program is based on programs that were used earlier at Metsahovi for the same purpose. All the low level routines were taken from the earlier programs, which were initially run on an HP 2100A, and then written in Ada to run on the MicroVAX. Some of these packages are shared with the Solar observing program. Only some new high-level routines were written to improve the user interface and to enable more automatic observations. This aspect of development was possible because the team was able to start using the written packages very early in the process.
Insights on Transitioning to Ada
The team leader reported that, “Regrettably, I do not think I can supply much interesting information about the challenges we faced in moving the radio telescope control system to Ada, mainly because, as I recall, there were almost none! Ada is much more powerful than the prior language (Algol) and the Ada tasking system is quite equal to this application.”
According to Holsti, the switch to Ada took place several years ago, and the problems encountered were due mainly to the simultaneous change of the computer hardware. The old control computer was a diskless, 16 bit, 64 Kb core HP2100A with paper and magnetic tape storage. The old system was significantly different from the new system, which is a MicroVAX running VMS.
Most of the low level I/O had to be totally rewritten, but this had little to do with Ada and everything to do with the I/O structure of VAX/VMS. In some cases, the developers tried to do memory mapped I/O directly from Ada, using representation clauses, but often had to go to assembly language because the compiler used wide bus accesses and field masking even for 16 bit data, where the memory mapped devices required 16 bit bus access. Still, the Ada system has less assembly code than the earlier Algol system.
The text of the earlier Algol programs was available. Nevertheless most of the Ada source was typed from scratch. Initial design and development were done on a large VAX machine at the University Computer Center with simulation versions of the packages for process I/O. Final development on the system’s own MicroVAX also depended quite a lot on simulation of the hardware, since the telescope was used continuously with the old control system.
Very little experience with Ada
The first program to be moved from Algol to Ada was the continuum or “quasar” observation program. No tool beyond a text editor and the VAX Ada compiler was used. The program was constructed by three people: one person for the design; another person for the coding; and a third who collaborated with the other two as a “chief programmer.”
The designer had an M.Sc. in computer science, but no Ada training. The coder had an M.Sc. in biology, some first and second year CS courses, and some years of experience as a business BASIC programmer. The “chief programmer” knew Ada only from his experience as a teaching assistant in a course on Principles of Programming Languages, where Ada was featured in many examples. Later work has drawn on students from an Ada course taught at the Helsinki University of Technology. No other special training has been given and no CASE tools are used.
The original Ada program was small, only about 5,000 to 10,000 lines of source code, but has grown over the years. The Algol program that was replaced was already structured as a set of concurrent tasks, using a home-brewed multi tasking kernel, and very much the same task structure was adopted for the Ada version. This may have reduced the need for a real time CASE tool.
Based on an article by Ralph Crafts, Ada Software Alliance.