GPS-Android based Location Tracking System for Public Transportation (TrackIT) R.R.Vithanage B

Similar documents
Transcription:

GPS-Android based Location Tracking System for Public Transportation (TrackIT) R.R.Vithanage 149233B Faculty of Information Technology University of Moratuwa May 2017

GPS-Android based Location Tracking System for Public Transportation (TrackIT) R.R.Vithanage 149233B Dissertation submitted to the Faculty of Information Technology, University of Moratuwa, Sri Lanka for the partial fulfillment of the requirements of the Master of Science in Information Technology. May 2017

Declaration I declare that this thesis is my own work and has not been submitted in any form for another degree or diploma at any university or other institution of tertiary education. Information derived from the published or unpublished work of others has been acknowledged in the text and a list of references is given. ------------------------------ ------------------------------ Name of the Student Signature of the Student Date: Supervised by ----------------------------- ------------------------------ Name of the Supervisor Signature of the Supervisor Date:

Dedication This thesis is dedicated to my parents, Mr. S.Vithanage and Mrs. G.Thambawita for their endless love, encouragement and support.

Acknowledgements First and foremost I would like to offer my sincere gratitude to my research supervisor, senior lecturer Mr. B. H. Sudantha, for his guidance, supervision, encouragement and support throughout this study. I would not know what research is and how to do research if the lecture series of thesis writing and research methodologies is not offered. So I would like to offer my sincere gratitude to the Prof. Asoka S. Karunananda for feeding the knowledge and guidance for doing researches in proper way. I would also like to thank my lecturer S. Premaratne and all the lecturers of Faculty of Information Technology University of Moratuwa, for their guidance and encouragement to get maximum use of knowledge and capabilities. Also I would like to mention the encouragement given by Mr. J.I. Pitiyage during the research. I am grateful to the management and colleagues at Four Corners Lanka (Pvt) Ltd for their kind support and understanding during this work. Finally I would like to extend my deepest gratitude to my parents and family, for their continuous support given in every possible way to make this project success.

Abstract Public transportation has been considered as the main mode of transportation in Sri Lanka. General public can view static time table of public transportation but properly aligning the transportation with the correct time table is not happening due to various reasons such as traffic conditions, bad road condition and some technical or human resource unavailability. From the passenger s perspective, they do not have a method to find the actual location or availability of the bus or train causing to waste of time waiting on bus shelters and railway stations. Therefore some method for location tracking for transportation system is important to enable passengers to reduce their time wastage. Many researches have been conducted on location tracking and monitoring in the world. With the spreading of information technology, over the past few years there have been some attempts to enhance the quality of public transportation with the application of information and communication technology. However still there is no proper mechanism to find real time location of a bus or train although there are some commercial tracking systems to track private vehicles by installing some costly hardware devices. This research focused on utilizing commonly used technologies and infrastructure to implement the location tracking system for public transportation sector. The system consisting of a web application and a mobile application to enable location tracking. The web application is the core of the system which provides the interface for the general public to view the schedules and actual location of the bus or train. In addition to the location information, it predicts time of arrival/destination through analyzing previous data and current live data. The administration panel of the main web application enable management of all master data of the system. With this system, it is expected to facilitate passengers to make better travelling decisions by providing required information for them. Also relevant authorities also can use system data to support decisions to enhance railway service and bus services. During the evaluation, it was shown that system was successful more than 70%. i

Table of Contents Chapter 1... 1 Introduction... 1 1.1 Prolegomena... 1 1.2 Background and Motivation... 1 1.3 Problem statement... 2 1.4 Hypothesis... 3 1.5 Objectives... 3 1.6 Location Tracking - GPS Android based approach (TrackIT)... 4 1.7 Structure of the Thesis... 4 1.8 Summary... 5 Chapter 2... 6 Developments and Challenges in Location Tracking Systems... 6 2.1 Introduction... 6 2.2 Early Developments... 6 2.3 Recent Developments... 9 2.4 Currently Available Systems for General Public... 10 2.5 Problem Definition... 11 2.6 Summary... 12 Chapter 3... 14 Technology Adopted - TrackIT... 14 3.1 Introduction... 14 3.2 Technologies Available... 14 3.3 Technology Stack... 16 3.4 Summary... 17 Chapter 4... 18 An approach to TrackIT... 18 4.1 Introduction... 18 ii

4.2 Hypothesis... 18 4.3 Users... 18 4.4 Input to the system... 19 4.5 Output of the system... 19 4.6 Process... 20 4.7 Features... 22 4.8 Summary... 22 Chapter 5... 24 Design of TrackIT... 24 5.1 Introduction... 24 5.2 Top Level Architecture... 24 5.3 Main Web Application... 25 5.4 Location Updater Android Application... 27 5.5 Public web interface... 27 5.6 Public web service... 28 5.7 Use case Diagrams of the system... 28 5.8 Sequence Diagrams of TrackIT... 28 5.9 Database Diagram of TrackIT... 28 5.10 Summary... 28 Chapter 6... 29 Implementation of TrackIT... 29 6.1 Introduction... 29 6.2 Overall solution... 29 6.3 Implementation plan for demonstration purpose... 29 6.4 Software and Hardware used in TrackIT implementation... 30 6.5 Main Web Application... 31 6.6 Location Updater Mobile Application... 40 6.7 Deployment View... 42 6.8 Data Analysis... 43 6.9 Summary... 49 Chapter 7... 50 iii

Evaluation of TrackIT... 50 7.1 Introduction... 50 7.2 Evaluation Methodology... 50 7.3 Evaluation Forms... 51 7.4 Final Evaluation Results... 51 7.5 Summary... 54 Chapter 8... 55 Conclusion and further work... 55 8.1 Introduction... 55 8.2 Overall conclusion... 55 8.3 Objective-wise conclusions... 55 8.4 Discussion... 56 8.5 Limitations... 58 8.6 Further Work... 58 8.7 Summery... 59 Appendixes... 62 Appendix A Use Case Diagrams... 62 Use Case Diagrams of the TrackIT System... 62 Appendix B Sequence Diagrams... 66 Sequence Diagrams of the system... 66 Appendix C Database Diagrams... 70 Database Diagrams of the system... 70 Appendix D User Module... 73 User Module Interfaces... 73 Appendix E Track Module... 77 Bus Tracking Interfaces... 77 Appendix F Train Tracking Module... 80 Train Tracking Interfaces... 80 Appendix G Frontend Modules... 84 Frontend Interfaces... 84 Appendix H Services... 92 Web service... 92 iv

Appendix I Mobile Application... 94 Development and Interfaces... 94 Appendix J Evaluation... 97 Evaluation Forms... 97 Evaluation Results... 101 List of Figures Figure 3.1 Technology stack... 17 Figure 5.1 Top level architecture... 24 Figure 5.2 Web Application Structure... 26 Figure 6.1 Web application structure in Netbeans... 31 Figure 6.2 List of developed modules in administration panel... 32 Figure 6.3 Shuttle node create actions... 34 Figure 6.4 Defining actions for shuttle nodes... 35 Figure 6.5 Implementation of Haversine formula... 36 Figure 6.6 Frontend map for Hikkaduwa train... 40 Figure 6.32 Location Updater App project structure... 41 Figure 6.36 Deployment view of TrackIT... 42 Figure 6.37 - Speed Distribution graph for train... 44 Figure 6.38 Average speeds Train Morning Trip... 45 Figure 6.39 Speed distribution for train for days... 45 Figure 6.40 Speeds with days - Evening trip... 46 Figure 6.41 Speed distribution of bus... 47 v

Figure 6.42 Average speeds of bus... 48 Figure 6.43 Average speeds of bus for days... 48 Figure 7.1 Evaluation Chart... 53 Figure 5.3 - Use case diagram for TrackIT system... 62 Figure 5.4 Admin use case... 63 Figure 5.5 Location Tracker... 63 Figure 5.6 Public user/passenger... 64 Figure 5.7 Registered user/vehicle owner... 64 Figure 5.8 Web service... 65 Figure 5.9 Sequence diagram for Admin Login use case... 66 Figure 5.10 Sequence diagram for manage buses use case... 66 Figure 5.11 Sequence diagram for manage trains use case... 67 Figure 5.12 Sequence diagram for manage users use case... 67 Figure 5.13 Sequence diagram for manage vehicles use case... 68 Figure 5.14 Sequence diagram for search train use case... 68 Figure 5.15 Sequence diagram for view live train location use case... 68 Figure 5.16 Sequence diagram for view vehicle tracking use case... 69 Figure 5.17 Sequence diagram for view vehicle reports use case... 69 Figure 5.18 Database diagram of the core system... 70 Figure 5.19 Table structures of custom modules... 71 Figure 5.20 Database administration interface - PhpMyAdmin... 72 Figure 6.7 Log in page... 73 Figure 6.8 Administration Dashboard... 74 Figure 6.9 Add new administrator users... 75 vi

Figure 6.10 - Granting permission levels for different user roles... 76 Figure 6.11 Bus master data administration interface... 77 Figure 6.12 - Adding bus and time schedule... 78 Figure 6.13 Bus routes administration interface... 79 Figure 6.14 Admin interface to manage rules when managing master data... 79 Figure 6.15 Managing train admin interface... 80 Figure 6.16 Adding train and schedule to the system... 81 Figure 6.17 Train Lines interface... 82 Figure 6.18 Railway Stations... 82 Figure 6.19 Geo coordinates of stations... 82 Figure 6.20 Rules configurations to handle train master data... 83 Figure 6.21 Home page for public users... 84 Figure 6.22 List of Trains with schedule... 85 Figure 6.23 Live train details and timetable... 86 Figure 6.24 Train Search and Search Results... 87 Figure 6.25 List of buses with time schedule... 88 Figure 6.26 Live map and schedule... 89 Figure 6.27 Bus Search and Results... 90 Figure 6.28 Add vehicle to system... 91 Figure 6.29 Part of a code to get location updates for web service... 92 Figure 6.30 Train data retrieval enabled in service... 93 Figure 6.31 Web service output... 93 Figure 6.34 Code segment to get location updates... 95 vii

List of Tables Table 2.1 Summary of key Researches... 12 Table 7.13 Main web application evaluation results - Trains... 52 Table 7.14 Main web application evaluation results - Buses... 52 Table 7.15 Mobile application evacuation results... 53 Table 7.1 Evaluation form to validate usability... 97 Table 7.2 Evaluation form to validate functionality... 98 Table 7.3 Evaluation form to validate overall impression... 98 Table 7.4 Evaluation form to validate usability of mobile application... 99 Table 7.5 Evaluation form to validate functionality of mobile application... 99 Table 7.6 Evaluation form to validate overall impression of mobile application... 100 Table 7.7 Evaluation results for main web application functionality... 101 Table 7.8 Evaluation results for main web application usability... 101 Table 7.9 Evaluation results for main web application overall impression... 102 Table 7.10 Evaluation results for mobile application functionality... 102 Table 7.11 Evaluation results for mobile application usability... 103 Table 7.12 Evaluation results for mobile application overall impression... 103 viii