Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telescope Control: ASCOM Driver #406

Closed
alex-w opened this issue Sep 26, 2018 · 38 comments · Fixed by #761
Closed

Telescope Control: ASCOM Driver #406

alex-w opened this issue Sep 26, 2018 · 38 comments · Fixed by #761
Assignees
Labels
wishlist Long-term ideas
Milestone

Comments

@alex-w
Copy link
Member

alex-w commented Sep 26, 2018

Original report by Mi.Holzner: https://bugs.launchpad.net/stellarium/+bug/1082196

Hi,

I would like to control differen Telescopes with Stellarium, as it is my favourite Sky-Software.
Many Drivers are available within the ASCOM project, i am sure, you know ASCOM.

So, is Stellarium TelescopeControl PlugIn would have a option for ASCOM-Driver in the telescope-Driver list - it would be possible to use it with every scope, where an Ascom driver exists.

Maybe advanced users have already written their own ascom-driver for use with different software - they would can use this driver then also with stellarium.

I saw this in the astrosurf c2a software - and it works great - but i would prefer to use Stellarium.. :-)

thanks,
Michael

@alex-w alex-w added wishlist Long-term ideas state: confirmed A developer can reproduce the issue labels Sep 26, 2018
@gzotti
Copy link
Member

gzotti commented Sep 26, 2018

#271 indicates demand for ASCOM control. We can close this.

@gzotti gzotti closed this as completed Sep 26, 2018
@rederikus
Copy link

I realize that you closed this thread but StellariumScope has not been updated for years. ASCOM is the de-facto worldwide telescope control standard. Yes, it only runs on Windows. So what? I use Cartes du Ciel on Windows and Linux, CdC uses Ascom where it is is available. I use Starry Night on Windows and that uses ASCOM on WIndows but not on other platforms. Finally I use Sky Tools 3 and Virtual Moon. Both use ASCOM only under Windows. bOviously where ASCOM is not available, it is not used.

Why oh why cannot Stellarium do the same? Where a tool is available, USE IT.

I and I suspect many others would like the consistency of ASCOM across software platforms. When using Stellarium I am denied focuser control, camera features and at least two of my telescopes are just not supported by Stellarium. It NEEDS ASCOM.

Please do not get me wrong. I love Stellarium. However I would love it more if it supported ASCOM on Windows.

Please make this happen.

Thanks

@alex-w alex-w added help wanted We may not have the hardware or expertise and removed state: confirmed A developer can reproduce the issue labels Jul 19, 2019
@alex-w alex-w reopened this Jul 19, 2019
@gzotti
Copy link
Member

gzotti commented Jul 19, 2019

I had closed this as duplicate of #271. Maybe we can close #271 instead?

The problem is that no developer has an ASCOM controlled telescope, and no ASCOM controlled telescope owner was so far able to develop a patch and send it to us. Stellarium has supported two widespread protocols for many years and has recently been enhanced to use RTS2 and INDI. I understand INDI as superior to ASCOM, and maybe your gear also supports INDI?

@rederikus
Copy link

I am sorry I caused you to reopen a closed thread. I was Googling the web to find an Ascom to Stellarium solution and this showed up in my search results.

I have heard of Indi but I can tell you that at the Charlotte Amateur Astronomers Club http://charlotteastronomers.org/ of 200 + members almost everybody who does not have a turnkey scope or a pushto device uses Ascom.

Almost all the major manufacturers support the platform. Regardless of whose system is the best I truly feel it is better to support common standards. Ascom, like Stellarium is free and for different telescopes and other devices many independent developers provide enhancements and drivers.

I shall certainly look at Indi again now you have mentioned it but honestly Ascom seems the way most people have already gone.

I hope you can find a way forward.

As an aside, I have been a user of Stellarium since the mid 2000s and I have just bought Starry Night 8. My decision to buy SN8 was based entirely upon the fact that it supported Ascom.

@gionkunz
Copy link
Contributor

gionkunz commented Aug 6, 2019

@gzotti I understand it's sometimes difficult if your users use hardware that the developers don't have access to. However, in case of ASCOM this is not a valid excuse :-) ASCOM has the concept of simulators built into its core. Almost all devices (scopes, focuser, dome etc.) have a simulation counterpart. In the case of ASCOM Scope, this includes positions, sync and all other features that a real mount would present. I think, given the high demand of ASCOM support in Stellarium, this would be a huge benefit for your users. Stellarium Scope is a great Workaround, but it's a workaround let's face it. Also, it presents other issues and requires maintenance outside of the Stellarium release cycle.

I'm a developer myself, however, I've written my last C++ code back in the university and I think I'd introduce more anti-patterns and bugs than anything else if I'd try to contribute here. However, if I can help with anything, please tell me.

Best regards
Gion

@gzotti
Copy link
Member

gzotti commented Aug 6, 2019

@gionkunz Having forgotten most of C++ is no excuse either -- this can be freshened up. :-)

Most development is driven by personal needs and interests of developers. The original developers of the telescope plugin unfortunately left the project. Two users have contributed INDI and RTS2, probably because they needed those connections themselves. My little telescope does not need ASCOM, so I have no personal ambition to spend several weekends of my spare time on this, to get a solution that does not more than the existing, and I am very sure users with advanced telescopes would then come with demands of focuser, CCD and filter wheel control (which I could not develop without the experience about how such control program should look like!). You would "just" have to understand the plugin code and extend the code if built on Windows. If there is a library to link, there are other examples to see in the code (e.g. spout). Yes, indeed, I would welcome an ASCOM solution contributed by somebody. Unfortunately that somebody has not volunteered yet.

@gionkunz
Copy link
Contributor

gionkunz commented Aug 6, 2019 via email

@gzotti
Copy link
Member

gzotti commented Aug 6, 2019

Great! The wiki here includes startup guides (Compilation on Windows), and https://stellarium.org/doc/head/ is the Doxygen documentation. You cannot break the program, as development will be done in your private clone. When you have something to show, you make a "pull request" on github. All you need to edit is inside plugins/TelescopeControl, and maybe some cmake config files. If you come across other issues, please don't try to silently add them with this branch.

I cannot promise permanent and immediate availability for testing, though, it may take a few weeks sometimes. And I am afraid I cannot answer too detailed questions related to the code of that plugin, as it is not my code and I hardly use the plugin myself. I guess @alex-w will have more insight, although he mostly uses Linux, not sure if he would be willing/able to test... In any case all ASCOM-related code must be excluded from build on non-Windows systems.

@gionkunz
Copy link
Contributor

gionkunz commented Aug 7, 2019

Okay, guys, I've started this journey 😄

image

@YahaGr
Copy link

YahaGr commented Aug 27, 2019

Good luck! Thousands of amateur astronomers are hoping for you!

@gionkunz
Copy link
Contributor

gionkunz commented Aug 27, 2019 via email

@rederikus
Copy link

I am amazed. My request has been answered. Thank you. Now, where can I get my hands on this to test it.

Thank you guys. You have just done the whole world of amateur astronomers a HUGE favour.

Wonderful

@gzotti gzotti added the state: in progress The problem is in process of solution... label Oct 8, 2019
@gzotti gzotti added this to the 0.19.3 milestone Oct 8, 2019
@gzotti gzotti added this to To do in Plugin: Telescope Control via automation Oct 8, 2019
@rederikus
Copy link

I'll help anyway I can. I have ASCOM telescopes available and so do some of my fellow astronomers at our club. I am pretty much a hardware guy and an old one at that. With regards to writing code I am like a fish with a bicycle so to test I really would like a Windows executable if I am to help out which, I would really like to do.

Again thanks you very much for this.

@gzotti
Copy link
Member

gzotti commented Oct 8, 2019

I feel there is lots of demand, and many volunteers to test this.

Not sure if @gionkunz can provide installers. Maybe you can try building his repository from sources. This does not require you to write code, just follow the instructions in our wiki: Install Cmake, MS Visual C (free community edition), install Qt 5.13 (OpenSource version, free; don't forget to install the deprecated QtScript module!), git, clone Gion's repository, load in QtCreator, build, and execute. If you are generally OK with operating a Windows system, this should work within a few hours or maybe days. And whoever is able to help Gion with coding can try to fix what does not work on his/her particular equipment.

@rederikus
Copy link

Thanks for your reply. I shall try and attempt not to break it. I am so pleased that I caused this thread to be re-opened and to see ASCOM coming to Stellarium. I use CdC, Starry Night and Sky Tools. CdC is great for telescope handling and its built-in ASCOM features. They are far better than those on Starry Night. Stellarium's support is also more responsive than Starry Night where they only help if they think it is worthwhile. It is a shame because it is an expensive program. Once Stellarium has working ASCOM I can drop Starry Night entirely.

@gzotti
Copy link
Member

gzotti commented Oct 8, 2019

Not so much reopening this (and closing the other) request, but Gion's activity is bringing ASCOM to Stellarium. Let's hope for the best now!

@gionkunz
Copy link
Contributor

gionkunz commented Oct 9, 2019

Okay, I think I'm nearly done with implementing the feature. I have tested it already with two different Simulators and with my EQ6-R mount. However, more sophisticated testing is required for testing the ASCOM coordinate systems and Stellariums way of calculating atmospheric refraction when using JNow and the mount does not do it by itself. This Saturday, it looks like there's a Starry Night (pardon the pun), and I'll take my scope for a detailed pointing test including the new sync functionality (ctrl + shift + <scope#>).

I never built the installer, but I think I should learn how to do it, since I also have a few people who would be very much interested to test this feature. Please bear with me, since I only have limited time to work on this.

I'm very certain we will soon have ASCOM support in Stellarium, since I won't stop until this is accepted and agreed by all involved parties.

Cheers
Gion

@gzotti
Copy link
Member

gzotti commented Oct 9, 2019

Sounds good. I can hopefully test it next weekend with my NEQ3. Maybe @alex-w could quickly build trial installers from your sources (or is the "Making the Installer" in the wiki Build instructions for Windows still up-to-date? Then just follow that.), so that Windows users can send you feedback. What about the win32/win64 issues, what is the recommended process now? Does a single 32bit ASCOM driver require you to use Stellarium 32bit, or do you handle all these cross-bittiness properly? (Not sure, are there still 32bit systems in wide use for telescope guiding systems?)

@gionkunz
Copy link
Contributor

gionkunz commented Oct 9, 2019

Well, the 32bit / 64bit issue seems to be fine. At least with the EQ ASCOM simulator and the ASCOM.Telescope.Simulator I do not notice any issues with either the 32 or the 64 bit version of my build. However, this could potentially be an issue with other ASCOM drivers which were compiled for a specific architecture. My latest commits include better error tolerance and I guess the effect of such an issue would currently be that the telescope would always show as "connecting..." similar to all the other telescope types, when you enter invalid parameters.

@gionkunz
Copy link
Contributor

gionkunz commented Oct 9, 2019

I have managed to build the installer. You can download the installer files for 32 and 64 bit here: https://drive.google.com/drive/folders/1hgTWKgmOgYq2OFNchOLdZxLgpZlKXPi7?usp=sharing

@alex-w
Copy link
Member Author

alex-w commented Oct 10, 2019

On Windows the plugin has issue in the GUI when ASCOM platform is not installed. I think the better choice here will be add the persistent GUI elements and manage enable/disable state for it on Windows.

@alex-w alex-w moved this from To do to In progress in Plugin: Telescope Control Oct 10, 2019
@rederikus
Copy link

rederikus commented Oct 11, 2019

Will this help? I asked in the ASCOM forum how to detect an ASCOM install in Windows. Here's the replies. I tried to post a link but it didn't work twice. Here's the full text.

Is there a way for a Windows program to detect the presence of an ASCOM installation before any connections are attempted.  To explain further, I need to see if ASCOM is even installed on a Windows PC when I run a program.  It does not matter if ASCOM is being used or not, just installed.There is probably a registry lookup or a folder/filename combo that I can use but I would rather the ASCOM devs pointed me in the right direction before I make mistakes.Thank you.

Reply Like More
Rick B.17:52   #41531  You could read HKEY_LOCAL_MACHINE\SOFTWARE\ASCOM\PlatformVersion from the Windows Registry to get the version number of the installed platform version.However, I would wait until Peter Simpson has replied since he may have a better suggestion.Rick B
Reply Like More
John Eccles18:05   #41532  On my WIN7 Professional machine the key is at: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ASCOM\Platform
Reply Like More
Rick B.18:30   #41533  The WOW6432Node only exists on 64-bit versions of windows. The OP did not say the bitness of his Windows version.Some registry keys are shared by both 32-bit and 64-bit software. The Registry Redirector takes care of re-directing registry access to the correct location. So, the location that I specified is good for any application running on either a 32-bit or a 64-bit version of Windows. I just don't know if it is the best, definitive location to determine if the Platform is installed.Here is a link to more info about the Registry Redirector --> https://docs.microsoft.com/en-us/windows/win32/winprog64/registry-redirectorRick Btoggle quoted messageShow quoted text
Reply Like More
Pete20:07   #41534  Thanks guys.  Most helpful.

@gionkunz
Copy link
Contributor

@rederikus I think instead of polluting to code even more with windows specific code, we keep it as we have it solved right now. We simply try to connect to the ASCOM.Util COM object and if that fails, we know that there's no ASCOM. Also this is great because it allows us to get the ASCOM version and also fail if it's significantly outdates (< version 6).

@gionkunz
Copy link
Contributor

But anyways, thanks so much for this clarification and valuable inputs!

@rederikus
Copy link

I can do very little to help this project but I feel some responsibility for having pushed you guys in this direction. I know it is not true but I kind of feel you are doing this for me. I am many things but not a coder.

I understand why you might not wish to put in Windows specific code to poke about in the registry.

@gionkunz
Copy link
Contributor

I can only speak for myself, but you did certainly not push me into any direction 😄 I wanted this feature since I have installed Stellarium and Stellarium Scope the first time, but never took the initiative to start development. I was re-using this ticket because that's what you should do on Github, instead of opening new tickets for the same topic. Also this issue was originally reported by someone else Mi.Holzner: https://bugs.launchpad.net/stellarium/+bug/1082196 . And I guess there are a bunch of other astronomy people who wish for this feature for a long time 😄 So really nothing you should feel responsible about in a negative way...

@rederikus
Copy link

Oh it is not in any negative sense at all. I was happy to find another thread. Mi.Holzner's that was also asking for ASCOM.

I am super happy to have helped to precipitate this sub-project. No wish to push anybody in any direction that they did not already want to go. This is great,

@alex-w alex-w removed the help wanted We may not have the hardware or expertise label Oct 12, 2019
@rederikus
Copy link

Without asking for even more work to be done, I number of people I know use IP (either via LAN cable or WiFi) to control their telescopes. I found that I was limited to COMx ports using Stellarium's built-in scope control.

Will it be very hard to include IP address connectivity? Just askin' , no mor'n that. Thanks
Pete

@gzotti
Copy link
Member

gzotti commented Oct 13, 2019

This is why I asked whether StellariumScope is completely obsolete now. Maybe network connectivity is available by ASCOM? (I never had the need for it.)

@rederikus
Copy link

I know that some ASCOM drivers do support IP connectivity as well as COMx connections. This is because I have used them on telescopes.

From what I have searched for and read StellariumScope looks, at best, to be no longer updated or maintained which is a shame. More I do not know.

@rederikus
Copy link

This amazing. Whilst I have only tested Stellarium/ASCOM on my bench system it worked perfectly. I shall try it out this weekend at the club observatory. Even the TCP/IP connection works along with (obviously) the COM ports.

When do you think this will be released for all to use? Will there soon be a 32 bit version? I have discovered that some ASCOM drivers are 32bit compatible only and will only run with a 32 bit compile.

@gionkunz
Copy link
Contributor

gionkunz commented Oct 29, 2019 via email

@rederikus
Copy link

Great. Thanks Gion.

This update is going to make a lot of people happy I think. I am still amazed at how quickly this has been brought to alpha testing stage.

What a great team.

@rederikus
Copy link

Two night ago I took my 8" Dob on its home made goto mount to the observatory. I id a 3 star align and turn control over to Stellarium + ASCOM via a HC-05 Bluetooth connection on the scope. It worked flawlessly. I used a 32mm eyepiece and every time I did a goto the object appeared in the eyepiece. It was just the same a using the OnStep hand controller. I am super impressed.

I know I have said this before but I genuinely believe that you have done the world of amateur astronomy a great favor by putting ASCOM into Stellarium. Thank you all once more.
Pete

@gzotti
Copy link
Member

gzotti commented Nov 8, 2019

Some things take time. See https://sourceforge.net/p/stellarium/feature-requests/60/ for probably the oldest ASCOM request, for version 0.8.0, and Johannes' call for participation.

@gionkunz
Copy link
Contributor

gionkunz commented Nov 8, 2019

If all astronomers have one thing in common, it's probably (to be forced to learn) to be patient... :-)

@gionkunz
Copy link
Contributor

gionkunz commented Nov 8, 2019

@rederikus that's awesome! So far we have had very good response with the alpha version. I'm writing on the documentation as we speak.

@rederikus
Copy link

@gionkunz I realize that I was not by, far the first to request this but it seems that my little ask came at just the right moment to kick the rock off the cliff and then, of course, there came the splash as the rock hit the water. Many rocks fall but sometimes, just sometimes the time is right for the splash.

As to patience, the cry is often, "Give me patience but, I want it now." Either way, I am really happy that you all did what you did. I await the official release eagerly.

Cheers
Pete

Plugin: Telescope Control automation moved this from In progress to Done Dec 4, 2019
@alex-w alex-w removed the state: in progress The problem is in process of solution... label Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wishlist Long-term ideas
Projects
Development

Successfully merging a pull request may close this issue.

6 participants
@alex-w @gionkunz @gzotti @rederikus @YahaGr and others