×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

how to align telescope to objects in a separate 2D camera (X,Y coords)

  • Posts: 7
  • Thank you received: 0
Hi,

I am using kstars with Celestron computer driven telescope with kstars-bleeding and all is working properly

I have added separate camera system (fixed, stationary) that detects moving objects and can get the 2D (X,Y) coords of the object using OpenCV and Python on Rpi

I can set it up so that the 2D camera X0,Y0 position aligns with the telescope center FoV by manual adjustements.

How do I send x,y updates to kstars when the camera detects an object, and then keep sending coordinate updates in 2D format to kstars to make the telescope follow the moving object seen in the camera

I am guessing that there is some kind of API to send coordinates to kstars, but not sure on how to convert X,Y from camera to match telescope and also how to scale the telescope to the camera FoV

If this is not possible with kstars, what would be involved in adding this as a feature.
5 months 1 week ago #97278

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

  • Posts: 1224
  • Thank you received: 566
There is an INDI DBus interface that I guess you can use to slew the telescope to an RA/DEC coordinate
api.kde.org/kstars/html/group__EkosDBusInterface.html
I personally haven't used these, but there are others on this forum with experience with that.

So, assuming you used something like gotoTarget on this page:
api.kde.org/kstars/html/classEkos_1_1Mou...684e4d06460c0787a343
then you'd need to translate your image x,y coordinates to RA & DEC coordinates.

To do that, you could plate-solve your image, e.g. StellarSolver or Astrometry.net or ASTAP etc.
Then, perhaps use wcslib to translate an image coordinate to a ra/dec coordinate.
You can find an example of using that by trying to understand pixelToWCS in KStars
invent.kde.org/education/kstars/-/blob/m...ref_type=heads#L2855

Of course, asking your telescope to slew to an RA/DEC coordinate may not accurately get it there.
So, then you might want to use the EKos plate-solve Align and Solve functionality (probably also available via DBus command)...

Hy
5 months 1 week ago #97294

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

  • Posts: 7
  • Thank you received: 0
Thanks for this info Hy, much appreciated.

Can you suggest any example Python script that is communicating with Kstars DBus that I can use as a start point.
5 months 1 week ago #97296

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

  • Posts: 1224
  • Thank you received: 566
5 months 1 week ago #97298

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

  • Posts: 7
  • Thank you received: 0
Thanks Hy, this is a great starting point
5 months 1 week ago #97301

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

Time to create page: 0.389 seconds