INFOWIKI System - PROTOTYPE - To WIKI INDEX main page

This article belongs to category : Blogs

Controlling EQ6 mount directly without handcontroller in Mac OS X

VOBSER project

Note: this software is not yet available for download. Sorry.

History

In autumn 2008 I started to rewrite the StarMap software I wrote for Mac OS X in 2005. The history of this small application is rather long. Originally I wrote it in 1998 on Linux using plain X11 (libX11) and later rewrote it 1999 to use the GTK-widgets. There was also a brief experimental version using Lesstif.

Screenshot of VOBSER v.2.0.1. Click to enlarge.

When I moved to Mac OS X (which I still consider the best Unix system I have used - and there has been many!) I rewrote the old StarMap in Objective-C and Cocoa.

However, my first rewrite of the software was not what I could describe real&pure Objective-C code. The code base still had lots of legacy old C code in it (ie lots of C functions) and the way how I used Cocoa and classes in Objective-C was - to put it nicely - clumsy. So, in general I was fully aware that this is not the way how Objective-C and Cocoa was supposed to be used.

Despite of the internal uglyness the software was completely useful. Thousands of variable star observations were done by the help of this small software. At this point the software was designed to assist the visual observer but when I moved to CCD-photography (2007) and started to use HEQ-5 GOTO mount I quickly realized that the software should assist not only the visual observer but also the observer using a CCD-camera with a robotic telescope mount.

After purchasing my first GoTo mount (HEQ-5) I implemented the first iteration of supporting this robotic mount. That 2007 version supported the NexStar protocol that the HEQ-5 handcontroller understands (it is a subset of that to be exact) and I was able to control the mount thru the software but the many bugs and other limitations that were caused by the stupidly done handcontroller were putting up some serious limitations.

In brief, this 2007 version talked to the handcontroller that then commanded the mount. Many problems still remained, there was no sync operation that the HC would support, there was numerous bugs in the HC that caused the handcontroller to lockup or to crash and tons of other stupid things that were implemented into the HC that had no real use or simply did not work. I was left wondering who designs these products. In my eyes the designers either know nothing about observing or are complete beginners. I felt that otherwise a rather good mount was destroyed by utterly stupid handcontroller.

I started to look for a solution and about this time I first heard about the EQMOD software project that was available for Microsoft Windows. In brief, the EQMOD software is driving the HEQ-5 and EQ6 mounts directly without the handcontroller (people in the Windows world also had realized the shortcomings of the handcontroller and decided simply to bypass it completely. What a wonderful idea !).

When using EQMOD you don't need the handcontroller for anything. In fact you even don't need to connect it to the mount at all (you can throw it "gently" to the trash). I tested EQMOD in a Windows PC and, yes, it worked beautifully.

However, the sad thing was that this special piece of code was only available for Microsoft Windows - an operating system that I have absolutely zero interest to use.

In the beginning of 2008 I contacted the original programmer of EQMOD and asked if he could write a port for Mac OS X. Unfortunately he had limited access to a Mac (no surprise here, windows programmers are windows programmers not mac programmers). I requested the source code of the eqcntrl.dll program (the heart of the EQMOD system) but the maker of the software was not willing to provide the sources of this code (it's free software but no source code is available).

The eqcntrl.dll includes the "super important" implementation of the actual protocol that your software needs to know so that it can command the mount directly.

I emailed several times with the Windows team and there were some attempts to produce something but unfortunately they failed to deliver anything for the Mac OS X platform.

I was left with only one option: I have to write the code myself.

... and the project starts

So, in summer 2008 I decided to do two things:

I first implemented the direct mount control as a separate application. The work progressed slowly and took many long hours and many weekends (and I won't explain how I did all that, sorry!) but after about 50-60 hours of effective work (not calendar time, I have a day job..) I finally got the basic mount control working without the handcontroller.

This required endless nights reviewing the log files produced by the RS-232 serial debuggers that I put between the mount and the handcontroller and interpreting the meaning of the bits and bytes that were stored in those logs. That was pure detective work.

Slowly the bits and pieces of the hidden protocol was revealed. It was a true feeling of triumph when the mount first reacted to the command to start the motors and then nicely was obeying the up,down,left,right SLEW commands that my small program was sending over the RS-232 serial cable. That put a smile on my face.

In mid November of 2008 I had managed to rewrite about 95% of the original clumsy Objective-C code and implemented direct EQ6 / HEQ-5 mount control to my new application and also spiced up the UI a bit. I also decided to rename the app from StarMap to VOBSER. The name stands for "Variable Star Observer".

The version 2.0.1 includes the following catalogs:

In addition the software supports:

The EQ6/HEQ-5 mount control is now integrated to the new chart application and all basic mount controls work:

There are still couple of things missing that I plan to implement:

Some of these features I plan to finish during Q1/2009.

November, 15th 2008

-Mika Luostarinen


Edit page