New Focus Algorithm

Robert Lancaster rlancaste at gmail.com
Sat May 7 18:41:02 BST 2022


Hello John,

Thank you very much for contributing.  A couple of years ago I was in a very similar position to you, having had no experience with C++ and using my Mac to try to contribute.  My hope is that besides my contribution of getting KStars to work on a Mac in the first place, that I made it doable for others to get started with it as well.  To that end, please let me know if there is anything that I can do to my instructions or to my repository that builds KStars INDI etc on Macs to make it more usable by others like yourself.  Also I don’t think you mentioned, are you using the KStars on OSX Craft repo or are you using the KStars INDI Mac Dev repo?  Right now the KStars on OSX Craft is working the best.  I was hoping that the KStars INDI Mac Dev would be more user friendly and would provide more freedom since it would be easier to set up, would not depend upon craft, and wouldn’t require as much time to set up as the first one.  But in fact craft has improved substantially since I first made that second repo, so that craft doesn’t take nearly the amount of time to get set up as it did before and craft is now much reliable.  Also recently I have had a couple of problems with KStars INDI Mac Dev and certain files.  In fact, I am strongly considering taking some of the features I had put into the KStars INDI Mac Dev and just blending them into KStars on OS X craft to make it more useful and user friendly.  Your thoughts?

Thanks for your help!

Rob

> On Apr 27, 2022, at 5:53 PM, John Evans <john.e.evans.email at gmail.com> wrote:
> 
> Hello Everyone,
> 
> Hope you're all well? I have been working on a change to improve focus on my rig. Iterative and Polynomial don't work so well for me on the ASI EAF, due, I think to backlash. The Linear algorithm works best but the second pass usually overshoots the ideal focus position.
> 
> So I built a "Linear 1 Pass" algo, that is based on Linear for the 1st pass, but instead of doing a second pass it moves straight to the minimum of the first pass.
> 
> I've implemented a couple of curve types (Hyperbola and Parabola) using a generic GSL curve fitting algorithm which could be extended in the future if necessary. The fitting can be done either giving each point equal weighting or weighting them based on the HFR standard deviation of the stars.
> 
> See the enclosed document for more details.
> 
> I have written most of the code and it basically works on my rig and the simulator. I have a couple of things still to work out though, and more testing to do.
> 
> Since this is the first Kstars change I have done (using QT on Mac) I have been following Ron Lancaster's work on getting Kstars running on Mac. In terms of coding standards I've just followed what's been done in the areas I've changed. If there are any resources that someone could point me to, that would be great.
> 
> If anyone has any feedback on the change that would also be great (I'll also post on the forum to see if there are any suggestions).
> 
> I estimate I'll be finished with coding and testing in a couple of weeks. I would like feedback on deployment as I'm not familiar with the process at all. So if anyone can point me to any resources that would be very helpful.
> 
> At the moment I'm thinking:
> 1. Release 1 - deploy Linear 1 Pass code but concentrate on minimising risk to breaking existing code, esp the Linear algorithm. I have cloned some Linear code for this.
> 2. Release 2. When Release 1 is working as expected, interface Linear 1 Pass code with Linear in a more integrated way, removing cloned code. If any features of Linear 1 Pass would be useful for other focus algos, this could be done here.
> 
> The reason I'm thinking of doing this in 2 steps is that I'm a novice with C++ and this seems the best way to minimize the risks of breaking existing code. However, I'm happy to take advice from more experienced people here.
> 
> If anyone would like to offer to help me, do a code review, etc., that would be really appreciated. As I mentioned I'm a novice with C++ so probably not doing things in the best way, but happy to be guided. Also, any suggestions on:
> 1. Test cases to write for this change.
> 2. Best way to profile the code, test for memory leaks, etc.
> 3. Since this would run on a range of different machines, how to configure for different setups, things to watch out for, etc.
> 
> Thanks for reading!
> 
> Regards,
> John.
> <EKOS Linear 1 Pass.pdf>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1618 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kstars-devel/attachments/20220507/c7039053/attachment-0001.bin>


More information about the Kstars-devel mailing list