# NavList:

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

**Re: Almanac for Computers**

**From:**Karl Hahn

**Date:**1996 Aug 28, 09:56 EDT

Jacky Wong wrote: > Your work should be very accurate. I had compare your example with my > JavaScript program, which can be find at > http://www.speednet.net/~himarj/navscript/sunsight.htm I noticed that Mr. Wong's program requires a DR position in order to do sight-reduction. When a computer is available to do the grunt work for you, a programmer can take advantage of the computer's talent for doing grunt work in enormous volumes. This includes things you would never want to do by hand at sea, such as solving matrices and quadratic equations, and taking trig and inverse trig functions. What I am leading up to here is that there is an algebraic solution to reducing a pair of sights that does not need a DR position. For the mathematically inclined, I will outline it here. Computing Position w/o a DR Position In principle, taking a sight reduces the possible positions you might be at in 3-dimensional space to a single plane in space. Taking two separate sights reduces it still further to the intersection of two planes, which is, of course, a line. You know, a priori, that your position is also on the surface of the earth. So the intersection of that line with the surface of the earth yields exactly two points at which you might be. Usually one of them is ridiculous, and so you choose the nonridiculous one. In more detail: If you imagine the sky as being the surface of a unit sphere, convert the GHA and declination of the object(s) sighted to Cartesian coordinates. So for each object (1 and 2) you would have a point: (x_1, y_1, z_1) and (x_2, y_2, z_2) You also have the corrected angles that you read from your sextant, theta_1 and theta_2. Take their sines. The equations for the two planes are: x_1 * x + y_1 * y + z_1 * z = sin(theta_1) and x_2 * x + y_2 * y + z_2 * z = sin(theta_2) Now solve those two equations as far as you can using Gaussian elimination. You (or actually, your computer program) should be able to get linear expressions for x in terms of z and y in terms of z. Your final equation is the equation of the surface of a sphere: x^2 + y^2 + z^2 = r^2 Assume r to be 1. Substitute into this equation from the other two, and you get a quadratic, from which you can get two solutions using the quadratic formula. From those, you can establish two Cartesian points that lie on the sphere at which you might be. Convert those points back to spherical coordinates (ie lat & lon) using the standard formula, and you're done. I don't know how many math-nerds like myself read this group, but of those who are out there, I hope you found this interesting. Take care, Karl | (V) | "Tiger gotta hunt. Bird gotta fly. | (^ (`> | Man gotta sit and wonder why, why, why. | ((\\__/ ) | Tiger gotta sleep. Bird gotta land. | (\\< ) der Nethahn | Man gotta tell himself he understand." | \< ) | | ( / | Kurt Vonnegut Jr. | | | | ^ hahn@XXX.XXX/~hahn ------------------------------------------------------------------------ This mail list is managed by the majordomo program. To unsubscribe from this list, send the following message to majordomo@XXX.XXX: unsubscribe navigation For help, send the following message to majordomo@XXX.XXX: help Do NOT send administrative requests to navigation@XXX.XXX -ben ------------------------------------------------------------------------