Finding your way at sea
Imagine you are in a ship at sea, miles out of sight of land. How do you find your position and navigate to safety? On land we learn to recognize and follow paths using known places as points of reference.
Of course, at sea there are no such landmarks, which makes marine navigation much more difficult. The only reference points for sailors are the Earth’s horizon, the Sun, Moon, planets and stars.
Finding latitude
At sea, latitude can be found by measuring the distance between the Sun or certain known stars and the horizon. This gives an estimate of distance north or south of the equator. However, both latitude and longitude are needed for accurate navigation. Finding longitude, or how far you are east or west of a known point, is a far more complicated process.
Finding longitude

Time equals longitude. © NMM 
Scientists knew that part of the secret to finding longitude lay in the constant rotation of our planet. The Earth revolves once on its axis every 24 hours. Therefore, the distance from a line of longitude to a prime meridian can be measured in 'hours' and 'minutes'. The Earth turns on its axis at the equivalent of 1° of longitude in four minutes, or 15° an hour.
Scientists worked out two possible ways to develop an accurate device for measuring longitude:
 the lunar distance method
 measuring time from a prime meridian.
The lunar distance method

Nevil Maskelyne, fifth Astronomer Royal. © NMM 
The Moon’s position against the background of stars changes in a complicated but predictable manner. This means that the Moon's motion can be used as a natural clock to calculate Greenwich time.
An astronomer can calculate the Moon’s path across the night sky by compiling a table of measurements of its future positions relative to the stars. This table is called a Nautical Almanac. The first one was published by the fifth Astronomer Royal Nevil Maskelyne, in 1766.

Lunar distance method. © NMM 
A navigator can calculate his longitude at sea by measuring the position of the Moon and a nearby bright star visible in the night sky. He uses a marine sextant to:
 measure the altitude or height of the Moon and the bright star
 measure the angle between the centre of the Moon and the star, the lunar distance.
He then looks up this measurement in the Nautical Almanac and finds out what time this corresponds to in Greenwich. Finally, he calculates his longitude by working out the difference between Greenwich time and his local time.
Measuring time from a Meridian line
The second method for finding longitude was to compare the local times at two points on the Earth’s surface. The time difference between these points determines how far apart these place are in longitude, east or west.
The seafarer could easily calculate the local time of his position at sea by observing the position of the sun at noon through a sextant. However, knowing the exact local time at a Meridian line was impossible without an accurate marine timekeeper.
Why was it important?
Solving the longitude problem was possibly the greatest scientific challenge of the 17th and 18th centuries. It was vitally important that mariners could find their way safely across the oceans. During this period, the great voyages of exploration, the development of maritime trade and commerce  something the government was keen to exploit  all depended on sailors being able to navigate the oceans.