Do ASCOM mounts have to support AzAlt?

A place to report problems and bugs in SharpCap
Forum rules


If you have a problem or question, please check the FAQ to see if it already has an answer : https://www.sharpcap.co.uk/sharpcap-faqs

Please also read about Troubleshooting USB Issues before posting.

*** Please do not post license keys - please report any problems with licensing to 'admin' by private message ***

Please include the following details in any bug report:

* Version of SharpCap
* Camera and other hardware being user
* Operating system version
* Contents of the SharpCap log after the problem has occurred.
[If SharpCap crashes, please send the bug report when prompted instead of including the log]
Post Reply
Clutchplate
Posts: 10
Joined: Fri Apr 09, 2021 5:19 am

Do ASCOM mounts have to support AzAlt?

#1

Post by Clutchplate »

Hi there, I am writing an ASCOM driver for a mount that does not support Az/Alt, only Ra/Dec. Whenever I connect, Sharpcap throws up error dialogs. The Sharpcaps logs indicate an exception saying that Altitude is not implemented ,which is true, my driver throws a NotImplementedException on Altitude since I return false for CanSlewAltAz. Is this expected? Should the driver return s dummy value instead? Why does SharpCap ask for Altitude if the CanSlewAzAlt capabilities are not there?
Cheers,
- Lutz
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Do ASCOM mounts have to support AzAlt?

#2

Post by admin »

Hi Lutz,

Ah, the joy that is ASCOM :)

As you will have noticed the documentation doesn't say "this property must be implemeted" or "this property may raise an exception" (https://ascom-standards.org/Help/Develo ... titude.htm). There are a number of places like this in the standard where you realise that the behaviour is not properly pinned down when you start thinking about it.

Fortunately, the ASCOM Conformance check tool seems to answer the question - it reads the Altitude and Azimuth from the telescope driver as part of its check, so I presume a driver that failed to implement those would fail conformance testing

Code: Select all

ConformanceCheck Driver ProgID: ASCOM.Simulator.Telescope
... 
Properties 
21:05:59.525 AlignmentMode                     OK       algGermanPolar
21:05:59.562 Altitude                          OK       38.92
21:05:59.591 ApertureArea                      OK       0.0269
21:05:59.625 ApertureDiameter                  OK       0.2
21:05:59.666 AtHome                            OK       False
21:05:59.716 AtPark                            OK       False
21:05:59.747 Azimuth                           OK       180.00
21:05:59.778 Declination                       OK        00:00:00.20
21:05:59.812 DeclinationRate Read              OK       0.00
21:06:01.885 DeclinationRate Write             OK       Set rate to 0.0 - successfully set rate to 0
21:06:03.954 DeclinationRate Write             OK       Set rate to 0.1 - successfully set rate to 0.1
21:06:06.035 DeclinationRate Write             OK       Set rate to 1.0 - success
Since you need to know the time and location for RA/Dec pointing to be meaningful, you should be able to use the Transform class that ASCOM makes available to calculate the Alt/Az on request based on the RA/Dec position.

https://ascom-standards.org/Help/Develo ... nsform.htm

cheers,

Robin
Clutchplate
Posts: 10
Joined: Fri Apr 09, 2021 5:19 am

Re: Do ASCOM mounts have to support AzAlt?

#3

Post by Clutchplate »

Thanks, Robin. Yeah, ASCOM..... :-)

I will run conformance testing over the driver and see what that shows up. Thanks for the hint about the Transform, too. Got to get it running in Sharpcap without causing exceptions, I think there will be an uptick in users using this mount.

- Lutz
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Do ASCOM mounts have to support AzAlt?

#4

Post by admin »

Hi,

cool - glad you have the problem solved.

One more thing to be aware of (I only just worked this out recently...)

The ASCOM mount object has an 'EquatorialSystem' property. You really have two options on this that can give good results

1) return equTopocentric and do nothing else - basically you are saying that your mount runs in what might be called 'JNOW' co-ordinates

2) return equJ2000 and then convert every co-ordinate so that on the ASCOM interface you talk J2000, but internally you are JNOW.

Some mount drivers default to returning equJ2000 but do no adjustment internally. Of course the physical part of the mount is going to be polar aligned with the current pole position and needs to get JNOW co-ordinates, so that GOTO co-ordinates are off etc.

cheers,

Robin
Clutchplate
Posts: 10
Joined: Fri Apr 09, 2021 5:19 am

Re: Do ASCOM mounts have to support AzAlt?

#5

Post by Clutchplate »

Hey Robin,

Thanks for the heads up, but I was indeed already returning equTopocentric.

And the good news is that running the comformance test uncovered a few bugs as well. But it now passes with no errors or issues and works great in SharpCap!

Hopefully you'll see some more registrations from our OAT mount users (https://wiki.openastrotech.com).

Cheers,

- Lutz
User avatar
admin
Site Admin
Posts: 13177
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Do ASCOM mounts have to support AzAlt?

#6

Post by admin »

Hi Lutz,

that looks like a neat project :) Glad the conformance check helped find some bugs :)

cheers,

Robin
Post Reply