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

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

Open
imvenj opened this issue Jan 16, 2018 · 0 comments
Open

Comments

@imvenj
Copy link

imvenj commented Jan 16, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant