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

Negative longitude reported as E instead of W. #5

Open
Jerry2840 opened this issue Jun 16, 2019 · 2 comments
Open

Negative longitude reported as E instead of W. #5

Jerry2840 opened this issue Jun 16, 2019 · 2 comments

Comments

@Jerry2840
Copy link

Jerry2840 commented Jun 16, 2019

sunriset.c
Has:
/* Note: Eastern longitude positive, Western longitude negative */

I changed sunwait.h to my location:
//#define DEFAULT_LATITUDE 52.952308
//#define DEFAULT_LONGITUDE 359.048052 /* The Buttercross, Bingham, England /
#define DEFAULT_LATITUDE 40.767218
#define DEFAULT_LONGITUDE -111.902899 /
Salt Lake City, Utah */

It looks like the times are right, but is says E instead of W.
I am not sure what is setting the E or W in the code.

# ./sunwait report

  Current Date and Time: 15-Jun-2019 21:23 MDT

Target Information ...

               Location:  40.767218N, -111.902899E
                   Date: 15-Jun-2019
               Timezone: MDT

Sun directly north/south: 13:27
Twilight angle: -0.83 degrees (daylight)
Day with twilight: 05:54 to 21:01
It is: Night

@eucratic
Copy link

Note: the 'N' and 'E' are hard coded in print.cpp (bug). I deleted those letters in mine, before compilation, without effecting additional functionality.

@DougieLawson
Copy link

Interestingly The Butter Cross Public House is at 52.9526528,-0.9538435 (from Google Maps) which the default has as 360-0.9538435=‭359.0461565‬ so it's using positive values for West by going full circle.

So your longitude of -111.902899 would be ‭248.097101‬ (which is a bit quirky) but avoids using negative numbers.

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