Solar elevation angle

Dear all,

I am looking for c code that work on Arduino platform which determine sun elevation angle.i tried NREL code but it did nt fit due to double precision floating point.

Is there any other code for it. Else share me the formulas for calculating it. I tried with Helios literary but huge difference on elevation angle. i.e of 2 or 3 deg which is not acceptable.

Find a calculator online, and figure out the angle in 1 week increments. IIRC, the total change is around 20 degrees. You could store the values in 26 bytes, since they are symmetrical around the equinoxes. That should give you resolution around 1 degree. You could multiply the absolute angles by 10, giving you 0 to 25.5 degrees, with .1 degree accuracy. Add a little arithmetic to get the exact angle for your latitude.

http://www.cambridge.org/us/academic/su … th-edition

If doubles don’t work, you can always convert to fixed point math.

Or use a more capable ARM based board.