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

swapped sign of longitude #1

Open
borje opened this issue Oct 1, 2012 · 2 comments
Open

swapped sign of longitude #1

borje opened this issue Oct 1, 2012 · 2 comments
Assignees

Comments

@borje
Copy link

borje commented Oct 1, 2012

Isn't there a sign error somewhere? The sunrise and sunset is incorrect unless you swap the sign of the longitude.
If you enter the coordinates from your example on (http://www.whatsmygps.com/) you won't end up in Washington...

@cpucycle
Copy link
Owner

You are correct. The code was ported from a c++ version, which was ported from the original java at http://www.esrl.noaa.gov/gmd/grad/solcalc/sunrise.html. That website has a message "Back when this calculator was first created, we decided to use a non-standard definition of longitude and time zone, to make coordinate entry less awkward. So on this page, both longitude and time zone are defined as positive to the west, instead of the international standard of positive to the east of the Prime Meridian." I think I can make it conform to the standard definition of longitude by simply negating longitude at the top of calcSunsetUTC and calcSunriseUTC.

@ghost ghost assigned cpucycle Oct 18, 2012
@dinedal
Copy link

dinedal commented Jan 5, 2016

Any update on this?

dinedal added a commit to dinedal/astrotime that referenced this issue Jan 5, 2016
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

3 participants