MATLAB_PV_LIB
MATLAB_PV_LIB copied to clipboard
pvl_singleaxis produces NaN surface tilt angles near solar noon
trafficstars
pvl_singleaxis can produce NaN results for the surface tilt angle when the tilt is 0. Error stems from the following line: SurfTilt = 90 - acosd(dividend./divisor);
When divisor is 0, the division by 0 produces NaN.
Possible fixes could be setting divisor to a very small number (eps) when it is 0, or simply setting SurfTilt to 0 any time that divisor is 0.