Porpoise occasionally. See where you are heading and adjust the compass heading accordingly.

Example: if you see you are headed 100 M to the right of the target, adjust the compass to 100 M to the left. A porpoise is a very brief surfacing to see where you are heading. Subs have periscopes.