Sunday, September 9, 2012

Autoguiding in KStars


In a previous post, I briefly talked about developing the Autoguide feature in KStars. Guiding is process by which a star field is kept stationary within the field of view of a telescope when performing long exposure astronomical imaging. The telescope mount must keep tracking the selected celestial object during the imaging process as it transit the sky. Due to imperfections in the mechanics of the mount and periodic errors, the star field may drift with time. If the drift is not corrected, the resulting image may contain star trails among other deformities. The guiding process depends on selecting a reference star in the frame and correcting the telescope motion by detecting drifts in the telescope axes, and issuing correction commands accordingly.

Guiding under Ekos
Autoguiding feature was once a GSoC 2012 project, but students who got accepted were selected for other projects in KStars, so I decided to implement the feature myself. KStars supports INDI which can operate and control numerous astronomical devices. The goal of the GSoC project is to add autoguiding support to KStars Ekos tool. Ekos is a tool to aid amateur astronomers in astrophotography. It enables focusing, guiding, and capture of astronomical images using INDI.


So instead of reinventing the wheel, I decided to base the autoguiding code on existing open source software. Under Linux, the primary tools are OpenPHD and Lin Guider.  After researching both options, Andrew Stepanenko lin_guider was selected because it was battle tested, and especially since it is based on Qt and hence, import will be easier. After a couple of weeks of importing the code and rewritings part of it to fit KStars and INDI framework, the autoguider tool was complete, at least under simulation. The autoguiding tool, in addition to the autofocus tool previously developed should now complete the basic stack of tools required by astrophotography. The next step is to field test all those features!

The following is a video illustrating the autoguide feature in KStars: