Calendar converter & Moon calculator,
v2.0 Beta

(C)Roy E. Hoffman 2000-2001
Permission is given to use this software for non-commercial
religious and scientific purposes. If you wish to use this
software for commercial purposes, please contact me to discuss
terms. If you have any comments
or suggestions, please contact me (roy@shum.cc.huji.ac.il).
While I will do my best to acknowledge any suggestions in
the code, I will assume that I have your permission to use
any information you give me as I wish.

24/10/2000

1. Getting started

Run the program Setup.exe to install Calendar. Run the program
calendar.exe from its own directory.

2. Using the program
On the left the input parameters. The results (output) appear on
the right according to the options selected.

2.1. Input parameters
The parameters are split into the following categories:
	Time
	Date
	Location
	Weather conditions
Set the parameters by clicking on Change. When finished with the category,
click on OK. Cancel will remove all changes.

The time is entered as hours, minutes and seconds. The type of time is set
using the upper combo box and may be UTC (Coordinated Universal Time); Local
using the time zone parameters set in the location menu; Mean solar; True Solar
as would be read from a sundial; GMST (Greenwich Sidreal Time); LST (Local Sidreal
Time); or Seasonal time. Seasonal time is counted as hours between sunrise and
sunset (or vica versa at night), the day/night being divided into 12 equal hours.
The time can be entered in 24 hour or 12 hour (am/pm) monde. The '1st time' and
'2nd time' options are used for when a particular time occurs twice during one day.
For example the sidreal day is nearly 4 minutes shorter that the mean solar day so
4 minutes repeat themselves. Likewise, if sunset is later than the previous day
then a short period will repeat itself in the Hebrew and Islamic calendars.

The date type is set by the upper combo box in the date menu. The options are
Fixed (radix starting at 1/1/1 gregorian = 1); JD (Julian Day number in UTC);
JDE (Julian Ephemeridies Day number in terrestial dynamic time); MJD (Modified
Julian Day number in UTC), Gregorian (the usual civil calendar), Julian (the civil
calendar that was in use till a few hundred years ago); Hebrew (used by mainstream
Judaism for religious purposes); Islamic arithmetic (the Islamic religious
calendar is fixed locally each month and may differ by a day or so). Fixed, JD, JDE
and MJD only require the entry of the day number. The other calendars require
date of month, month and year. Negative years should be indicated by a minus sign
except for Julian that uses the BCE/CE option. Dates cannot be accepted beyond about
30000 years from the present.

The Location can be set by name from the list of options or by latitude and
longitude. The location name is defined by country, town/city and neighborohood.
The Country also defines the automatic time zone settings.
The time zone may be set manually by cancelling the DST auto option.

The Weather can be defined manually, from the climate of the nearest defined
location, or from the global climate.

2.2 Output results
Select 'Convert date' or 'Moon, Sun, Planets'.
Under 'Convert date', select the calendar type in the upper combo box and
the time type in the lower box.
Under 'Moon, Sun, Planets', select the heavenly body (Sun, Moon, Mercury,
Venus or Juptier) in the upper combo box and the parameters required. For
all bodies the lower combo box the parameters available are: Ecliptic
coordinates, Equatorial coordinates, Horizon coordinates, Distance and size,
Rise, Set and stellar Magnitude. For the Moon extra parameters are:
    1) Yallop's q parameter as given in: B. D. Yallop, NAO Technical Note No 69, HM Nautical Almanac Office, Royal Greenwich Observatory, Cambridge, UK (1998). q is calculated from the
geocentric difference in altitude of the Sun and the Moon in degrees (ARCV) and the geocentric width of the crescent in minutes of arc (w') measured 4/5 lag time after geometric Sunset. q is calculated as follows:
    q = {ARCV - 11.8371 + w' * [6.3226 - w' * (0.7319 - w' * 0.1018)]} / 10
The Moon is definately visible if q > 0.2 and definately not visible if q < -0.05.
    2) Rambam's orech rishon and keshet reiya. Orech rishon is the difference in the
ecliptic longitudes of the Sun and the Moon in degrees, 20 minutes after geometric Sunset.
Keshetreiyah is the lag time (time between Sunset and Moonset) in minutes divided by four.
If the sum of orech rishon and keshet reiyah is less than 22 then the Moon cannot be seen.
Rambam's criterion is only valid for latitudes between 29 and 35 North. For further
details, see: J. Obermann, The Code of Maimonidies: Sanctification of the New Moon, Yale University Press, New Haven, 1956.
    3) Phase, lag, distance: these parameters are used by the Karaites to predict the
visibility. The phase and distance are topocentric at apparent Sunset over a sea-level
horizon. The lag time is for apparent Sunset and Moonset over a sea-level horizon.
    4) Visiblitiy prediciton (including graph when the Moon is a thin crescent) using the
method to be published: R. E. Hoffman and T. Kaatz, Yodei Binah, in press.
    5) and the date of the next first sighting of the New Moon according to method 4.
