Here’s an example:
https://www.businessinsider.com/how-swedish-sub-ran-rings-around-us-aircraft-carrier-escorts-2021-7
Submarines vs aircraft carriers, but all the sub has to do is pull off an attack run undetected, i.e. get in torpedo range and positively ID their target and its location. Meanwhile the carrier just has to correctly locate the sub while its within weapons range.
Basically, they do everything up to the point where someone pulls a trigger, and then they get on the radio and yell “bang, you’re dead”.
Latest Answers