Astroislamica: Journal of Islamic Astronomy
Vol. 4 No. 2 (2025): Astroislamica: Journal of Islamic Astronomy (Desember)

Implementasi Perhitungan Arah Kiblat Menggunakan Metode Vincenty dalam Bahasa Pemrograman C++

Muhammad Mundhir (Universitas Islam Negeri Walisongo Semarang)



Article Info

Publish Date
31 Dec 2025

Abstract

Determining the direction of the Qibla is an important aspect of Islamic worship practices. To accurately determine the Qibla direction, geodesic calculations that take into account the Earth's ellipsoidal shape are required. The Vincenty method, designed to calculate the distance and azimuth between two points on the surface of an ellipsoid, is a suitable choice for this calculation. This research aims to implement the Qibla direction calculation using the Vincenty method in the C++ programming language. The C++ programming language was chosen because it is a strongly-typed and flexible programming language, widely used for software development, IoT systems, computer systems, and robotic systems. This implementation utilizes the geographic coordinates of the user's location (latitude and longitude) and the coordinates of the Kaaba in Mecca (latitude 21.4225° N, longitude 39.8262° E) as input. The Vincenty method is used to calculate the azimuth from the user's location to the Kaaba, which is then interpreted as the Qibla direction. The implementation results are validated by comparing the calculations with tested Qibla direction applications. The results show that the Vincenty method provides high accuracy in determining the Qibla direction, with a difference of less than 2 minutes of longitude. This implementation can serve as a foundation for developing accurate digital Qibla direction applications or even simple microcontroller-based systems.

Copyrights © 2025






Journal Info

Abbrev

ASTROISLAMICA

Publisher

Subject

Religion Astronomy

Description

Astroislamica: Journal of Islamic Astronomy is a journal that studies Islamic astronomy and Islamic laws related to astronomy. Astroislamica focuses on Islamic astronomy topics such as Qibla direction, prayer times, calendars, and eclipses through multiple perspectives, including Islamic law, ...