Skip to content

Daylight framework crashes app if the location is inside polar ring. #2

Description

@imvenj

Locations inside polar ring, will have polar days (sun never sets) and polar nights (sun never rises).

private func hourAngleOfSunrise(latitude: Float64, solarDeclination: Float64, solarElevation: Float64) throws -> Float64

This function return NAN when sun never rises or sun never sets.

I have made a work around to solve this problem by throw an error from there (and re-throw it along the method chain). I don't have a better solution to handle this situation, so I hope you can look into it.

The workaround I've made was in commit eca031c.

Thank you.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions