SunAltitude

SunAltitude is a command line utility that determines:

The software needs the observer's position (longitude, latitude, altitude above sea level) and optionally accounts for atmospheric refraction.
Very precise algorithms are used for the computation of the sun position, but local atmospheric conditions can affect the actual values.
Exceptionally, the algorithm might not converge for very specific combinations of time and observer's location, but this limitation should not be problem for most of the users.

It can output either data tables or graphs.

Data table output

The results are fomatted with three columns:
Example:
>SunAltitude.exe --day 12082007 --latitude 40 --longitude 3 --altitude 0.2 --verbose
Values for 12/08/2007 at 0.20 km height, 40° latitude and 3° longitude.
Interval is 600 seconds.

Column 1 is the time (HH:MM:SS).
Column 2 is the sun center angle with respect to the horizon, in degrees.
Column 3 is the minimum height at which the sun upper limb is visible, in km.

Time     	Alt (°)	Height (km)
00:00:00	-34.38	1365.54
00:10:00	-34.26	1354.97
00:20:00	-34.05	1335.50
00:30:00	-33.74	1307.53
00:40:00	-33.34	1271.59
00:50:00	-32.85	1228.35
01:00:00	-32.26	1178.58
01:10:00	-31.59	1123.14
01:20:00	-30.83	1062.95
01:30:00	-29.99	998.92
01:40:00	-29.08	931.99
01:50:00	-28.09	863.08
02:00:00	-27.03	793.05
...

Graph output

The graph x-axis is the time of the day of interest.
The red plot is the sun altitude in degrees, displayed against the left y-axis
The green plot is the minimum sun visibility height, displayed against the right y-axis

Example:
>SunAltitude.exe --day 12082007 --latitude 40 --longitude 3 --altitude 0.2 --graph 'test.png'
SunAltitude Graph Example

Download

SunAltitude has been developped in C# under MonoDevelop 0.16. It can also be compiled under Visual Studio 2005.
It has been tested under Linux Ubuntu 7.10/Mono 1.2.4, and under Windows XP/.NET 2.0.

Current version is 1.0.0.0.
SunAltitude binary and source can be downloaded through anonymous SVN at the following address:
http://anonsvn.lionelloudet.homedns.org/SunAltitude/tags/

Installation

Under Windows, it is necessary to install :
Under Linux, it is necessary to install :
In addition, gnuplot must be installed to generate graphs: Refer to the gnuplot homepage. Under Linux, gnuplot needs the Arial font that must be installed, and the environment variable
GDFONTPATH
must be initialized to the relevant font path, for instance:

Help

 --start  --end 
              --longitude  --latitude 
              --height  --step  [--refract|-r] [--verbose|-v]
              [--gnuplot ""] [--graph null|]
              [--height ] [--width ]

  Options:
    day       Date for which the values are calculated.
              Format is DDMMYYYY (e.g. 12012006 for 12 January 2006).
    start     Start time of the calculations range.
              Format is HH:mm (e.g. 04:30). Default is 00:00.
    end       End time of the calculations range.
              Format is HH:mm (e.g. 18:15). Default is 24:00.
    longitude Real value between -180 and 180 expressing the longitude
              of the location in degrees.
              Positive values in the eastern hemisphere. Default is 0.
    latitude  Real value between -90 and 90 expressing the latitude
              of the location in degrees.
              Positive values in the northern hemisphere. Default is 0.
    altitude  Real non negative value expressing the height of the observer
              for which the sun altitudes are calculated.
              Expressed in kilometers. Default is 0km (ground level).
    step      Positive integer value representing the interval in seconds
              between two computations. Default is 600 (10 minutes).
    refract   Indicates if the atmospheric refraction is accounted for.
    verbose   Shows legend.
    gnuplot   Path to the gnuplot executable. If empty, default is:
              on Windows platforms [Program Files Directory]\gnuplot\bin\wgnuplot.exe.
              on Linux platforms /usr/bin/gnuplot.
    graph     Path to the png file that will be created -- requires gnuplot
              set to null if the image is to be sent to stdout.
    height    height of the png image, in pixels. Default is 400.
    width     width of the png image, in pixels. Default is 745.
]]>
Creative Commons License SID Monitoring Station by Lionel LOUDET is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 2.0 France License.
Contact the webmaster
Disclaimer
Last Update: 17 Aug 2009 Total Visits: 001746 since Nov 15,2009
Apache Web Server PHP
Apache/2.2.8 (Ubuntu) DAV/2 SVN/1.4.6 PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch proxy_html/3.0.0
Labeled with ICRA Labeled with SafeSurf ICCS&174; seal
Made with CSS Valid XHTML + RDFa Valid CSS!
Page generated in 0.422 seconds.