Welcome to my life. Have a look here:
See if the above is useful at all. It depends on what level or precision is needed and how physically accurate we need to be. Do check @pezzott1’s post there as well. It’s a totally different approach that may as well work great for you.