Focus Stacking 2.0

I promise this will be the last update before I leave for a month to the UAE but it was kind of important for me to take this step.
After two days of calculations and programming I came up with a way to improve my focus stacker - while doing macro photography one wants consistent distances between steps of the stack but when using it in landscape photography this can lead to overshooting.
Why you ask? - well, because the interesting objects are usually placed in the fore- and background to create interest, which leaves the whole midrange of focus as more or less uninteresting blob.
If we would shoot the stack with discrete and consistent steps we need a lot smaller steps to cover the interesting parts of the picture with enough granularity that we end up with 'useless' mid ground photos which do not add to the final result.

I do not claim that my solution is perfect, actually it is far from it, but an improvement nevertheless:
I prioritize the foreground a little bit and the background a lot, meaning that the steps that are calculated within the closest 20% of the frame are 30% smaller than those in the center while the last frames of the stack are closer together by about 60% - yielding a better coverage throughout the whole scene.

Those numbers are useable while not compromising the coverage in the center of the focus range which is still in good coverage.
My reason to choose a rather tight end of the stack is simply determined by the design of the newer lenses which need smaller adjustments in the end of the focus range to shift the focus. Especially in Cityscapes with great architecture in the background I found this to be the optimal configuration to fit my taste, which of course can vary between people but thats what keeps it fun - doesn't it?

PS: Since I designed the controller very modular I am able to use both methods just by switching a setting in the menu, even more and more complex algorithms to optimize coverage can be stored and used at the same time, even in the same stack if one would desire to specify different methods for different segments. I am quite happy how this is coming along.