NavList:
A Community Devoted to the Preservation and Practice of Celestial Navigation and Other Methods of Traditional Wayfinding
From: Frank Reed
Date: 2019 Nov 11, 08:49 -0800
the documentation for the program I'm trying to reverse-engineer states exactly the same purpose - the compass check.
Of course, you can use a celestial azimuth to check a compass. That's a good "modern celestial" cause -- an excellent reason for calculating azimuths.
But note that this "good cause" does not imply that there's any reason to find a new "altitude-less azimuth formula". Just calculate the altitude and use the standard formula for azimuth which is dependent on the altitude. The extra cost is nearly zero in the modern world. And you get the altitude out of it, too. In an "azimuth for compass check" scenario, this might provide a useful cutoff. For example, you might want to use celestial azimuths only when the observed body is below 20° altitude.
You don't need this algorithm that you have reverse-engineered. Needless to say (but I will anyway), if it's just good clean fun, then no problem. You don't need it, but perhaps you're trying to get inside the head of the coder who created that old calculator program.
Frank Reed