Joe said: > I'm working on a solar tracker and would like to calculate the sunrise/sunset position. The aim is to use a PIC controlling a pair of steppers and gear trains One algorithm frequently cited is this one http://williams.best.vwh.net/sunrise_sunset_algorithm.htm /> __________ I have a friend who is highly expert in this - he may be willing to comment Peripheral thoughts Do you want to do this? eg - will your panel rotate past +/- 90 degrees as it needs to d for full tracking? When the sun is very low, are you better off pointing the panels at it through the local hills, trees, houses etc (no) or would you get slightly better results by pointing it at some sky location that has at least a glimmer of light in it (yes, but there will still be very little energy). See eg http://www.gaisma.com/en/location/auckland.html for eg in mid summer the sum is behind a north facing observer before 0930 and after 1700 The sun is above the horizon from about 0558? to 2039 at that time. You wont get much energy from 0558 to 0930 or for 1700 to 2039 - but you'll probably get more from the sky than eg from a row of houses. Russell McMahon --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .