The Sun Position Calculator (SPC) help file
by Sándor Volkán-Kacsó & Zoltán Néda
Babeş-Bolyai University, Department of Physics
str. Kogălnicenu nr.1 RO-3400, Cluj-Napoca
ROMANIA
4. Some useful hints, regarding the use of SPC
4.3Minus/positive signs for Latitude, Longitudes and GMT+
4.4Getting the Latitude, Longitude and GMT+ for the desired location
7. Precision
This is a freeware program, comes with no warranty. It has not yet been sufficiently tested. The program runs under WINDOWS environment (Windows 98 or higher).
Feel free to download it, use it and distribute it. We are grateful for any comments and suggestion regarding this program. Please send your feedback at: zneda@phys.ubbcluj.ro (with subject line: SPC).
If you would like to sponsor our research on complex systems, any tinny donation for our research group is gratefully acknowledged, and will be mentioned on the homepage dedicated to SPC. The present version of SPC was sponsored by the KPI Sapientia Foundation in Cluj.
This Sun Position Calculator will calculate the position of the bottom and top of the Sun's rim, sunset and sunrise time at any geographical location (characterized by observational height, latitude and longitude) at any date (between 1900- 2100) and time. SPC will also indicate the twilight or when the Sun is not visible. A table with latitudes and longitudes, and GMT+ for some major cities around the world is also incorporated.
The Sun's position is characterized by the elevation angle relative to the horizon and azimuth relative to the North direction. Since the observed position of the Sun can be effected by the refraction of the light rays in the atmosphere (especially for low elevation angles), the program gives both the real position of the Sun (without atmospheric refraction) and the observed elevation and azimuth (when atmospheric refraction is accounted). The same remarks are valid for sunset and sunrise time. Atmospheric refraction is taken into account in a more realistic manner, than in other available Sun Position Calculators. We compute the refraction corrections by using a Standard Atmosphere model. In order to approach a realistic atmosphere profile the program needs as input the expected temperature and pressure for an arbitrary chosen altitude.
4. Some useful hints regarding the use of SPC
By launching SPC a window will appear. In this window there are several boxes in which the user can input the parameters and view the results.
The default parameters are as follows:
After changing these parameters and making a calculation, the newly introduced parameters will be remembered in the "SPC.ini" file, and the program will start with these parameters. The program does not accept ill-defined parameters, replacing them automatically with the original default values, or just simply warning us.
The user can change the values of the parameters either by typing in the desired parameters or by using the up/down arrows at the right side of the boxes. You must input the values using the proper units!
Some of the parameters can be automatically set by pressing the appropriate pushbutton. Thus one can set the date/time/GMT+ to the computer's time and can automatically calculate the minimal horizon angle (more about this in section section 4.7).
4.3 Minus/positive signs for the Latitude, Longitude and GMT+
In the present version of SPC the Latitudes are considered positive in the Northern Hemisphere, and negative in the Southern one. The Longitudes are positive for the East direction and negative for the West direction relative to the GMT-line. For negative angles the negative sign in any box refers only to the value in the given box. As an example: to work on the Latitude of -(27o 10' 30'') one has to input in the fields reserved for the angle of the Latitude: -27 degree -10 minutes and -30 seconds!
4.4 Getting the Latitude, Longitude and GMT+ for the desired location.
The Latitude and Longitude for many cities can be found on the Internet or on a large-scale map. Some useful homepages in this sense are listed below.
http://www.astro.com/cgi/aq.cgi?lang=e
http://www.calle.com/world/index.html
In the present version of SPC we have also incorporated the latitudes and longitudes for some major cities around the world. In case the Internet is not available, the user can simply select the coordinates of the closest city available on this list.
For working with the local time at the chosen geographical position, rather then the GMT time, the knowledge of the time zone is necessary. The time zone is characterized by the difference (GMT+) relative to the GMT time. By definition this difference is positive and increasing in the East direction, and it is negative and decreasing in the West direction relative to Greenwich (UK). If your Windows system is properly setup the GMT+ for your geographical location is automatically taken from the system configuration. If you are interested in the Sun position at a different location you must use the proper GMT+ for this location. You can find this either by browsing the web, or by simply using the incorporated table or GMT time-zone map. The value of GMT+ is modified by the daylight saving. Once given the GMT+ for a given location, the present version of SPC can automatically take into account the daylight saving, if the user selects this option (by default it is selected). In this case it is not necessary to change the GMT+ for a given location, when daylight saving is on. To learn more about the "daylight saving option" go to section 4.6.
In the output window the program will give us:
corresponding to the input parameters (geographical location, height, date, atmospheric parameters and twilight definition). These results are given both without taking into account atmospheric refraction, and when atmospheric refraction is accounted. The results which have to deal with elevation angles (elevation of the bottom and top of Sun's rim) or depend on them (sunrise/sunset time) are calculated relative to the given horizon angle (see more in section section 4.7). The twilight however, is calculated for the horizon at 00, since the light in this case is a dispersed one, and the altitude of the horizon does not really count. In the output window the program will also tell us if the Sun's rim is not visible, or if there is twilight.
In many countries it is a custom to shift the time by one hour during the spring-summer-autumn period, a procedure called "daylight savings". Our code can take this shift into account after selecting this option. If this option is ON, the program automatically will take daylight saving into account between the last Sunday of March - the last Sunday of September, and the user can simply use the official time at the selected location, without shifting the time by one hour to get the proper GMT+ time. The sunrise, sunset and twilight results are then also given for this practical time.
The elevation angles showing the Sun's rim position (top and bottom) are calculated relative to the horizon angle seen by the observer. If this is set to 0o0'0'' the mathematical horizon is taken in consideration. The horizon can also be negative if the observer's altitude is greater then 0 m above sea-level. The minimal horizon angle is automatically calculated by SPC if the appropriate button is pressed. In this calculation the horizon altitude is always taken as 0 m above sea-level.
As there is only one input field for horizon both sunrise/moring twilight time and sunset/evening twilight time are calculated relative to the same horizon angle. However if eastern and western horizon angles are not the same, two consecutive runs are needed in order to calculate the data for each horizon angle.
For calculating the position of the Sun (without taking into account atmospheric refraction) at a given geographical location, date and time, we use the algorithm described in:
http://www.stargazing.net/kepler/sun.htm
http://www.xylem.f2s.com/kepler/moonrise.html
Atmospheric refraction is taken into account as described in our earlier work: http://www.fi.uib.no/~neda/sunset/index.html (or http://www.arxiv.org/abs/physics/0204060). In short: after fixing the temperature and pressure at a given height, we construct a Standard Atmosphere model, by imposing a standard 6.5K/km temperature lapse rate. By using Edlen's semi-empirical formula we calculate then the refractive index profile (which is dependent on height alone). In this optical atmosphere model, we follow the path of the light-rays by using the principles of classical geometrical optics.
6 About the authors
Sándor Volkán-Kacsó is momentary (2003) a Master student in the Computational Physics Program, at the Physics Department of the Babeş-Bolyai University of Cluj. His main research interest is the Physics of Complex Systems, approaching complex problems by computational physics methods.
Zoltán Néda is a Professor of Theoretical Physics at the Physics Department of the Babeş-Bolyai University of Cluj (http://www.fi.uib.no/~neda). His main research area is Statistical and Computational Physics, applied to soft-condensed matter problems. He is interested in all problems regarding complexity in natural phenomena.
7 Precision
By neglecting the errors coming from the used Standard Atmosphere model the precision of the present version of the Sun Position Calculator is always under 1 min both for the elevation angle and the azimuth of the Sun.
Errors arising from atmospheric refraction are not easily estimated. Our previous studies convinced us, that the Standard Atmosphere approximation is a proper one, and atmospheric refraction can be accounted well in this manner. However, if the atmospheric parameters from the input are incorrect, the errors when the Sun is in the vicinity of the horizon (elevation less than 1 degree) can be orders of magnitude higher then the previously given 1 minute estimate.