FYI, new code was submitted last night that adds the mount altitude angle to the existing kstars log and autofocus log. After merge, the altitude will now be at the end of each line:
autofocus log (located in .local/share/kstars/focuslogs/):
date, time, position, temperature, filter, HFR, altitude
2020-09-01, 22:35:46, 50100, 15.0, Red, 1.692, 37.5
kstars log has a similar, but different formatted entry:
Autofocus values: position, 50100 , temperature, 15.0 , filter, "Red" , HFR, 1.69168 , altitude, 37.4758
The prior version of the log entry already facilitated plotting temperatures against focuser positions. The new code provides users with info needed to find the altitude residuals trend.
For those that don't know how to process the data (but want to), do the following: (Note that your focuser should be well behaved...no major slipping or out-of-control backlash or your trendline functions will be suspect)
a. Import the autofocus log into your favorite spreadsheet or charting app and plot all temperatures against corresponding focuser positions. Set a linear or quadratic trendline for the data and display the equation.
b. Create a new column that subtracts the above equation from each focuser position (on the same row). This is the residual of the measurement after factoring the temperature trend.
c. Plot the residuals column (from b above) against altitudes, set a trendline, and display that equation. This is the elevation residual function.
You can now calculate your autofocus "seed" position for any temperature and elevation. Add the two functions together using the input temperature and elevation. I've provided a sample spreadsheet clip below that hopefully helps folks understand the setup a bit better. The top line shows the seed position calc for my gear (partial data). In my case, indications are that I must adjust my focuser ~75 counts for each degree (C) change, and also ~21 counts (+/-) for each degree change in target altitude angle. Running the focuser seed calc after a slew and setting the focuser position to the seed before running autofocus allows tighter parameters, keeps autofocus runs short, and increases successful outcomes. Automation (future) is certainly possible, but for now, I hope this info helps folks get a better handle on focus performance. Cheers, Doug