K-Nearest Neighbors for Fast and Accurate Qibla Direction Determination

Determining the correct direction of the Qibla is essential for the validity of prayer, but in areas far from the Kaaba, this can be a challenge. While calculating the Qibla azimuth using latitude and longitude is relatively straightforward, traditional methods for obtaining the Qibla direction, such as those provided by the Muhammadiyah Central Leadership’s Tarjih Center, are time-consuming and require specialized teams. This paper proposes a recommendation system that uses the K-Nearest Neighbors (K-NN) algorithm to provide an efficient and automated solution for determining the Qibla direction. The system leverages the Google Maps API to obtain geographic coordinates and calculates the Qibla azimuth by applying the Euclidean distance formula between latitude and longitude points. The K-NN method is employed to recommend the nearest mosque or prayer room that is aligned with the correct Qibla direction, based on proximity and geographic data. This approach eliminates the need for a dedicated team and significantly reduces the time required for users to find the correct direction. The system's performance was tested through Black Box testing to ensure all features functioned as expected. User acceptance was measured using the System Usability Scale (SUS), resulting in an average score of 76.33, indicating good usability. Additionally, accuracy testing compared the recommended Qibla direction from 28 mosques and prayer rooms with another established system, yielding an accuracy of 78.57%. These results demonstrate that the proposed K-NN-based recommendation system is both effective and efficient for determining the Qibla direction.

Authors

Institutions

Publication Details

Journal
Mobile and Forensics
Published
2025-03-17
DOI
https://doi.org/10.12928/mf.v7i1.12781
Primary Topic
Infrared Target Detection Methodologies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

K-Nearest Neighbors for Fast and Accurate Qibla Direction Determination

Ahmad Azhari, Girindra Sulistiyo Wardoyo
Mobile and Forensics
Infrared Target Detection Methodologies
article

K-Nearest Neighbors for Fast and Accurate Qibla Direction Determination

Ahmad Azhari, Girindra Sulistiyo Wardoyo
article en

Abstract

Determining the correct direction of the Qibla is essential for the validity of prayer, but in areas far from the Kaaba, this can be a challenge. While calculating the Qibla azimuth using latitude and longitude is relatively straightforward, traditional methods for obtaining the Qibla direction, such as those provided by the Muhammadiyah Central Leadership’s Tarjih Center, are time-consuming and require specialized teams. This paper proposes a recommendation system that uses the K-Nearest Neighbors (K-NN) algorithm to provide an efficient and automated solution for determining the Qibla direction. The system leverages the Google Maps API to obtain geographic coordinates and calculates the Qibla azimuth by applying the Euclidean distance formula between latitude and longitude points. The K-NN method is employed to recommend the nearest mosque or prayer room that is aligned with the correct Qibla direction, based on proximity and geographic data. This approach eliminates the need for a dedicated team and significantly reduces the time required for users to find the correct direction. The system's performance was tested through Black Box testing to ensure all features functioned as expected. User acceptance was measured using the System Usability Scale (SUS), resulting in an average score of 76.33, indicating good usability. Additionally, accuracy testing compared the recommended Qibla direction from 28 mosques and prayer rooms with another established system, yielding an accuracy of 78.57%. These results demonstrate that the proposed K-NN-based recommendation system is both effective and efficient for determining the Qibla direction.

Mobile and ForensicsVol. 7(1)
Universitas Ahmad Dahlan (ID)
Openalex Percentile: Top 70%
Infrared Target Detection Methodologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.