| Crates.io | spa_sra |
| lib.rs | spa_sra |
| version | 0.3.3 |
| created_at | 2025-08-14 12:08:58.246315+00 |
| updated_at | 2025-11-09 13:32:07.480656+00 |
| description | Solar Position Algorithm for Solar Radiation Applications |
| homepage | https://github.com/gostonefire/spa_sra |
| repository | https://github.com/gostonefire/spa_sra |
| max_upload_size | |
| id | 1794782 |
| size | 1,393,471 |
The SPA_SRA (Solar Position Algorithm for Solar Radiation Applications) calculates the solar zenith and azimuth angles in the period from the year -2000 to 6000, with uncertainties of +/- 0.0003 degrees based on the date, time, and location on Earth. (Reference: Reda, I.; Andreas, A., Solar Position Algorithm for Solar Radiation Applications, Solar Energy. Vol. 76(5), 2004; pp. 577-589).
It can also calculate the surface incidence angle for e.g. a solar panel. The surface incidence angle is the angle between an incoming ray (like light or radar) and a line perpendicular to the surface at the point where the ray hits.
Further information on this algorithm is available in the following NREL technical report (pdf): Reda, I.; Andreas, A. (2003). Solar Position Algorithm for Solar Radiation Applications. 55 pp.; NREL Report No. TP-560-34302, Revised January 2008.
SPA_SRA is a port with rust specific adjustments from the original C-code prepared by employees of the Alliance for Sustainable Energy, LLC. Hence, the MIT license comes with an acknowledgement and disclaimer related to that original code. For personal use it should be fine though.