| my account | login-logout | resources | classroom help | support | catalog | home | get webcard |

 search | help desk | commons
 » Online Classroom   »   » Public Discussion of Cel Nav   » Clarification of algorithms for use with Cel Nav

Author Topic: Clarification of algorithms for use with Cel Nav
 Al Szymanski posted October 28, 2009 01:00 PM                   Good day. ( Thanks David for letting me back in ).A number of years ago, I took the at home Celestial Navigation course and was quite pleased with the product and my advancement.I went on to take a hand at doing lunars and getting into the core math and theory on my own.As I said, this was a number of years ago.I have a new problem, that I am confident that you folks can drop a bit of help my way.I am trying to do the Law of Cosines method for calculation Hc and Z for a given set of locations.I have the calculation of Hc down pretty confidently using the following algorithm:Hc = arccos ( cos ( 90 - Lat ) * cos ( 90 - Dec ) + sin ( 90 - Lat ) * sin ( 90 - Dec ) * cos ( LHA ) )- and -Hc = arccos ( sin ( Lat ) * sin ( Dec ) + cos ( Lat ) * cos ( Dec ) * cos ( LHA ) )However it is my attempts at getting Zc that are failing.I have two equations; both fail on my calculator by trying to perform an arccos of a number greater than 1.Zc = arccos ( ( sin ( 90 - Dec ) - ( sin ( 90 - Lat ) * sin ( Hc ) ) / ( cos ( 90 - Lat ) * cos ( Hc ) ) )Zc = arccos ( ( sin ( Dec ) - ( sin ( Lat ) * cos ( Hc ) ) ) / ( cos ( Lat ) * cos ( Hc ) )I know that they cannot be both correct, but both come from reputable resources and both are failing.Last question : both examples of these formulae do not state whether or not the angles need be in radians or if they may be in degrees. I am wondering if this is the entire crux of the problem. Thanks again. Al
 David Burch posted October 28, 2009 07:23 PM                   Please check our online glossary for cel nav at www.starpath.com/glossary, and look under the term Navigator's triangle and you will find the right equation. It seems that your two options are each slightly off of what we have, which i believe is correct.a shortcut to the answerPS, normally it does not matter what the angles are. I would use degrees only. You only have to use radians if you using say Visual Basic programming or doing it in a spread sheet. hand held calculators let you choose degrees or radians. From: Starpath, Seattle, WA