
Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
> back in the 70s I wrote a program to predict the positions of the
> planets and the moon using the principles of spherical astronomy.
>
> It would match published ephemerises for several years into the future
> but would wander after that. The essential problem was any error
> compounded itself over time.
If the calculation was incremental (used previous results to find the
new one), it would indeed start to wander due to roundoff, particularly
if you were using 32-bit floats. Another possibility is precession,
which slowly rotates the equatorial coordinate frame--you might have
just been seeing mismatched epochs rather than position errors.
> It was all on punch cards in FORTRAN.
Youngsters don't know what it's like to carry their programs around in
a shoe box.
> I wondered if you had any idea of how accurate your algorithms are
> over time.
The accuracy of the methods I used is discussed in some of the sources I
mentioned on the webpage. A good online source is
http://ssd.jpl.nasa.gov/?planet_pos
The error numbers are the maximum error you'd expect. If you graph the
error over time, it's usually much lower, but periodically spikes to the
levels listed in this table.
I spot-checked my applet against a full VSOP87 calculation for Mars and
Saturn at several dates between 1950 and 2050 to make sure I was in the
right ballpark. The errors were between a couple of arcseconds and an
arcminute. The Moon is a lot messier, but the source of the method I
used claims an error of about 5 minutes in r.a. and 1 arcminute in dec.
All respectable considering how small the code is, and all smaller than
a single pixel in the applet's display, so I get the same plot I would
have gotten from a more accurate and expensive calculation.
- Ernie http://home.comcast.net/~erniew
Roedy Green - 05 Mar 2006 15:11 GMT
>All respectable considering how small the code is, and all smaller than
>a single pixel in the applet's display, so I get the same plot I would
>have gotten from a more accurate and expensive calculation.
You did a beautiful job. The code is fast too.

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
Ernie Wright - 05 Mar 2006 21:01 GMT
> You did a beautiful job. The code is fast too.
Thanks Roedy.
- Ernie http://home.comcast.net/~erniew