Yes, indeed…
For the last few months I was looking for a Wordpress plugin or widget that shows the Moon’s phases. There are some plugins, but beeing an amateur astronomer they didn’t really satisfy my visions. Not to call someone others work bad, no way! Somehow the existing moonphase scripts are not that exact as they could be. But, again, maybe my point of view is something different…
OK, as you can see in the sidebar there goes my solution for the problem. It’s a widget written in Flash, which is 160 pixels squared. It shows the Moon’s current phase and has some more features. You can easily set the layout to English or German in the widget’s parameter backend. However, in the english version the date has the format Month/Day/Year, but the time format is still in 24 hours mode, not 01-12 am/pm. In astronomical calculations, there is no am/pm “concept”. The time from your system is converted into UT (Universal Time) and the calculations are made due to this instant.
You can modify nearly every visual parameter of the basic layout of the widget in the backend, as there are:
Unfortuantely, the size of the widget isn’t adjustable, because the widget uses pixel fonts for all text displays. But hopefully your sidebar isn’t that small, is it?
Setting another date is easily done by clicking the desired part and dragging the mouse to the left or right. The date range is from 1900 to 2100.
You can also set the time in this way. The hour mode is in 24 hours per day.
The phases of the Moon are exact instants of time. It looks like that the Moon is “full” over serveral days, because it is very hard to see a very small dark sickle with the naked eye. In fact, all these phases are points of time. These times are calculated in an astronomical way here, not just setting up equal time spans by “guessing” the times from the last New Moon upwards. This will be wrong after a short period of time.
Calculating the phases of the Moon is not trivial. One cound take the date and time of the last New Moon. Knowing that an average lunation is about 29.530556 days long, one divides this period by 4, so he gets the dates and times for the upcoming phases. But, unfortuately, nature isn’t that simple. Calculating the phases in such way could be one day in error sometimes! The Moon’s orbit isn’t a circle, but an ellipse, so the Moon travels fast when he is near to the Earth and more slowly when he is far away. Moreover, the orbit of the Moon is tilted to the orbit of the Earth by more than 5 degrees. Therefore, the length of the lunation can differ more than 7 hours from the average lunation, which is 29 days 12 hours and 44 minutes long.
Depending on the accuracy one wishes to obtain, calculations become complex very quickly. Is has to be said that the calculations for this widget are not too complex, there is no need to calculate for “seconds of time” accuracy. Most calculations are based on the algorithms of Jean Meeus’ book “Astronomical Algoritms“. The accurracy within the time span 1900-2100 lies at 1 or 2 minutes in error. Too much accuracy will bring up performance problems.
Calculating the zodiacal position means to get the current position of the Moon on the ecliptic, or true ecliptical coordinates. The zodical signs are divided in equal parts of 30 degrees, starting at Aries (0°-30°), Taurus (30°-60°), Gemini (60°-90°), and so on…. So when one gets a true ecliptical longitude of 128.565°, this means that the Moon is in “Leo” (120°-150°), and since the entering of that sign he travelled 8.565° or 8°33.9′.
Last not least: The times of the phases of the Moon do not depend on where the observer is located. The instants are calculated in Universal Time (UT), the timezone of Greenwich, London. The output times are then given, of course, in the time according to the UT timezone-offset of your machine. It is not crucial if you are sitting in Los Angeles or Berlin.
Example: Full Moon occurs on September 23, 2010, 09:18 UT. That is 10:18 MEZ (Middle european timezone = UT+1h) in Berlin, or 11:18 with taking the daylight saving time into account. The same instant occurs on 01:18 in Los Angeles (UT-8h, Pazific Standard Time =02:18 Pazific Daylight Time)
Unfortunately, at the moment there are only English and German availiable. You can set the language in the widget’s backend.
15.2.2010: New versiopn upcoming. Some more features, like calculation of rising/setting, are planned.
I’m currently testing the widget, upload soon. I am looking forward to build a “plugin only” version, too (no widget).
You can download the current version Wordpress Moonphase widget here:
The widget was tested on Wordpress v2.8 and v2.9. it should run on Wordpress versions from v2.6 upwards, but there are no guarantees. Please report troubles if you discover. Thanks!
And one more thing: No registration, no costs, no code twiddle diddle. Just install, set your layout, enjoy.
Have fun!