Hachiman, you seem to have Playboy as Steamname. As this question is virtually identical to this thread:
https://steamcommunity.com/app/49092...3879073118479/
I (Valen) already responded to it.
I will add that if you are dragging the line of the periscope sideways with your own speed and looking to your side then the AOB of the target will play a part in the correction. Then to correct the measurement you need to add or subtract the value of ownspeed*sin(periscope angle)/sin(AOB). Adding if your bow is pointing in the direction the target is moving. Subtracting if your bow is moving to the opposite direction the target is moving.