using_mount_control_software.rst 11.2 KB

First steps with the Mount Control Software

The Mount Control Software (MCS) is the program that makes the link between astronomers and the hardware of the mount. MCS is installed aboard the computer linked to the mount hardware controlers.

MCS is running as a service as soon as the raspberry is booted. It allows a connection with any astronomy software using ASCOM protocol via serial port RS232 (driver astromecca, 115200 bauds). We named astronomy software any software that communicates with MCS (Cartes du Ciel, Prism, MaxIm DL, AudeLA, etc.).

If the ASCOM connection failed you must check if the MCS is running as service.

Check if MCS is running as service

In case of ASCOM no connection you must check the MCS state. To verify if MCS is running, in a Linux console:

ps -edf | grep mount

The answer may seems to be:

root       569     1  1 16:47 ?        00:00:16 /usr/bin/python3 /home/pi/astromecca/mount_control_software.py -config_path /home/pi/astromecca/ -server -langage ASCOM -transport SERIAL -port /dev/ttySC1
pi        1195  1161  0 17:05 pts/1    00:00:00 grep --color=auto mount

What is important is the first line indicating the mount_control_software.py script is run by python3. Note the PID (process identifier) is 569. It should be different for your session.

If the mount_control_software.py appears in ps -edf it means the possibility to drive the mount using a astronomy software using the ASCOM protocol. The check is OK.

If the mount_control_software.py does not appear in the ps -edf command, the check is not OK and you should check the error log file. In a Linux console:

more /tmp/mcs_err.txt

According the contents of the file mcs_err.txt, contact the manufacturer.

Moreover, the log file can help to identify some problems. To check the log of MCS, in a Linux console:

tail -n30 /tmp/mcs_log.txt

If you want to change the running service configuration, read the section to change the configuration for running as service.

Use the pad of the Mount Control Software

If the astronomer wants to drive manually the mount, it is possible to launch MCS in another way than a service. By this way it is possible to use the virtual pad of the MCS.

First you have to kill the current instance of mount_control_system.py (i.e. that is running as service). To kill a running MCS, in a Linux console:

sudo kill -9 569

569 is the PID previously noticed in ps -edf list (replace 569 by the PID of your session). Once kill done, verify the MCS has disapeared of the ps -edf list.

Then you can launch manually an instance of mount_control_system.py

cd ~/astromecca
python3 mount_control_software.py -config_mount config_mcs_default.py -mount_real -pad &

In the command line, the file name config_mcs_default.py provides a simulator only. For a real mount you have to replace the file name config_mcs_default.py by the file name delivered for your specific mount (contact the vendor if not present in the folder).

After MCS launch the virtual pad must appears on the desktop. The pad is a window divided in tabs.

  • Drive the mount tab is used to drive the mount for astronomical observations.
  • Calibrations tab is to help the polar alignment.
  • Configuration tab displays the configuration parameters.

Drive the mount

The first tab is used to drive the mount. It is possible to enter equatorial coordinates (J2000) and the side of the tube. Then push the button GOTO to start pointing. Note the side of the tube is Regular or Fliped for fork mounts and is Tube West or Tube East for German mounts. The telescope will track in sideral motion after pointing.

It is possible to move the pointed position using the N, E, S, W buttons. The moving velocity is set changing the number (1 deg/sec by default) in the center of the buttons. When buttons are released the motion return to the previous motion state (tracking or stoped).

The button STOP stops any motion of the mount (slew or track). The button Synchro records the RA, Dec, Side of pointing as the pointed coordinates. Use the button Synchro after having pointed and centered a bright star for instance. The button Park is used to park the mount. The button Quit exits the pad.

doc_images/pad1.png

Pad tab to drive the mount.

Help for polar aligment

The second tab is for advanced users. It is possible to enter local equatorial coordinates (equinox at the date) and the side of the tube. H.A. means hour angle. Then push the button GOTO to start pointing. The telescope will not drift after pointing.

It is possible to move the pointed position using the N, E, S, W buttons. The moving velocity is set changing the number (1 deg/sec by default) in the center of the buttons. After release the direction buttons the telescope is stoped (i.e. no tracking).

doc_images/pad2.png

Pad tab to help the polar aligment.

The buttons Lim E, Lim W and the Declination inc0 value are used to fit the mechanical pole in the center of images. The buttons Lim E, Lom W allow to slew the mount around the hour angle axis in order to obtain images of stars as circles.

doc_images/rotpole1.png

Image taken during the rotation from Lim E to Lim W.

One can deduce the center of rotation. The goal is to fit the center of star circles exactly in the center of the image. One axis of offcentring depends on the value of inc0 of the declination axis:

  • First: Push the Lim E button to put the mount in the eastern position.
  • Second: Change the inc0 value and push the button VALID and GOTO pole.
  • Third: Start an image exposure.
  • Fourth: Push the Lim W button to put the mount in the western position.
  • Fifth: Display the image and return to the first step and iterate until reaching star circles centered on the image center (see :numref:`fig_rotpole1`).

This setting must be done before any procedure of polar alignment (see the dedicated documentation align the pole).

Mount configuration

The third tab display the configuration paramters.

doc_images/pad3.png

Pad tab to display the mount configuration.

Mount Control Software for experimented users

All the fonctionalities described now imply to kill all the MCS instances (using kill -9 described above) before launching a new one.

It is possible to launch manually mount_control_software.py via Spyder IDE instead of the command line. We let users chosing what they prefer.

There are many options to adapt MCS for your needs. Especially it is possible to choose the protocols for astronomy programs.

Change the MCS configuration of the command line

There are many options to fit the needs. The help of the software is displayed as the following procedure:

pi@raspberrypi:~/astromecca $ python3 mount_control_software.py -h

usage: mount_control_software.py [-h] [-config_path CONFIG_PATH]
                                                                 [-config_mount CONFIG_MOUNT] [-mount_real]
                                                                 [-mount_port MOUNT_PORT] [-server]
                                                                 [-langage LANGAGE] [-transport TRANSPORT]
                                                                 [-port PORT] [-client]
                                                                 [-client_port CLIENT_PORT] [-pad]

Launch MCS

optional arguments:
  -h, --help            show this help message and exit
  -config_path CONFIG_PATH
                                                Path where configuration files will be read.
  -config_mount CONFIG_MOUNT
                                                Configuration files for the mount.
  -mount_real           Connect to a real mount controller. You must specify
                                                the -mount_port.
  -mount_port MOUNT_PORT
                                                Port identifier for the connection with a real mount
                                                controller -mount_real.
  -server               To activate a server. You must specify the -langage,
                                                -transport, -port.
  -langage LANGAGE      Server langage protocol (LX200, ASCOM, ASTROMECCA).
  -transport TRANSPORT  Server transport protocol (SERIAL, TCP).
  -port PORT            Port identifier for the server to listen a client.
  -client               To test a client. You must specify the -client_port
  -client_port CLIENT_PORT
                                                Port identifier for the client to dialog with a
                                                server.
  -pad                  Display the virtual pad.

MCS codes are installed in the folder /home/pi/astromecca. Codes are written in Python and consist of two Python modules, files and folders:

  • Module mounastro: Contains Python classes to drive the mount.
  • Module celme: Contains Python classes to perform calculations of celestial mechanics.
  • File mount_control_software.py: The Python code of MCS. It uses modules mountastro and celme.
  • Folder catalogues: Contains catalogs of astronomical sources used by the mountastro module.
  • Folder doc_html: Contains this documentation in HTML format (index.html).
  • Folder doc_pdf: Contains this documentation in PDF format (index.html).
  • Folder doc_rst: Contains this documentation in RST format (source of the documentation).

For example, if you want to launch MCS with the server MCS protocol over TCP port 1111:

cd /home/pi/astromecca/
python3 mount_control_software.py -pad -server -langage MCS -transport TCP -port 1111

If you want to launch MCS with the server ASCOM protocol over serial port /dev/ttySC1:

cd /home/pi/astromecca/
python3 mount_control_software.py -pad -server -langage ASCOM -transport SERIAL -port /dev/ttySC1

Change the MCS configuration for running as service

For AstroMECCA mounts, MCS is installed in a Raspberry computer. When the computer is booting, MCS is automatically launched according the configuration of the /etc/rc.local file. To read or change the configuration:

sudo geany /etc/rc.local

The following line is the code must be found in the rc.local file to launch MCS during the boot of the Raspberry:

nohup /usr/bin/python3 /home/pi/astromecca/mount_control_software.py -config_path /home/pi/astromecca/ -server -langage ASCOM -transport SERIAL -port /dev/ttySC1  1>/tmp/mcs_log.txt 2>/tmp/mcs_err.txt &

If you want to start the service with the MCS protocol over TCP port 1111:

nohup /usr/bin/python3 /home/pi/astromecca/mount_control_software.py -config_path /home/pi/astromecca/ -server -langage MCS -transport TCP -port 1111 1>/tmp/mcs_log.txt 2>/tmp/mcs_err.txt &

If you want to start the service another configuration file (e.g. myconf.py) placed in the folder /home/pi/astromecca:

nohup /usr/bin/python3 /home/pi/astromecca/mount_control_software.py -config_path /home/pi/astromecca/ -config_mount myconf.py -server -langage MCS -transport TCP -port 1111 1>/tmp/mcs_log.txt 2>/tmp/mcs_err.txt &

Do not forget to reboot the Raspberry to start the service:

sudo reboot