soltrack
A free, fast and accurate routine to compute the position of the Sun
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.7%) to scientific vocabulary
Keywords
Repository
A free, fast and accurate routine to compute the position of the Sun
Basic Info
- Host: GitHub
- Owner: astronomy
- License: lgpl-3.0
- Language: Python
- Default Branch: master
- Homepage: http://soltrack.sourceforge.net
- Size: 87.9 KB
Statistics
- Stars: 9
- Watchers: 3
- Forks: 6
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
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
- SolTrack homepage describing the C/C++ and Python versions
- SolTrack project page on SourceForge (code/binary
download, bug reports, etc.)
- 2017-04-15: v2.1 released
- 2017-02-22: v2.0 released
- 2015-04-11: v1.1 released
- 2014-11-10: v1.0 released (first stable release)
- SolTrack for Python on PyPI
- SolTrack for Arduino on GitHub
- Code documentation generated by Doxygen
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:
- HAN University of Applied Sciences, The Netherlands
- SunCycle
Contact
You can contact the authors (preferably through email) via this page.
Owner
- Name: Astronomy
- Login: astronomy
- Kind: user
- Location: Planet Earth
- Repositories: 8
- Profile: https://github.com/astronomy
Citation (CITATION.cff)
cff-version: 1.1.0 message: "Please cite the following works when using this software: https://ui.adsabs.harvard.edu/abs/2022ascl.soft09019V" authors: - family-names: van der Sluys given-names: Marc - family-names: van Kan given-names: Paul - family-names: Reintjes given-names: Jurgen title: "SolTrack: Compute the position of the Sun in topocentric coordinates" version: 2.2 date-released: 2017-09-09 identifiers: - type: "ascl-id" value: "2209.019" - type: "bibcode" value: "2022ascl.soft09019V" abstract: "SolTrack computes the position of the Sun, the rise and set times and azimuths, and transit times and altitudes. It includes corrections for aberration and parallax, and has a simple routine to correct for atmospheric refraction, taking into account local atmospheric conditions. SolTrack is derived from the Fortran library libTheSky (ascl:2209.018) and has versions in C(++), Arduino Scratch and Python. The package can be used to track the Sun on a low-specs machine, such as a microcontroller or PLC, and can be used for (highly) concentrated (photovoltaic) solar power or accurate solar-energy modeling."
GitHub Events
Total
Last Year
Dependencies
- dataclasses *
- numpy *