View Full Version here: : Moonrise, moon phase, calculation thereof
stephend
10-09-2008, 03:55 PM
I want to write a program to calculate moonrise time and phase, so that this can be displayed in a website automatically far into the future.
By far into the future I mean a few years, so I can take the moon's current orbit as being fixed, even though it isn't.
Since its orbit is currently close to circular, I can treat each day's worth of orbit as being equal to every other.
I assume using the average synodic month will be okay, hoping that the average figure is quite accurate over say every year rather than say every century.
Any helpful hints, comments, would be :welcome:
bojan
11-09-2008, 07:59 AM
Jean Meeus books are the standard reference for this kind of work...
http://en.wikipedia.org/wiki/Jean_Meeus
Another source for algorithms might be S&T software library, there you can find routines (written in BASIC) for various transformations, necessary to convert XYZ coordinates into celestial (altitude-azimuth).
I am not sure the Moon's orbit can be approximated with stable ellipse for, say, 1min accuracy over period of couple of years, though.. but it will be an interesting exercise :-)..
EDIT:
Mel Bartel's software is open source (C).. it contains the same routines, and it uses precompiled module (with Meeus algorithms) which deals with planet (and Moon) orbits.
Try here:
http://www.bbastrodesigns.com/BBAstroDesigns.html#DOWNLOAD
And, finally, of course.. Mike may tell you how he does it on this website :-)
sjastro
11-09-2008, 09:45 AM
Unfortunately the Moon's orbit does not give repeatable data. It's the classic three body problem of Celestial Mechanics (Sun, Earth, Moon).
The main culprit is Nutation where the combined gravitational effects of the Sun and the Moon cause an oscillation in the Earth's axis of rotation. This effect is quite rapid as one complete oscillation takes less than 19 years.
Regards
Steven
Wavytone
12-09-2008, 04:16 PM
This site http://www.ngc7000.org/astrotools/astrotools.html has what you want in Javascript, save the page and view as source.
One source is Jan Meeus' book as pointed out previously, there are also 2-3 books by Peter Duffett-Smith with a similar method which from memory can be made recursive if you want high precision though it will be within 1 minute on the first pass and 1 second on the second.
For most purposes you don't really need precision better than the nearest minute given the size of the moon, refraction and the (unknown) users horizon, so forget all the perturbation terms and just stick to the first order orbit and do the calculation for a geocentric observer (ie don't correct for parallax either). It's straightforward with the Duffett-Smith method, I implemented this in my HP41CX 25 years ago for calculating the ASNSW ephemerides of sun moon and planets.
However there are plenty of sites with this data already (and much more), I'd suggest link to one of the credible ones that is likely to be around for a long time.
vBulletin® v3.8.7, Copyright ©2000-2025, vBulletin Solutions, Inc.