Shadow length Implimentation

Can someone help implement above algorithm

http://www.mysolarpannels.com/optimum-angle-for-solar-panels/. Here how to calculate the shadow length

x- modules length=1200mm
?-modules angle varies with time of day. Initially i calculated for single tracker unit.
usually spacing between the tracker or panel is 3200 mm

How to calculate ?-solar radiation angle here.Once shadow length determined .

if backtrack_active
     if shadow length<=Lmin
            back_trackangle=?-solar radiation angle; it should be +45 degree and -45 degree format
     else
           back_trackangle=desired_Angle;

NOAA_Solar_Calculations_day.xls (281 KB)