Skip to content

pvl_singleaxis produces NaN surface tilt angles near solar noon #17

Description

@DanRiley

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions