I have shoot some photos to illustrate it.
I had to look at those pictures for a while (maybe I need a better monitor?) before I started to understand what you are trying to do. If I focus on just one or two colors in the color checker I can see what is happening. I guess this is what people on the various camera forums call "pixel peeping" ?
In your example you have a brightly lit background (an outdoors water shot) and a color checker close by in the shade. So you want the exposure ( Tv & Sv) set correctly to get the background right, and you want to use "fill flash" for the foreground. And to get that exposure right, you need enough flash power for the distance to the subject and the Sv adjusted appropriately for both the background shot and the flash shot?
So simply put, if we take all the combinations of Tv & Sv that give "acceptable" exposure of the background, we want CHDK to automatically pick the one that gives the best fill flash results in the foreground. If there are multiple acceptable combinations over the adjustable range of the flash power, then pick the one with the lowest ISO.
e.g : if acceptable background exposures are :
Tv | Sv |
1/30 | ISO100 |
1/60 | ISO200 |
... | ... |
1/800 | ISO2400 |
1/1200 | ISO3200 |
how do you decide which one gives the best fill flash ? (other than trial and error) Will forcing the flash ON and doing a test flash in half shoot give you the right answer ? Or can we look at the SD reading we get after the camera sets the focus?
I suppose one method would be a script to shoot enough images at the different setting to effectively bracket all the combinations?