batoulapps / adhan-swift

High precision Islamic prayer time library for Swift
MIT License
182 stars 42 forks source link

Possible London Unified Prayer Times calculation? #79

Closed basememara closed 1 week ago

basememara commented 1 year ago

East London Mosque recently published how they calculate London Unified Prayer Times:

Do you think this enough info to encapsulate the formula in the library?

z3bi commented 1 year ago

@basememara sorry I lost track of this issue. So my understanding is that East London Mosque prayer times are based on the same calculation method of Moonsighting Committee. Are you observing a large difference when using that method?

basememara commented 1 year ago

Np, I think you will have to give us a webinar on prayer calculations so we can help you more :)

No their calculations aren't Moonsighting but maybe derived from it. Below is an example prayer times for Moonsighting compared to London Unified Times from the same location (London, UK):

Moonsighting London Unified
image image
z3bi commented 1 year ago

In the page you linked they say:

Fajr

This is between daybreak and sunrise. The daybreak time is based on the work of Hizbul Ulama . The sunrise time is taken from Her Majesty’s Nautical Almanac Office , with 3 minutes taken off for safety to allow coverage of the whole M25 region.

In the first link they discuss that the timetable is based off of the Moonsighting Committee calculations but with manual changes they have added due to manual observations in the local area.

Then for sunrise they mention that 3 minutes is added to account for the larger geographical area they are covering.

Both of these things specifically in place to support the concept of a unified timetable where having the exact same times is more beneficial than precision. These are things communities and scholars can decide for a location, but as a software developer is not really possible to account for.

basememara commented 1 year ago

That's what confused me, they say 3 minutes for fajr but you can see it ranges between 3-5 minutes within a month's time. Maybe it's using specific coordinates to calculate Moonsighting from then adding the minutes, but I couldn't find what these coordinates are.

z3bi commented 1 year ago

That's what confused me, they say 3 minutes for fajr but you can see it ranges between 3-5 minutes within a month's time. Maybe it's using specific coordinates to calculate Moonsighting from then adding the minutes, but I couldn't find what these coordinates are.

That would be my guess as well, that they choose a specific set of coordinates to minimize variation. Without knowing those exact coordinates it would be hard to replicate.

ZainAli360 commented 1 year ago

I was searching for Prayer Time Calculations methods and found this link https://aladhan.com/calculation-methods which shows there are 16 calculation methods available but in this framework we are using 10 why ?

basememara commented 1 year ago

@ZainAli360 I don't see London on there, how does this relate?

Anyways to answer your question, any one can put the fair/isha parameters and create their own preset but they should be verified. Baytoul has a relatively stringent verification process with testing against scholar approved sources. With that said, you can add your own presets in your own app that plugs into the Adhan's calculation functions.

ZainAli360 commented 1 year ago

@ZainAli360 I don't see London on there, how does this relate?

Anyways to answer your question, any one can put the fair/isha parameters and create their own preset but they should be verified. Baytoul has a relatively stringent verification process with testing against scholar approved sources. With that said, you can add your own presets in your own app that plugs into the Adhan's calculation functions.

So I did added a method in the CalculateMethod file but I want to add new methods from the view controller is it possible ? I tried to create a method using .other option but unable to set the angles for prayers as they are get only properties. So what if I want to add the methods dynamically not statically is It possible ?