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

Western Hemisphere, Not By Default #6

Open
eucratic opened this issue Jun 18, 2019 · 1 comment
Open

Western Hemisphere, Not By Default #6

eucratic opened this issue Jun 18, 2019 · 1 comment

Comments

@eucratic
Copy link

On CentOS 7, the compiler strips the negative sign (-77 degrees) from the define directive DEFAULT_LONGITUDE (sunwait.h), eliminating the possibility of referencing the western hemisphere by default. It probably happens for the southern hemisphere. Furthermore, the large positive version (282 degrees) is converted into the eastern equivalent of the small angle. I have a work around for this bug.

I replaced DEFAULT_LONGITUDE in the two uses with the negative decimal angle, allowing 'sunwait report' to run accurately without feeding the coordinates every time. This work around doesn't seem to have an effect on other functionality.

I like sunwait. I'll use it to feed dunst and i3blocks with fun information.

Thanks :-)

@danieldjewell
Copy link
Contributor

It seems like the best option might be for an environment variable? (I wonder if gpsd sets any by default... if so, using that would be easy - and then one could set that same variable if you're not running gpsd.)

Using a hard-coded default is great for demo purposes but it also means that your binaries are very specific to 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

2 participants