KStars is a KDE application for doing astronomy stuff.
It has the possibility to make telescopes and other equipment track and measure astronomical objects, which it does through INDI (Instrument Neutral Distributed Interface). This can be a neat thing, especially if you want to try to use your parabolic dish with a brand new 23 cm feed to measure neat stuff in the Universe, and you don’t necessarily want to go through the hassle of adding all of these objects to libpredict when KStars can just add them to its database.
We couldn’t see INDI drivers for our rotor controller, so we made one ourselves as a perfect excuse for doing more useful work like checking that our parabolic dish actually can receive this stuff. Its git repository is located at https://github.com/bjorgan/indi-rotctl. It can control a hamlib-supported rotor through rotctld, which means that any hamlib-supported rotor controller is also supported by our INDI interface. Build and usage instructions follow below.
Build instructions
Start by cloning the git repository:
git clone https://github.com/bjorgan/indi-rotctl.git
Enter the folder and create a build folder:
cd indi-rotctl
mkdir build
cd build
Now, the slightly horrible part begins. The included INDI header files include each other in such a way that it isn’t enough to have /usr/include
as a part of the standard search paths, but /usr/include/libindi/
actually has to be included. Instead of specifying this explicitly, we’ll let INDI’s CMake modules take care of it. Unfortunately, they aren’t a part of the standard installation, so they have to be included from a copy of INDI’s source code repository. We’ll therefore also have to clone this (~330 MB):
git clone https://github.com/indilib/indi
We’ve made our CMakeLists.txt
add the CMake modules based on the environment variable INDI_SOURCE_DIRECTORY
. In addition, INDI drivers have to be installed to /usr/
and not /usr/local
, since INDI will call them as executables explicitly from /usr/bin
. We therefore specify these while running cmake
:
cmake -D INDI_SOURCE_DIRECTORY=$PWD/indi -D CMAKE_INSTALL_PREFIX=/usr ..
It is slightly inconvenient that they can’t be installed to /usr/local
, but what can you do. Provided nothing went wrong, we can compile and install the driver:
make
sudo make install
From here and on it is assumed that you already have started a rotctld service that controls your rotor. We’ve achieved this by connecting all our rotors to a Raspberry Pi, and starting a rotctld
instance for each, where the rotor is uniquely identified by its port. You can also give it a spin using the rotctld
dummy driver.
Usage instructions
KStars is a GUI application, which means we’ll have to use our computer mouse for quite a bit.
First of all: Make sure to set your correct location, otherwise all of this is rather meaningless. This is both because the sky will all be wrong, but also because the coordinate conversions between KStars’ right ascension/declination to rotctld
‘s azimuth and elevation won’t be correct.
From KStars, the device drivers are accessed using the Device manager.
We added our rotctld driver to its own driver category since it wasn’t exactly a Telescope or something like that. It is therefore found under “Rotors”. The driver is started by clicking “Run service”.
The control panel for the Rotctld driver will show up. We’ll have to switch to the “Connection” tab in order to specify the address and port of the rotctld instance.
In our case, this is at la1k-rotors.local:4537
for our parabolic dish. Pressing “Set” will save it to the settings.
Next, switch back to the “Main control” tab and press “Connect” to connect to rotctld
.
Hopefully, something like this will show up. A slightly cryptic (at least for me) right ascension and declination shows the current pointing direction of the rotor.
Slightly more convenient: The KStars sky view thing will show the current position of the rotor.
Engaging tracking of objects is easily done by right-clicking the object and asking the rotctl driver to track it.
The rotor starts to slew towards the object.
And the rotor will remain pointing towards the object as the Earth rotates, in a slightly wobbly way due to how the tracking is implemented.
We are used to tracking satellites, where the rotor has to turn towards the satellite, and track it as best it can while it passes over the horizon. Here, the stars are fixed, and have right ascensions and declinations that are almost fixed – but the Earth rotates, and make the necessary azimuth and elevation change, which means that the rotor has to change its course all the time.
Going back to the control panel and pressing “Abort” will abort the tracking mode.
The rotor will then remain pointing towards a fixed azimuth, elevation while the Earth rotates further on during its merry course.
The solution here is rather quick and dirty, and the driver will only have access to a single rotctld instance at a time. The tracking might also be a bit wobbly, as demonstrated above – but it’ll do.
The source code repository is located at https://github.com/bjorgan/indi-rotctl.
Leave a Reply