public bus transportation tracking and arrival …

45
PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL TIME ESTIMATION USING HAVERSINE ABDUL AFNAN BIN BASIR BACHELOR OF COMPUTER SCIENCE (INTERNET COMPUTING) UNIVERSITI SULTAN ZAINAL ABIDIN 2017

Upload: others

Post on 16-Nov-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

PUBLIC BUS TRANSPORTATION TRACKING AND

ARRIVAL TIME ESTIMATION USING HAVERSINE

ABDUL AFNAN BIN BASIR

BACHELOR OF COMPUTER SCIENCE

(INTERNET COMPUTING)

UNIVERSITI SULTAN ZAINAL ABIDIN

2017

Page 2: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL TIME

ESTIMATION USING HAVERSINE

ABDUL AFNAN BIN BASIR

Bachelor of Computer Science (Internet Computing)

Faculty of Informatics and Computing

Universiti Sultan Zainal Abidin, Terengganu, Malaysia

MAY 2017

Page 3: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

i

DECLARATION

I hereby declare that this project is based on my own effort with helps getting information

from sources that I have confessing. All sections of the text and results which have been

obtained from other workers or sources are fully references. I understand that are cheating

and plagiarism constitute a breach of university regulations and will be dealt with

accordingly.

________________________________

Name : .............................................

Date :.................................................

Page 4: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

ii

CONFIRMATION

I hereby declare that this report is based on my original work except for quotations and

citations, which have been duly acknowledged. I also declare that it has not been previously

or concurrently submitted for any other degree at Universiti Sultan Zainal Abidin or other

institutions.

________________________________

Name : ..................................................

Date : ..................................................

Page 5: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

iii

DEDICATION

I am using this opportunity to express my greatest gratitude to everyone who

supported me throughout my final year project, Public Bus Transportation Tracking and

Arrival Time Estimation Using Haversine. I am thankful for their aspiring guidance,

invaluably constructive criticism and friendly advice during the project work. I am

sincerely grateful to them for truthful and illuminating views on a number of issues related

to the project.

Firstly, I express my thanks to Dr Azrul Amri Bin Jamal as my supervisor for guidance,

monitoring and constant encouragement throughout the course of this final year project. I

want to take this opportunity to thank my parent and also special thanks to all lecturers of

Faculty Informatics and Computing for their attention, guidance and advice to help in the

development of this project.

I would also like to thanks all my friends and classmates for their valuable comments and

suggestions on this project which gave me an inspiration to improve this project. I thank all

the people for their help directly and indirectly to complete this project.

Thank you,

Abdul Afnan Bin Basir

Page 6: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

iv

ABSTRACT

Urban communities are becoming more reliant to public transportation. Traffic congestion

differs based on the time of day and the route being taken. Thus, making the bus time table

unreliable and bus users are wasting time at bus stops waiting for transport to come. This

open the users to become prey to crimes because some of the bus stops are in secluded area.

The objectives of this study are to design an easy system using suitable interfaces and iconic

that fulfill the Human Computer Interaction (HCI) and user friendly system that are can

used by all ages in this country that using public transportation. Secondly are to develop

the appropriate and usable system to facilitate users or passengers that using public

transportation daily especially bus. Lastly is to evaluate the effectiveness of this system

which are could avoid passengers from missed the bus. The method is being used is WDMS

which is require four phases which are user modelling, conceptual design, implementation

design and actual implementation. The technologies such as Global Positioning System

(GPS), Global System for Mobile Communication (GSM), and Arduino. By the end of this

study, it is expected that the developed application can help peoples or bus passenger avoid

from missed the bus arrival time. This been done by user or passenger get notification from

the bus. The bus will update the latest location to the nearest bus station or bus stand.

Page 7: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

v

ABSTRAK

Masyarakat bandar masa kini banyak bergantung kepada system pengangkutan awam.

Keadaan trafik yang dilalui mereka berbeza berdasarkan hari dan laluan yang dilalui

mereka. Jadual harian bas awam yang dibuat membuatkan pengguna-pengguna bas

tertunggu-tunggu dan membuang masa di stesen bas. Hal yang demikian memyebabkan

mereka terdedah kepada jenayah kerana kebanyakan perhentian bas berada di kawasan-

kawasan terpencil. Objektif kajian ini adalah untuk mereka system yang mudah dan sesuai

untuk memenuhi kriteria Interaksi Manusia dan Komputer (HCI) dan mesra pengguna

yang dapat digunakan oleh semua lapisan masyarakat di negara ini yang menggunakan

sistem pengangkutan awam. Keduanya, sistem ini dibangunkan bertujuan membolehkan

semua pengguna yang menaiki pengangkutan awam berasa mudah untuk digunakan.

Ketiganya ialah untuk menilai sejauh mana keberkesanan system ini untuk mengatasi

pengguna-pengguna pengangkutan awam daripada terlepas bas. Metodologi kajian ialah

WDMS yang memerlukan empat fasa iaitu permodelan pengguna, reka bentuk pelaksanaan

dan pelaksaaan yang sebenar. Teknologi yang digunakan dlm kajian ini adalah Sistem

Kedudukan Global (GPS), Sistem Global untuk Komunikasi Mudah Alih (GSM) dan

Arduino. Di akhir kajian ini, jangkaan hasil yang dapat dinyatakan ialah sistem yang

dibangunkan dapat membantu pengguna mengatasi masalah ketinggalan bas. Hal ini

dapat diselesaikan dengan penumpang bas menerima ‘notification’ daripada sistem.

Sistem ini juga akan sentiasa memperbaharui maklumat, info serta lokasi bas yang

berhampiran dengan stesen bas atau perhentian bas.

Page 8: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

vi

CONTENTS

PAGE

DECLARATION i

CONFIRMATION ii

DEDICATION iii

ABSTRACT iv

ABSTRAK v

CONTENTS vi

LIST OF TABLES ix

LIST OF FIGURES xvi

LIST OF ABBREVIATIONS x

CHAPTER I INTRODUCTION

1.1 Project Background 1

1.2 Problem statement 4

1.3 Objectives 4

1.4

Scopes and Limitation 5

CHAPTER II LITERATURE REVIEW

2.1 Public Transport Applications 8

2.2 Distance Calculation Techniques 13

2.2.1 Euclidean

2.2.2 Haversine

14

11

15

2.3 Summary 16

CHAPTER III

METHODOLOGY

3.1 Project Life Cycle 17

3.1.1 Planning Phase 19

3.1.2 Requirement Analysis and Specification 20

3.1.3 Design Phase 20

3.1.4 Implementation Phase 20

3.1.6 Deployment Phase 21

3.2 Gantt Chart 22

Page 9: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

vii

3.3 System Requirement 23

3.3.1 Software 23

3.3.2 Hardware 24

3.4 System Design 25

3.4.1 Framework Design 25

3.4.2 Process Design 26

3.4.2.1 Context Diagram 26

3.4.2.2 Data Flow Diagram 27

3.4.3 Data Model 28

3.4.3.1 Entity Relational Diagram 28

3.4.3.2 Database Scheme 29

3.4.4 Interfaces 31

3.4.4.1 Passenger 31

3.5 References 33

Page 10: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

VIII

LIST OF TABLES

TABLE TITLE PAGE

1.1 First table in chapter 1 10

1.2 Second table in chapter 1 11

2.1 First table in chapter 2 20

2.2 Second table in chapter 2 25

Page 11: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

IX

LIST OF FIGURES

FIGURE TITLE PAGE

1.1 First figure in chapter 1 10

1.2 Second figure in chapter 1 11

2.1 First figure in chapter 2 20

2.2 Second figure in chapter 2 25

Page 12: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

X

LIST OF ABBREVIATIONS / TERMS / SYMBOLS

CD Context Diagram

DFD Data Flow Diagram

ERD Entity Relationship Diagram

FYP Final year project

GA Genetic algorithm

HCI Human computer interface

IOT Internet of Things

Page 13: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

1

CHAPTER 1

INTRODUCTION

1.1 Project Background

Public transportation in Malaysia is expanding and growing to satisfy the demand

of peoples to travel from one place to another (Abdullah, 2013). Public transportation

assume a major part in transportation industry. This public transportation consume a lot of

transport services to most peoples living in Malaysia. People use busses to go work,

schools, or other places. Bus is a very vital today because it is used by most of people

because it can reduce the number of vehicles on road that can cause traffic jams. Some

users like to sit in the bus with another passengers while waiting to reach their destinations.

This indirectly will influence people to communicate each other. (Dissertation & Jeong,

2004) .

Page 14: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

2

Basically in Malaysia, bus public transportation is covered by Rapid Bus Sdn Bhd

which supervised under Prasarana Malaysia Berhad as the asset owner and operator of LRT,

KL Monorail, Mass Rapid Transit (MRT), Sunway-BRT and bus services in Kuala

Lumpur, Penang and Kamunting. Basically in Kuala Lumpur, RapidKL covered at

Ampang, Cheras, Damansara, Jalan Ipoh, Jalan Klang Lama, Jalan Pahang, Lebuhraya

Persekutuan, Sungai Besi and Puchong (Abdullah, 2013). Rapid KL also used by Rapid

Bus Sdn Bhd for the first bus rapid transit service in Malaysia and it is also one of the

largest stage bus operators in the Klang Valley, next to Metrobus. Currently, there are 98

stage bus routes and 39 feeder bus services which operate from LRT stations. The bus

routes operated by Rapid Bus were previously operated by Intrakota Komposit Sdn Bhd, a

subsidiary of DRB-Hicom Bhd; and Cityliner Sdn Bhd, a subsidiary of Park May Bhd

(Abdullah, 2013).

Bus stands or bus stops is the place for passengers to waiting for the bus. Several

standard is being set when considering build a bus stops. Bus stop must located at straight

roads to improve the sight distance for bus drivers as they leave the stop, and easier for

driver to draw in. There must be adequate weave length provided where buses are required

to enter the traffic lane and cross additional lanes to make turning movement. Bus stops

should not located adjacent to facilities that induce a high parking turnover such as ATMs,

shops and etc. as is likely that vehicles will park illegally near the bus stop (Cortés,

Fernández, & Burgos, 2007).

Page 15: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

3

Public transports, especially buses have been used throughout the world. Vehicle

tracking system was first being implemented in shipping because there is a need to track

item from courier. Technology is growing in a fast pace, automated bus tracking system

can be used to track and display location in real-time. This paper proposes a bus tracking

system using GPS/GSM technology and smartphone application to give a better and cost

effectiveness services to the user. This project work on bus arrival time are predicted based

on location of previous station. The travel prediction time also take into accounting other

unpredictable factors such as traffic jam, harsh weather situation and the worst, bus

breakdowns. The model and algorithm are based on vector data for bus route, bus stand,

and road network with junctions and segments. Passengers with access to the Internet earn

obtain to get real-time arrival information, notification via SMS or some other wireless

push mechanism.

Bus arrival time and prediction is very vital to passengers, not only at the terminal,

but on every bus stop (Abdullah, 2013). Problem arise if the arrival times or departures

time of the buses at bus stop cannot be predicted by passengers. Bus stops are the place that

familiar to bus passengers. This relationship lead to the bus arrival time at different stop on

a route. Inaccurate bus arrival time will affect the schedule designed by the bus

management. Bus management design bus operations and produce bus arrival time

schedule, however the implementation is depends on bus speed, bus operator, and the traffic

conditions on road. This paper focus on basic development of optimum bus arrival time by

tracking and estimate the arrival time using Haversine formula based on the ground speed

of the bus travelling. Then, every 5 minutes the GPS tracking will capture ground speed of

the bus. So that calculation is happen there based on the speed capture of the vehicle.

Page 16: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

4

1.2 Problem Statement

There are several problems need to be solved in this system. The first problem was

mostly bus in Malaysia is not real time and they could not track or predict when the bus is

arrived or departed from bus stops. Lack of estimation time provided will hard to users and

passengers to plan their trip such as head to go to working place. They did not know when

the bus is arrived, badly they could missed the bus because do not know the arrival time of

the bus.

Secondly, people waiting a lot of times waiting at bus stops, therefore I will exposed

them to prey of crimes while waiting at bus stops. Previous studies (Cervero, 1997) proved

that waiting at bus stops bring them to exposed to crime and risk rider’s security. They

using crime data from 1994 until 1995 made by Los Angeles Metropolitan Transportation

Authority said that transit crime (crime on the bus or train or at bus stop or rail station) is

quite much and many (Cervero, 1997).

1.3 Objectives

- To study the most suitable prediction methodology for bus arrival time from

previous station to the next station

- To design an application useful and suitable interfaces for predict bus arrival time

- To develop the complete system that could identify the prediction interval of bus

arrival time and the probability of a bus being on time

Page 17: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

5

1.4 Scope and Limitation

In this project scope involves are User or Passenger. User is a person using bus public

transport to go to working or head to their destination. User could request the route number,

or search location or the live departures or live arrival time of the specific bus stops. There

could request through their smartphone which have internet access. They could see live

map of the route and could gain the arrival and departures time based on the bus stops.

They could also request the official schedule provided by bus transport management.

Therefore they could track and monitor the bus location precisely by give them a real time

access.

Administrator is the is bus management itself which are staff responsible to analyze

the information about updated location of the bus and provide the arrival and departures

schedule of the whole bus trip of the bus. Admin also responsible to specify the location of

bus stop and facilitate the passengers to manage their trip using bus transportation. Admin

responsible to update location of the bus to insert to system.

Internet of Things involved was Arduino board GPS/GSM module. They play role

similar as Administrator but it done automatically to transmit to system. The GPS capture

ground speed of the bus to calculate estimation to arrive at bus stop requested by user. Each

bus has GPS module to track and trace the location of the bus.

Page 18: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

6

The limitation was the system only worked if there are internet connection whether

mobile connection or Wi-Fi connection. It was internet of things, so internet connection is

a vital to make this system run. It also work on smartphone only which have latest features

of technologies such as internet connection, GPS and etc. It does not working on mobile

phones or basic phones.

1.5 Expected Outcome

Based on the objective of the development for this project, this tracking application will

be run as below:

i. This application or system will enable passengers or transit riders get the real

time access of the bus public transportation

ii. This application will help passengers to prevent the transit riders from missed

the bus at the bus stop

iii. This application will help passengers to plan their journey and trip where ever

their destinations effectively and clearly.

Page 19: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

7

CHAPTER 2

LITERATURE REVIEW

RapidKL is a sub brand of myRapid a company of Prasarana Malaysia Berhad.

RapidKL buses provided services to 6 main areas of Klang Valley with a total of 165 routes.

RapidKL Bus operate whopping 18.5 hours daily at 5.30 am to 12 am midnight (Abdullah,

2013). RapidKL Bus commonly divided into categories that were city shuttles using the

letter ‘B’ stand for Bandar for example was B114. Secondly trunk services using letter ‘T’

stand for Tempatan for example was T323. Lastly express services using letter ‘E’ stand

for Ekspres for example was E1. These codes are provided to ease passengers to ride the

bus and guide them to identify which bus should they ride to arrive at their destination

safely.

Peoples are easily to become a prey of crimes while they waiting at the bus stops.

Mostly woman and children are become victims of crimes. A survey made in 1994 and

1995 by Los Angeles Metropolitan Transportation Authority, police indicate the data that

majority of reported crime happen on bus and bus stops. The crimes at bus stops being

increased and concentrated (Cervero, 1997). A limited number of bus stops attract the

excessive amount of crime incidents. Mostly number of crimes occur during rush hours of

late afternoon, early evening, and at night when there are a few pedestrians walking around

bus stops. It is reported that transit riders run twice the risk to become a victims compared

to non-transit riders. People especially children are risky to accidents. They should wait in

a safe place away from the road. Kids should never speak to strangers and never get into

the car with a stranger. Do not run and play while waiting the bus (Cervero, 1997).

Page 20: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

8

2.1 Public Transport Applications

Real-time arrival estimation system is vital today to ensure passenger could get

information when bus is arrived. Actually real time arrival estimation system give benefits

to bus transit company and passengers (Haghani & Banihashemi, 2002). It could save

money. The high cost of diesel fuel and transit labor require that transit agencies operate as

efficiently as possible. A good real time prediction system give big impact by reduce

significant cost. Once these areas is cut, the remaining route segments can be reorganized

and served using fewer routes, vehicles, and operators (Schweiger, 2003).

In Malaysia, the most popular web-based system was www.myrapid.com.my portal

“Plan My Journey”. This system provide a plan for a tourist or bus riders to ride public

transportation either LRT, BRT, Monorail or RapidKL Bus. Passengers fill in depart

location and the destination they heading. There are an options to go by Bus, Rail or both.

The departure time also provided to estimate when the bus or rail trip arrive at current

location. After that, system will give result what transportation should they ride. The travel

time provided and Estimated Time of Arrival (ETA) is given. Basically in Malaysia there

are no specific prediction time system for a bus transportation because Malaysian still

prefer using their own vehicles. Prediction time arrival of bus many used at Europe because

their government encourage their citizens to ride public transportation. Figure 2.1 shows

the rapidkl system.

Page 21: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

9

Figure 2.1: myrapid bus system

Page 22: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

10

In Chicago, there is one system is used to tracked the location of the bus called

ctabustracker.com by Chicago Transit Authority (CTA). CTA Bus Tracker using GPS

devices to give data location back to their server. Then in real time, they show the passenger

where the bus on map and estimate when they will arrive at bus stops. If bus went on an

irregular route, the system could not predict the accurate arrival time of the bus.

Furthermore, they could not locate the bus on map. If bus is unable to move for several

minutes because of being stuck on irregular event e.g. (traffic jam or stop by freight train

at crossing and etc), arrival estimate will be switched to “DELAYED”. During that time

the bus stop transmitting data to the server and disappear from the website.

Figure 2.2: CTA bus tracking system

Page 23: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

11

In London, there is one system used was Transport for London. The system used

domain named tfl.gov.uk. In the portal, passenger choose public transportation either Bus,

Tube or Overground or TFL Rail or DLR or Tram, River or Emirates Air Line. The Bus

passenger will choose number of bus such as 1-50, then passenger choose ‘3’.Number ‘3’

was towards Crystal Palace. They list all of the streets. One street such as ‘Trafalgar Sq /

Charing Cross Stn’ is chosen. The next bus is listed from bus number ‘3’. The estimate

arrival time is given in next column of the list of the bus. This system update is not real

time because they do not give exact location if irregular incident occur such as traffic jam

or flat tire.

Figure 2.3: TFL bus tracking system

Page 24: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

12

In Bridgeport, the city of Connecticut, United States, there is one system called

GBT tracker (Greater Bridgeport Transit) provides local, regional and express bus

throughout the Bridgeport region with routes extending from Milford to Norwalk and from

Bridgeport to Naugatuck Valley. It included a map-click through map showing all the

routes in GBT system along with timetables and schedules for individual routes. Web-

watch is its real time information system that allows passengers to track bus.

Figure 2.4: GBT bus system

Page 25: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

13

All bus system integrated mostly similar to each other. Passenger or transit rider

will request route number or station name to get the estimated arrival time of the bus. Bus

managements design bus operations with convenient headway and release the bus schedule

based on bus operation manual standards. The availability of real-time bus information at

stops will help passengers plan their bus trips efficiently and reduce long queues and waiting

times at stops.

2.2 Distance Calculation Techniques

Distance is a numerical description of how far apart objects are. In physics context,

distance is a physical length, or an estimation based on other criteria. In mathematics, a

distance function or metric is a generalization of physical distance concept (Mwemezi &

Huang, 2011). The techniques popular used is Euclidean and Haversine. If we want to

calculate the distance between two point, we must consider the shape of the earth

(Mwemezi & Huang, 2011). For the example, the assumption that interior angle of a

triangle add up to 180 degrees is no longer true. People use this mathematics to measure

the land, construct religious buildings, and calculate the positions of stars and planets. In

fact, we still take our calendar and our measurement of time from the positions of stars and

planets.

Page 26: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

14

2.2.1 Euclidean

Euclidean distance can be produced efficiently by sequential algorithms. The map

indicates, for each pixel in the objects (or the background) of the originally binary picture,

the shortest distance to the nearest pixel in the background (or the objects). In mathematics,

Euclidean distance is said as an ordinary straight line distance between two points. Despite

the development of numerous types of geometry. Euclidean geometry is still by far the most

used geometrical tool of applied scientist. Euclidean is also known as Cartesian Distance .

Geometry in the earliest was measuring land. Ancient, countries like Babylonia and Assyria

often flooded, this mean that people live in the river banks had to measure out the

boundaries of their land. This made them expert in geometry of flat surfaces very quickly.

They learn how to create right angles and right-angle triangles and they could calculate

areas using simple multiplication (Gower, 1982).

Euclidean geometry is named after the Greek mathematician, Euclid. His focus was

on using logical thinking and deductive reasoning to make mathematical statement, and

then go on to prove them. Euclidean geometry focuses on point lines and shape on flat

surfaces or planes. It is not concerned with what happen when the surfaces curves. Actually

when we want to find a distance between two points, we have set the points (latitude and

longitude) e.g point one (5,2) and point two (-3,-4), we using formula

. So the distance from point one and two is 10

(Danielsson, 1980).

Page 27: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

15

2.2.2 Haversine

If a vehicle had to move from point A to B and the distance those two points is

about 36 km and the geographical coordinates (latitude and longitude) and the point from

A(43.901N,79.222W) to B(43.901N,78.772W) is straight line. Since the latitude are the

same, it is considered that it had to head to east, but there are reason why that would not

work. For the record heading due to east in a straight line will result about 330 meters from

the target. The earth is spherical and as such follows a different set of geometric rules . The

flight routes to go far up north in arc is because that is the shortest route. Common mistake

in navigation is representing the geographical coordinates as points on a two dimensional

plane without realizing their angles about the center of earth. Navigation using something

else called the law of Haversine to calculate large distance on the spherical planet (Chopde

& Nichat, 2013).

Supposed a traveler want to go a city from point A to point B and he take road south

and a road to east and arrive at the destination. The total distance traveled is the length of

the road south plus road to east. However we must consider that the earth is sphere, if a

traveler want to go from one point in earth to another point in earth e.g Toronto to

Johannesburg and traveled in straight line, basically will be straight line on spherical

surface of the earth. Point from Toronto to Johannesburg in a world map is not be equal to

spherical distance because straight line on a sphere is actually part of great circle and great

circle basically is a circle whose planes travels through the center of the earth or passes

through the center of the earth. All distances calculated on the surface of the earth are

basically spherical great circle distance (Ganesh & Kumar, 2015).

Page 28: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

16

2.3 Summary

The absence of information on arrival times at stops or inaccurate information will

affect the uncertainty regarding the frequency of buses at stops. For example, in the case of

30-min bus frequency, if the first bus arrives too early and the next bus arrives quite late,

the service frequency will not comply with the information of one bus every 30 minutes.

The passengers will have a negative impression regarding the service because they had

assumed that the bus would arrive within 30 min. So it is very important to the system to

implement the specific calculation to ease users and passengers to know the arrival time of

the bus (Abdul Wahab, Borhan, & OK Rahmat, 2017).

Page 29: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

17

CHAPTER 3

METHODOLOGY

3.1 Project Life Cycle

In this section, the detail methodology that used to develop this system is described.

The use of the methodology is to solve all the problem arising and to ensure that the project

will works as well as the planning to develop this system smoothly and complete within the

given time. There are many types of methodology that we can applied and used in the

development of the system. The approach must be chosen correctly so that it is suitable for

the development of the project. It is the important step to guide the researcher to manage

the given task. Hence, this project hence on to use Waterfall Model for this project. The

details of every phases that involved is described

Waterfall model is a model which was develop for software development. The basic

idea it is called as such because the model develop systematically from one phases to other

phase in downwards style like a waterfall. The phases consist of definition study or analysis,

basic design, technical design, construction and implementation, testing, integration and

maintenance. The reason why this model is chosen because it’s parallel to the time taken

to complete this project which is for two semester.

Page 30: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

18

Figure 3.1:Waterfall Model

Waterfall model has been chosen based on the following consideration:

1) Project Monitoring

- Each phase of the development is monitored from time to time to ensure all the system

module match earlier system requirement.

2) Allow changes

- Any changes in developing the system can be implement at every phases to improve

the functionality of the system.

Page 31: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

19

3) Save cost

- The development of the system can save the cost because the information collected at

each phases are very particular until the final test of the system.

This project is using Structured Analysis and Design Methodology (SSADM) by

applies waterfall model. This methodology is adaptable to time given for complete the task.

It starts with the planning, requirement analysis, design, implementation and testing and

operation and maintenance. Every phase must fulfil the requirement specification. After the

system complete, it will undergo maintenance as final test.

3.1.1 Planning phase

The objective in this phase is to choose and decide the system and title for this project

with supervisor. The title that has been agreed to proceed was Public Bus Transportation

Tracking and Arrival Time Estimation using Haversine. This system will develop for

passengers and transit riders to estimate the bus arrival time of the bus. An abstract is done

based on information gathered and the system that has been agreed to develop.

Page 32: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

20

3.1.2 Requirement Analysis and Specification phase

The objective in this phase is to gather all the requirement needed to develop the

system and analyze the existing system. In this phase, the information gather regarding on

online appointment and the way to implement the scheduling technique is based on the

analyzing from the internet searching to understand more about the system will develop.

For better understanding about the existing bus tracking application, an observation of the

real time system an observation of the real system is done by looking the system that are

already had. Technique used also discovered in this project.

3.1.3 Design Phases

Design phases contains several diagram to show the process of the system will

functioning. This phases contain Context Diagram, Data Flow Diagram (DFD) Level 0,

and Entity Relationship Diagram (ERD). These entire diagram is the guide for user to

understand the flow of the system that will be functioning. The database for overall system

also is develop at this phase.

3.1.4 Implementation Phase

This phase will transform the design into the real system by implementing the

coding. This project developing using GPS/GSM module to implement at bus to get the

location of the bus, plus could capture the ground speed of the bus to estimate when the bus

is arrived at bus stops or bus stations. RFID tag and reader are used in this project. Tag is

put on bus stops or bus stations while the reader is on the bus which bus has power source.

The GPS module is on the bus to track and every 5 minutes it will capture the ground speed

of the bus so that it could estimate the time arrival of the bus.

Page 33: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

21

Android Studio is used to create the mobile platform that used by users or passenger to

request the arrival or departures of the bus.

3.1.5 Testing Phase

After writing the code, the system module is tested by using single unit testing to

test the single module of the system. Then, the integration testing is conducted to test the

integrated modules. After that, system testing in conducted to test error of the whole

system. Any errors or bugs will be fixed and the system will repeat the testing phase until

there none of errors and bugs are founds. The finishing of testing phase, will released the

first version of the system.

3.1.6 Deployment Phase

After the system is bug free, the system can be released and users can use the

system. Once the system is in the steady state, it is reviewed that the system has meet all

the goals, requirement and the objective for the project plan satisfactory results.

Page 34: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

22

3.2 Gantt Chart

Figure 3.2: Gantt Chart

No. Tasks Weeks

2 4 6 8 10 12 14 16 18 20 22 24 26 28 30

1 Planning System

1.1 Problem

Definition

1.2 Project

Identification

1.3 Project

Proposal

2 System Analysis

2.1 Analysis of

System

Operation and

current

Problem

2.2 Specification

of

Requirements

2.3 Selection of

Technical

Options

3 Designing System

3.1 Data Design

3.2 Process

Design

3.3 Physical

Design

4 Implementing

System

4.1 Construct

System

4.2 Install System

5 Performing Test

5.1 System Test

5.2 Maintain

System

6 Document System

7 Presentation &

Submission

Page 35: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

23

3.3 System Requirement

3.3.1 Software

List of software used in this project

Table 3.1: List of software requirement

No Software Name Description

1 Android Studio Platform to build android application

2 Notepad ++ Editor to write PHP language for web

3 Xampp Act as a local server to run and test the system

4 Adobe Photoshop Platform to design header and logo of the

system

5 Java JDK Development environment for application

6 Google Chrome Browser to open the web system

7 MySQL Platform for the database of the system

8 Microsoft Office Word 2013 Platform for documentation the system

9 Microsoft Office Power Point

2013

Platform to manage the presentation slide

10 Arduino 1.6.12 Programming IDE`

11 Arduino Bootloader Programmer

12 AVR GCC Compiler

Page 36: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

24

3.3.2 Hardware

List of hardware used in this project

Table 3.2: List of hardware requirement

No Item Name Description

1 Laptop

(Asus : A556U)

Processor: Intel Core i7- 6500U CPU @ 2.50 GHz

RAM : 12GB

Operating System: Windows 10

System Type: 64-bit Operating System, x64-based

processor

2 ATmega328

Microcontroller With

Arduino Bootloader

Arduino module

3 SIM800A GSM

MODEM

4 GPS Receiver Receive the GPS transmission

5 7.5V DC Adapter Power supply

6 5V Regulated Power

supply

Power supply

7 RC522 RFID RFID reader and tag

Page 37: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

25

3.4 System Design

3.4.1 Framework Design

Figure 3.3: Framework of Bus tracking system

Page 38: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

26

3.4.2 Process Design

3.4.2.1 Context Diagram

Figure 3.4: Context Diagram

There are only User or passenger involved, user request bus number and the system will

send the ETA of the bus to arrive at bus stop. Authorized admin will authenticate to access

the system as a bus management system. They could manage the bus information regarding

the request by the user. At the end, the system could generate report upon request. IOT will

update automatically the location of the bus heading to next bus stop.

0

Public Bus Transportation and

Arrival Time Estimation using

Haversine

ADMIN

IOT USER

Admin Profile

Bus info

Bus report

Estimation Time Arrival

Bus number Update automatically

Verification admin

Page 39: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

27

3.4.2.2 Data Flow Diagram Level 0

Figure 3.5: Data Flow Diagram Level 0

1.0

Register Admin

2.0

Manage Bus Information

3.0

Calculate Bus Arrival Time

4.0

Generate Report

ADMIN

IOT

USER

D1

D3

D5

D2

D4

ADMIN

BUS

ARRIVAL

ROUTE

STATION

admin

profile

bus info

station info

bus info

arrival info

arrival detail

bus data

route data

arrival data

time estimation

bus no

Estimated Time Arrival station data

bus data

report detail arrival data

Admin verification

route data

station data

route info

location detail

Page 40: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

28

Figure 3.5 show the data flow that consist of four processes and five data stores. The

processes are register admin, manage bus information, calculate bus arrival time, and

generate report. The report will generated based on the data accumulated all of those data

stores.

3.4.3 Data Model

3.4.3.1 Entity Relational Diagram

Figure 3.6: Entity Relational Diagram

BUS

ROUTE

STATION

has

Route_No

Route_Name

BusID

has

ADMIN

AdminID

Admin_Pwd

Admin_UName

manage

StationID

Station_Name

ARRIVAL

Time_Arrive

BusID StationID

ARRIVAL

Plate_No

Route_No

Latitude

Longitude

CheckpointID

Page 41: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

29

Figure 3.6 shows ER Diagram, An entity-relationship diagram (ERD) illustrates system’s

entities information and entities’ relationship. ERD composed of 3 things such as

identifying and defining the entities, determine entities’ interaction and the cardinality of

the relationship. Every boxes illustrate the table in database and lines is to illustrate

relationship.

3.4.3.2 Database Scheme

Table 3.1: Admin Table

Attribute Explanation Data Type Size Remark

AdminID Identification of

admin

VARCHAR 10 PK

Admin_UName Admin Name VARCHAR 30

Admin_Pwd Admin Password VARCHAR 10

Table 3.2: Bus Table

Attribute Explanation Data Type Size Remark

BusID Identification of

bus

VARCHAR 5 PK

Plate_No Bus plate number INT 6

Route_No Identification of

route

INT 2 FK

Page 42: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

30

Table 3.3: Route Table

Attribute Explanation Data Type Size Remark

Route_No Identification of

route

INT 2 PK

Route_Name Route name VARCHAR 20

CheckpointID Identification of

checkpoint every

5 minutes

INT 20

Table 3.4: Table Station

Attribute Explanation Data Type Size Remark

StationID Identification of

station or stop

VARCHAR 10 PK

Station_Name Station Name VARCHAR 20

Latitude Latitude of bus

location

VARCHAR 10

Longitude Longitude of bus

location

VARCHAR 10

Table 3.5: Arrival Table

Attribute Explanation Data Type Size Remark

Time_Arrive Arrival Time INT 10

BusID Identification of

bus

VARCHAR 5 FK

StationID Identification of

station or stop

VARCHAR 10 FK

Page 43: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

31

3.4.4 Interfaces

3.4.4.1 Passenger

Figure 3.4: Interface design for Passenger request for estimation arrival time

Figure 3.4 shows that the interface by passenger request for the route number and the

system will give back the arrival time of the bus at the bus stops. It will display 3

upcoming bus to arrive.

Page 44: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

32

Figure 3.5: Interface design for live view map of the bus

Figure 3.5 shows the interface design for live view map to see map-through where the bus

stop either southbound, northbound, westbound or eastbound, so that user can make sure

where exactly they heading for their destination.

Page 45: PUBLIC BUS TRANSPORTATION TRACKING AND ARRIVAL …

33

3.5 References

Abdul Wahab, R., Borhan, M. N., & OK Rahmat, R. A. A. (2017). PREDICTION OF

BUS ARRIVAL TIMES AT BUS STOP. Organic Syntheses, 5, 99. Retrieved from

http://onlinelibrary.wiley.com/doi/10.1002/0471264180.os005.31/full

Abdullah, A. A. (2013). Rapidkl Bus Service in City Center , Kuala Lumpur , Malaysia :

An Epitome of Good Service ? International Journal of Academic Research in

Business and Social Sciences, 3(4), 333–349.

Cervero, R. (1997). Hot Spots of Bus Stop Crime: The Importance of Environmental

Attributes, 2(2), 107–123. https://doi.org/10.1068/a201285

Chopde, N., & Nichat, M. (2013). Landmark Based Shortest Path Detection by Using A*

and Haversine Formula. GH Raisoni College of Engineering and …, 1(2), 298–302.

Retrieved from

http://www.ijircce.com/upload/2013/april/17_V1204030_Landmark_H.pdf

Cortés, C. E., Fernández, R., & Burgos, V. (2007). Modeling Passengers, Buses, and

Stops in Traffic Microsimulators: MISTRANSIT Approach on PARAMICS

Platform. Transportation Research Board 86th Annual Meeting, (March). Retrieved

from http://trid.trb.org.globalproxy.cvt.dk/view.aspx?id=802638

Danielsson, P. E. (1980). Euclidean Distance Mapping. Computer Graphics and Image

Processing, 14(3), 227–248. https://doi.org/10.1016/0146-664X(80)90054-4

Dissertation, a, & Jeong, R. a N. H. E. E. (2004). the Prediction of Bus Arrival Time

Using Automatic Vehicle Location Systems Data the Prediction of Bus Arrival

Time. Information Systems, (December).

Ganesh, & Kumar, V. (2015). Indoor Wireless Localization using Haversine Formula.

Iarjset, 2(7), 59–63. https://doi.org/10.17148/IARJSET.2015.2713

Gower, J. C. (1982). Euclidean Distance Geometry. Mathematical Scientist, 7(1), 1–14.

Retrieved from http://convexoptimization.com/TOOLS/Gower2.pdf

Haghani, A., & Banihashemi, M. (2002). Heuristic Approaches for Solving Large-scale

Bus transit Vehicle Scheduling Problem with Route Time Constraints.

Transportation Research Part A: Policy and Practice, 36(4), 309–333.

https://doi.org/10.1016/S0965-8564(01)00004-0

Mwemezi, J. J., & Huang, Y. (2011). Optimal Facility Location on Spherical Surfaces:

Algorithm and Application. New York Science Journal, 44(77), 21–28. Retrieved

from

http://www.sciencepub.net/newyork%5Cnhttp://www.americanscience.org%5Cnhttp

://www.sciencepub.net/newyork.

Schweiger, C. (2003). TCRP Synthesis 48: Real-Time Bus Arrival Information Systems.

In Transit Cooperative Research Program (p. 71).