developer - would like to add new telescope to plugin

Asked by John Guineau

Hi,

I am a software developer and amateur astronomer. I recently revived my old Celestron SPC8 telescope (from circa 1984). I also have a SkySensor computer control with serial port (this is NOT the newer SkySensor 2000). I have the SkySensor programing info and would like to add its simple protocol to the stellarium Telescope Control plugin so I can control my scope.

I've been browsing the source and also searching around the various stellarium web sites (wiki, sourceforge etc) but have not come across any docs specific to adding new telescopes to the telescope control plugin. I thought I saw a reference in one of the source files to a telescope control plugin developers document, but now I can't seem to fond that reference!

Any pointers appreciated. of course whatever I do would be given back to Stellarium.

thanks!
john

Question information

Language:
English Edit question
Status:
Solved
For:
Stellarium Edit question
Assignee:
No assignee Edit question
Solved by:
Bogdan Marinov
Solved:
Last query:
Last reply:
Revision history for this message
John Guineau (wjg321) said :
#1

Ah, this is the reference to a document I mentioned in the original post:

In ./stellarium-0.10.5/plugins/TelescopeControl/src/clients/TelescopeClientDirectLx200.cpp

it has:

        //! queues a GOTO command with the specified position to the write buffer.
        //! For the data format of the command see the
        //! "Stellarium telescope control protocol" text file
        void TelescopeClientDirectLx200::telescopeGoto(const Vec3d &j2000Pos)

Where can I find the "Stellarium telescope control protocol" text file?

thanks!

Revision history for this message
Best Bogdan Marinov (daggerstab) said :
#2

The code of the old style, stand-alone telescope control servers is still in the Subversion repository at SourceForge:
http://stellarium.svn.sourceforge.net/viewvc/stellarium/trunk/telescope_server/
A lot of it has been reused in the current Telescope Control plug-in.

There's also a somewhat newer (and unfinished) re-write with a GUI:
http://stellarium.svn.sourceforge.net/viewvc/stellarium/trunk/telescope_server_gui/
(You'll need to use Qt Creator for that one.)

The document you are interested in is this one:
http://stellarium.svn.sourceforge.net/viewvc/stellarium/trunk/telescope_server/stellarium_telescope_protocol.txt?revision=1562&view=markup
But it specifies the protocol used by Stellarium to communicate over TCP/IP with a stand-alone server application that controls the telescope itself. That comment in TelescopeClientDirectLx200 is a leftover - the code has been copied from TelescopeTCP. TelescopeTCP::telescopeGoto() uses that protocol to send commands over TCP/IP to a server, but TelescopeClientDirectLx200::telescopeGoto() simply calls the necessary function from the Lx200Connection class - as the server/driver code is a part of the plug-in itself, there is no need for network communication.

You can try to write an old-style stand-alone server first, or you can skip this part and add the telescope specific classes directly to the plug-in. Or both. :)

Adding a telescope requires:
- Classes that stand for the commands given to the telescope. Typically, this is implemented as an abstract base class with subclasses for the specific commands. See Lx200Command and its subclasses and NexStarCommand and its subclasses.
- A subclass of the Serial port class that handles the connection to the telescope. See Lx200Connection and NexStarConnection.
- In a stand-alone server: a subclass of Server (e.g. ServerLx200) and a "main" file (e.g. MainLx200.cpp)
- In the Telescope Control plug-in: a sublass of TelescopeClient. See TelescopeClientDirectLX200 and TelescopeClientDirectNexStar. You need also to add the new telescope model to TelescopeClient::create() and to the device_models.json file.

In all cases, you can begin by copying some of the existing files for the other models and making the necessary changes. This is how the NexStar server/driver has been created - as a clone of the code for Lx200.

Note that both the servers and the plug-in use Doxygen documentation. It helps a lot, especially with the class hierarchy.

If you have any more questions, Stellarium's developers mailing list is a better place to discuss them:
https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel

Revision history for this message
John Guineau (wjg321) said :
#3

Thanks Bogdan. That gives me a great starting point. I had planned to just copy the LX200 or NexStar direct code and modify it.

john

Revision history for this message
John Guineau (wjg321) said :
#4

Ok, i spent some time today and I now have a basic plugin half working for the original Sky Sensor.

I basically copied the NexStar and gleaned some info from the LX200 plugins.

It tracks the SkySensor's current position and shows the telescope location "cursor" in Stellarium.

The hack I am choking down now if for sending a position (GoTo). The SkySensor has a single command for specifying a GoTo R.A./Dec - and that command over the serial port actually interactively *prompts* you for each piece of information!

So from the Stellarium plugin the model of commands and response does not fit well with a single command needing to interact with the telescope controller. I had to hack the Socket class to expose the writeNonBlocking() function so I can access it from within SkySensorCommand (via TelescopeClientDirectSkySensor).

So SkySensorCommandGotoPosition::readAnswerFromBuffer() is actually calling a new hacked API static_cast<TelescopeClientDirectSkySensor*>(&server)->sendBytesToSerial() to feed the SkySensor with data at each prompt.

I hope this makes sense - and I hope someone who knows the Telescope Control plugin framework better will set me straight.

Any thoughts?
john

Revision history for this message
John Guineau (wjg321) said :
#5

Also, I believe the SkySensor is Epoch 1950 data. I am just stuffing coordinates in as though they were J2000 :)

Is there a conversion routine in Stellarium I can use to go between 1950 and J2000?

This is pretty cool. The SkySensor is slooow to slew since I cannot activate the "fast" mode via serial port.

thanks!
john

Revision history for this message
ERIC HEIM (yesduhh) said :
#6

Hi, I was very pleased and surprised to google and get your posting on the first hit.

I also have my dad's old rather beat up spc8 with the skysensor. No manual or anything. I am sure the epoch is old and on top if it it cannot handle dates after Y2K! (the only device I know of personally that did not survive the y2k bug).

Anyway, I am an amateur astronomer and know nothing about programming, but have refurbished the scope quite well, optically and the mount, and the skysensor does work, but I have been fantasizing about computer control via stellarium or Starry night, which I also have. I spent a lot of time initially trying to find any info at all on Sky Sensor, pdf manuals etc. , star codes, etc.

Now I see you have endeavored to do that which I cannot. I would love to hear about any advances you have made. I really know nothing about the kind of programming you mentioned in your post. I would have no idea how to connect a windows pc of today with a serial cable to the serial port!

RSVP, Eric Heim.

Revision history for this message
igor_g (igor-gojnik) said :
#7

Hi!

I see that this theme is dealing with old vixen skysensor.

I also have one that I got with celestron spc8. It works but my problem is that I do not have any manual. If anybody have manaul for old Vixen/Celestron mid 80s Skysensor I will appreciate help very much because I almoste give up in my search for this manual.

If there is no manual out there can anybody learm me how ot speed up tracking speed (what is command for that)?

Thanks in advance!

igor

Revision history for this message
John Guineau (wjg321) said :
#8

Hi Igor,

I have the manuals for SkySensor as PDF's. I will try to attach them to this email, but if it does't work feel free to email me directly and I can send them to you.

john

> On Oct 23, 2014, at 5:56 AM, igor_g <email address hidden> wrote:
>
> Your question #124108 on Stellarium changed:
> https://answers.launchpad.net/stellarium/+question/124108
>
> igor_g posted a new comment:
> Hi!
>
> I see that this theme is dealing with old vixen skysensor.
>
> I also have one that I got with celestron spc8. It works but my problem
> is that I do not have any manual. If anybody have manaul for old
> Vixen/Celestron mid 80s Skysensor I will appreciate help very much
> because I almoste give up in my search for this manual.
>
> If there is no manual out there can anybody learm me how ot speed up
> tracking speed (what is command for that)?
>
> Thanks in advance!
>
> igor
>
> --
> You received this question notification because you asked the question.

Revision history for this message
John Guineau (wjg321) said :
#9

Yes, the attachments were stripped off. Try here:

http://coyotetechnology.com/Skysensor_Inst_Man.pdf <http://coyotetechnology.com/Skysensor_Inst_Man.pdf>
http://coyotetechnology.com/Skysensor_Star_Data.pdf <http://coyotetechnology.com/Skysensor_Star_Data.pdf>

> On Oct 24, 2014, at 7:06 AM, John Guineau <email address hidden> wrote:
>
> Your question #124108 on Stellarium changed:
> https://answers.launchpad.net/stellarium/+question/124108
>
> John Guineau posted a new comment:
> Hi Igor,
>
> I have the manuals for SkySensor as PDF's. I will try to attach them to
> this email, but if it does't work feel free to email me directly and I
> can send them to you.
>
> john
>
>
>> On Oct 23, 2014, at 5:56 AM, igor_g <email address hidden> wrote:
>>
>> Your question #124108 on Stellarium changed:
>> https://answers.launchpad.net/stellarium/+question/124108
>>
>> igor_g posted a new comment:
>> Hi!
>>
>> I see that this theme is dealing with old vixen skysensor.
>>
>> I also have one that I got with celestron spc8. It works but my problem
>> is that I do not have any manual. If anybody have manaul for old
>> Vixen/Celestron mid 80s Skysensor I will appreciate help very much
>> because I almoste give up in my search for this manual.
>>
>> If there is no manual out there can anybody learm me how ot speed up
>> tracking speed (what is command for that)?
>>
>> Thanks in advance!
>>
>> igor
>>
>> --
>> You received this question notification because you asked the question.
>
> --
> You received this question notification because you asked the question.

Revision history for this message
igor_g (igor-gojnik) said :
#10

Hi John !

Thank you alot for your post!

I am very happy to finally get this manual. Your post will help guys out there who are looking for that informations too.

I hope that your stellarium project is going well.

Thanks!

Igor