Closed Cyrillius closed 4 years ago
There is already a similar function:
src/calculation_parameters.c:59
calculation_parameters_t getParameters(calculation_method calculation_method1);
Full body:
calculation_parameters_t getParameters(calculation_method calculation_method1){
calculation_method default_method = OTHER;
switch(calculation_method1){
case MUSLIM_WORLD_LEAGUE:
return new_calculation_parameters3(18.0, 17.0, calculation_method1);
case EGYPTIAN:
return new_calculation_parameters3(20.0, 18.0, calculation_method1);
case KARACHI:
return new_calculation_parameters3(18.0, 18.0, calculation_method1);
case UMM_AL_QURA:
return new_calculation_parameters4(18.5, 90, calculation_method1);
case GULF:
return new_calculation_parameters4(19.5, 90, calculation_method1);
case MOON_SIGHTING_COMMITTEE:
return new_calculation_parameters3(18.0, 18.0, calculation_method1);
case NORTH_AMERICA:
return new_calculation_parameters3(15.0, 15.0, calculation_method1);
case KUWAIT:
return new_calculation_parameters3(18.0, 17.5, calculation_method1);
case QATAR:
return new_calculation_parameters4(18.0, 90, calculation_method1);
case OTHER:
return new_calculation_parameters3(0, 0, calculation_method1);
default:
return new_calculation_parameters3(0, 0, default_method);
}
Is this ok @Cyrillius ?
The implementation respect this guidance. But I still have a problem with the result (already discussed via e-mail) . here is the problem:
Je pense qu'il y a un paramètre différent avec Muslim pro. Ce code:
coordinates_t coordinates = {48.853409, 2.348800};
calculation_method method = OTHER;
calculation_parameters_t calculation_parameters = new_calculation_parameters(12.0, 12.0);
calculation_parameters.highLatitudeRule = TWILIGHT_ANGLE;
time_t calculation_time = resolve_time_2(2017, 11, 5);
prayer_times_t prayer_times = new_prayer_times2(&coordinates, calculation_time, &calculation_parameters);
Renvoie les bons horaires:
Date Fajr Sunrise Dhuhr Asr Maghrib Ishaa
11/05/17 05:33AM 06:44AM 11:35AM 01:58PM 04:24PM 05:35PM
Ce qui correspond aux résultat de muslim pro. Mais si je change le madhab l'horaire de l'Asr change:
coordinates_t coordinates = {48.853409, 2.348800};
calculation_method method = OTHER;
calculation_parameters_t calculation_parameters = new_calculation_parameters(12.0, 12.0);
calculation_parameters.highLatitudeRule = TWILIGHT_ANGLE;
calculation_parameters.madhab = HANAFI;
time_t calculation_time = resolve_time_2(2017, 11, 5);
prayer_times_t prayer_times = new_prayer_times2(&coordinates, calculation_time, &calculation_parameters);
Je trouve exactement comme vous:
Date Fajr Sunrise Dhuhr Asr Maghrib Ishaa
11/05/17 05:33AM 06:44AM 11:35AM 02:37PM 04:24PM 05:35PM
Pourriez vous reteser ?
Oui je fais le test lundi et je vous tiens au courant. Si on utilise l'application payante que je crois que vous possédez le même problème persiste? Ca vient peut-être de Muslim Pro ..
Alors j'ai fait le test et effectivement lorsque le madhab n'est pas configuré à Hanafi j'ai partout quelques minutes de différence. Avez-vous pu tester avec l'application payantede iphone? En tout cas avec ce site le problème persiste: https://www.islamicfinder.org/prayer-times/
Je suppose donc que c'est plutôt un problème de la librairie des prières avec le madhab
J'ai testé avec islamicfinder et c'est le mêm résultat:
Hello! I want to retrieve the paramaters of a corresponding methods. I have done something like this:
But it's incomplete...
I need a method like this:
calculation_parameters_t *calculation_parameters = getParameters(&method);
How can I perform this ?