seeing-things / track

Automates tracking of targets with a telescope using ephemeris (TLE files) and/or optical tracking.
MIT License
8 stars 0 forks source link

Streamline subprocess usage in `autofocus` #268

Open bgottula opened 1 year ago

bgottula commented 1 year ago

Currently, autofocus runs track as a subprocess twice: First to wait until the mount moves over and gets the bright star centered in the camera, and then a second time to hold it in the camera while it does all of the actual focusing stuff. This gets the job done but is not the smoothest experience. Try to rework things such that track can just be run once as a subprocess, using some kind of inter-process synchronization so the parent process can wait until the subprocess indicates that it has converged on the star.

It may be possible to re-use the signals-based synchronization method I'm working on for the align_guidescope program where the situation is very similar.

When this change is applied, make sure to adjust the tracking error threshold. Right now it's hard-coded at 0.1 degrees, which is close enough when the process has to re-start anyway, but once the process does not need to re-start it should just wait until the tracking error is below about 1% of the main camera's field of view, similar to the threshold align_guidescope uses.