
Apparently there were numerous attempts over the years, but no good solution. Reliance on tactics like "dead reckoning" was dicey.
A British ship returning from battle ran aground with great loss of life; with other disasters, the government was prompted to throw some serious money (>$4.5 million in today's dollars) behind finding a solution.
There were two main approaches thought most likely to succeed: a highly accurate clock (permitting the navigator to know the difference in time from London); or extensive star charts.
This book focuses on John Harrison, who worked on a clock. I didn't realize how inaccurate clocks were up to this point (Harrison was working on this in the mid-18th century). He had to figure out a way to keep the clock precise on a pitching ship that faced extremes of temperature and humidity. He seemed to have absolutely no background for the task, but somehow figured it out. The powers-that-be that ran the prize commission favored the star-chart approach, and placed all sorts of roadblocks in Harrison's way. But he succeeded.
I had no idea "Longitude" would overlap with concepts in this book by Umberto Eco - including the race for a solution, the idea of using a wounded dog on ship to bark in sympathy with a dog on land (hopefully not a serious idea), the clocks, etc.
And - by another coincidence - this book overlaps with another that I'm reading about the royal society (under Maskelyne) that mistreated Harrison (but supported folks like Herschel).