Menu

Tree [5f296f] master /
 History

HTTPS access


File Date Author Commit
 CMake 2017-04-15 MvdS MvdS [657eec] Add CMake files to repo
 Python 2020-10-27 MvdS MvdS [44f993] Python: update README.
 doc 2024-02-12 MvdS MvdS [5f296f] doc/INSTALL: add section on building example code.
 examples 2021-03-18 MvdS MvdS [02efc8] Convert README to markdown.
 CITATION.cff 2022-10-07 MvdS MvdS [0947b1] Add CITATION.cff, codemeta.json.
 CMakeLists.txt 2017-04-17 MvdS MvdS [027c31] CMake: ensure file INSTALL is found in CMake ro...
 LICENSE 2021-03-13 MvdS MvdS [8c0ff2] Copy LICENSE to root.
 README.md 2021-03-18 MvdS MvdS [02efc8] Convert README to markdown.
 SolTrack.c 2021-03-18 MvdS MvdS [02efc8] Convert README to markdown.
 SolTrack.h 2019-10-31 MvdS MvdS [5e2b22] Update Licence statement in file headers. Add ...
 SolTrack_RiseSet.c 2019-10-31 MvdS MvdS [5e2b22] Update Licence statement in file headers. Add ...
 codemeta.json 2022-10-07 MvdS MvdS [0bee63] codemeta.json: add urls to GitHub (Arduino).

Read Me

SolTrack

SolTrack is a free, fast and accurate C/C++ routine to compute the position of the Sun. In addition, SolTrack computes
rise and set times and azimuths, and transit times and altitudes.
The code can be used to track the Sun on a low-specs machine, such as a microcontroller or PLC, and can be used for e.g.
(highly) concentrated (photovoltaic) solar power or accurate solar-energy modelling.

SolTrack has been developed by Marc van der Sluys, Paul van Kan and Jurgen
Reintjes, at the Sustainable Energy research
group
at the HAN University
of Applied Sciences
in Arnhem, the Netherlands. The code is based
on the astronomical Fortran library libTheSky and can be used, modified and
distributed under the conditions of version 3 of the GNU Lesser General Public
Licence
.

Description, speed and accuracy

See also the poster and conference proceedings we
presented on CPV-11 in April 2015.

SolTrack is a simple C/C++ routine that can compute the position of the Sun in topocentric coordinates, both
in a horizontal and in an
equatorial system. The code is based
on the Fortran library libTheSky and includes corrections for
aberration and
parallax, and a simple
routine
to correct for atmospheric
refraction
, taking into account local
atmospheric conditions. We compared the performance of SolTrack to detailed calculations using the planetary
theories VSOP 87 and an accurate
model
for atmospheric refraction.

We tested SolTrack for 100,000 random moments in the next 100 years (between 2017 and 2116) when the Sun is
above the horizon in the Netherlands (latitude ∼52°N). We find that the mean error in position is
0.0030 ± 0.0016°, which is sufficient for solar tracking of CPV systems under all conditions. The code
can compute ten million positions in 6.47 ± 0.03s on a single 2.67 GHz CPU core when only horizontal
coordinates (azimuth and altitude) are computed, and takes 8.16 ± 0.02s (26% slower) if
refraction-corrected parallactic coordinates are also calculated. In addition to positions, SolTrack can also
compute the distance to the Sun, its rise, transit and set times, and its rise and set azimuth and transit
altitude.

When compared to the PSA SunPos routine, which is also light-weight and
freely available, SolTrack is 24 times more accurate (0.073°) and 2% faster. When computing additional
refraction-corrected equatorial coordinates, SolTrack is 23% slower than SunPos. We also compared the
performance of SolTrack to the NREL SPA routine, which is more elaborate and
has a more restricted licence. SPA is 24% more accurate than SolTrack (0.0023°), but also 20 times slower,
where we computed only the Sun's position in SPA (not its rise and set times or incident radiation) and
included the additional refraction-corrected equatorial coordinates in SolTrack. A paper describing more
details is forthcoming.

SolTrack pages

Installing SolTrack

The SolTrack tarball contains CMake installer files for (semi)automatic compilation and installation of the
shared (and if desired static) library. See doc/INSTALL for more information.

SolTrack has an ebuild for easy
installation in Gentoo Linux and has been included in Arch Linux's
AUR. Binary packages
(.deb and
.rpm) are available for e.g. Debian, (*)Ubuntu, Red
Hat, Fedora, CentOS, Scientific Linux, SUSE and many others.

Examples

The examples/ directory lists two example programs that can be linked against the SolTrack library, and which
computes either data for a single instance, or read dates from a file and compute the corresponding positions.
Example output is provided to verify the results.

SolTrack has been used by:

Contact

You can contact the authors (preferably through email) via this page.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.