AUTOMATIC QIBLAT DIRECTION USING PDA GPS
NOOR BADAIUAH BINTI ASAN
This report is submitted in partial fulfillment of the requirements for the award of Bachelor of Electronic Engineering (Telecommunication Electronics) With Honours
Faculty of Electronics and Computer Engineering Universiti Teknikal Malaysia Melaka
UNZVERSITI TEKNIKAL MALAYSIA MELAKA
FAKULTI KEJURUTERAAN ELEKTROMK DAN WJURUTERAAN KOMPUTER
BORANG PENGESARAN STATUS LAPORAN
PROJEK SARJANA MUDA II
: -Am-QmncQ!BUTD-WmON-USm-GW-A-G-B ---- ---- - - -- -- - -.- - .- - - -- - - ---
: .20055!2008 ... 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 ..---.--- 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
Saya . - -NW-R BADAMH -B-m A$ANAN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN AN -.
(HURUF BESAR)
mengaku membenarkan Laporan Projek Sarjana Muda ini diiimpan di Perpustakaan dengan symt-syarat kegunaan seperti
1. Laporan adalah halanilik Universiti Teknilcal Malaysia Melaka.
2. Perpustakaan dibenarkan membuat salinan untuk tujuan pengajian sahaja
3. Perpustakaan dibenarkan membuat salinan laporan ini sebagai bahan pertukaran imtara institusi pengajim tinggi.
4. Sila tandakan ( 4 ) :
(Mengandungi makcurnat tehd yang telah ditemukan oleh
organisasi/badan di mana penyelidikan dijalankan)
at TetaP: 214, ...
J ! l L w - ~ m - ~ E M
~D-m-GmA
- ~3rn-DWGrn,-- ---- - - ---- -- - .EW-W-N:- -- - - -- - - -- --- - -m i & - 2 ~ ~ 1 - 2 ~ . --- Tarikh: -2ME!-2-9(,8 --- 8 8 8 8 8 8 8 8 8
C I
*CATATAN : Jika laporan ini SULIT atau 'IERERD, sila lampirkan swat daripada pihak berkdorganisasi berkenaan
"I hereby declare that this report is the result of my own work except for quotes as cited in the references."
Signature
"I hereby declare that I have read this report and in my opinion this report is sufficient in terms of the scope and quality for the award of Bachelor of Electronic Engineering (Telecommunication
Electronics) With Honous."
Signature
Special dedication to my loving parents, Hj. Asan bin Abdullah and Hjh. Minah binti
Sidek, for giving me birth in the first place, for unconditional support and
encouragement to pursue my interests, even when the interests went beyond
boundaries of language, field and geography. My best thoughts are extended to
my parents, who taught me that education is the rest duty of both parents and
children. Also to my siblings, my kind hearted supervisors Mr. Azmi bin Awang
Md Isa and Miss Nurmala Irdawaty binti Hassan, all lecturers in Faculty of
Electronics and Computer Engineering (FKEKK) and also to my dearest fiiend,
ACKNOWLEDGEMENT
Alhamdulillah, all Praise to thank to Allah SWT the Almighty for giving me
the Rahmah to finish my Project Sarjana Muda successfully.
I would like to express my deep and sincere gratitude to all those who gave
me the possibility to complete this PSM. I am deeply indebted to my main supervisor
Mr Azmi bin Awang Md. Isa whose help, stimulating suggestions and
encouragement helped me in all the time of research for and writing of this thesis.
My sincere gratitude and many thanks goes to him for his endless support and ideas,
during which he has been patiently supervising my progress and encouraged me to
do this project the right way.
My sincere thanks are due to my second supervisor, Miss Nurmala Irdawaty
binti Hassan for her excellent advice and helped me not to get lost during the
development of this thesis. I also would like to express my deep gratitude to her
whose really supports me during the preparation of this thesis. Other than my
advisors, I would also like to thank the rest of my thesis committee, Faridah Azura
for her friendship and encouragement, who gave insightful comments and reviewed
my work on a very short notice.
Last, but definitely not least, I want to thank my beloved parents, Hj. Asan
bin Abdullah and Hjh. Minah binti Sidek for unconditional support and encouragement to pursue my interests. Lastly, to everybody that has been involved in
vii
ABSTRACT
The Qur'an states that Muslims must Solat (Muslim prayer) in the direction of
Mecca at certain times of the day. However, most Muslims have dificulty to perform
their duty when they are in traveling because there is no such equipment available to
determine the direction of Qiblat. Because of that, this project was developed for
Muslims to determine the cment Qiblat direction automatically by using Personal
Digital Assistant (PDA) or Pocket PC with Global Positioning system (GPS)
capability. This project can determine the current Qiblat direction automatically for
users, who are on moving vehicles (Mobile) such as airplane, ship, train etc or who
are in building (Static). For mobile condition, the Qiblat direction can be obtained by
pointing the PDA in fiont of the user or mobile vehicle direction and the arrow of the
compass will be pointing to the Qiblat automatically. For static condition, the Qiblat
direction can be obtained by pointing the device (PDA) at any direction. The
Graphical User Interface (GUI) based software has been developed using Microsoft
Visual Basic.NET. The GPS receiver provides information of users' current location
and the information will be synchronized with the developed s o h e in order for
the whole system to be operated correctly. This project is divided into 6 application
which is contains Prayer Times, Local Time, Location Info, Qiblat Direction,
Directional Finder and Calendar. This project focuses to improve the development of
Qiblat Direction, Directional Finder, and Calendar application. The other three
applications can be referred to '"Mobile Prayer Times for PDA Application" thesis by
Faridah Azura binti Yahaya. It is highly hoped that this system could facilitate
viii
ABSTRAK
Al-Quran menyatakan bahawa setiap Muslim wajib menunaikan Solat
(Sembahyang Muslim) menghadap ke arah Mekah pada waktu-waktu yang tertentu
setiap hari. Walau bagaimanapun, kebanyakan Muslim menghadapi masalah untuk
menumikan kewajipan mereka ketika perjdanan jauh kerana tiada peralatan untuk
menentukan arah Kiblat. Oleh kerana itu, projek ini telah di bangunkan untuk
Muslim mengetahui arah Kiblat semasa secara autornatik dengan menggunakan
pembantu digital persendirian (PDA) atau PC Poket dengan kebolehan Sistem
penentuan global (GPS). Projek ini boleh menentukan arah Kiblat secara automatik
untuk pengguna yang berada di dalam kenderaan bergerak (Mobil) seperti di dalam
kapal terbang, kapal, kereta api dan sebagainya mahupun yang berada di dalarn
bangunan (Statik). Bagi keadaan bergerak, arah kiblat dapat diperolehi dengan
menghalakan PDA di hadapan pengguna atau pada
arah
kenderaan yang bergerakdan anak panah kompas tersebut akan menunjukkan arah Kiblat secara automatik.
Bagi keadaan statik,
arah
kiblat dapat diperolehi dengan menghalakan alat (PDA)pada sebarang arah. Perisian Pengguna grafik antara muka (GUI) dibangunkan
menggunakan Microsoft Visual Basic.NET. Penerirna GPS akan memberikan
informasi kedudukan semasa pengguna clan informasi tersebut akan diseragamkan
dengan perisian yang dibina untuk membolehkan sistem tersebut beroperasi dengan
baik. Projek
ini
terbahagi kepada 6 aplikasi di mana mengandungi Waktu Solat,Waktu Tempatan, Maklumat Lokasi, Arah Kiblat, Pencari Arah, dan Kalendar.
Projek ini fokus untuk meningkatkan pembangunan aplikasi Arah Kiblat, Pencari
Arah, dan Kalendar. Tiga aplikasi yang lain boleh merujuk kepada tesis "Mobile
Prayer Times for PDA Application" daripada Faridah Azura binti Yahaya. Adalah
diharapkan sistem ini dapat memberikan peluang kepada pengguna Muslim untuk
CONTENTS
CHAPTER TITLE
PROJECT TlTLE
STATUS REPORT FORM STUDENT DECLARATION SUPERVISOR DECLARATION DEDICATION ACKNOWLEDGEMENT ABSTRACT ABSTRAK CONTENTS LIST OF TABLES LIST OF FIGURES
LIST OF ABREVIATIONS LIST OF APPENDICES
I INTRODUCTION
1.1 Project Background
1.2 Project Objectives
1.3 Problem Statements
1.4 Scopes of Project
1.5 System Operations
1.6 Organisation of Thesis
n
LITERATURE REVIEWFalaq (Astronomy) Knowledge's
Traditional Equipments
Falaq (Astronomy) Equipents
2.3.1 Theodolite
2.3.2 Compass with Telescope (Ushikata)
2.3.3 GPS (GARMIN GPSmap 76CSx)
Traditional Method to Determine Qiblat Direction
2.4.1 Istiwa
2.4.2 Constellation Method
Spherical Trigonometry
2.5.1. TheEarth'sShape
2.5.2. Great Circles, Antipodes
2.5.3. Parallels and Meridians (Lines of Latitude
and Longitude)
2.5.4. Cardinal Directions, Latitudes, and
Longitudes
2.5.5. Basic Spherical Trigonometric Fonnula
Personal Digital Assistant (PDA)
PDA with Built-In GPS: 5466-1 -ETEN x500
(Glofiish)
Advantages of PDA with Built-In GPS
Disadvantages of PDA with Built-In GPS
Wintec WBT- 100 Multi-Function (4-In- 1) GPS
Receiver
111 PROJECT METHODOLOGY
3.1 Overview
3.2 Definition of Qiblat
3.3 Determining Qiblat Direction
3.4 Concept of Qiblat Pole
3.6 NMEA - National Marine Electronics Association 33
3.7 How GPS Data String Reads 34
3 -8 Workflow Description 35
3.8.1 System Design 3 6
N
SOFTWARE DEVELOPMENT4.1 Introduction of Microsoft Visual Studio 2005
4.1.1 Overview Visual Studio 2005
4.1.2 Objectives Using Visual Studio 2005 4.1.3 Creating a Pocket PC 2003 Smart Device
Application
4.2 GPS Setup
4.3 Program Development Cycle
4.3.1. Performing a Task on the Computer 4.3.2. Program Planning
4.4 Automatic Qiblat Direction
V PROJECT
FINDING
AND ANALYSIS5.1
Last
Results 505.2 Achievement for PSM Project 52
5.3 Results on Software 54
5.4 Application Using PDA with Built-In GPS 70
5.5 Analysis 72
5.5.1. Consistency of Global Positioning Systems
(GPS) 75
xii
6.1 Discussions
6.2 Explanation on Analysis 6.2.1. Qiblat Direction 6.2.2, Calendar Converter 6.3 Consistency of the GPS 6.4 GPSSignalErrors
6.4.1. GPS Signal inside the Building
6.4.2. GPS Signal inside the Moving Vehicles 6.5 Improvement and Suggestions
6.6 Conclusions
REFERENCES
xiii
LIST OF TABLES
NO TITLE
PAGE
2.1 Estimation of the Difference Angle between the Qiblat and 16
Sunset Direction for Malaysia
5.1 Results of GPS Measurement in a Wide Open Area 76
5.2 Results of GPS Measurement inside the Mosque (Without 80
Electronic Compass)
5.3 Results of GPS Measurement inside the Mosque (With 83
Electronic Compass)
xiv
LIST OF FIGURES
TITLE PAGE
A Simple Scheme of Sacred Geography in the Published
Text of the Kitab Al-Masalik of Ibn Khurradadhbih (3rd /
9th Century)
Qibla Indicator, Persian, 1 8'b Century
Overall Block Diagram of the S o m e Development with
PDA with Built-In GPS
Rubu' Muj ayyab
Theodolite
Learn How to Use Theodolite
Compass with Telescope (Ushikata)
GARMIN GPSmap 76CSx
Sun's Direction above the Ka'bah Show the Qiblat
Direction
Orion Constellation
(a) Al-Judah (Bajak / Ursa Minoris) (b) Polaris
Constellation
Finger Guideline for Angle Value
Great Circles, Small Circles, and Antipodes
The Spinning Earth.
(a) Parallels (Lines of Latitude, E-W) (b) Meridians (Lines
of Longitude, N-S)
Latitude and Longitude
The 5466-1 -ETEN X500-Glofiish Model
Wintec WBT-100 Multi-Function (4-In-1) GPS Receiver
Direction to Ka'bah
8 Conditions on Determination Qiblat Direction
Concept of Qiblat Pole
The Constellation of NAVSTAR Satellites and Their Orbits
Latitude and Longitude from GPS Data String
Work Flow of System Design
The Microsoft Visual Studio.NET Logo
Overall Flow Chart of Designing in Microsoft Visual
Basic.NET
Create New Project and Solutions by Using the New Project
Window and a Name for the Smart Device Application
Tools Required by Microsoft Visual Basic.NET
Deploy GPSolat Using Windows Mobile 5.0 Pocket PC
Emulator
Program Developing Process
Flow Chart for Digital Qiblat Direction
Qiblat Arrow and Position of Ka'bah
Main Menu of Mobile Prayer Times and Qiblat Direction
Program
Second Menu for GPSolat
The Menu for Qiblat Direction
The Message Box for Qiblat Direction
Magnetic Qiblat Direction Program
Mobile Qiblat Direction Program
Menu for 'Direction Finder'
Mobile Direction Applications for 'Direction Finder' (a)
Previous Menu (b) Latest Menu
Save the Destination and Start the Mobile Direction
Application for 'Direction Finder'
The Direction and the Distance for the Magnetic Direction
Remove Destinations
Previous Gregorian to Hijri Calendar
Calendar, Date Converter Gregorian Date to Hijri Date and
Special Event
The Hari Raya Puasa / Aidilfitri Event.
(a) Help Menu Application (Emulator) (b) Text for Qiblat
Direction
GPSolat Trial Period Has Expired
Qiblat Direction on Mobile Condition (a) Blue Arrow
Shows the Direction fiom Vehicle Clockwise (b) Red
Arrow Shows the Direction from North Clockwise
Direction Finder on Mobile Condition (The Picture Shows
"You are now about 2.2km fiom tarnan tasek utama")
Distance between Kuantan, Malaysia-Mecca
GPS Testing Position Float at Pole 1 (Wide Open Area)
GPS Testing Position Float at Pole 2 (Wide Open Area)
GPS Testing Position Float at Pole 3 (Wide Open Area)
GPS Testing Position Float at Pole 1, Pole 2 and Pole 3
Referring to Kaabah (Wide Open Area)
GPS Testing Position Float at Pole 1 inside the Mosque
(Without Electronic Compass)
GPS Testing Position Float at Pole 2 inside the Mosque
(Without Electronic Compass)
GPS Testing Position Float at Pole 1 and Pole 2 Referring
to Ka'bah (Qiblat) inside the Mosque (Without Electronic
Compass)
GPS Testing Position Float at Pole 1 inside the Mosque
(With Electronic Compass)
GPS Testing Position Float at Pole 2 inside the Mosque
(With Electronic Compass)
GPS Testing Position Float at Pole 1 and Pole 2 Referring
to Ka'bah (Qiblat) inside the Mosque (With Electronic
Compass) xvi 65 66 67 68 69 69 7 1
7
1xvii
6.1
L
1 -Signal Re-Radiator Designed for Receiving GPS Signals 94Indoors
6.2 External GPS Antenna on the Roof and Has a Strong 95
Magnet at the Base for Affixing to a Car Roof
xviii
LIST OF ABREVIATIONS
GPRS GMT GPS GUI
mu
NMEA PDA Qiblat RAM ROM SA Solats v s
USB
UT
WAAS
WLAN
W A N
General Packet Radio Service
Greenwich Mean Time
Global Positioning System
Graphic User Interface
International Astronomical Union
National Marine Electronics Association
Personal Digital Assistant
Ka 'bah in Makkah Saudi Arabia Random-Access Memory
Read-Only Memory
Selective Availability
Muslims Prayers
Space Vehicles/ satellites
Universal Serial Bus
Universal Time
Wide Area Augmentation System
Wireless Local Area Networks
xix
LIST OF APPENDICES
NO TITLE PAGE
A IEEE Conference Paper, APACE2007, Melaka. 102
B IEEE Conference Paper, International
RF
and Microwave 107Conference 2006, Putrajaya, Malaysia
C Penentuan Arah Kiblat 112
D Langkah-langkah Penpiraan Qiblat 115
E Huraian Lokasi Masjid 116
CHAPTER 1
INTRODUCTION
This chapter will discuss about the project background, objectives and scope
of the project, problem statement, system operation and report structure.
1.1 Project Background
The Qur'an states that Muslims must pray in the direction of Mecca at certain
times of the day. For faithful Muslims, it was vital to be able to calculate the
direction of prayer towards Mecca. In the eariy centuries of Islam, Muslim did nat
have tools to determine the Qiblat with precision, Only from third century onwards mathematical solutions for determining Qiblat were available even then their use was not widespread.
A common instrument was the "Qibla Indicator", an adaptation of the
compass designed to indicate the direction of Mecca fiom other major cities. These
often incorporated similar features to the sundial. [I]
From 3rdl9th century onwards, Muslim astronomers working in the tradition
of classical astronomy devised methods to compute the Qiblat for any locality from the available geographical data. For them, the Qiblat was the direction of greater
determination of Qiblat according to this definition is a non-trivial problem of
mathematical geography, whose solution involves the application of complicated
trigonometric formula or geometrical considerations.
EGYPT
[image:21.591.206.429.151.326.2]w
Ka'bahFigure 1.1 : A Simple Scheme of Sacred Geography in the Published Text of the
Kitab Al-Masalik of Ibn Khurradadhbih (3rd / 9th Century) [2]
However, mathematical methods were not available to the Muslims before
the late 2nd / 8th and early 3rd / 9th centuries, the Qiblat was not generally found by
computation anyway even after the mathematical solutions were available. This is
very well illustrated in the diagram below for Qiblat in the cities of Cordova, Cairo
and Samarqand. [3]
All the material above shows that the early Solat accepted some flexibility in
the determination of the Qiblat and that it was not determined with a compass
precision as the early Muslims did not have the tools to find that precision. In the
Shafie School, facing the direction of prayer is a necessary condition.
Figure 1.2 shows a "Qibla Indicator" which is used for finding the direction
of Mecca. The ornamental plate over the compass is engraved with the names of the
four cardinal points and with a scale of degrees. On the bottom of the compass-box
are engraved lines indicating the direction of the South point of the compass and
Figure 1.2: Qibla Indicator, Persian, 1 8h Century
The importance of the prayer in Islam cannot be understated. It is the first
pillar of Islam that the Prophet (peace be upon him) mentioned after mentioning the
testimony of faith, by which one becomes a Muslim. It was made obligatory upon all
the prophets and for all peoples. Allah has declared its obligatory status under
majestic circumstances.
However, most Muslims have difficulty to perform their duty when they are
in traveling because there is no such equipment available to determine the direction
of Qiblat. For an instance, Muslims traveling abroad on airplanes are still required to
perform prayers, even though they may encounter difficulties to do so due to high
velocity of the airplane and its orientation. Furthermore, Muslims need to identifjr
their current location in order to know Qiblat direction. It is extremely difficult to
determine the direction of Qiblat due traveling.
This project is divided into two major part; hardware and software. For
hardware part, the Personal Digital Assistant (PDA) with built-in Global Positioning
System (GPS) is used with the software developed using Microsoft Visual
Basic.NET. PDA with built-in GPS will give the information of the latitude and
longitude. Then, the program that have done develop using Microsoft Visual
Basic.NET will synchronize with the information of PDA with built-in GPS. This
project need to study on how to develop GUI-based software, which can determine
the current Qiblat direction with additional features that can be incorporated into
portable devices such as Personal Digital Assistant (PDA) or Smartphones with
1.2 Project Objectives
The
final
project is named as GPSolat, which is a combination of GlobalPositioning System (GPS) and Solat (Muslim Prayers). This GPSolat is divided into
2 main parts which is Automatic Qiblat Direction Using PDA GPS and Mobile
Prayer Times for PDA Application. This thesis covered the Qiblat Direction Using
PDA GPS application and carried out on the following objectives:
a) To improve and design an innovative system for Muslims to determine the
current Qiblat direction in real time automatically by using Personal Digital
Assistant (PDA) or Pocket PC with Global Positioning system (GPS)
capability.
b) To develop multi-function application such as directional finder, calendar,
converter Gregorian to Hijri vice versa, and etc.
c) To develop the GW-based software to make it user-friendly device.
d) To study how GPS works and the functionality of PDA with built-in GPS.
e) To commercialize the project with protection '30 Days trial license key' and
Help Menu.
1.3 Problem Statements
The importance of the prayer in Islam cannot be understated. It is the fkst
pillar of Islam that the Prophet (peace be upon him) mentioned
after
mentioning thetestimony of faith, by which one becomes a Muslim. Performance of Solat five times
a day is mandatory to all Muslims. During performance of Solat, Muslims must turn
their face towards the Ka 'bah. It was made obligatory upon all the prophets and for
(0 Prophet!), We see your face turning to the heaven (For guidance). Now shall please you turn then your face in the direction of The Sacred Mosque; Wherever you are, turn your faces in that direction. The people of the book know we21 that this is the truthcfiorn their Lord And Allah is not unmindfirl of what they do. (Sura AI-Baqara, Jm 1: 144) [4]
Recently we are facing some confbsion regarding the methods of finding out
the direction of the Ka'bah. As far as my knowledge goes, this is the
first
time suchconfusion has appeared since the inception of Solat more than fourteen hundred
years ago. Moreover, this confusion is apparently confined to North America. I
strongly feel that a thorough discussion and deliberation in a congenial environment
is needed to remove the confusion once and for dl.
The main problem in Islamic astronomy is the accuracy of Qiblat (the
position of facing the 'Ka 'bah' during prayers), There were no accurate methods in
finding the Qiblat. Muslim astronomers and geographers starting from the 8th
century took up for best methods of Qiblat direction using the techniques of
measurement of geographical coordinated and trigonometry that they have acquhd
fiom the Greeks.
However, most Muslims have dificulty to perform their duty when they are
in traveling because there is no such equipment available to determine the direction
of Qiblat. For an instance, Muslims traveling abroad on airplanes are still required to
perform prayers, even though they may encounter difficulties to do so due to high
velocity of the airplane and its orientation. Furthermore, Muslims need to identify
their current location in order to know Qiblat direction. It is extremely difficult to
determine the direction of Qiblat due traveling.
The previous project has their disadvantages and this project will update and
recover their disadvantages. The main disadvantage is the previous of this project is
the Qiblat direction is only can be used on moving condition (Mobile) such as inside
moving vehicles, but not on static condition. When we in the static condition, we