I don't understand why you want a complicated formula based on the subject distance when you could just velcro a measuring tape to your tripod and use your cell phone's calculator to figure the traditional bellows extension factor. It takes 30 seconds to get the right factor and then you can either divide the ISO by that factor to get a new ISO, or just have a table that gives the right aperture adjustment for each factor in third stops. You can even make it faster by printing a table of the square of each focal length you own so you can plug it in the calculator immediately without doing math.