Imagine you are a sea captain in the North Atlantic in the 1600s, and you want to find your position. Because of a happy astronomical coincidence, one of the brightest stars in the sky, Polaris, sits almost directly where a line extending out from the North Pole points. This means that as the Earth turns and the seasons change, you’ll always have a beacon screaming “Here lies true North!” Find that star, measure its elevation above the horizon, and you’ll have your position along the north-south axis, or latitude.
Whereas latitude is easy (though once you go far enough south you’ll need to use some star other than Polaris as your guide), your position east or west or longitude is really hard. First, there’s no obvious unambiguous marker from where to start (no East or West Pole), though this can be obviated by saying “Such-and-such degrees west of Wherever.” You could do it by going off of things like when you observe the Sun or Moon rising or setting, but this requires highly accurate knowledge of the time. The problem of finding spatial position becomes one of knowing the time precisely, and in the 1600s they just couldn’t do that.
In our modern world we’re supersaturated with accurate and reliable time-keeping instruments, but the mechanical clocks of that era would lose or gain time over the course of a day due to poor construction, would need to be re-wound and wouldn’t be running during that process, and the inner instrumentation would be highly affected by the changing temperatures and pressures of the high seas. As ships got lost at sea or were ruined on rocky coasts with all hands lost, the governments, navies, and commercial centers of Europe were desperate for a solution.
The British Parliament passed the Longitude Act in 1714 to offer prize money for novel solutions. Longitude is about that contest, which was mainly fought between the clockmaker John Harrison, who came out of nowhere with accurate timepieces that fulfilled the Longitude Prize conditions, and the collected body of astronomers and mathematicians who precisely mapped the stars in the sky and made detailed calculations of the Moon’s trajectory across them. It’s a short and surprisingly thrilling read, with the “human element” being controversy that arose due to politics that kept Harrison from claiming the prize (in fact he was never awarded the full amount) for decades.
It’s interesting that nowadays we use the intellectual descendants of both methods. We have clocks and watches which keep time with precise electrons or even atomic oscillations, but we also have launched our own constellations of artificial stars to keep our bearings. Of course, unlike the lunar nautical almanacs of yore, the Global Positioning System satellites directly tell us where we are, via ethereal radio light, the likes of which would have been pure fantasy to those 18th century astronomers.