batoulapps / adhan-js

High precision Islamic prayer time library for JavaScript
MIT License
388 stars 87 forks source link

Question: Generating calculation methods based of data #41

Closed khawarizmus closed 3 years ago

khawarizmus commented 3 years ago

is it possible to generate a calculation method parameters based on publicly available data? basically, reverse engineer that process?

sgtsquiggs commented 3 years ago

We tried this - there's too many parameters / personal preferences to get this right. You'd end up creating a massive location + other params -> method database to make it work.

Best you can do is suggest based on location, but that's still iffy at best.

z3bi commented 3 years ago

@gimyboya it might be possible to make a tool that iterated through a number of parameters to help identify what params a specific set of prayer times might be using. Ultimately it could only be a first step though as it would really need to be manually verified first, but it might be a nice option to have.

If you look at the logging we have in the Swift version of the library when running the tests against the json timetables https://github.com/batoulapps/adhan-swift/blob/master/Tests/TimeTests.swift there are a number of values it calculates that helps us try and narrow in on a specific set of parameters when implementing a new calculation method.

If this is something you would be interested in starting, I think we could definitely turn it into something useful.

khawarizmus commented 3 years ago

@sgtsquiggs @z3bi thank you for your answers. I think it's definitely something worth exploring. I will try to dig into it when I have more time.

github-actions[bot] commented 3 years ago

Stale issue message