Solar Geometry 2 (SG2) is the second generation of library for computing the relative position of the sun and the earth. Valid over the time period 1980-2100, the algorithm is 20 times faster than the well-know SPA algorithm, with an accuracy order of approx. 0.005°. Reference article: Blanc P. and L. Wald, The SG2 algorithm for a fast and accurate computation of the position of the sun for multi-decadal time period. Solar Energy 88, 3072-3083, 2012, doi: 10.1016/j.solener.2012.07.018.
Solar Geometry 2 is released under LGPLv3.
We provide wheel binary package that can be installed using pip:
pip install sg2
To compile it see README.linux or README.win.
see help(sg2)
$ python3
>>> import sg2
>>> help(sg2)