Celestial navigation was the first system devised to help sailors locate their positions accurately on a featureless ocean. Celestial navigation is based on angular measurements, typically measured between the horizon and a common celestial object, like the Sun, the Moon or known stars and planets. The basic concept of celestial navigation is that, at any given instant, any particular celestial object will be directly over some geographical position on the Earth. By measuring the actual angle to that object, and knowing the spot where that object is actually above, your own position relative to that known spot can be calculated. This "fixes" you on a circle of that angle around the spot, and several such measurements are taken to find the intersection of the circles, revealing your position.
Latitude can be determined by measuring the angle of a known star above the northern horizon. Polaris is particularly useful for this measurement, because it stays in almost the same position over the period of time, or with changes in longitude. That is, the "known spot" for Polaris is always over the north pole. If you measure the angle to Polaris and find that it is 60 degrees away from directly overhead, then you are on a circle 60 degrees away from the north pole. This circle coincides with a circle of 60 degrees of geographic latitude. In practice the angles are typically measured up from the horizon instead of down from overhead, as locating the horizon is typically quite easy, while locating the point directly overhead, the zenith, tends to be much more difficult.
Latitude can also be determined by the direction in which the stars travel over time. If the stars rise out of the east and travel straight up you are at the equator, but if they drift south you are to the north of the equator. The same is true of the day-to-day drift of the stars due to the movement of the Earth in orbit around the Sun; each day a star will drift one degree. In either case if the drift can be measured accurately, simple trigonometry will reveal the latitude.
Longitude can be measured in the same general way, at least in theory. If one can accurately measure the angle to Polaris, a similar measurement to a star near the eastern or western horizons will provide the longitude. The problem is that the Earth is turning rapidly enough, 15 degrees per hour, to make such measurements highly dependent on time. Making a measure only a few minutes before or after the same measure the day before is enough to create serious navigation errors. The solution to the longitude problem took many years to solve, and the need for accurate navigation led to the development of progressively more accurate chronometers in the 18th century.
These measures are all based on those "known spots", which change over time as the Earth rotatates and moves around the Sun in orbit. Large books known as almagests or almanacs collect these measurements, sorted into time and date. After selecting an object that is easy to measure, typically meaning one that is bright and located near the horizon, the angle is measured and then looked for in the book's tables. For instance, if Spica is measured at 5 degrees above the horizon at 10pm, examining the table for Spica shows that Spica is on the horizon at Alexandria at 10pm on that date. This means you are somewhere on a circle 5 degrees "out" of Alexandria.
All points on that circle have the same distance (and measured angles) from a center directly under the celestial object's position over the earth. By measuring a second celestial object, two circles are then considered. Theoretically, there are two possible positions for the vessel, defined by the two intersections of both circles. However, one position is usually so far away from the vessel's estimated position that it is ruled out as a possible location for the boat. Three separate measurements, or "sights," are usually taken to locate the vessel's position most accurately.
Modern almanacs are published every year that accurately measure the positions of the sun, moon, visible planets and 57 brighter stars. The numerous visible celestial objects available permit navigators to shoot through holes in clouds, or during moonless nights. The mathematics required for navigation is simple addition and subtraction of trigonometric quantities from a table in the book. Most people can master the procedure after a day or two of instruction.
Navigators measure distance on the globe in degrees, minutes and seconds. A nautical mile is defined as one minute, measured along the equator (0 degrees latitude). Sextants can be read accurately to within 0.2 minutes. With two sights, the correct time to within a second and the estimated position of the observer, the observer's position can be determined within (theoretically) 0.2 miles, about 400 yards (321 m). Most ocean navigators, shooting from a moving platform, can achieve a practical accuracy of 1.5 miles (2.4 km), more than close enough to see a harbor or city.
Accruate angle measurement evolved over the years. One simple method is to hold the hand above the horizon with your arm stretched out. The width of your fingers is an angle just over 1.5 degrees. The need for more accruate measurements has led to the development of a number of increasingly accurate instruments, including the kamal, astrolabe and sextant.
Time is measured with a chronometer, a quartz watch, or a short wave radio broadcast from an atomic clock. A quartz wristwatch normally keeps time within a half-second per day. If it is worn constantly, keeping it near body heat, its rate of drift can be measured with the radio, and by compensating for this drift, a navigator can keep time to better than a second per month. Traditionally, a navigator set his chronometer from his sextant, at a geographic marker surveyed by a professional astronomer. This is now a rare skill, and most harbor masters cannot locate their harbor's marker.
Traditionally, three chronometers were kept in gimbals in a dry room near the center of the ship. They were used to set a watch for the actual sight, so that no chronometers were ever risked to the wind and salt water on deck. Winding the chronometers was a crucial duty of the navigator, logged as "chron. wound." for checking by line officers. Navigators also set the ship's clocks and calendar.