Sun position
Sun position algorithm
Sun position Documentation
Author
David Hoadley vcrum.nosp@m.ble@.nosp@m.westn.nosp@m.et.c.nosp@m.om.au
Version
0.4.1-0

This program calls two demo routines to calculate the Sun's position. The first (called demo1()) calculates it using the NREL SPA algorithm (see reference), but implemented in rectangular coordinates. The second (called demo2()) runs a loop to repeatedly calculate the position, but using interpolation between two previously calculated positions.

The interpolation will introduce a very small error in position. For the value of 720 minutes supplied to routine skyfast_init(), the maximum error that is introduced is less than 0.075 arcseconds. Given that the NREL-SPA algorithm itself is only accurate to approximately 1 arcsecond, this is pretty good.

This demo shows some of the use of the routines in sky.h and sun.h, and for interpolation, skyfast.h.

Reference:
Reda, Ibrahim and Andreas, Afshin. Solar Position Algorithm for Solar Radiation Applications. National Renewable Energy Laboratory, publication no. NREL/TP-560-34302, June 2003, revised January 2008