NavList:
A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding
Altitude & azimuth from Bygrave formulas
From: Paul Hirose
Date: 2023 Nov 29, 09:17 -0800
From: Paul Hirose
Date: 2023 Nov 29, 09:17 -0800
Note from FER: This message was sent a month ago and arbitrarily stopped by a spam filter. I discovered it just a few hours ago.
Back in December 2017 I gave my version of the Bygrave sight reduction
formulas. I would like to revisit Bygrave with warnings on the
mathematical pitfalls.
Except for some forbidden angles, these rules are valid for all
combinations of latitude, declination, and hour angle, including
negative altitudes.
The first rule is to ignore negative signs. Angles, cosines, tangents,
and arc tangents are always positive. In a program, take the absolute
value before every arc tangent.
First compute angle W:
W = arc tan(tan dec / cos LHA)
If LHA is 90 to 270, replace W with its supplement: W = 180 - W
Compute angle X. Although lat and W are always positive, it's possible
for X to be negative if names are contrary. (This is the one exception
to the "ignore negative signs" rule.)
X = 90 - lat + W (if lat and dec have same name)
X = 90 - lat - W (contrary name)
If X is not 0 to 180, add or subtract 180 to make it so. If the
adjustment is necessary, the altitude of the body is negative.
Compute azimuth angle Z, 0 to 180, measured from the elevated pole. For
example, if assumed latitude is south and Z = 10, azimuth is 170 or 190,
depending on LHA. Compute Z to full accuracy. If you round Z to the
nearest degree, altitude is inaccurate because it's a function of Z.
Z = arc tan(tan LHA cos W / cos X)
Replace Z with its supplement (Z = 180 - Z) if EXACTLY ONE of these is
true: 1) altitude negative, or 2) X less than 90. (If you need only Hc
and don't care about Z, this adjustment is not necessary.)
Finally, compute altitude:
Hc = arc tan(tan X cos Z)
Apply a negative sign to Hc if indicated when you computed X.
PITFALLS
The tangent of 90 and division by 0 are both undefined. Therefore, LHA =
90 or 270 and X = 90 must be avoided. The solution is to change LHA or X
a little if too near a danger angle. (That's equivalent to a small
change in assumed position.) Exactly what is "too near" and "a little"
is a matter of judgement. It depends on the application and the
computing device.
For example, lat = 30, dec = 20, LHA = 270. A computation with vectors
gives Z = 72.50476, Hc = 9.84655. With the Bygrave formulas, change the
illegal LHA to 270.0001. Results are Z = 72.5048, Hc = 9.8466.
A computer program will produce a result even if LHA = 90 or 270 because
the argument of the tangent function in (almost?) every computer
language is radians. The radian value of 90° is π/2. Since the computer
can't represent π exactly, it avoids the illegal angle. But it's also
inaccurate in the Bygrave formulas. A computer implementation with
double precision variables gives errors of 74.1″ in azimuth and -39.6″
in altitude in the above problem. But if you adjust LHA to 270.00001 the
errors are 0.016″ and 0.030″ with respect to the vector solution with
non-adjusted LHA.
To show why Z must be computed to full accuracy, let lat = 30, dec =
21.2951, LHA = 310.6388. A solution by vectors is Z = 89.10007, Hc =
45.00003. A Bygrave solution by calculator agrees to the last digit in
both values. But if you use Z = 89, not 89.10007, the Hc formula gives
48.0147, 3 degrees in error! (This problem is less severe when Z is not
so near 90.)
--
Paul Hirose
sofajpl.com