I'm trying to use a pan / tilt alt-azimuth telescope mount to track an object that is moving in the sky. The problem is that the object is changing speed constantly. I can easily track objects that are moving at a steady speed.
I'm using the OpenCV library to compute the object's distance from the center of the image. I should be able to tell the telescope mount to speed up or slow down to follow the object. The actual algorithm though seems surprisingly hard to write.
For instance if I tell the mount to speed up to follow the object, then the apparent speed between the two is much less, but still not zero. So the object is slowly drifting out of the view. So I have to recenter it which is totally different than adjusting the speed. It's like I need a re-centering algorithm and a speed adjusting algorithm running at the same time.
Does anyone have any ideas how to do this or where to ask? Neither the OpenCV or telescope forums seems the right place to ask this question.
Thanks