home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / calculat / sun.zip / SUN.DOC < prev    next >
Text File  |  1988-03-30  |  3KB  |  54 lines

  1. SUN.C documentation
  2.  
  3.  SUN.C   Version 1.0  Michael Schwartz  December 25, 1984
  4.          Update for ANSI compatibility  March 1, 1988
  5.  
  6. This program uses the USNO algorithm to calculate sunrise and sunset 
  7. times from standard lattitudes and longitudes.  It has been set up as
  8. system independently as possible, with the exception being a function
  9. which gets the current (default) date and day of the year.
  10.  
  11. Inquiries can reach me at PO BOX 24536, Denver, Colorado 80224
  12. (a place no longer 'out of the way')
  13.  
  14. Ref: Almanac for Computers, pub. by US NAVAL OBSERVATORY
  15. Usage:
  16.   sun [-c] [-l[lat]] [-L[long]] [-M] [-m[1-12|a]] [-d[day]]
  17.       [-t<S|C|N|A>]  [-<12|24>]
  18.    Latitude in deg,min'sec" N; Longitude in deg,min'sec" W
  19.    NOTE THAT LONGITUDE IS NEGATIVE OF USUAL NOTATION (I'm a Western
  20.    Hemisphere chauvinist).  Also, use of -l or -L will cause the
  21.    time zone to default to GMT!!!
  22.  
  23.   -c: Calendar-ish output
  24.   -M: multiple invocation
  25.   -m: Choose a month of times (e.g. -m5 for may) or all 12 months (-ma)
  26.   -d: Day of year
  27.   -t: S:Sunset, C: Civil Twilight N: Nautical Twilight A: Astronomical Twilight
  28.   -12: 12 hour clock (default)
  29.   -24: 24 hour clock
  30.   -j:  Candle lighting & Havdalah
  31.  
  32. Accuracy:  The USNO claims accuracy withing 2 minutes except at extreme
  33.  northern or southern lattitudes.  Comparison to local NWS charts for
  34.  sunrise and sunset (which are cheap and easy to come by) shows that with
  35.  the double precision calculations, the charts produced by this program 
  36.  are no more than 1 minute removed from those charts in lattitudes lower
  37.  than 41 degrees.  Candle lighting times agree with those on popular 
  38.  calendars also to the 1 minute accuracy.
  39.  
  40. The program, unlike its Fortran predecessor has a number of 
  41. important options and defaults.  It is capable of getting today's
  42. sunrise and sunset at a default location (now Denver, of course),
  43. producing a calendar-like table of a month or a year, and allowing the
  44. user to produce reams of data without reinvoking the program.
  45.  
  46. Bugs:      No method of calculating DST or aligning years to Fridays/Saturdays
  47.  or holidays has been provided in the MS-DOS version:  However,
  48.  as more MS-DOS compilers support the ANSI time standards, the MS-DOS
  49.  option may not be necessary for your compiler.
  50.  This program has not been tested under UNIX since the ANSI updates.
  51.  The locations of the include files may need to be fixed.
  52.  
  53. Rights:   All rights to this program are placed in the public domain.
  54.