****************************************************************************** * Sun Event Calculator * * by: G.R.Smith (Gary) * ****************************************************************************** * Bix : revsmith * * CompSrv: 73537,1351 * * PLINK: iwj024 * ****************************************************************************** PROGRAM NOTES - I/O for this program is via the CLI. Nothing fancy... yet. It will therefore be most convenient for you to install this file in the c directory of the disk from which you will be running it. Then, at any CLI prompt, type Sun. From this point, the program should explain it's own use. Explanation of it's OUTPUT is what I will try to provide here... NOTE: If you run this program from WorkBench, open it's window to FULL SCREEN size before entering the date. That way, info displayed by the program will be formatted properly. - Given any date in the last half of this century, this program calculates the time of Sunrise and Sunset along with Astronomical, Nautical and Civil Twilight to an accuracy of +/- 2 Mins for any location on the earth. Time may be displayed as LOCAL clock time for certain selected locations, or UNIVERSAL time for any arbitrary location. In addition, time may be displayed in terms of any U.S. continental time zone for ANY location. - The default coordinates for this program are Minneapolis, simply because this is where I live. If you really find this program useful and wish it would default to your own location, or, that it would include some other selections in it's location menu, I can be persuaded to provide a custom version, you guessed it, for a price... Just send your coordinates along with up to ten others which you would like to have appear in the locations menu. Unless obvious, I will also need the time difference between your locations and EASTERN STANDARD TIME or some other zone of reference. Send MONEY ORDERS or CASHIER'S CHECKS only, to ... G.R. Smith 2502 Brookdale Lane Brooklyn Park, MN 55444 I'm sorry, but for anything less than $25.00 this just doesn't seem worth the effort to me. You do, however, have an alternative. Right now, I do intend to eventually release the source code for this program; perhaps in around six months (now 2-6-88). If you own a C compiler you may want to wait. I would let the code out now but I am using it as part of another program and do not care to give anyone a leg-up at the expense of making my own efforts pointless. - Civil Twilight is defined, by Webster, as "the period after sunset or before sunrise ending or beginning when the sun is about 6 degrees below the horizon and during which on clear days there is enough light for ordinary outdoor occupations". - Nautical Twilight is defined, by Webster, as "the period before sunrise or after sunset during which the sun is not more than 12 degrees below the horizon". - Astronomical Twilight is defined, by Webster, as "the period after sunset or before sunrise ending or beginning when the sun is about 18 degrees below the horizon". (Webster could use a definition to which people could more easily relate. I don't have one.) - The program will automatically convert the U.S. continental time zones to Daylight Savings Time for dates on which this law is in effect. You will know this by observing the zone designation which the program appends to all times (e.g. EST becomes EDT when Daylight Savings Time is in effect). - The effect of choosing a U.S. continental time zone for a location off-continent is to cause the times of the various solar events to be expressed in terms of that U.S. continental time zone's clock. This seems logical when you read it but keep it in mind the next time you see that the sun is rising at 1:38 AM CST in London! - More confusing than this is the effect of date changes in expressing solar events. If you ask for the time of sunrise in Sydney on 2-2-88 and allow it to be expressed in terms of CENTRAL STANDARD TIME you will find that it actually occurred on 2-1-88 as far as the people in the CENTRAL TIME ZONE are concerned. This is denoted by the program as it appends the text "Previous Day" to the times which it displays. Similarly, a "Next Day" tag will be appended whenever appropriate for the locations and time zones specified. - To get the LOCAL clock time for sunrise in Sydney on a given date you should first know whether they are observing Daylight Savings Time on the date of interest (or whether they observe it at all) and then select the appropriate conversion (LOCAL STD or LOCAL DAY) from the time zone menu. Note that if you are asking the program to express the events in terms of a U.S. continental time zone, it only matters whether or not the U.S. is observing Daylight Savings Time on the date of interest since the laws of the other country do not (of course) change the actual event but only the LOCAL clock time at which it occurs in that country. - For CUSTOM COORDinates you may still express the times in terms of U.S. continental time zones but because of the extreme tedium involved in trying to tell a dumb computer how time zones are laid out (if you've ever looked at a world time zone map you know what I mean) and how it may test a particular location for inclusion in a particular zone, I have only provided the alternative of expressing the event times in terms of UNIVERSAL TIME (a.k.a. Greenwich time). To arrive at LOCAL time you must make your own conversions. - If you're wondering how Lawrenceville got into this list, it's the present home of my sister. If your wondering where the heck it is, it's in New Jersey. It's times should be pretty close to Philadelphia's. - Please note, I am strictly an amateur and not a professional developer. As such, this program is sure to have it's shortcomings. Actually, I think it also has some "longcomings" in that I don't understand the compiler and linker command line options at all and I'm sure that the executable must be larger than necessary. Any advice which you can throw my way will be appreciated. - One last (major) enhancement that I would like to make to this incarnation of my larger effort is to display the prompts and results in some more eye-pleasing fashion... something like Progressive Peripherals has done with CLImate. Perhaps someone can direct me to example-code?