Everybody knows that in modded SH5 at full realism  Sometimes, we just try to setup TDC so perfectly, we are very stressed and we are making mistakes.
How to make TDC settings easier with basic trigonometry?
Here in this example i will use the RAOBF:
(its widget which you can toggle in The Wolves of steel at periscope station), but you can get these inputs even by other means (for example you can measure distance optically by stadimeter and current angle on bow by drawing angle at map).
So  Here is the situation:
We have a medium composite freighter closing at our bearing
270.
I see him at my periscope and at RAOBF found, that he is
5600m far.
Thanks to RAOBF i can measure his angle on bow which is
53. (He is closing to me and i see his starboard)
The next thing i will need is his speed, thanks to RAOBF i found, that its
8kts.
(The speed doesn't bother us for our calculation, just set it to TDC and thats all)
So  we have ship which was at our bearing 270 coming before our nose at AoB 53 at 8kts.
What's our goal here:
Right now we really don't want to get this input again in hurry just before fire (you can get it again just to be sure, but its just confirmation, we want to be set before fire)
We rather want to decide our solution in forward, knowing
WHEN we will have the ship in this solution and just wait to push fire.
In this post you can learn why we should want to fire torpedo at ship when its at 90 degrees AoB. To be short  this way, many of our mistakes are erased.
So we want to know, at which of our bearing the ship will be at 90 AoB.
How to find which our bearing at the ship will be at 90 AoB?
If you start to draw this situation to paper and just count the angles mathematically, you'll find, that as many degrees you'll add to your current bearing as many degrees will be added to target's AoB.
(If you want to know why  read details at bottom of this post, its the rule of sum of all inner angles of triangle)
So if we have our ship at our 270 with 53 AoB, we can count it simply as
270+(9053), which is 270+37=
307.
So right now we already know, that if we have target's real AoB at our 270, it will be 90 at our bearing 307.
Target distance at 90 AoB (at our bearing 307):
We will not mess with map geometry right now, just pick pen and paper like real Kaleun, its much more simple:
So
here we have a triangle ABC with
A=our position,
B=our target past position at our 270 bearing and
C=target future position at 90 AoB.
If you will fire at target with 90 AoB, you can calculate that distance as:
Target distance at our bearing 270 * sine of target's AoB at that moment. (in Our triangle its angle B).
So its:
5600 * sine(53) > 5600 * 0.8 > 4480.
The distance of target in moment of fire will be then 4480, if you want more details, why it is so, again  read details at bottom of this post.
TDC:
So we already can prepare our devil plan, move periscope to 307 bearing, switch TDC to manual and set the data in:
speed we already have (8 kts),
AoB=90,
distance=4480.
Lock periscope back to auto and thats all.. The periscope now can be moved freely.
(As a bonus here, you can move locked and set periscope back to 270 to confirm you'll see AoB=53 in TDC  the TDC is recalculating AoB live now  but not the distance, so bevare if you want to fire at different bearing...)
Now you are set, if you have some time, try to confirm you have right input data by measuring AoB again at current target position and compare it with TDC value at the same bearing.
At last, just check if you have really 90 AoB in TDC at 307 bearing.
Then just wait until the target will be at your 307, mark him by periscope cross and then, fire!
Bonus:
To fire to target which is at 307 is slightly more risky than it should be, because if you dont fire to target just before you, you need to have proper set its distance. Yes  if you fire just before yourself, you dont need to set target distance at all! You literally can set TDC distance to 10km if you have your target just 2km away, no mather, you will hit him if you have proper speed and AoB..
So, please if you know the target will have 90AoB before you at 307, just order slow ahead and course to 53 to the left. Then stop and calculate everything as if the target will be 90AoB at your 360. And forget its distance at all
Details:

The Law of Sines  The Law of sines actually forms our equation for getting target's future distance at 90 AoB. Since sine of 90 degrees is 1, you can just remove it from equation and count target distance simply as
distance at 53 AoB * Sine(53).
If you would fire at different AoB, it would be:
distance at 53 AoB * Sine(53) / sine(AoB at target's position when you want to fire)

Sum of all inner triangle angles is always 180  thanks to this knowledge, you can always calculate third angle if you have 2 others  this way you can confirm easily that AoB is directly proportional to our bearing with pen and paper.
BTW:
If you tried to move periscope with TDC set and locked, you may found that TDC do exactly the same thing what we calculated. It remaps your bearing changes into AoB 1:1  if you move periscope +1degree, TDC adds 1degree even to AoB and thats exactly what happens in situation.
Now we could ask why the hell i should calculate it myself instead of let TDC to do it with basic input data. Well, you can let the TDC to do it for you as you move periscope, but TDC will not recalculate the distance for you as you can see, so you still need to prepare the distance in forward if you want to have complete solution.
This example was to get you in problematic of TDC targeting, if we got how it works, we now can go creative in finding solution in every situation and understands how exactly TDC works. We can confirm the solution in time by this rules and know exactly how.
And as always: Gutte Jagd Kaleunen