Javascript implementation of NREL solar position algorithm, ported from Pysolar