-
Notifications
You must be signed in to change notification settings - Fork 9
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
Shabbat times API accept decimal format coordinates #12
Comments
This shouldn't be too difficult. Thanks for suggesting it. We will try to Sent from my mobile device
|
Easier than I thought. Just deployed 818b429 to hebcal.com. Give it a whirl and let me know what you find? Note that in addition to lat/long, you'll also have to specify appropriate timezone identifier such as |
Works great! Thanks @mjradwin! |
The Shabbat times API only accepts cartesian style coordinates at the moment.
Typically, coordinates are obtained from devices in a decimal format, which look like this:
latitude: 31.7684025, longitude: 35.2132987
However, the API only accepts coordinates in radians, which looks like this:
31.44º N, 35.12º E
It is possible to convert decimal to radians with a fairly simple formula:
radians = decimal / π * 180
But unfortunately, this isn't very accurate due to the fact that the earth isn't exactly spherical.
It would be much easier if I could pass in a latitude in decimal format, e.g.:
?cfg=json&m=50&geo=pos&latitude= 31.7684025 &longitude= 35.2132987
Would this be difficult?
The text was updated successfully, but these errors were encountered: