# NavList:

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

**GHAA formulas**

**From:**Paul Hirose

**Date:**1997 Dec 12, 2:34 PM

Here is an algorithm for directly computing the GHA and dec of the Sun, from the "Explanatory Supplement to the Astronomical Almanac" (ISBN 0-935702-68-7). It appears to be very closely related to the method already posted to the list. The similarity is partly hidden because I've reworked the formulas. I find a base epoch of 2000 Jan 1 12 h UT awkward, and I don't like working in Julian centuries either, so both have been changed. The book says this method is accurate to better than 1 minute of arc. No time span limitation is stated. For the date calculations I'll illustrate my own method. It allows a clean implementation in a computer program because it's all integer math and there are no trick formulas. It's also easy to do by hand on a calculator if you know the rules of the calendar. For a calculator program, however, you might try Jean Meeus' algorithm instead. It eliminates the need for a month length lookup table. The formatting of this message will look best in an equally-spaced typeface, such as Courier. Now l'll compute the Sun's position for 1996 July 7 1300 UT. Days in full years for a 1996 date: DIFY(1996) = (1995 * 365) + (1995 / 4) - (1995 / 100) + (1995 / 400) = 728 175 + 498 - 19 + 4 = 728 658 (Use only the integer part of each quotient.) Days in full months for a July date: DIFM(Jul) = Jan + Feb + Mar + Apr + May + Jun = 31 + 29 + 31 + 30 + 31 + 30 = 182 Gregorian Integer for 1996 July 7: GI(1996 Jul 7) = DIFY(1996) + DIFM(Jul) + 7 = 728 658 + 182 + 7 = 728 847 That is the Gregorian Integer of the date of interest, 1996 July 7. Now compute the Gregorian Integer of the base date, 2000 Jan 1. DIFY(2000) = (1999 * 365) + (1999 / 4) - (1999 / 100) + (1999 / 400) = 729 635 + 499 - 19 + 4 = 730 119 DIFM(Jan) = 0 GI(2000 Jan 1) = DIFY(2000) + DIFM(Jan) + 1 = 730 119 + 0 + 1 = 730 120 Now compute elapsed time T (days) AFTER the base date. T = GI(1996 Jul 7) - GI(2000 Jan 1) = 728 847 - 730 120 = -1273 days That is the time from midnight to midnight on those dates, and is of course negative since 1996 is before 2000. Finally, convert time of day (13 h) to decimal days (.54167), and add to T: T = T + .54167 = -1272.458 33 Once again, this is the elapsed time in days from 2000 Jan 1 0 h UT to 1996 Jul 7 13 h UT. With this number we enter the following formulas: L = .777 687 + 2.737 9093e-3 T = .293 812 rev = 105.772 deg (mean longitude) G = .991 764 + 2.737 7785e-3 T = .508 055 rev = 182.900 deg (mean anomaly) The results of first two formulas are in revolutions and must be converted to degrees. Drop the integer part, add 1 to the fractional part if it's negative, then multiply by 360. Two constants are in scientific notation and should be entered that way if you have a 10-digit calculator. Otherwise you will not be able to input all eight significant digits. The remaining formulas are in degrees. lambda = L + 1.915 sin G + 0.020 sin 2G = 105.677 (ecliptic longitude) epsilon = 23.439 - 3.6e-7 T = 23.439 (inclination of the ecliptic) E = -1.915 sin G - 0.020 sin 2G + 2.466 sin 2lambda - 0.053 sin 4lambda = -1.235 (equation of time) GHA = 15UT - 180 + E (express UT in decimal hours) = 13.765 = 13 45.9' dec = arcsin (sin epsilon sin lambda) = 22.519 = 22 31.1' SD = 0.267 / (1 - 0.017 cos G) = 15.8' The last three values are the results, and they match the Nautical Almanac to 0.1'. =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-= =-= TO UNSUBSCRIBE, send this message to majordomo{at}ronin.com: =-= =-= unsubscribe navigation =-= =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=