Degrees of ingenuity

The lines of longitude are all the same length. They are semicircles and section the earth like an orange running from north to south and converging at the poles - where the Prime Meridian (0 longitude, fixed by convention to run through Greenwich) turns into the International Date Line (180 longitude). At the poles there are no right answers to questions about the time and today is always tomorrow (or yesterday) as well as today.

The lines of latitude run east-west and are quite different. They are circles, they run in parallel (they are the "parallels") and they vary in length from 25,000 miles at the Equator (0 latitude, fixed by nature not convention) to zero at the unclockable poles (nominally 90). The earth grows a million tonnes heavier every day as a result of extraterrestrial incoming, but the longitudes and latitudes remain the same. They constitute the net or "graticule" of the earth.

As Dava Sobel says in Longitude: "Any sailor worth his salt can gauge his latitude well enough by the length of the day, or by the height of the sun or known guide stars above the horizon." All you need to know is the day of the year. Longitude is another matter. There is no easy, natural way to establish it. Old-fashioned "dead reckoning" aimed to establish position by combining crude estimates of speed with star-based or compass- based information about direction, but it was fatally unreliable (it was particularly hard to factor in the effects of ocean currents and changes in speed due to variable winds).

Today sailors have radio links to geostationary satellites: it takes them a couple of seconds to fix their position to within a few metres. In the past, thousands died because they did not know their longitude: in May 1741 Commodore Anson reached the latitude of Juan Fernandez island at 35 south in the Pacific after struggling for two months to clear Cape Horn. All he had to do to make landfall was to run down the parallel. But he didn't know his longitude, so he didn't know which way to go. His men had scurvy and were dying. He guessed west. After four days he lost his nerve and turned round. Eventually he sighted land, but it was the hostile coast of Spanish Chile. He'd been within hours of Juan Fernandez when he gave up; it took him another 10 days to get back and another 80 men died.

All over Europe, monarchs offered prizes for a solution. In 1617 Galileo submitted a method based on the eclipses of the moons of Jupiter to Philip III of Spain. It was unusable at sea, but sound in principle and many believed that the solution lay in more detailed knowledge of celestial bodies. Astronomers increasingly favoured the "lunar distance method", which required detailed maps of the fixed stars and regularly updated tables - "lunar ephemerides" - specifying the position of the moon relative to the sun and stars at any given time.

This method was also sound in principle, and began to be partially practicable by the 1760s when adequate maps and tables became available. On six days a month, however, the moon is too close to the sun to be seen, and the method is useless in cloudy conditions. "Lunars" also requiired hours of error-inviting calculations for each fix.

There is a simple alternative to lunars, as Isaac Newton observed. All you need is "a watch to keep time exactly". If your ship carries a clock that continues to tell the time at Greenwich, all you need to do to work out your degree of longitude is to establish local noon by the sun and then consult the clock. If it's 2pm in Greenwich by the ship's clock when it's noon by the sun, then you're 30 west of Greenwich. The arithmetic is easy: there are 360 degrees of longitude, the earth turns once in 24 hours, and 360 divided by 24 is 15. So one hour's difference is equal to 15 degrees of longitude. The point was old by the time Newton restated it (the lunar distance method was simply another way to work out the time gap between Greenwich and one's ship), but it seemed unhelpful. True, all you need is an accurate watch; "But, by reason of the motion of the ship, the variation of heat and cold, wet and dry and the difference of gravity in different latitudes, such a watch hath not yet been made." Newton seemed to doubt that it could be done.

In 1707, 2,000 British seamen died because of another miscalculated longitude, wrecking on the Scilly Isles in foul weather the day after their admiral had hanged a man for questioning his calculation. The disaster touched Parliament, and in 1714 it passed the Longitude Act, which established a "Board of Longitude" and offered pounds 20,000 for a method that would fix longitude to within half a degree.

Longitude describes the 60-year race to the prize: it involved one clockmaker versus a cluster of astronomers and a horde of cranks. Discovering the longitude came to mean attempting the impossible: Hogarth had a "longitude lunatic" scribbling a solution on the wall of Bedlam in The Rake's Progress (1735); Gulliver on his Travels (1726), trying to imagine what immortality would be like, looked forward to "the discovery of the longitude, the perpetual motion, the universal medicine".

The clock-maker was John "Longitude" Harrison (1693-1776), a Yorkshire- born, Lincolnshire-based "country bumpkin" carpenter whose first clocks were made of wood and who was entirely self-taught; the astronomers included some of the Astronomers Royal, who had ex officio places on the Board of Longitude and who were committed to the lunar distance method.

Harrison had already solved the problem on paper by 1730, and by 1735 he had built "H-1", the first of a series of revolutionary clocks. It weighed 75 pounds and performed beautifully on a trip to Lisbon and back. It was good enough to win the prize, but Harrison was dissatisfied with it and built H-2 (1737, 86lbs). H-2 also worked beautifully, but Harrison was soon disgusted with it and spent the next 19 years on H-3 (1757, 60lbs), in which he invented the bi-metallic strip - among other things - in order to cancel out the effects of variations of temperature on the clock's movement.

"No 3 is not merely complicated, like No 2," its 20th-century restorer Rupert Gould wrote in 1935, "it is abstruse. It embodies several devices which are entirely unique - devices that no clock maker has ever thought of using ..." More than once, Gould found that the "remains of some device which Harrison had tried and subsequently discarded had been left in situ". These relicts were fat red herrings: H-3 took seven years to repair.

H-3 was followed two years later by H-4 (1759), five inches in diameter and three pounds in weight. Known simply as "the Watch", it lost only five seconds in 81 days on the trial voyage to the West Indies stipulated by the Board of Longitude. It could have lost up to two minutes and still have won Harrison the prize, but quibbles from the astronomical faction forced a second test in 1764. Once again the Watch performed far more accurately than the terms of the Longitude Act required.

Astronomical tergiversations continued: no prize for Harrison. It was not until 1773, when he was nearly 80, that he was awarded a sum of money effectively equivalent to the prize, and this was only because King George III - charmed by H-5 (1770), which lost less than a third of a second a month - intervened in his favour. "By God, Harrison," he said. "I will see you righted."

Longitude is an absorbing book. It is as nice as a Harrison clock. It has been in the US bestseller lists for some months and will increase attendance figures at the National Maritime Museum in Greenwich, where H1, H2, H3 and H4 are to be found. All are in working order and readers of this book will understand why its author, when she finally visited them, was moved to tears. The first three are running, continuously enacting the deep, untutored originality of their maker.