Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pvl_singleaxis produces NaN surface tilt angles near solar noon #17

Open
DanRiley opened this issue Nov 29, 2018 · 0 comments
Open

pvl_singleaxis produces NaN surface tilt angles near solar noon #17

DanRiley opened this issue Nov 29, 2018 · 0 comments
Labels

Comments

@DanRiley
Copy link
Collaborator

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.

@DanRiley DanRiley added the bug label Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant