Thanks for the mod link but I want to identify the ship myself

Well I did lock the target with spacebar then it opens the WO dialogue where I can only click on "never mind" so I click on the WO icon in the dialogue then I can click "start TDC" or something like that and then it open the dialogue where I can choose range, speed etc. but WO says only tanker or unknown merchant or something like that. so I press E search for the right ship for instance liberty frighter, press send data to TDC but nothing happens.
Edit: It actually did something when I press "send mast data to TDC" in the range dialogue. Now I have the mast data entered. But how to calculate the distance. I assume the triangle between periscope, Ships waterline and highest point of mast is a right traingle, all I need now is an angle.