SunAzimuth

SunAzimuth is a command line utility that determines, for a given day or a period of time:

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.

Single day output

SunAzimuth shows times of sunrise and sunset, as well as sun azimuth at at sunrise and sunset.

Example:
>SunAzimuth.exe --day 12082007 --latitude 40 --longitude 3 --altitude 0.2 --verbose
Location: 40° 00' 00.00" N  003° 00' 00.00" E  (JN10MA)
Values for 12/08/2007 at 0.20 km height.
True horizon -0.4540° below the astronomical horizon
Refraction effect: -0.6740°

Sunrise : 04:53:05	Azimuth : 068.88°
Sunset  : 18:52:26	Azimuth : 290.88°

Data table output for several days

The results are fomatted with five columns:
Example:
>SunAzimuth.exe --start 01082007 --end 10082007 --latitude 40 --longitude 3 --altitude 0.2 --verbose
Location: 40° 00' 00.00" N  003° 00' 00.00" E  (JN10MA)
Values between 01/08/2007 and 10/08/2007 at 0.20 km height.
True horizon -0.4540° below the astronomical horizon
Interval is 1 day.
Refraction effect: -0.6740°

  Column 1  is the day (DD/MM/YYYY).
  Column 2  is the sunrise time.
  Column 3  is the sunrise azimuth.
  Column 4  is the sunset time.
  Column 5  is the sunset azimuth.

          	--- Sunrise ---		--- Sunset ----
Day       	Time   	Azimuth		Time   	Azimuth
01 Aug 2007	04:43	064.76°		19:05	295.03°
02 Aug 2007	04:44	065.11°		19:04	294.68°
03 Aug 2007	04:45	065.46°		19:03	294.33°
04 Aug 2007	04:45	065.82°		19:02	293.97°
05 Aug 2007	04:46	066.18°		19:01	293.60°
06 Aug 2007	04:47	066.55°		19:00	293.23°
07 Aug 2007	04:48	066.93°		18:59	292.85°
08 Aug 2007	04:49	067.31°		18:57	292.47°
09 Aug 2007	04:50	067.69°		18:56	292.08°
10 Aug 2007	04:51	068.08°		18:55	291.68°

Combined Graph output

SunAzimuth can generate a single image file with three different plots. The x-axis corresponds to the days.
The upper plot contains the sunrise and sunset times.
The middle plot contains the lengths of days, from sunrise to sunset.
The lower plot contains the sunrise and sunset azimuths.

Example:
>SunAzimuth.exe --start 01012007 --end 31122007 --latitude 40 --longitude 3 --altitude 0.2 --graph 'test.png' --height 600
SunAzimuth combined graph output example

Sunrise and sunset times graph output

The x-axis corresponds to the days.
The gray lines are the UTC sunrise/sunset times.

Example:
>SunAzimuth.exe --start 01012007 --end 31122007 --latitude 40 --longitude 3 --altitude 0.2 --graphtimes 'test.png'
SunAzimuth times graph output example

Day length graph output

The x-axis corresponds to the days.
The yellow line correspond to day length from sunrise to sunset.

Example:
>SunAzimuth.exe --start 01012007 --end 31122007 --latitude 40 --longitude 3 --altitude 0.2 --graphdaylen 'test.png'
SunAzimuth day length graph output example

Sun azimuth graph output

The x-axis corresponds to the days.
The green lines correspond to sun azimuth at sunrise and sunset.

Example:
>SunAzimuth.exe --start 01012007 --end 31122007 --latitude 40 --longitude 3 --altitude 0.2 --graphaz 'test.png'
SunAzimuth sun azimuth graph output example

Download

Current version is 1.0.0.0.

SunAzimuth binary and source can be downloaded through anonymous SVN at the following address:
https://anonsvn.loudet.org/SunAzimuth/tags/

SunAzimuth has been developped in C# under MonoDevelop 2.0. It can also be compiled under Visual Studio Express 2010.
It has been tested under Linux Ubuntu 9.10/Mono 2.4.2.3, and under Windows XP/.NET 2.0.

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:

Changelog


Help

 | --start  --end 
    --longitude  --latitude  | --locator 
    --altitude  --step  [--norefract|-r] [--verbose|-v]
    [--extended|-e] [--mysql|-m]
    [--fromsouth]
    [--gnuplot ""]
    [--graph null|""]
      [--height ] [--width ]
    [--graphtimes null|""]
      [--heighttimes ] [--widthtimes ]
    [--graphdaylen null|""]
      [--heightdaylen ] [--widthdaylen ]
    [--graphaz null|""]
      [--heightaz ] [--widthaz ]

  Options:
    help        Shows this message.
    day         Date for which the values are calculated, for a single day
                calculation. Default is the current day.
                Format is DDMMYYYY (e.g. 12012006 for 12 January 2006).
    start       Start day for several days calculations.
                Format is DDMMYYYY (e.g. 12012006 for 12 January 2006).
    end         End day for several days calculations.
                Format is DDMMYYYY (e.g. 12012006 for 12 January 2006).
    longitude   Value between -180 and 180 expressing the longitude of the
                location in degrees. String representations are accepted.
                Positive values in the eastern hemisphere. Default is 0.
    latitude    Value between -90 and 90 expressing the latitude of the
                location in degrees. String representations are accepted.
                Positive values in the northern hemisphere. Default is 0.
    locator     Maidenhead locator of the location. If set, latitude
                and longitude options must not be defined.
    altitude    Real non negative value expressing the height of the observer
                for which the sun positions are calculated.
                Expressed in kilometers. Default is 0km (ground level).
    step        Positive integer value representing the interval in days
                between two computations. Default is 1.
    norefract   Disable accounting for atmospheric refraction effect.
    verbose     Shows legend.
    extended    Shows full date and time (dd MMM YYYY HH:MM:SS).
    mysql       Shows full date and time in mysql format (YYYYMMddHHMMSS).
    fromsouth   Measure azimuth from south, westward positive.
                By default azimuth is measured from north, eastward positive.
    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.
                set to null if the image is to be sent to stdout.
                Plot contains sunrise/set times, day length and
                sunrise/set azimuths.
    height      height of the png image, in pixels. Default is 400.
    width       width of the png image, in pixels. Default is 745.
    graphtimes  Path to the Times png file that will be created.
                set to null if the image is to be sent to stdout.
                Plot contains sunrise/transit/set/twilights times.
    heighttimes height of the Times png image, in pixels. Default is 400.
    widthtimes  width of the Times png image, in pixels. Default is 745.
    graphdaylen Path to the  Day Lengths png file that will be created.
                set to null if the image is to be sent to stdout.
                Plot contains day lengths.
    heightdaylen height of the  Day Lengths png image, in pixels. Default is 400.
    widthdaylen width of the Day Lengths png image, in pixels. Default is 745.
    graphaz     Path to the Azimuths png file that will be created.
                set to null if the image is to be sent to stdout.
                Plot contains sun azimuths at sunrise and sunset.
    heightaz    height of the Azimuths png image, in pixels. Default is 400.
    widthaz     width of the Azimuths png image, in pixels. Default is 745.
]]>
Creative Commons License SID monitoring station by Lionel LOUDET is licensed under a
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Disclaimer
Last Update: 04 Apr 2013
Apache Web Server PHP
Apache/2.4.62 (Debian)
Valid XHTML + RDFa Valid CSS!
Page generated in 0.031 seconds.