After some testing I found out that most times when there was a distortion visible was when I choose a zoom% that is between the factory settings you can choose with the ring. (so 10%, 20%, 40%, 50%, 70%, 80% give a bigger chance of different settings after a restart, my trouble started with setting 70% zoom in UI)
I also have seen a small F stop difference(f/2.2-f/2.5) between 20% and 30%, but it both still registers as 7mm..so the mm zoom that is logged with a picture seems more an indication than a true lens position.
because lowest f is related to the physical zoomfactor.
this is completely speculative, maybe if the percentage comes close to a factory optimised setting it sometimes latches to that setting?
is zoom_setpoint lineair?
what I do see is that if I choose a setting (like 30%) but first have put the camera on that setting (35mm) manually before I start the script that sometimes the zoom lens is shortly operated zooming fractional in and out and other times not. and after those moments it zooms there is a small distortion visible in the pictures taken.
And no matter what zoom percentage I choose in ultimate intervallometer, the camera still firmly believes it is shooting at 28mm(6mm) and displays so on screen....maybe that can also lead to wrong choices in the cameras barrel distortion?
For the S95: (for each percentage booting the camera in chdk & starting UI)
0%=6mm (step 0)
10%=6mm
20%=7mm
30%=7mm..you'd expect this being 8mm, but since f/2.5 and 7mm it is the setting you see with step 1
40%=9mm
50%=10mm
60%=11mm (step 2)
70%=13mm
80%=15mm
90%=18mm (step 3)
100%=22mm (step 4)
factory settings with use of ring:
step 0=6mm (28mm)
step 1=7mm with f/2.5 (35mm)
step 2=11mm (50mm)
step 3=18mm (85mm)
step 4=22mm (105mm)