A lot of the numbers in the hour angle array are negative, so if you switch to unsigned you would lose that information. The hour angle array does cause some of the error because it is averaged over a period of many years. Ideally, you should have a new array for each year. I experimented with this though, and it didn't seem to make enough of a difference to be worth the trouble.

Most of the error seems to be due to the fact that trig functions are super accurate on the Arduino. For example, if I take these two equations and plug the same numbers into both the Arduino and a computer, I get slightly different answers. Those two equations are the source of most of the error it seems. Unfortunately, I don't think there isn't really any way around them.

altitude = (asin(sin(latitude) * sin(delta) + cos(latitude) * cos(delta) * cos(h)))*180/pi;

azimuth = ((atan2((sin(h)),((cos(h) * sin(latitude)) - tan(delta) * cos(latitude)))) + (northOrSouth*pi/180)) *180/pi;

The hour angle array is the same for every location. It's technically only accurate at Greenwich England, but it is made accurate for your location with this line of code:

h = h + longitude + (timezone * -1 * 15);

You may have already seen this, but I did do some error checking for these calculations.

http://www.cerebralmeltdown.com/2012/06/18/checking-the-output-error-of-the-arduino-sun-position-calculations/Depending on what you are doing, they may be accurate enough.

Hope that helps!

Gabriel