batoulapps / adhan-kotlin

High precision Islamic prayer time library for Java
MIT License
148 stars 46 forks source link

Issues with fixed angles for calculating Fajr & Isha in places at high latitudes #25

Open moosalim opened 3 years ago

moosalim commented 3 years ago

What do you think of this article that says fixed degree around the year is not correct in places with high latitudes and low latitudes. see the link below:

https://www.moonsighting.com/how-we.html

z3bi commented 3 years ago

This is why we offer the "moonsighting committee" calculation method. It is up to the developer to use this method for the appropriate location.

moosalim commented 3 years ago

Thanks for the clarification. but I have two question please:

z3bi commented 3 years ago

@moosalim the high latitude rule puts in a limiting factor so that during the extremes of summer there is a max time for isha and minimum time for fajr. This is to provide reasonable prayer times that are not a burden. For adjusting the degrees specifically thats not something that is done, however the "moonsighting committee" method has seasonal adjustment values that effectively change how fajr and isha are calculated in summer vs winter.

For your second point, yes we can. We added one to the swift library so we should add one here too.

moosalim commented 3 years ago

@z3bi Thanks for the clarifications. That means, if I wanted to follow moonsighting committee, i need to do seasonal adjustments progromaticaly by my self. Do you have these values of seasonal adjustments? do you know where form I get them?

z3bi commented 3 years ago

@moosalim you do not need to provide them yourself, that method automatically makes adjustments based on the season. All you need to do is calculate times using that method.

tanweermaniyar commented 3 years ago

@z3bi , my app is live which has been using your Java library for 7 months. Recently, at my place (latitude 51.0 degrees), I am facing a couple of issues with the setup below 1) Salat calculation method selected : - anyone supported, except for Moon Sighting Committee 2) High Latitude methods selected : None, and Middle of the night

Issues: 1) I find fajr of next day starts one minute earlier than start of Isha time tonight. So, e.g. today, Isha started at 12:59am, and Fajr tomorrow is at 12:58am, which is a minute earlier than Isha started. 2) This is slightly unrelated; but it appears to me that Qiyaam method with 'Middle of the night' is actually taking a mid point between sunset and start of next Fajr, however, while calculating the Isha & fajr using High Latitude Middle of the night method, library is picking up mid point between sunset and next sunrise. Is this correct? 3) Last is just a query; if I have to enable 'High Latitude' at app first launch by default, could you please suggest which latitude shall I start doing it at - some sites have said anything above 46 but less than 66 degrees. Could you advise also if that must be done for southern hemisphere too - i.e. negative latitudes?

Thanks in advance , and sorry if questions above are too lengthy.