Hello, I would like to try to start over. I have some software which I would like to share with the community. I made it open source GNU public license, so feel free to use it in any project you wish. It is the basis for the software which I use in my current Alt-Az fork mount prototype, which as of right now, I keep in a private repository.
In any case, I would love for any of you DIYers out there to try it out. I would appreciate the feedback, just try to keep the criticism constructive for me please. As of now, everything runs on a 4 core Raspberry Pi (3B, 3B+, or 4), on Ubuntu 18.04. It is a bit tricky to set up, so I might make the OS image with all of the relevant libraries, along with my software preinstalled, available for download, if people have trouble.
I may or may not make geometric correction algorithms available in the public repository at some point, depending on how things go in the future, along with a method calling the ESA's plate solving algorithm. As of now, it is very bare-bones, but aside from mechanical imperfections, I can assure you the software itself will enable your DIY Alt-Az mount to track as accurately as the precision of your encoders will allow.
There is one limitation, however. Since it runs on a Raspberry Pi currently, and for some reason the Raspberry Pi foundation has neglected to create an official library for control of the GPIO pins, I have relied on a 3rd party library for such control. Don't get me wrong, the 3rd party library I chose to link is quite excellent (http://abyz.me.uk/rpi/pigpio/). The problem is that it is written in C, and the GUI library I use is QT, which is written in C++. Incidentally, it made sense to write the bulk of the code in C++, using a class system for ease of integrating multithreading. Each motor and each encoder runs on its own core of the cpu. Ordinarily, mixing C and C++ would not cause much trouble. However, one area where C and C++ do not play well together is callbacks. Callbacks are handled quite differently in the two languages, so at the moment, there is a bit of a memory problem which can lead to occasional crashing.
I would like to add one more thing. I have been using the sofa library for the bulk of the calculations (https://www.iausofa.org/current_C.html), and it works incredibly well. However, environmental conditions, such as temperature, pressure, and other variables which can affect viewing conditions (sometimes atmospheric factors such as these can affect Alt-Az coordinates dramatically) are set in the globalvars.cpp file. While strictly speaking, this is not ideal programming practice, ease-of-use for the end-user was the motivation for this design. Ideally, instrumentation should be used to set these variables at runtime. As it stands now, global variables need to be set by the user before compiling. A compiled language was chosen for this application, because an interpreted language, such as python, would be much too slow to handle the accounting of the incremental encoders.
Anyway, please let me know what you think. I am anxious to get some more eyes on the code, so I can improve it. Here is the link: https://github.com/T.../TelescopeMount
 One more thing -- in addition to a Raspberry Pi, a touchscreen or mouse/screen combination is required to operate the GUI. You might want to turn the brightness all the way down. [end edit]
Edited by n-dtech.com, 13 January 2021 - 06:14 PM.