/* compute time for a given angle G */ double compute_time(double g, double t) { double d = sun_declination(julian_date + t); double z = compute_mid_day(t); double v = 1.0 / 15.0 * darccos((-dsin(g) - dsin(d) * dsin(latitude)) / (dcos(d) * dcos(latitude))); return z + (g > 90.0 ? - v : v); }
double PrayerTimes::compute_time(double g, double t) { double d = sun_declination(julian_date + t); double z = compute_mid_day(t); double v = 1.0 / 15.0 * TrigHelper::darccos((-TrigHelper::dsin(g) - TrigHelper::dsin(d) * TrigHelper::dsin(latitude)) / (TrigHelper::dcos(d) * TrigHelper::dcos(latitude))); return z + (g > 90.0 ? - v : v); }
/* compute the time of Asr */ double compute_asr(int step, double t) // Shafii: step=1, Hanafi: step=2 { double d = sun_declination(julian_date + t); double g = -darccot(step + dtan(fabs(latitude - d))); return compute_time(g, t); }
double PrayerTimes::compute_asr(int step, double t) // Shafii: step=1, Hanafi: step=2 { double d = sun_declination(julian_date + t); double g = -TrigHelper::darccot(step + TrigHelper::dtan(fabs(latitude - d))); return compute_time(g, t); }