Request for the formula to calculate the current UV index with adjustments for cloud cover and ozone levels

I have read a lot of materials, but I still couldn’t find anything close to what I need. There are data sources for the UV index, like OpenUV and others, as well as hyperlocal data on cloud cover and ozone layer. Could you perhaps suggest where to find a working formula to calculate the actual UV on the ground? For instance, I was able to find formulas for city and snow cover, but nothing about cloud cover and how to account for it, nor about fog or rain. I would like to create a sensor and automate it further so that I don’t have to apply SPF to my child unnecessarily.