Calculating Daylight hours by latitude is essential for properly sizing a battery box and solar panel. There are several other factors that play significant roles in calculating power needed, however, it was difficult to find a simple formula for calculating daylight hours by latitude. The c# code is provided by SCADACore.
Here are several wikipedia pages available (http://en.wikipedia.org/wiki/Day_length), an additional page linked by wikipedia provides in depth calculations (http://herbert.gandraxa.com/length_of_day.xml)
A formula provided by a user of Mathforum.org provides the simplest formula for calculating day length (http://mathforum.org/library/drmath/view/56478.html).
The corresponding C# code is as follows:
With this calculation users can retrieve the data number of hours for a specific latitude.
SCADACore provides the Solar Panel Sizing field application to help field users properly size their SCADA solar battery boxes for specific climates. The following calculator from http://astro.unl.edu/ is useful in determining the number of daylight hours based on your location.