# NavList:

## A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding

**Re: Sight Reduction by the Cosine Haversine Method**

**From:**George Huxtable

**Date:**2004 Oct 3, 15:05 +0100

Chuck Taylor has taken some of the mystery out of haversines and the cosine-haversine method, and shown how such calculations were made. I think there's a bit more to be add, if Chuck doesn't mind. ==================== He wrote- >Haversines are merely a vehicle for simplifying the >computations. While sines and cosines range from -1 >to + 1, haversines range only from 0 to + 1, and the >haversine of a negative angle is the same as the >haversine of the absolute value of that angle. That's all correct, but Chuck has omitted the important reason WHY it was necessary to avoid negative values. The reason was the USE OF LOGS. Unless a navigator was keen to do 4- or 5-figure long-multiplication and long-division (and who would be?), before the days of calculators and computers such calculations had to be done by logs. Logs were necessary and useful, but had a great drawback; that for negative numbers, the logarithm is meaningless. There was a trick to make get such log calculations to work with negative numbers, but it never found favour with navigators. Instead, their calculation formulae were rewritten in a form so that when logs were taken, the numbers were always positive. First, a new function, the "versine", (1 - cos), was introduced, in addition to the usual sin and cos; clearly, this was always positive, varying between 0 and +2. Later, it became clear that a function which never exceeded 1 would be more useful still, so the versine was simply halved, becoming the haversine (hence its name). Then the altitude formula was reconstructed to use the haversine and avoid negative quantities. Things have changed. In these days of pocket-calculators and computers, there's no need to involve logs or haversines, and everything becomes much simpler. But Chuck's description is useful, and interesting, in showing how the old navigators had to do it, and you can do it their way if you wish. To compute an intercept, you need lat and dec, and the separation in longitude, (or HA, which Chuck abbreviates as t) and then require the alt, to compare with the corrected alt from your sextant. =================== Direct method (can't be used with logs). From the basic cosine formula for a spherical triangle, then sin alt = sin lat sin dec + cos lat cos dec cos HA With a calculator, that's easy to work out. For this method, you have to remember to give lat and dec their appropriate signs, + for North, - for South. The sign of HA (i.e. whether it's East or West) doesn't matter. ================== Cosine-haversine method (using logs). If you're interested in how the haversine calculation works out in the method Chuck describes, the expression above can be manipulated into- hav ZA = hav (lat ~ dec) + sin lat sin dec hav HA ZA is the zenith angle, or (90 - alt) Lat and dec are now always positive quantities, 0 to 90 degrees, whatever the hemisphere. (lat ~ dec) is the amount of North-South angular difference between them, taking account of which hemisphere each is in, therefore in the range 0 to + 180 degrees. Instead of sin lat cos dec hav HA in the expression above, we can substitute hav X; we don't need to bother what X actually is, as will be seen. So hav ZA = hav (lat ~ dec) + hav X and hav X = sin lat sin dec hav HA Then taking logs, log hav X = log sin lat + log sin dec + log hav HA These logs always turn out now to be of positive quantities, so that's OK. Chuck's procedure adds those logs to get log hav X. Most haversine tables (but not all) list the angle (0 to 180 deg), then its log hav, and then its hav (as "nat", or natural, haversine). In my modern edition of Norie's (1970), this table, to 5 decimal places, occupies over 100 pages. So, knowing the log hav, you search down that column for the value of log hav X that you have just calculated. Then alongside it in the adjacent column, is the value of the haversine, hav X. You don't need to bother to find what the corresponding value of angle X actually is. So now we have hav X, to which we must add hav (lat ~ dec), and the result is hav ZA. Then take out the angle ZA, corresponding to this value of hav, from the table, subtract it from 90 degrees, and you have the required calculated alt, to compare with the sextant and obtain the intercept. ===================== The method for deriving azimuth, from its cosine, quoted by Chuck, has two problems. One was the difficulty that for azimuths near due East, say, angles the same amount North and South of East, such as 80degrees and 100 degrees, have the same cosine, so the expression for cos az can't distinguish between them. Similarly for azimuths near West. A special procedure was quoted to distinguish which was which, which added quite a bit of complexity. By the way, if observations of the Sun were made between the Autumn and Spring equinox, there's no need to make such a test, because during the Winter months the Sun must always be in the Southern quadrants from the Northern hemisphere (and vice versa). Similarly for stars with a South declination observed from the Northern hemisphere. The other difficulty is that cos az changes hardly at all for angles near to East and West, so in that situation, the azimuth is predicted only approximately and is very sensitive to small errors in calculation. Unless one is forced to use logs, both these difficulties are avoided by using a different expression which derives az from tan az and is better in every way. This alternative has been referred to earlier on Nav-L and I won't discuss it further unless anyone asks. George. ================================================================ contact George Huxtable by email at george---.u-net.com, by phone at 01865 820222 (from outside UK, +44 1865 820222), or by mail at 1 Sandy Lane, Southmoor, Abingdon, Oxon OX13 5HX, UK. ================================================================