API for PA

Got an idea for something that SharpCap should do? Share it here.
Forum rules
'+1' posts are welcome in this area of the forums to indicate your support for a particular feature suggestion. Suggestions that get the most +1's will be seriously considered for inclusion in future versions of SharpCap.
Post Reply
Clutchplate
Posts: 10
Joined: Fri Apr 09, 2021 5:19 am

API for PA

#1

Post 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
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: API for PA

#2

Post 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
Clutchplate
Posts: 10
Joined: Fri Apr 09, 2021 5:19 am

Re: API for PA

#3

Post 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
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: API for PA

#4

Post 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.
Clutchplate
Posts: 10
Joined: Fri Apr 09, 2021 5:19 am

Re: API for PA

#5

Post 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
User avatar
admin
Site Admin
Posts: 13173
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: API for PA

#6

Post 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
Clutchplate
Posts: 10
Joined: Fri Apr 09, 2021 5:19 am

Re: API for PA

#7

Post by Clutchplate »

Ok, thanks much! Will let you know how it turns out :-)
Post Reply