I am in my IXC sailing all over the place BTW

And I just got sonar.. I know its to figure out the distance between your U-boat and a ship, but how do I get it to work proper? When should I use it? NOw that I think about it, it might be useless for me since I do NOT do manual targeting and my P scope will tell me what the distance is automaticly.
Also everytime I click on the get target distance button it says target not selected. How do I select a target?