//https://www.ncdc.noaa.gov/gridsat/docs/Angle_Calculations.pdf public double[] getZenithAndAzimuth2(DateTime time, double longitude, double latitude, double timezone) { double hourAngle = -(getLocalHour(time) - 12 / 12); //Are the units correct? Degrees or radians?! double solarDeclinationAngle = -23.45 * Math.Cos(MathD.DegreeToRadian(2 * Math.PI * time.DayOfYear / 365 + 20 * Math.PI / 365)); double[] answer = new double[2]; // answer[0] = MathD.RadianToDegree(sza); //answer[1] = MathD.RadianToDegree(saa) % 360; return(answer); }