The nightview package also provide the server for control of telescope's mount. The shell a GTK+ client are included. They are control the telescope motions, clock and a dome slit position.
The server is a simpler variant of the nightview server. It listen on socket, it knows a set of commands. The server is a multi-threaded (more than one control track i one run binary). A first thread communicates with clients, a second controls a timers, start mount's engines and updates time specific variables (Julian date, azimuth of the telescope.. or spin the dome is it is need) and a third periodically saves the coordinates to file (for more robust behaviour when something crashed). The observation site parameters shares with nightview package. The server is a relative clever but it isn't the oracle. It uses all coordinates in degrees but it don't know nothing about your steeper motors. Therefore, the user should provide a few a low-level utilities (described in detail below) to do it.
The mount config file is shared with nightview daemon. It's means It read of the file /etc/nightview.conf. Only those items are used by the telescoped:
Longitude = 16.58395 Latitude = 49.204128
The geographical coordinates of your site in degrees must be provided. The longitude is coded as positive on east and negative to west with respect to zero's meridian (eg Greenwich). The latitude is in obvious manner. This values are used to computation of horizontal coordinates, Julian time etc. so enter the most precise values you knows.
Both latitude and longitude parameters can by independently set on command line during invoking of the daemon. The options are: -latitude and -longitude. See this example:
telescoped -latitude 49.204128 -longitude 16.58395
The command line switches overrides the config file setting. For details see the config file description.
Note. If command line switches are not specified and config file is not found, the defaults (Longitude = 16.58395, Latitude = 49.204128) are used. They are unusable for you, I suppose.
Note 2. Any part of this package wasn't tested on a wild west or a heat south observatories. Be careful.
The server is independent on your hardware solution of the mount. This independence requires a site specific solution. This solution is build on a few low-level subroutines directly used to communication with mount engine.
A good example is a mount with axes driven by steeper motors. The steeper motor have 100 steps per revolution (for example), your gears provides 1:3600 ratio so the low-level subroutines may know that you have a 100 steps per degree. Moreover, this drivers may provide communication over some interface (hardware dependent again).
The nightview package defines six general commands to control of the telescope. The telescope_rekl, telescope_dekl, telescope_clock and telescope_stop controls the telescope. The telescope_domeinit and telescope_dome controls the dome. The table describe usage:
Table 8-1. Low-level commands used by telescoped
command | options |
---|---|
telescope_rekl | difference [deg] velocity [deg/dec] |
telescope_dekl | difference [deg] velocity [deg/dec] |
telescope_clock | 0 | 1 |
telescope_stop | |
telescope_domeinit | 0 | 1 |
telescope_dome | difference [deg] velocity [deg/dec] |
The telescope_rekl command change the Right Ascension
of the telescope about value difference. If actual value of the telescope
is
and the difference
than the telescope is moved to:
The difference are in degrees, positive and negative values. Second parameter is velocity of moving in degrees per second. The command should immediately print the number of seconds needs to moving as a float number. If any error is occurred the zero is printed and return value should by set to non-zero.
The telescope_dekl command change the Declination
of the telescope about value difference. If actual value of the telescope
is
and the difference
than the telescope is moved to:
The difference are in degrees, positive and negative values. Second parameter is velocity of moving in degrees per second. The command should immediately print the number of seconds needs to moving as a float number. If any error is occurred the zero is printed and return value should by set to non-zero.
The telescope_clock command switch on the clock of the mount when parameter 1 (or any positive non-zero value) is supplied. If the zero (or negative or nothing) is specified, the clock is stopped. The float-number format can be used. The command should immediately print the number one (1) (may by a float number) when started and number zero (0) (may by a float number) when stopped the clocks. If any error is occurred the zero is printed and return value should by set to non-zero.
The telescope_stop command immediately stop all moving (clock included) motors. It's normally not used and is invoked when unconditional interrupt from user is occurred. The command line arguments are non-relevant and print the 0 (fail) or 1 (success).
The telescope_domeinit command initialise the dome (open the doors, spin to the telescope position for example) the 1 when parameter 1 (or any positive non-zero value) is supplied. If the zero (or negative or nothing) is specified, the dome is uninitialised (doors are closed, power is down). The float-number format can be used. The command should immediately print the number one (1) (may by a float number) when dome is initial and number zero (0) (may by a float number) when uninitialised the dome. If any error is occurred the zero is printed and return value should by set to non-zero.
The telescope_dome command change the azimuth of the dome's
slit about value difference. If actual value of the slit
is
and the difference
than the dome is spin around angle:
The difference are in degrees, positive and negative values. Second parameter is velocity of moving in degrees per second. The command should immediately print the number of seconds needs to moving as a float number. If any error is occurred the zero is printed and return value should by set to non-zero.
Warning. To correct behaviour of the telescoped server all listed drivers are need. Otherwise, the server will be flood your syslog with warnings and control utilities will print confusing messages. If any function is not supported by your hardware (like dome) use a dummy script. For example, telescope_dummy on my computer is:
#!/bin/sh # # dummy telescope echo -1 exit 0
with corporate links.