There is no way to have more than the given speed settings. You can only change the fixed speed settings to some other fixed speed setting.
You won't have any ingame flexibility to set any speed variation but the given ones.
skwas Silent 3ditor is the modding tool - you'll find it here aboard.
A forum search for 'torpedo speed modding' or similar will show the files to be altered.
As far as I know there is no existing mod available with altered speed settings. You will have to mod them by yourself.
Edit: Your complicated trigonometric approach would be fine, if there were more variable speed settings for the torpeodes. But there aren't.
Do your math with fixed torpedo speed and variable angle of attack.

That's what they did (or the TDC).