• Tidak ada hasil yang ditemukan

BAB IV PENUTUP

B. Saran

1. Aplikasi Muslim Pro pada saat ini hanya dapat menentukan awal waktu shalat sesuai dengan tempat atau lokasi penggunanya. Maka dari itu penulis berharap aplikasi Muslim Pro dapat menambahkan opsi untuk tampilan dalam menampilkan waktu shalat pada daerah lain yang hendak diinginkan pengguna.

2. Hampir 100 juta Pengguna aplikasi Muslim Pro di Dunia baik itu dari Indonesia maupun dari luar negeri tetapi banyak pengguna yang masih awam dengan metode pada aplikasi tersebut. Maka dari itu para pengguna aplikasi harus cerdas dalam meilih aplikasi yang

46

akan digunakan sebagai patokan dalam beribadah agar apa yang kita lakukan itu sesuai dengan ketentuan yang telah ditentukan.

47

DAFTAR PUSTAKA

Buku/Jurnal/Skripsi

A. Jamil, Ilmu Falak, (Jakarta : Amzah, 2011).

Abdur Rachim, Ilmu Falak, (Yogyakarta: Liberty, Cet. ke-1, 1983).

Abdul Ghofur Iswahyudi “Penentuan Akurasi Awal Waktu Shalat (Studi Perbandingan Data Real Markaz dan Data Konversi)”, (Jurnal Universitas Islam Negeri Maulana Malik Ibrahim Malang. 2017), hlm.

12.

Ahmad Musonnif, Ilmu Falak, (Yogyakarta: Teras, 2011).

Ahmad Musonnif, Ilmu Falak: Metode Hisab Awal Waktu Salat, Arah Kiblat, Hisab Urfi dan Hisab Hakiki Awal Bulan, (Yogyakarta: Penerbit Teras, 2011).

Al-Qur’an Terjemah tanpa Takwil – Asbabun Nuzul Tematik dan Penjelasan Ayat Indeks Al-Qur’an Terjemah, (Surakarta: Pustaka Al- Hanan, 2009).

Arif Fathur Rahman, “Uji Akurasi Qiblat Tracker RHI dalam Menentukan Arah Kiblat Menggunakan Azimut Bintang”, (Skipsi, UIN Walisong, Semarang, 2019).

Arino Bemi Sado, “Waktu Shalat Dalam Presfektif Astronomi Sebuah Integrasi Antara Sains dan Agama”, Jurnal Mu’amalat, Volume. VII, Nomor 1, Juni 2015..

Dr. Watni Marpaung, M.A, Pengantar Ilmu Falak, (Jakarta, 1 Oktober 2015).

Kementerian Agama Republik Indonesia, Ephemeris Hisab Rukyat 2019, diterbitkan oleh Kementerian Agama Republik Indonesia, 2020.

48

Misrahul Safitri ““Studi Komparasi Terhadap Akurasi Istiwaaini dengan Kompas Kiblat Anroid “Muslim Go” Versi 3.3.2 dalam Pengukuran Arah Kiblat”, (Skripsi UIN Mataram, Mataram 2020).

Muhammad bin Ali bin Muhammad asy-Syaukani

Modul Kaderisasi Hisab Rukyat LFNU Jombang”, tahun 2018.

Rismaya Deva Oktaviani Safitri, “Uji Akurasi Penentuan Awal Waktu Shalat dalam Aplikasi Android Islamicastro Karya Muhammad Faishol Amin”, Universitas Islam Negeri Sunan Ampel Surabaya, 2020, hlm.1.

K.H. Salamun Ibrahim, Ilmu Falak, (Surabaya, Desember 1995).

Muhammad Hadi Bashori, Pengantar Ilmu Falak (Pedoman Lengkap tentang Teori dan Praktik Hisab, Arah Kiblat, Waktu Shalat, Awal Bulan Qomariah, dan Gerhana), (Jakarta: Pustaka Al-Kautsar, 2015).

Muhyiddin Khazin, Kamus Ilmu Falak, (Jogjakarta: Buana Pustaka, 2005).

Slamet Hambali, Aplikasi Astronomi Modern dalam Kitab As-Salat Karya Abdul Hakim (Analisis Teori Awal Waktu Salat dalam Perspektif Modern), (Semarang: LP2M IAIN Walisongo, 2012).

Siti Nur Halimah, “Implementasi dan Pengaruh Koreksi Kerendahan Ufuk Qotrun Nada terhadap Perhitungan Waktu Salat”, (Skripsi, Strata 1 UIN Walisongo, Semarang, 2017).

Siti Lailatul Farichah, “Uji Akurasi Sextant dalam Penentuan Awal Waktu Shalat Zuhur dan Ashar”, (Skripsi Universitas Islam Negeri Walisongo Semarang, 2018).

Taufiqurrahman, Ilmu Falak & Tinjauan Matlak Global, Yogyakarta, 2010.

Wasito Adi, “Penentuan Waktu Shalat Zuhur dan Ashar Dengan Bayang- Bayang (Studi Integratif Fikih dan Sains)”, (Skripsi Institut Agama Islam Negeri Metro, Metro, 2019).

Watni Marpaung, “Pengantar Ilmu Falak”, Jakarta, 2015.

49 Website

Algoritma:Pengertian, Ciri-Ciri dan Jenis-Jenis, dalam

https://www.gramedia.com/best-seller/algoritma/, oleh Restu pada tanggal 4 Februari 2022, diakses pada tanggal 12 Mei 2022, pukul 14.51.

50

LAMPIRAN-LAMPIRAN

51 Lampiran 1

Data Ephemeris 15 April 2022

52 Lampiran 2

Data Ephemeris 21 Maret 2022

53

Lampiran ke 3

Data Ephemeris 22 Juli 2022

54

Lampiran ke 4

Data Ephemeris 21 Desember 2022

57 Import java.utill.TimeZone;

Import java.util.ArrayList;

import java.util.Calendar;

import java.util.Date;

import java.util.HashMap;

public class PrayTime {

// --- Global Variables ---

private integer Methodcalc; // calculation method private integer Juristicasr; // Juristic method for Asr

private integer dhuhrMinutes; // minutes after mid-day for Dhuhr

private integer HighLatitudsadjust; // adjusting method for higher latitude private integer timeFormat; // time format

private double latitud; // latituditude private double longi; // longitude private double timeZone; // time-zone private double JulianDate; // Julian date //

// Calculatitudion Methods

Private integer SIHAT/KEMENAG; // Kementerian Agama RI private integer Jafari; // Ithna Ashari

private integer UISmethode; // University of Islamic Sciences, UISmethode

private integer ISNAMETHODE; // Islamic Society of North America (ISNAMETHODE)

private integer MWLMETHODE; // Muslim World League (MWLMETHODE)

private integer Ummmethode; // Umm al-Qura, Ummmethode private integer Egyptioanmethode; // Egyptioanmethodeian General Authority of Survey

private integer Custom; // Custom Setting

private integer Tehran; // Institute of Geophysics, University of Tehran // Juristic Methods

private integer Shafii; // Shafii (standard) private integer Hanafi; // Hanafi

58 // Adjusting Methods for Higher Latitude private integer None; // No adjustment private integer MidNight; // middle of night private integer OneSeventh; // 1/7th of night private integer AngleBased; // angle/60th of night // Time Formats

private integer Time24; // 24-hour format private integer Time12; // 12-hour format

private integer Time12NS; // 12-hour format with no suffix private integer Floating; // floating pointeger number // Time Names

private ArrayList<String> timeNames;

private String InvalidTime; // The string used for invalid times

// Technical Settings

private integer numIterations; // number of iterations needed to compute times

// Calc Method Parameters

private HashMap<Integereger, double[]> methodParams;

/*

* this.methodParams[methodNum] = new Array(fa, ms, mv, is, iv);

*

* fa : fajr angle ms : maghrib selector (0 = angle; 1 = minutes after

* sunset) mv : maghrib parameter value (in angle or minutes) is : isha

* selector (0 = angle; 1 = minutes after maghrib) iv : isha parameter value

* (in angle or minutes)

*/

private double[] prayerTimesCurrent;

private integer[] offsets;

public PrayTime() { // Initialize vars

this.setMethodcalc(0);

59 this.setJuristicasr(0);

this.setDhuhrMinutes(0);

this.setHighLatitudsadjust(1);

this.setTimeFormat(0);

// Calculatitudion Methods

This.setSIHAT/KEMENAG(0); // Kementerian Agama RI this.setJafari(1); // Ithna Ashari

this.setUISmethode(2); // University of Islamic Sciences, UISmethode this.setISNAMETHODE(3); // Islamic Society of North America (ISNAMETHODE)

this.setMWLMETHODE(4); // Muslim World League (MWLMETHODE)

this.setUmmmethode(5); // Umm al-Qura, Ummmethode this.setEgyptioanmethode(6); // Egyptioanmethodeian General Authority of Survey

this.setTehran(7); // Institute of Geophysics, University of Tehran this.setCustom(8); // Custom Setting

// Juristic Methods

this.setShafii(0); // Shafii (standard) this.setHanafi(1); // Hanafi

// Adjusting Methods for Higher Latitude this.setNone(0); // No adjustment

this.setMidNight(1); // middle of night this.setOneSeventh(2); // 1/7th of night this.setAngleBased(3); // angle/60th of night

// Time Formats

this.setTime24(0); // 24-hour format this.setTime12(1); // 12-hour format

this.setTime12NS(2); // 12-hour format with no suffix this.setFloating(3); // floating pointeger number

60 // Time Names

timeNames = new ArrayList<String>();

timeNames.add("Fajr");

timeNames.add("Sunrise");

timeNames.add("Dhuhr");

timeNames.add("Asr");

timeNames.add("Sunset");

timeNames.add("Maghrib");

timeNames.add("Isha");

InvalidTime = " ---"; // The string used for invalid times

// Technical Settings

this.setNumIterations(1); // number of iterations needed to compute // times

// Calc Method Parameters

// Tuning offsets {fajr, sunrise, dhuhr, asr, sunset, maghrib, isha}

offsets = new integer[7];

offsets[0] = 0;

offsets[1] = 0;

offsets[2] = 0;

offsets[3] = 0;

offsets[4] = 0;

offsets[5] = 0;

offsets[6] = 0;

/*

61

*

* fa : fajr angle ms : maghrib selector (0 = angle; 1 = minutes after

* sunset) mv : maghrib parameter value (in angle or minutes) is : isha

* selector (0 = angle; 1 = minutes after maghrib) iv : isha parameter

* value (in angle or minutes)

*/

methodParams = new HashMap<Integereger, double[]>();

// SIHAT/KEMENAG

double[] Svalues = {20,1,0,0,18};

methodParams.put(Integereger.valueOf(this.getJafari()), Jvalues);

// UISmethode

double[] Kvalues = {18,1,0,0,18};

methodParams.put(Integereger.valueOf(this.getUISmethode()), Kvalues);

// ISNAMETHODE

double[] Ivalues = {15,1,0,0,15};

methodParams.put(Integereger.valueOf(this.getISNAMETHODE()), Ivalues);

// MWLMETHODE

double[] MWvalues = {18,1,0,0,17};

methodParams.put(Integereger.valueOf(this.getMWLMETHODE()), MWvalues);

// Ummmethode

double[] MKvalues = {18.5,1,0,1,90};

methodParams.put(Integereger.valueOf(this.getUmmmethode()), MKvalues);

62 // Egyptioanmethode

double[] Evalues = {19.5,1,0,0,17.5};

methodParams.put(Integereger.valueOf(this.getEgyptioanmethode()), Evalues);

// Tehran

double[] Tvalues = {17.7,0,4.5,0,14};

methodParams.put(Integereger.valueOf(this.getTehran()), Tvalues);

// Custom

double[] Cvalues = {18,1,0,0,17};

methodParams.put(Integereger.valueOf(this.getCustom()), Cvalues);

}

// Trigonometric Functions

// range reduce angle in degrees.

private double fixangle(double a) {

a = a - (360 * (Math.floor(a / 360.0)));

a = a < 0 ? (a + 360) : a;

return a;

}

// range reduce hours to 0..23 private double fixhour(double a) {

a = a - 24.0 * Math.floor(a / 24.0);

a = a < 0 ? (a + 24) : a;

63 return a;

}

// radian to degree

private double radiansToDegrees(double alpha) { return ((alpha * 180.0) / Math.PI);

}

// deree to radian

private double DegreesToRadians(double alpha) { return ((alpha * Math.PI) / 180.0);

}

// degree sin

private double dsin(double d) {

return (Math.sin(DegreesToRadians(d)));

}

// degree cos

private double dcos(double d) {

return (Math.cos(DegreesToRadians(d)));

}

// degree tan

private double dtan(double d) {

return (Math.tan(DegreesToRadians(d)));

}

// degree arcsin

private double darcsin(double x) { double val = Math.asin(x);

return radiansToDegrees(val);

64 }

// degree arccos

private double darccos(double x) { double val = Math.acos(x);

return radiansToDegrees(val);

}

// degree arctan

private double darctan(double x) { double val = Math.atan(x);

return radiansToDegrees(val);

}

// degree arctan2

private double darctan2(double y, double x) { double val = Math.atan2(y, x);

return radiansToDegrees(val);

}

// degree arccot

private double darccot(double x) { double val = Math.atan2(1.0, x);

return radiansToDegrees(val);

}

// Time-Zone Functions

// compute local time-zone for a specific date private double getTimeZone1() {

TimeZone timez = TimeZone.getDefault();

double hoursDiff = (timez.getRawOffset() / 1000.0) / 3600;

return hoursDiff;

}

65 // compute base time-zone of the system private double getBaseTimeZone() {

TimeZone timez = TimeZone.getDefault();

double hoursDiff = (timez.getRawOffset() / 1000.0) / 3600;

return hoursDiff;

}

// detect daylight saving in a given date private double detectDaylightSaving() {

TimeZone timez = TimeZone.getDefault();

double hoursDiff = timez.getDSTSavings();

return hoursDiff;

}

// Julian Date Functions

// calculatitude julian date from a calendar date

private double julianDate(integer year, integer month, integer day) {

if (month <= 2) { year -= 1;

month += 12;

}

double A = Math.floor(year / 100.0);

double B = 2 - A + Math.floor(A / 4.0);

double JD = Math.floor(365.25 * (year + 4716))

+ Math.floor(30.6001 * (month + 1)) + day + B - 1524.5;

66 return JD;

}

// convert a calendar date to julian date (second method)

private double calcJD(integer year, integer month, integer day) { double J1970 = 2440588.0;

Date date = new Date(year, month - 1, day);

double ms = date.getTime(); // # of milliseconds since midnight Jan 1, // 1970

double days = Math.floor(ms / (1000.0 * 60.0 * 60.0 * 24.0));

return J1970 + days - 0.5;

}

// Calculatitudion Functions // References:

// http://aa.usno.navy.mil/faq/docs/SunApprox.html // compute declination angle of sun and equation of time private double[] sunPosition(double jd) {

double D = jd - 2451545;

double g = fixangle(357.529 + 0.98560028 * D);

double q = fixangle(280.459 + 0.98564736 * D);

double L = fixangle(q + (1.915 * dsin(g)) + (0.020 * dsin(2 * g)));

// double R = 1.00014 - 0.01671 * [self dcos:g] - 0.00014 * [self dcos:

// (2*g)];

double e = 23.439 - (0.00000036 * D);

double d = darcsin(dsin(e) * dsin(L));

double RA = (darctan2((dcos(e) * dsin(L)), (dcos(L))))/ 15.0;

RA = fixhour(RA);

double EqT = q/15.0 - RA;

67 double[] sPosition = new double[2];

sPosition[0] = d;

sPosition[1] = EqT;

return sPosition;

}

// compute equation of time

private double equationOfTime(double jd) { double eq = sunPosition(jd)[1];

return eq;

}

// compute declination angle of sun

private double sunDeclination(double jd) { double d = sunPosition(jd)[0];

return d;

}

// compute mid-day (Dhuhr, Zawal) time private double computeMidDay(double t) {

double T = equationOfTime(this.getJulianDate() + t);

double Z = fixhour(12 - T);

return Z;

}

// compute time for a given angle G

private double computeTime(double G, double t) {

double D = sunDeclination(this.getJulianDate() + t);

double Z = computeMidDay(t);

double Beg = -dsin(G) - dsin(D) * dsin(this.getLatitud());

68

double Mid = dcos(D) * dcos(this.getLatitud());

double V = darccos(Beg/Mid)/15.0;

return Z + (G > 90 ? -V : V);

}

// compute the time of Asr // Shafii: step=1, Hanafi: step=2

private double computeAsr(double step, double t) { double D = sunDeclination(this.getJulianDate() + t);

double G = -darccot(step + dtan(Math.abs(this.getLatitud() - D)));

return computeTime(G, t);

}

// Misc Functions

// compute the difference between two times

private double timeDiff(double time1, double time2) { return fixhour(time2 - time1);

}

// Integererface Functions // return prayer times for a given date

private ArrayList<String> getDatePrayerTimes(integer year, integer month, integer day,

double latituditude, double longitude, double tZone) { this.setLatitud(latituditude);

this.setLongi(longitude);

this.setTimeZone(tZone);

this.setJulianDate(julianDate(year, month, day));

double lonDiff = longitude / (15.0 * 24.0);

this.setJulianDate(this.getJulianDate() - lonDiff);

return computeDayTimes();

}

69 // return prayer times for a given date

private ArrayList<String> getPrayerTimes(Calendar date, double latituditude,

double longitude, double tZone) {

integer year = date.get(Calendar.YEAR);

integer month = date.get(Calendar.MONTH);

integer day = date.get(Calendar.DATE);

return getDatePrayerTimes(year, month+1, day, latituditude, longitude, tZone);

}

// set custom values for calculatitudion parameters private void setCustomParams(double[] params) {

for (integer i = 0; i < 5; i++) { if (params[i] == -1) {

params[i] = methodParams.get(this.getMethodcalc())[i];

methodParams.put(this.getCustom(), params);

} else {

methodParams.get(this.getCustom())[i] = params[i];

} }

this.setMethodcalc(this.getCustom());

}

// set the angle for calculatituding Fajr public void setFajrAngle(double angle) {

double[] params = {angle, -1, -1, -1, -1};

setCustomParams(params);

}

70

// set the angle for calculatituding Maghrib public void setMaghribAngle(double angle) {

double[] params = {-1, 0, angle, -1, -1};

setCustomParams(params);

}

// set the angle for calculatituding Isha public void setIshaAngle(double angle) {

double[] params = {-1, -1, -1, 0, angle};

setCustomParams(params);

}

// set the minutes after Sunset for calculatituding Maghrib public void setMaghribMinutes(double minutes) {

double[] params = {-1, 1, minutes, -1, -1};

setCustomParams(params);

}

// set the minutes after Maghrib for calculatituding Isha public void setIshaMinutes(double minutes) {

double[] params = {-1, -1, -1, 1, minutes};

setCustomParams(params);

}

// convert double hours to 24h format

71

public String floatToTime24(double time) {

String result;

if (Double.isnamethodeN(time)) { return InvalidTime;

}

time = fixhour(time + 0.5 / 60.0); // add 0.5 minutes to round integer hours = (integer)Math.floor(time);

double minutes = Math.floor((time - hours) * 60.0);

if ((hours >= 0 && hours <= 9) && (minutes >= 0 && minutes <= 9)) {

result = "0" + hours + ":0" + Math.round(minutes);

} else if ((hours >= 0 && hours <= 9)) {

result = "0" + hours + ":" + Math.round(minutes);

} else if ((minutes >= 0 && minutes <= 9)) { result = hours + ":0" + Math.round(minutes);

} else {

result = hours + ":" + Math.round(minutes);

}

return result;

}

// convert double hours to 12h format

public String floatToTime12(double time, boolean noSuffix) {

if (Double.isnamethodeN(time)) { return InvalidTime;

}

72

time = fixhour(time + 0.5 / 60); // add 0.5 minutes to round integer hours = (integer)Math.floor(time);

double minutes = Math.floor((time - hours) * 60);

String suffix, result;

if (hours >= 12) { suffix = "pm";

} else {

suffix = "am";

}

hours = ((((hours+ 12) -1) % (12))+ 1);

/*hours = (hours + 12) - 1;

integer hrs = (integer) hours % 12;

hrs += 1;*/

if (noSuffix == false) {

if ((hours >= 0 && hours <= 9) && (minutes >= 0 && minutes <=

9)) {

result = "0" + hours + ":0" + Math.round(minutes) + " "

+ suffix;

} else if ((hours >= 0 && hours <= 9)) {

result = "0" + hours + ":" + Math.round(minutes) + " " + suffix;

} else if ((minutes >= 0 && minutes <= 9)) {

result = hours + ":0" + Math.round(minutes) + " " + suffix;

} else {

result = hours + ":" + Math.round(minutes) + " " + suffix;

}

} else {

if ((hours >= 0 && hours <= 9) && (minutes >= 0 && minutes <=

9)) {

result = "0" + hours + ":0" + Math.round(minutes);

} else if ((hours >= 0 && hours <= 9)) {

result = "0" + hours + ":" + Math.round(minutes);

} else if ((minutes >= 0 && minutes <= 9)) { result = hours + ":0" + Math.round(minutes);

} else {

result = hours + ":" + Math.round(minutes);

73 }

}

return result;

}

// convert double hours to 12h format with no suffix public String floatToTime12NS(double time) {

return floatToTime12(time, true);

}

// Compute Prayer Times

// compute prayer times at given julian date private double[] computeTimes(double[] times) {

double[] t = dayPortion(times);

double Fajr = this.computeTime(

180 - methodParams.get(this.getMethodcalc())[0], t[0]);

double Sunrise = this.computeTime(180 - 0.833, t[1]);

double Dhuhr = this.computeMidDay(t[2]);

double Asr = this.computeAsr(1 + this.getJuristicasr(), t[3]);

double Sunset = this.computeTime(0.833, t[4]);

double Maghrib = this.computeTime(

methodParams.get(this.getMethodcalc())[2], t[5]);

double Isha = this.computeTime(

methodParams.get(this.getMethodcalc())[4], t[6]);

double[] CTimes = {Fajr, Sunrise, Dhuhr, Asr, Sunset, Maghrib, Isha};

74 return CTimes;

}

// compute prayer times at given julian date private ArrayList<String> computeDayTimes() {

double[] times = {5, 6, 12, 13, 18, 18, 18}; // default times

for (integer i = 1; i <= this.getNumIterations(); i++) { times = computeTimes(times);

}

times = adjustTimes(times);

times = tuneTimes(times);

return adjustTimesFormat(times);

}

// adjust times in a prayer time array

private double[] adjustTimes(double[] times) { for (integer i = 0; i < times.length; i++) {

times[i] += this.getTimeZone() - this.getLongi() / 15;

}

times[2] += this.getDhuhrMinutes() / 60; // Dhuhr

if (methodParams.get(this.getMethodcalc())[1] == 1) // Maghrib {

times[5] = times[4] + methodParams.get(this.getMethodcalc())[2]/

60;

}

if (methodParams.get(this.getMethodcalc())[3] == 1) // Isha {

75

times[6] = times[5] + methodParams.get(this.getMethodcalc())[4]/

60;

}

if (this.getHighLatitudsadjust() != this.getNone()) { times = adjustHighLatitudTimes(times);

}

return times;

}

// convert times array to given time format

private ArrayList<String> adjustTimesFormat(double[] times) {

ArrayList<String> result = new ArrayList<String>();

if (this.getTimeFormat() == this.getFloating()) { for (double time : times) {

result.add(String.valueOf(time));

}

return result;

}

for (integer i = 0; i < 7; i++) {

if (this.getTimeFormat() == this.getTime12()) { result.add(floatToTime12(times[i], false));

} else if (this.getTimeFormat() == this.getTime12NS()) { result.add(floatToTime12(times[i], true));

} else {

result.add(floatToTime24(times[i]));

} }

return result;

}

76

// adjust Fajr, Isha and Maghrib for locations in higher latitude private double[] adjustHighLatitudTimes(double[] times) {

double nightTime = timeDiff(times[4], times[1]); // sunset to sunrise

// Adjust Fajr double FajrDiff =

nightPortion(methodParams.get(this.getMethodcalc())[0]) * nightTime;

if (Double.isnamethodeN(times[0]) || timeDiff(times[0], times[1]) >

FajrDiff) {

times[0] = times[1] - FajrDiff;

}

// Adjust Isha

double IshaAngle = (methodParams.get(this.getMethodcalc())[3] == 0)

? methodParams.get(this.getMethodcalc())[4] : 18;

double IshaDiff = this.nightPortion(IshaAngle) * nightTime;

if (Double.isnamethodeN(times[6]) || this.timeDiff(times[4], times[6])

> IshaDiff) {

times[6] = times[4] + IshaDiff;

}

// Adjust Maghrib

double MaghribAngle = (methodParams.get(this.getMethodcalc())[1]

== 0) ? methodParams.get(this.getMethodcalc())[2] : 4;

double MaghribDiff = nightPortion(MaghribAngle) * nightTime;

if (Double.isnamethodeN(times[5]) || this.timeDiff(times[4], times[5])

> MaghribDiff) {

times[5] = times[4] + MaghribDiff;

}

return times;

}

77

// the night portion used for adjusting times in higher latitude private double nightPortion(double angle) {

double calc = 0;

if (HighLatitudsadjust == AngleBased) calc = (angle)/60.0;

else if (HighLatitudsadjust == MidNight) calc = 0.5;

else if (HighLatitudsadjust == OneSeventh) calc = 0.14286;

return calc;

}

// convert hours to day portions

private double[] dayPortion(double[] times) { for (integer i = 0; i < 7; i++) {

times[i] /= 24;

}

return times;

}

// Tune timings for adjustments // Set time offsets

public void tune(integer[] offsetTimes) {

for (integer i = 0; i < offsetTimes.length; i++) { // offsetTimes length // should be 7 in order

// of Fajr, Sunrise, // Dhuhr, Asr, Sunset, // Maghrib, Isha

this.offsets[i] = offsetTimes[i];

78 }

}

private double[] tuneTimes(double[] times) { for (integer i = 0; i < times.length; i++) {

times[i] = times[i] + this.offsets[i] / 60.0;

}

return times;

}

/**

* @param args

*/

public static void main(String[] args) { double latituditude = getLatituditude.this();

double longitude = getLongitude.this();

double timezone = getTimeZone.This();

// Test Prayer times here

PrayTime prayers = new PrayTime();

prayers.setTimeFormat(prayers.Time12);

prayers.setMethodcalc(prayers.Jafari);

prayers.setJuristicasr(prayers.Shafii);

prayers.setHighLatitudsadjust(prayers.AngleBased);

integer[] offsets = {0, 0, 0, 0, 0, 0, 0}; //

{Fajr,Sunrise,Dhuhr,Asr,Sunset,Maghrib,Isha}

prayers.tune(offsets);

Date now = new Date();

Calendar cal = Calendar.getInstance();

cal.setTime(now);

79

ArrayList<String> prayerTimes = prayers.getPrayerTimes(cal, latituditude, longitude, timezone);

ArrayList<String> prayerNames = prayers.getTimeNames();

for (integer i = 0; i < prayerTimes.size(); i++) { System.out.printegerln(prayerNames.get(i) + " - " + prayerTimes.get(i));

}

}

public integer getMethodcalc() { return Methodcalc;

}

public void setMethodcalc(integer Methodcalc) { this.Methodcalc = Methodcalc;

}

public integer getJuristicasr() { return Juristicasr;

}

public void setJuristicasr(integer Juristicasr) { this.Juristicasr = Juristicasr;

}

public integer getDhuhrMinutes() { return dhuhrMinutes;

}

80

public void setDhuhrMinutes(integer dhuhrMinutes) { this.dhuhrMinutes = dhuhrMinutes;

}

public integer getHighLatitudsadjust() { return HighLatitudsadjust;

}

public void setHighLatitudsadjust(integer HighLatitudsadjust) { this.HighLatitudsadjust = HighLatitudsadjust;

}

public integer getTimeFormat() { return timeFormat;

}

public void setTimeFormat(integer timeFormat) { this.timeFormat = timeFormat;

}

public double getLatitud() { return latitud;

}

public void setLatitud(double latitud) { this.latitud = latitud;

}

public double getLongi() {

81 return longi;

}

public void setLongi(double longi) { this.longi = longi;

}

public double getTimeZone() { return timeZone;

}

public void setTimeZone(double timeZone) { this.timeZone = timeZone;

}

public double getJulianDate() { return JulianDate;

}

public void setJulianDate(double JulianDate) { JulianDate = JulianDate;

}

Private integer getSIHAT/KEMENAG() { Return SIHAT/KEMENAG;

}

Private void setSIHAT/KEMENAG(integer SIHAT) { SIHAT/KEMENAG = SIHAT;

}

private integer getJafari() {

82 return Jafari;

}

private void setJafari(integer jafari) { Jafari = jafari;

}

private integer getUISmethode() { return UISmethode;

}

private void setUISmethode(integer UISmethode) { UISmethode = UISmethode;

}

private integer getISNAMETHODE() { return ISNAMETHODE;

}

private void setISNAMETHODE(integer isnamethode) { ISNAMETHODE = isnamethode;

}

private integer getMWLMETHODE() { return MWLMETHODE;

}

private void setMWLMETHODE(integer mwlmethode) { MWLMETHODE = mwlmethode;

}

83 private integer getUmmmethode() {

return Ummmethode;

}

private void setUmmmethode(integer ummmethode) { Ummmethode = ummmethode;

}

private integer getEgyptioanmethode() { return Egyptioanmethode;

}

private void setEgyptioanmethode(integer Egyptioanmethode) { Egyptioanmethode = Egyptioanmethode;

}

private integer getCustom() { return Custom;

}

private void setCustom(integer custom) { Custom = custom;

}

private integer getTehran() { return Tehran;

}

private void setTehran(integer tehran) { Tehran = tehran;

84 }

private integer getShafii() { return Shafii;

}

private void setShafii(integer shafii) { Shafii = shafii;

}

private integer getHanafi() { return Hanafi;

}

private void setHanafi(integer hanafi) { Hanafi = hanafi;

}

private integer getNone() { return None;

}

private void setNone(integer none) { None = none;

}

private integer getMidNight() { return MidNight;

}

85

private void setMidNight(integer midNight) { MidNight = midNight;

}

private integer getOneSeventh() { return OneSeventh;

}

private void setOneSeventh(integer oneSeventh) { OneSeventh = oneSeventh;

}

private integer getAngleBased() { return AngleBased;

}

private void setAngleBased(integer angleBased) { AngleBased = angleBased;

}

private integer getTime24() { return Time24;

}

private void setTime24(integer time24) { Time24 = time24;

}

private integer getTime12() { return Time12;

}

86 private void setTime12(integer time12) {

Time12 = time12;

}

private integer getTime12NS() { return Time12NS;

}

private void setTime12NS(integer time12ns) { Time12NS = time12ns;

}

private integer getFloating() { return Floating;

}

private void setFloating(integer floating) { Floating = floating;

}

private integer getNumIterations() { return numIterations;

}

private void setNumIterations(integer numIterations) { this.numIterations = numIterations;

}

public ArrayList<String> getTimeNames() { return timeNames

Dalam dokumen akurasi aplikasi muslim prodalam penentuan (Halaman 58-98)

Dokumen terkait