Issue slewing to zenith via SharpCap IronPython script

Discussions on extending SharpCap using the built in Python scripting functionality
pe78420
Posts: 23
Joined: Sat Aug 26, 2017 12:09 pm

Re: Issue slewing to zenith via SharpCap IronPython script

#11

Post by pe78420 »

Hi Jean-François,

I get the same error via SharCap Sequence Editor...

Code: Select all

SEQUENCE
    MOUNT CONNECT
    MOUNT UNPARK
    MOUNT GOTO ALTAZ 90 0
    PROMPT "Press OK to Continue." ENABLECONTROLS False
    MOUNT PARK
END SEQUENCE
  • First run KO
  • Second Run OK
  • Third run KO
  • Fourth run OK
And so on..
An asynchronous issue between commands ?

Weird! 😒
Jean-Francois
Posts: 863
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Issue slewing to zenith via SharpCap IronPython script

#12

Post by Jean-Francois »

Hello Philippe,

No, I guess it is some conversion error between the AltAz coordinates and the mount RA-DEC.

For the zenith: with an equatorial mount, you can have only 2 orientations of the mount ... tube East pointing up or tube West pointing up.
With an AltAz mount, you have an infinity position ... Alt = 90 and Az is free, means from 0° to 360°.
Now how to calculate from one coordinate system to the other without producing an error.

So, it seems that the SynScanPro does the job without error.
The GSServer needs some additional work for this case.
I checked with EQMOD (Simulator), it seems to work fine with EQMOD.

Jean-Francois
pe78420
Posts: 23
Joined: Sat Aug 26, 2017 12:09 pm

Re: Issue slewing to zenith via SharpCap IronPython script

#13

Post by pe78420 »

Thanks JF,
I’m going to do more extensive testing… but I must admit that I’ve never really looked into the theory behind alt/az or ra/dec coordinates… hence my silly questions! 🤣
Philippe
pe78420
Posts: 23
Joined: Sat Aug 26, 2017 12:09 pm

Re: Issue slewing to zenith via SharpCap IronPython script

#14

Post by pe78420 »

No more extensive testing — it's always the same error. To bypass it, I have to disconnect the mount, and then the sequence ends properly.
I asked GSS dev to have a look...
https://gss.groups.io/g/main/message/6301
Jean-Francois
Posts: 863
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Issue slewing to zenith via SharpCap IronPython script

#15

Post by Jean-Francois »

Hello Philippe,

Can you confirm that you use the mount (SkyWatcher AZ-EQ5) in equatorial mode ?

Jean-Francois
pe78420
Posts: 23
Joined: Sat Aug 26, 2017 12:09 pm

Re: Issue slewing to zenith via SharpCap IronPython script

#16

Post by pe78420 »

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

Re: Issue slewing to zenith via SharpCap IronPython script

#17

Post by admin »

Hi,

the 'SharpCap is still having problems' error means that something SharpCap asked the mount to do has failed, and following retries it is still failing. The retries help deal with intermittent connection errors (particularly with wirelessly connected mounts), but it does hide the actual error message a bit. It's probably worth looking into the SharpCap log (feel free to post here) to see what the underlying cause of the failure is.

Further up, there was an error to do with the GOTO alt/az co-ordinates - that one looked as though the mount ASCOM driver was rejecting the AltAz GOTO because the mount was tracking. Some ASCOM drivers do that, others allow it. I guess it makes sense, since if tracking you won't stay pointing at the zenith for long! To work around that, you could stop tracking, goto the zenith and then resume tracking.

cheers,

Robin
Jean-Francois
Posts: 863
Joined: Sun Oct 13, 2019 10:52 am
Location: Germany

Re: Issue slewing to zenith via SharpCap IronPython script

#18

Post by Jean-Francois »

Hello,

I found the cause of the problem.

The GSServer does not go to the AltAz coordinates if the mount is tracking.

=> so do tracking = False before the command and it works :-)

But now I found something weird and that can confuse if you start to program ...
The order of the parameters seem to be inverted if you use the SharpCap or directly the ASCOM command.
SlewTo_Zenith.jpg
SlewTo_Zenith.jpg (36.84 KiB) Viewed 2753 times
Regards,
Jean-Francois
pe78420
Posts: 23
Joined: Sat Aug 26, 2017 12:09 pm

Re: Issue slewing to zenith via SharpCap IronPython script

#19

Post by pe78420 »

Dear Jean-François,

Sorry to disappoint you, but here is the script I used yesterday:

Code: Select all

import clr
clr.AddReference("SharpCap")
mount_name = "ASCOM GS Sky Telescope"
for index, mount in enumerate(SharpCap.Mounts):
	if str(mount) == mount_name:
		break
SharpCap.Mounts.SelectedMount = SharpCap.Mounts[index]
SharpCap.Mounts.SelectedMount.Connected = True
SharpCap.Mounts.SelectedMount.UnPark()
SharpCap.Mounts.SelectedMount.Tracking = False
SharpCap.Mounts.SelectedMount.SlewToAltAz(90,0)
SharpCap.Mounts.SelectedMount.Connected = False
Capture d'écran 2025-05-10 172434.png
Capture d'écran 2025-05-10 172434.png (373.93 KiB) Viewed 2743 times
pe78420
Posts: 23
Joined: Sat Aug 26, 2017 12:09 pm

Re: Issue slewing to zenith via SharpCap IronPython script

#20

Post by pe78420 »

Same with:

Code: Select all

SEQUENCE
    MOUNT CONNECT
    MOUNT UNPARK
    MOUNT TRACKING None
    MOUNT GOTO ALTAZ 90 15
    PROMPT "Press OK to Continue." ENABLECONTROLS False
    MOUNT PARK
END SEQUENCE
Capture d'écran 2025-05-10 174205.png
Capture d'écran 2025-05-10 174205.png (678.56 KiB) Viewed 2742 times
Post Reply