Re: Online calculators for position angle



In article <1131139061.709794.298120@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
canopus56 <canopus56@xxxxxxxxx> wrote:

> Mark Gingrich wrote:
>> William Kahan['s] original solution to this very problem [of small angle
>> angular distances, not position angle] -- a solution he claims is both
>> accurate for *any* angular separation and efficient:
>> http://www.cs.berkeley.edu/~wkahan/Math128/angle.pdf
>
> That's an interesting implementation - convert the two positions to the
> X,Y,Z coordinates on a unity sphere and then use the 3-D Pythagorean
> formula. Meeus's small angluar distance formula is basically the
> same, except he uses the 2-D Pythagorean formula.

Using a 2-D Pythagorean formula will make the formula accurate only
for sufficiently small angles. So if you want to implement a general
algorithm for this, valid for any angle, and you want to use the 2-D
Pythagorean formula for small angles, you'll have to switch to some
other formula if the angle exceeds some limit.

It's more convenient to use a formula which remains accurate for any
angle.

--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/
.