home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_2.iso
/
files
/
678b.lha
/
SunRise
/
README
next >
Wrap
Text File
|
1992-07-02
|
3KB
|
87 lines
/*
* SunRise.c - a program to calculate sunrise, sunset & twighlight
* Amiga C version by Ralph Siemsen 30-Jun-92 @ Ottawa
*
* This program calculates the time of sunrise, sunset, and twilight
* (astronomical, nautical, and civil) to within a minute or two
* during the second half of the twentieth century.
*
* You need to input the latitude & longtitude for your locality.
* Here are a few popular places:
*
* Latitude Longtitude
* Ottawa, Ontario 45.2624 75.4142
* Toronto, Ontario 43.3910 79.2300
* Winnipeg, Manitoba 49.5356 97.0823
* Vancouver, BC 49.1856 123.0444
*
* For the time zone, consult the following chart:
*
* STANDARD(winter) DAYLIGHT(summer)
* Newfoundland 3.30 2.30
* Atlantic 4.00 3.00
* Eastern 5.00 4.00
* Central 6.00 5.00
* Mountain 7.00 6.00
* Pacific 8.00 7.00
*
* Year (1951 through 2000)
* You must enter all four digits!
* Month (1 through 12)
* Day (1 through 31)
*
* Output-
* You will get the sunrise, sunset, and twighlight (astronomical,
* civil and nautical dawn & dusk) for the day you requested.
* A zero indicates that the phenomenon does not occur, eg. there is
* no sunset at high altitudes in the summer.
* The program does not take into account the elevation with respect
* to the horizon, so its accuracy is limited.
* In case you want to know-- twilight is defined as the time at which
* the sun is 6, 12, and 18 degrees below the horizon. Sunrise and sunset,
* of course, correspond to when the top of the sun is on the horizon.
*
* Sample-
* Latitude? 30
* Longtitude? 90
* Zone? 5
* Year? 1983
* Month? 5
* Day? 19
*
* A. DAWN: 4.33
* N. DAWN: 5.06
* C. DAWN: 5.38
* SUNRISE: 6.04
*
* SUNSET : 19.49
* C. DUSK: 20.15
* N. DUSK: 20.47
* A. DUSK: 21.21
*
* Notes-
* This program uses 64-bit IEEE floating point math, although it is
* probably not necessary (32-bit would do just fine). It is written
* in C and it compiles under MANX Aztec 3.6a using the +fi option:
* cc +fi SunRise
* ln SunRise -lma -lc
*
* And YES, it works under 2.04!!! (I just upgraded, so I'm excited).
*
* +-------------------------------------------------------------------+
* | This program is in the public domain. You can use it, copy it, |
* | change it, or even delete it! You can use (or abuse) the source |
* | code, or include it in another program, with or without credit |
* | to me (I can't stop you, anyways!). THE ONLY CONDITION IS THAT |
* | YOU MAY NOT SELL THIS PROGRAM OR OTHERWISE MAKE MONEY FROM IT!! |
* | (I think that finding a market would be difficult, anyways...) |
* +-------------------------------------------------------------------+
*
* I hope someone finds it useful. If anyone makes any significant
* improvements, well, share them with us!
* Should you get any very questionable results, send a message to me.
* Include the values that you entered, so I can reproduce the error.
* I'll be available on SteveX's OMX for as long as he'll have me...
*
*/