A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding
From: Lars Bergman
Date: 2021 Nov 10, 04:04 -0800
If you define easterly longitude as positive, then
LHA = GHA + Long, from which
Long = LHA - GHA
In the formula you use, cos(LHA) = C = A - B, you have to be aware of the fact that cos(LHA) = cos(-LHA). So when you calculate LHA = arccos(C), LHA can have any sign. As the example you show is an AM Sun sight, then we know that 180° < LHA < 360°. So your LHA is (using integer values for clarity) -52°, or -52° + 360° = 308°. Thus your longitude
Long = LHA - GHA = 308° - 134° = 174°. As the result is positive the longitude is east.
You can as well use LHA = -52°, then
Long = LHA - GHA = -52° - 134° = -186°. As the result is negative the longitude is west. But 186°W equals 174°E.