Page 1 of 1

Do ASCOM mounts have to support AzAlt?

Posted: Fri Apr 09, 2021 5:26 am
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

Re: Do ASCOM mounts have to support AzAlt?

Posted: Fri Apr 09, 2021 8:10 pm
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

Re: Do ASCOM mounts have to support AzAlt?

Posted: Sat Apr 10, 2021 12:42 am
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

Re: Do ASCOM mounts have to support AzAlt?

Posted: Sat Apr 10, 2021 7:06 pm
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

Re: Do ASCOM mounts have to support AzAlt?

Posted: Sat Apr 10, 2021 8:21 pm
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

Re: Do ASCOM mounts have to support AzAlt?

Posted: Sun Apr 11, 2021 2:33 pm
by admin
Hi Lutz,

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

cheers,

Robin