home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / sharew / astronom / sunmoon1 / sun_moon.doc < prev    next >
Encoding:
Text File  |  1985-11-19  |  6.2 KB  |  123 lines

  1. Here is something that will test the number crunching ability of
  2. your ST. There are some fairly extensive trigonometric calculations
  3. in places.
  4.  
  5. This program computes data for the sun and moon. It was made with the
  6. intent of printing monthly tables of sunrise and sunset or moon rise
  7. and moon set. The program is based on several articles published in
  8. Weatherwise magazine and expanded upon to add an easy to use user
  9. interface. The program was first written on a Prime computer using
  10. Fortran 77. It was then converted to Megamax C for the Atari ST. Finally
  11. after discovering the floating point calculations were fairly slow,
  12. it was converted to GFA basic which was about 5 times faster.
  13.  
  14. The rise and set computations are valid for a flat horizon at sea level.
  15. Adjustments would have to be made for the actual times and angles
  16. where there are hills on the horizon or where the location is at
  17. a higher elevation. Care has been made to insure accuracy at high
  18. latitudes (don't try the north pole). In its present form the program
  19. will not correctly perform computations for latitudes south of the
  20. equator.
  21.  
  22. In order to run the program a file called LATLON.DAT is required.
  23. This file contains data for specific locations including latitude,
  24. longitude, number of hours from UTC meridian, and whether daylight
  25. savings time is used. This enables fast access by locating file
  26. data when required by the program. The LATLON file can be added to
  27. through the program. It also can be added to or modified through a
  28. file editor or word processor. LATLON city names should be in capital
  29. letters, the latitudes and longitudes are entered (in the file only)
  30. without a decimal point. Hour differences from the 0 degree meridian
  31. are positive for west longitudes and negative for east longitudes.
  32. About two cities from each state some foreign locations are included
  33. in the LATLON.DAT file. The maximum entries allowable in LATLON.DAT
  34. is 500.
  35.  
  36. Medium or high resolution is required. When the program begins the
  37. first location in the file is displayed in the status line at the
  38. bottom of the screen. To change this start up location you have to edit
  39. the LATLON file. To change the month of computation select the data
  40. entry in the menu bar or the F1 key. Enter the month in number or
  41. three letter format. Similarly the year can be changed using the data
  42. entry menu or the F2 key. Years require 4 number format. To change the
  43. location for the computation use the data entry menu or the F3 key. It
  44. is not necessary to type the entire city name. The location with the
  45. first characters in the LATLON file that match your entry will be
  46. selected. For example to call up Los Angeles you would only need to
  47. type L if it was the first L location in the file. If not Lo or Los
  48. would probably work. Changes you make are displayed in the status line
  49. at the screen bottom.
  50.  
  51. The F4 key or compute in the data entry menu will start computation.
  52. Listing to the screen may be stopped at any time by pressing a key.
  53. Another key press will resume the computation.
  54.  
  55. The options menu in the menu bar enables computation change from the
  56. sun to the moon. Click on your choice. Default is the sun on program
  57. start up. Also through the options menu you may display the entire
  58. list of locations available. Another option enables you to enter data
  59. for a new place. For instance you could type data for your own residence.
  60. Follow the prompts. Latitudes and longitudes are entered in degrees and
  61. hundredths, not minutes.
  62.  
  63. Output to the printer may be selected through the options menu or the
  64. F5 key. When the printer is selected all computed output goes to the
  65. printer instead of the monitor screen. Make sure you have the printer
  66. turned on in advance.
  67.  
  68. Quit in the options menu or the F6 key is the only way to gracefully
  69. exit the program.
  70.  
  71. In addition there is a choice of 3 different types of twilight for
  72. the sun computations. The default is civil twilight which begins or
  73. ends when the sun is 6 degrees below the horizon. You may also
  74. select nautical twilight, when the sun is 12 degrees below the
  75. horizon or astronomical twilight when the sun is 18 degrees below
  76. the horizon.
  77.  
  78. Output shows rise and set times and day lengths in hours and minutes.
  79. Times should be accurate to less than 1 minute for the sun and within a
  80. few minutes for the moon, probably better at low latitudes than at high
  81. latitudes. Change in day length is in minutes and seconds. Azimuth
  82. angles of rise and set on the horizon are measured from true north and
  83. are in degrees and tenths. Maximum elevations are also measured in
  84. degrees and tenths. Transit or solar noon is the time that the sun
  85. or moon is on the horizon due south. It is given to the nearest second
  86. for the sun. This enables an observer to determine the location of
  87. due south. Full moon occurs when the phase is shown to be .99.
  88.  
  89. There are centain conditions where there are no rise or set times for
  90. a day. It is also possible to have two sunsets on the same day! 
  91. The following conventions are used in the times showing these conditions:
  92.  
  93. ..:.. Indicates there is no rise or set for this day, it occurs on the
  94.       following day.
  95. --:-- Indicates there is no rise or set for this day because the sun
  96.       or moon stays below the horizon.
  97. **:** Indicates there is no rise or set for this day because the sun
  98.       or moon remains above the horizon.
  99.  
  100. Revision 1.1 added the following...
  101. Through a line editor or word processor you may add elevation after the
  102. UTC/local time difference in columns 33 through 37. Normally this is not
  103. used but in the case where the observer is on a high mountain and
  104. the horizon is near sea level it will make several minutes difference
  105. in sunrise and sunset. This elevation is not computation is not done
  106. for moonrise and moonset.
  107.  
  108. The status display line at the screen bottom was fixed to show correct
  109. latitude and longitude.
  110.  
  111. Tests were inserted for screen resolution and printer status.
  112.  
  113. A file called DATLOC.DAT was added which remembers the last location,
  114. month, and year used so when the program is rerun the same data
  115. will be used.
  116.  
  117. Suggestions for improvements are welcome. Write:
  118.  
  119.                       Dave Henry
  120.                       1720 Wickersham Drive
  121.                       Anchorage, Alaska 99507
  122.  
  123.