system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: Given that currents can throw a boat off course, how did submarine navigators know precisely where they were while submerged pre-GPS?
gpt
Compass bearings, knowledge of the currents, and dead reckoning. Prior to nuclear power submarines spent most of their time on the surface because their batteries had very limited endurance. So they could regularly take star sightings and utilize radio navigation beacons.

Modern submarines have very advanced inertial navigation systems, since GPS doesn't work underwater.