For all calculations, the coordinates of sun for the given date is calculated.The distance of the sun to the earth is long enough that the geocentric coordinates of sun gives good results.

**Dhuhr (Noon): **Dhuhr or zawal is the time that the sun reaches its highest altitude. This time is a
little bit different from the time that the sun passes the meridian. At this time any vertical object may
have a shadow. The length of shadow also should be calculate for finding Asr time.

**Asr: **Is the time that the length of the object’s shadow is equal to the length of the object plus
specific amount that for majority of schools, this amount is equal to the object’s shadow length at Dhuhr
and for Hanafi school is equal to twice of the object’s shadow length at Dhuhr.

**Sunrise and Sunset: **The astronomical definition of sunrise and sunset is the time that the upper limb
of the sun (apparent sun) is at the horizon. Because of the refraction of the atmosphere the sun can be seen
when its center is about 0.866 degrees below horizon. Since the atmospheric refraction depends on air
temperature and air pressure, we cannot predict these times very accurately and the predicted time can be
within the couple of minutes of the actual sunrise or sunset. Also in many calculation the effect of the
elevation of the place is ignored. In reality we should take into account this effect but currently the
effect of elevation is not included in the calculations.

**Fajr, Maghrib and Isha: **These time is related to the astronomical term of “twilight”.In astronomy
twilight is the time that the center of the sun is some specific value under the horizon. This value is 6
degrees for civil twilight, 12 degrees for nautical twilight and 18 degrees for astronomical twilight. For
calculation of Fajr this angle is something between 19.5 degrees to 15 degrees according to the different
schools. For all schools except Shia schoold, Aaghrib is the same as sunset. And for Shia school it is about
4.3 degrees. Again for Isha, according to different schools this angle may be 14 to 18 degrees. For Umm
al-Qura University, the time between Isha and sunset is fixed and is 2 hours in Ramadhan and is 1.5 hours
for the other months.