Page 1 of 1

API for PA

Posted: Sun Jun 13, 2021 6:09 pm
by Clutchplate
Hi Robin,
Is there any way to get the ALT/AZ offsets from SharpCap in realtime? I am thinking about trying to implement an automatic PA routine on my mount. If Sharpcap could make the offsets available to my mount control app, it could adjust the mount accordingly…
Maybe a socket based (REST?) would work. Or maybe it could be included in the Python interface? I’d need to be able to start PA, get states (so i can rotate RA when needed) and ALT/AZ offset after successful solve.
Thoughts?
Lutz

Re: API for PA

Posted: Mon Jun 14, 2021 11:26 am
by admin
Hi,

making this available via the Python scripting is probably the best idea - that's nice and simple from my side and this seems like a fairly niche (but rather cool) thing :)

Right now getting sc4.0 out the door is my priority, but I will jot this down on the features todo list.

cheers,

Robin

Re: API for PA

Posted: Tue Oct 05, 2021 4:46 am
by Clutchplate
Hey Robin,

thought I'd check back in with you, now that 4.0 is out the door :-)... did this make it onto any list that is coming in a future release?

Cheers,
- Lutz

Re: API for PA

Posted: Tue Oct 05, 2021 2:34 pm
by admin
Hi Lutz,

yes, it did

Code: Select all

print SharpCap.PolarAlignOffset
this will be (0,0) unless you are in the last stage of polar alignment, where it will be the alt/az offset in degrees required to get alignment (positive X means move right, positive Y means move up).

cheers,

Robin.

Re: API for PA

Posted: Wed Oct 20, 2021 2:55 am
by Clutchplate
Awesome! What version is this or will this be in?

Also, do you know whether it is possible to access the SharpCap scripting API from another C# .NET application? If so, can you give me a synopsis of how that would be possible?

Lutz

Re: API for PA

Posted: Wed Oct 20, 2021 1:27 pm
by admin
Hi Lutz,

that's available now in the latest updates to SharpCap 4.0.

There is no built in way to access the API from another application, but since you can build pretty much anything you like using the IronPython libraries, you could make your own. For instance you can use pyro to make a remoting server inside SharpCap (see viewtopic.php?t=302). You could even make a web server with a REST API if you wanted...

cheers,

Robin

Re: API for PA

Posted: Thu Oct 21, 2021 7:08 pm
by Clutchplate
Ok, thanks much! Will let you know how it turns out :-)