xmsunmoom - A motif wrapper for the program sunmoon, which calculates a number of sunrise/sunset and moonrise/moonset variables. See below for a more complete description of that program. Syntax: xmsunmoon -s -m -y -l -f -p Arguments: All command line arguments are optional. The program can be started by just typing xmsunmoon. However it will come up with no data displayed until a station is selected from the drop-down list. -s the 3-5 letter ID of the station to get data for -m -y number of month (1-12) 4 digit year -l <> -f <> the sunmoon program uses a file called latlon.dat containing station names along with lat/lon and GMT offset for each station. Also whether DST is used. The -l option can be used if this file is located in a different directory than the xmsunmoon program. The -f option can be used if the file is named something besides latlon.dat. -p <> xmsunmoon gets its data from the program sunmoon, which does all the actual calculations. The -p option can be used if the sunmoon program is in a different directory than xmsunmoon >>>>>>>>>>>>>>>>>>>>>>>>>>> SunMoon <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ABOUT THE PROGRAM) SunMoon is a program for calculating astronomical information for the sun and for the moon. For the sun the computations made are: 1)Sunrise 2)Sunset 3)Hours of Daylight 4)Change in Daylight from Yesterday 5)Civil Twilight Beginning 6)Twilight Ending 7)Sunrise Azimuth 8)Sunset Azimuth 9)Maximum Elevation 10)Transit (Solar Noon) For the moon the computations made are: 1)Moonrise 2)Moonset 3)Moonrise Azimuth 4)Moonset Azimuth 5)Maximum Elevation 6)Transit 7)Phase 8)Age Civil twilight is defined as the time the sun reaches 6 degrees below the horizon. Transit is when the azimuth angle is 180 degrees or when the sun or moon is due south of the observer. The phase of the moon ranges from 0 when new to .99 when full. The age is the number of days since the new moon. Rise and set times are computed and are accurate to less than one minute for sun data. Accuracy for moonrise and set is usually less than one minute, but in some cases the error will be about 2 minutes. The error should never be more than 3 minutes. All times are truncated, not rounded up, following the convention in Astronomical Phenomena. The internal program keeps time to the nearest second but the display is to the nearest minute for rise and set times and possible sunlight hours. This may make daylight times appear different from rise time minus set time, but this is only a rounding problem. The length of day is displayed to the nearest second to show smaller changes. The possible sun hours and minutes are those which occur in the 24 hour period of the day for which they are shown. In cases where sunset falls on the following day, those possible sun hours and minutes are included in the daylight for that following day. This convention may result in non-uniform values for the change in sun hours. These apparent irregularities are correct. Refraction is restricted to the lowest 2 degrees above the horizon. This causes rise times to be slightly earlier and set times to be slightly later. In all cases, no effect of mountains or terrain is taken into account since these effects may vary widely over small distances. A flat earth is assumed. Refraction for rise and set is assumed to be 50 minutes of arc. Variations in the refraction in the real atmosphere from the 50 minutes assumed will also cause small variations in actual rise and set times from those produced by these computations. These variations become larger at high latitudes for low sun angles. This program is not guaranteed to work at the North or South Pole. The displayed data may include "----", "****", or "....". The "----" indicates no data because the sun or moon stays below the horizon. "****" indicates the sun or moon stays above the horizon. "...." means the rise or set time occurs on the following day. Infrequently, there will be two settings on the same day, one just after midnight and then again just before the next midnight. In this case an extra line is inserted showing the time of the second setting for that day. Hours are adjusted to daylight savings time when it is in effect if the station being displayed uses it. There is no provision for adjusting times for earlier historical dates where time zone boundaries were different or daylight savings time was not yet used. Also, no provision is made for time zones that are not in increments of whole hours, or countries where daylight savings time does not begin the first Sunday in April and end the last Sunday in October. USING THE PROGRAM) SunMoon - displays astronomical data for the sun or moon for any date Syntax: SunMoon -s [-d ] [-o ] [-h] [-n] [-c] [-t ] Flags: -s Station is the three to five letter identifier for the station desired. The station database file "latlon.dat" located in the program directory is searched to find information for the station requested. If is not found in the database, an error message is printed. This is the only flag that MUST be entered. -d Date for which data is desired. If this flag is not entered, data for the current computer date is output. To display data for a whole month, a '0' is entered for the day (DD). -o is a variable length string of letters corresponding to the data items desired. If this flag is not entered, all available items are displayed for the sun (or the moon if the -t MOON flag is used). Possible values are chosen from the following list: a - Sunrise b - Sunset c - Amount of daylight (HR:MN) x - Amount of daylight (HR HOURS MN MINUTES) d - Change in amount of daylight from yesterday (HR:MN:SC) y - Change in amount of daylight from yesterday (GAIN/LOSS OF HR HOURS MN MINUTES) e - Time of beginning of civil twilight f - Time of end of civil twilight g - Azimuth angle of sunrise h - Azimuth angle of sunset i - Maximum elevation of the sun for this day j - Time of transit (Solar noon) o - Moonrise p - Moonset q - Azimuth angle of moonrise r - Azimuth angle of moonset s - Maximum elevation of the moon for this day t - Time of transit u - Phase of the moon (0 - 1) v - Age of the moon (Days since new moon (0-29)) Adding the number '2' after any option letter will give the data (for that item only) for the next day. -h If this flag is present a header will be displayed first showing what it data item is. This is only valid if all the items for either sun or moon are being displayed. -n If this flag is present, each data item will be output on a separate line. -c If this flag is present, all times are displayed according to a twelve hour clock with hours from 1-12. If this flag is not present, all times are displayed according to a twenty-four hour clock with hours from 1-24. -t If is 'MOON', all the data items for the moon are output. If is 'SUN', all the data items for the sun are output. The -o flag takes precedence over this flag. This is just an easy way to get all the available data without having to enter an option string. If this flag is not present and the -o flag is not present, the default is to display all the sun data. Examples: 1) To display all the sun data for today for Juneau, enter: SunMoon -s jnu 2) To display all the moon data for June,1994 for Juneau, enter: SunMoon -s jnu -d 6/0/1994 -t moon 3) To display sunrise, sunset, twilight beginning and ending, and the amount of daylight for July 4,1943 and the moonrise, moonset and phase of the moon for July 5,1943 in 12-hr time format for Juneau with each item on a separate line, enter: SunMoon -s jnu -d 7/4/1943 -o abefco2p2u2 -c -n STATION DATABASE FILE) To make its calculations, SunMoon uses a station database file called "latlon.dat". This file contains latitude, longitude and timezone information for all the stations that are available. A station must be listed in this file for the program to be able to calculate sun and moon data for it. The database file is a regular ASCII file that may be edited using any editor that outputs ASCII. The data format of the file is as follows: 1) 2) 3) 4) 5) 10AK 70.22N150.98W- 9Y PASY 52.72N186.00W-10Y TYO 35.80N139.70E 9N 1) 3 or 4 letter identifier of the station padded with blanks if necessary to make 4 characters. 2) 7 characters of latitude in degrees and hundredths (NOT seconds!). Use N at the end for North latitudes and S for South. 3) 7 characters of longitude in degrees and hundredths (NOT seconds!). Use W at the end for West longitudes and E for East. When entering data for East longitudes which retain the earlier day (E.G. in the Aleutians west of 180 degrees), the longitude used by the program needs to be the longitude of the location subtracted from 360 degrees. This will maintain the correct day of the month. 4) 3 characters showing the number of hours difference between Co-ordinated Universal Time (CUT) and the station. This is the time of the local clock, on standard time, minus the time at longitude zero. The number is negative for stations behind CUT and positive for station ahead of CUT. In the United States, the following applies: Hawaii Time -10 Alaska Time - 9 Pacific Time - 8 Mountain Time - 7 Central Time - 6 Eastern Time - 5 Alantic Time - 4 NOTICE! The '-' for the sign MUST be the far left character. No sign is needed for a positive difference. No provision is made for time zone differences that are not in increments of whole hours. 5) Does the station use Daylight Savings Time? If you want the computed values to be corrected for DST this character must be 'Y', if not use 'N'. This correction is applied from the first Sunday in April until the last Sunday in October. The beginning and ending dates in other countries that advance their clocks may be different, but no provision is made for this. To add a station to the database, the file "latlon.dat", located in the same directory as the program must be called up into an editor that outputs ASCII text. The stations are in alphabetical order, so the new station should either be entered in the correct position, or if not, the file should be sorted after the new entry is made. When entering a new station, make sure the new items line up with the same data items in the entries above and below the new entry. To sort the datafile in alphabetical order after entering a new station, enter the following command: In UNIX: sort -o latlon.dat latlon.dat