Arabic Chinese simplified Chinese traditional English French German Italian Japanese Korean Russian Spanish

shopping cart

Solved Sync Home Position Programmatically

  • Samuel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
09 Mar 2023 17:11 #1129 by Samuel
Sync Home Position Programmatically was created by Samuel
Hello,

is there any way to "Sync Home Position" programmatically, e.g. via ASCOM? I wouldn't mind writing a little ASCOM client/script myself.

Some more context: My rig is not permanent, hence I would like to be able to automate this part as I always set up my M-Uno in the CWD position anyways. I use Voyager which takes care of starting and connecting all my devices and I would like to do the same with my M-Uno and "Sync Home Position".

Thanks and best regards,
Samuel

Please Log in or Create an account to join the conversation.

More
14 Mar 2023 16:07 - 14 Mar 2023 16:09 #1130 by Schaefer
Replied by Schaefer on topic Sync Home Position Programmatically
Hi Samuel,
I think it is basically just syncing the scope to the celestial north pole. So DEC will be 90 degree and RA can be derived from the local siderial time available from the mount. In CWD position you would need to add 6hrs to it and makes sure to not exceed 24h.
In ASCOM using JScript it could be done like this (no error checking, so the mount should be powered on and connected to your PC and of course be in CWD position);
You can run the script using cscript.exe. No guarantee of course that it actually works and will not brick your mount

var T = new ActiveXObject("ASCOM.AvalonStarGo.NET.Telescope");
T.Connected = true;
T.Tracking = true;
var RA = (T.SiderealTime + 6) % 24;
var DEC = 90;
T.SyncToCoordinates(RA, DEC);
T.Connected = false;


Regards,
Stephan
 
Last edit: 14 Mar 2023 16:09 by Schaefer.

Please Log in or Create an account to join the conversation.

  • Samuel
  • Topic Author
  • Offline
  • New Member
  • New Member
More
15 Mar 2023 17:38 - 16 Mar 2023 08:07 #1131 by Samuel
Replied by Samuel on topic Sync Home Position Programmatically
Hi Stephan,

that's great, thank you!

I think I'll make a tiny .NET app from this with proper error checking and so on.

I also noticed that SideOfPier seems to be -1 ("Unknown") until the mount is aligned, so I'll use that to first make sure that the mount wasn't already aligned and also to then afterwards ensure that the alignment was successful.

Regards,
Samuel
Last edit: 16 Mar 2023 08:07 by Stefano82.

Please Log in or Create an account to join the conversation.

More
16 Mar 2023 11:17 #1132 by Schaefer
Replied by Schaefer on topic Sync Home Position Programmatically
Hi Samuel,
when playing with it I also found some strange behaviour of the Avalon driver in reaction to the sync command. For instance if you request the current position (RA/DEC) immediately after the sync call returns, it still reports the old position. Only after several seconds it returns the updated value.
I would have expected that upon return from that request, everything has finished, as there is no official way to check if the sync was completed or not. The method is not flagged as being asynchronous, like some of the Slew methods where you can check if it has finished or not.
I also looked at the SideOfPier property and I think it also took a while to be updated, but I'm not sure. Anyway, I think finding ways to check if that call has finished successfully are kind of a hack and should not be necessary if the driver would only return from the command once it is completely done and all internal positions are properly updated. May be Avalon can explain this behavior or explain how to detect if a mount is aligned or not. StarGo needs to do that check, as it indicates it in the user interface. So there must be an 'official' way...

Regards,
Stephan

Please Log in or Create an account to join the conversation.