# NavList:

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

**Re: Azimuth Equation revisited**

**From:**Bill B

**Date:**2005 Oct 20, 02:42 -0500

> Further, while we are on the subject: What exactly is meant by Step 3 on > pg 279 of the N.A.? Is it simply that if the value calculated for X is > greater than 1, then X is assigned the value +1, and hence when A is > calculated (cos-1 X) it is simply 0 degrees True, and 180 degrees True if > the value of X is less than -1 (hence = -1)? And what is defensive coding? > Am I correct to assume simply putting in the If clause in my programming to > insure that if X>+1, then set it equal to +1 &c.? You are way above my head with most of your questions. My question to you is, "Why make your program, or life, more painful than it has to be?" It appears to me that the Almanac creates little nuggets--whatever--to save you from multiplying the same set of values twice by hand. Not a problem with a programmable calculator. Use the straightforward formula for Z instead. Reduce the "if" arguments to: If sinLHA is positive, then Zn = 360-Z. If sinLHA is negative, then Zn=Z. Why mess with the other stuff? Hopefully a former discussion on the merits of using tangents or reference to the archives will resurface. Bill