Bus tracking application project report

43
1 CHAPTER 1 INTRODUCTION There are buses made available for passengers travelling distances, but not many passengers have complete information about these buses. Complete information namely the number of buses that go to the required destination, bus numbers, bus timings, the routes through which the bus would pass, time taken for the bus to reach, maps that would guide the passenger with his/her route and most importantly, track the current location of the bus and give the correct time for the bus to reach its bus stop. The proposed system deals with overcoming the problems stated above. The system is an Android application that gives necessary information about all the buses travelling in Pune. This information overcomes the problems faced in the previously built application “Pune Bus Guide”. The platform chosen for this kind of system is android, reason being Android Operating System has come up on a very large scale and is owned by almost every second person. Also, Android is a user friendly platform, thereby enabling ease of access for all the users. A number of applications made for the Android Operating System is increasing on a large scale ever since its advent. Android is an open source mobile software environment. Brought up by Google, the operating system has been made Linux based and uses Java programming language. It has a virtual machine that is used to optimize memory usage as well as resources. This application has been developed using IDE (Android Studio 1.6) with ADT (Android Development Tools) and Android SDK (Software Development Kit). There are a number of constraints that need to be satisfied.

Transcript of Bus tracking application project report

Page 1: Bus tracking application project report

1

CHAPTER 1

INTRODUCTION

There are buses made available for passengers travelling distances, but not many passengers

have complete information about these buses. Complete information namely the number of

buses that go to the required destination, bus numbers, bus timings, the routes through which

the bus would pass, time taken for the bus to reach, maps that would guide the passenger

with his/her route and most importantly, track the current location of the bus and give the

correct time for the bus to reach its bus stop. The proposed system deals with overcoming

the problems stated above. The system is an Android application that gives necessary

information about all the buses travelling in Pune. This information overcomes the problems

faced in the previously built application “Pune Bus Guide”. The platform chosen for this

kind of system is android, reason being Android Operating System has come up on a very

large scale and is owned by almost every second person. Also, Android is a user friendly

platform, thereby enabling ease of access for all the users. A number of applications made

for the Android Operating System is increasing on a large scale ever since its advent.

Android is an open source mobile software environment.

Brought up by Google, the operating system has been made Linux based and uses Java

programming language. It has a virtual machine that is used to optimize memory usage as

well as resources. This application has been developed using IDE (Android Studio 1.6) with

ADT (Android Development Tools) and Android SDK (Software Development Kit). There

are a number of constraints that need to be satisfied.

Page 2: Bus tracking application project report

2

1.1 Purpose

The main goal of the proposed work is to improve the Bus system by adding the necessary

additional features into the application, like accurate bus timings, correct bus numbers and

moreover adding a GPS tracker into it. This study accepts input in the form of selection of

the source and destination and selection of the bus travelling the distance to display the entire

details about the routes and also track the location of the respective bus and give the map for

the same.

The last two decades have seen growing interest in the development of Android based

platform. Our review of this area shows that there have been only few approaches that

provide automated tools for the functioning of the application:

1. An application has been implemented in Pune, named “Pune Bus Guide”. This application

gives the way to the destination correctly, but the number of drawbacks that it has is greater

than the number of advantages. It does not show the passengers current location even if

he/she is connected to the GPS. Also, this application has been proven useless as it does not

display the bus numbers, so the passengers find it very hard to know the number and time of

arrival of the respective buses. It does not have a real time bus tracking service or does not

even generate maps for the users ease. This application has never been updated ever since

its development. Moreover, this application has bugs which makes it all the more difficult

for the user to use it.

2. Another application that was implemented in Mumbai, named “M-Indicator – Mumbai”

has drawbacks like: It displays matter which is the same as what is online. Its latest updates

have given issues on every Android mobile supporting even the most recent device version.

The “A to B” module of buses has given problems. Whenever an option for the source to

destination is selected, the field still remains blank, i.e. no bus routes are displayed.

3. The application built in Delhi named “Delhi Bus Navigator” has drawbacks like: The

application works smoothly when offline, but works very badly when connected to the

Internet. The application gives information about direct routes only. It does not give

information about the alternate routes. This application has bugs due to which it lags all the

time. Most of the time the application crashes when requested for specific bus routes.

Page 3: Bus tracking application project report

3

4. The application developed in Bengaluru named “Bangalore BMTC Info” has drawbacks

like: The application is never in an updated condition. The application has fed in wrong

routes on several buses and given no updates to fix them. After the minimization and

restoration of the application, it cannot search anything. This application crashes almost

always. The application is not user friendly with a complicated User Interface (UI).

5. The application developed in Chennai named “Chennai Bus Route” has the following

drawbacks: The application works fine, but the bus timings have not been mentioned. Not

all bus stops are updated. The application does not display maps.

1.2 Scope

Many cities have found that GPS tracking system not only improve the efficiency of city bus

operation, but also encourage commuters to take the advantage of city bus system.

Many city bus system have discovered that GPS tracking system which allows to monitor

the location and arrival time of their bus actually increase the number of people using city

buses for routine communing.

The application is a user friendly one that anyone can access for free of cost. The basic idea

for this project was to guide the bus travelers with the routes, all the possible stops that come

on their way to the destination and moreover, display maps and track their locations and

show the estimate remaining time required to reach. The aim is to overcome all the

drawbacks faced in all the previous applications and generate fast and accurate results. The

proposed system has been divided into two modules as follows. Module 1 gives information

about all the routes from the source to the destination and give maps for the same. Module

2 give information about all the buses along with the bus numbers that go through the

selected stops, track the location of the selected bus and send this information to the

passenger giving him/her the estimate time required for the bus to reach. This is done using

the Client-Server technology.

Page 4: Bus tracking application project report

4

1.3 Software Development Life Cycle

The System Development Life Cycle framework provides system designers and developers

to follow a sequence of activities. It consists of a set of steps or phases in which each phase

of the SDLC uses the results of the previous one.

A Systems Development Life Cycle (SDLC) adheres to important phases that are essential

for developers, such as planning, analysis, designs and implementation and are explained in

the section below. A number of system development life cycle (SDLC) models have been

created: waterfall, fountain and spiral build and fix, rapid prototyping, incremental, and

synchronize and stabilize. The oldest of these, and the best known, is the waterfall model: a

sequence of stages in which the output of each stage becomes the input for the next. These

stages can be characterized and divided up in different ways, including the following:

Project planning, feasibility study: Establishes a high-level view of the intended

project and determines its goals.

Systems analysis, requirements definition: Refines project goals into defined

functions and operation of the intended application. Analyzes end-user information

needs.

Systems design: Describes desired features and operations in detail, including screen

layouts, business rules, process diagrams, pseudo code and other documentation.

Implementation: The real code is written here.

Integration and testing: Brings all the pieces together into a special testing

environment, then checks for errors, bugs and interoperability.

Acceptance, installation, deployment: The final stage of initial development, where

the software is put into production and runs actual business.

Maintenance: What happens during the rest of the software's life: changes,

correction, additions and moves to a different computing platform and more? This,

the least glamorous and perhaps most important step of all, goes on seemingly

forever.

Page 5: Bus tracking application project report

5

Fig 1.1 System Development Life Cycle

1.4 Feasibility Study

A feasibility analysis usually involves a thorough assessment of the operational (need),

financial and technical aspects of a proposal. Feasibility study is the test of the system

proposal made to identify whether the user needs may be satisfied using the current software

and hardware technologies, whether the system will be cost effective from a business point

of view and whether it can be developed with the given budgetary constraints. A feasibility

study should be relatively cheap and done at the earliest possible time. Depending on the

study, the decision is made whether to go ahead with a more detailed analysis. When a new

project is proposed, it normally goes through feasibility assessment. Feasibility study is

carried out to determine whether the proposed system is possible to develop with available

resources and what should be the cost consideration. Facts considered in the feasibility

analysis were-

Technical Feasibility

Economic Feasibility

Behavioral Feasibility

Page 6: Bus tracking application project report

6

1.4.1 Technical Feasibility

Technical feasibility includes whether the technology is available in the market for

development and its availability. The assessment of technical feasibility must be based on

an outline design of system requirements in terms of input, output, files, programs and

procedures.

This can be qualified in terms of volumes of data, trends, frequency of updating, cycles of

activity etc., in order to give an introduction of technical system.

1.4.2 Economic Feasibility

This feasibility study present tangible and intangible benefits from the project by comparing

the development and operational cost. The technique of cost benefit analysis is often used as

a basis for assessing economic feasibility. This system needs some more initial investment

than the existing system, but it can be justifiable that it will improve quality of service.

Thus feasibility study should center along the following points:

Improvement resulting over the existing method in terms of accuracy, timeliness.

Cost comparison

Estimate on the life expectancy of the hardware.

1.4.3 Behavioral/Operational Feasibility

This analysis involves how it will work when it is installed and the assessment of political

and managerial environment in which it is implemented. People are inherently resistant to

change and computers have been known to facilitate change. The new proposed system is

very much useful to the users and therefore it will accept broad audience from around the

world.

Page 7: Bus tracking application project report

7

CHAPTER-2

SYSTEM ANALYSIS

To design and build a GPS tracking system for fleet based vehicles that will provide two-

way communications to the drivers. It uses following environment and tools for the

development of the project application. All the information is provided below.

In this chapter we will discuss about the Android architected in the form of a software stack

comprising applications, an operating system, run-time environment, middleware, services

and libraries. This architecture can, perhaps, best be represented visually. Each layer of the

stack, and the corresponding elements within each layer, are tightly integrated and carefully

tuned to provide the optimal application development and execution environment for mobile

devices.

2.1 Android

Android is a mobile operating system (OS) currently developed by Google, based on

the Linux kernel and designed primarily for touchscreen mobile devices such

as smartphones and tablets. Android's user interface is mainly based on direct manipulation,

using touch gestures that loosely correspond to real-world actions, such as swiping, tapping

and pinching, to manipulate on-screen objects, along with a virtual keyboard for text input.

In addition to touchscreen devices, Google has further developed Android TV for

televisions, Android Auto for cars, and Android Wear for wrist watches, each with a

specialized user interface. Variants of Android are also used on notebooks, game

consoles, digital cameras, and other electronics. Now we have phones which can even access

GPS, GPRS, Wi-Fi, NFC and lot of other cool and advanced features which you cannot even

imagine. So in this Mobile world of this complication. Android is one of those operating

system platforms which made it easy for manufacturers to design top class phones.

Stored and copied to a stream where the actual data is transferred. Due to its native

characteristic, it runs in the background and waits for a possible transfer operation. They are

called right after the related button is pressed. Services retrieve values from static class called

Page 8: Bus tracking application project report

8

FinalValues.java through intent's extended data. They mainly include Final Values

.EXTRAS_GROUP_OWNER_ADDRESS and Android OS.

As it is widely known, android is a Linux-based operating system led by Google. It is mostly

developed for mobile devices to bring simplicity, functionality and efficiency to the market.

Android is an open source project and it has a large number of developers writing

applications. Developers write applications primarily in Java (Stephen Shankland, 2007) and

applications can be downloaded mostly through official online store called Google Play.

Currently there is 600,000 applications available on Google Play and so far 20 billion

applications downloaded from this store (engadget, 2012).

2.1.1 Overview

Android runs on Linux with libraries and libraries written in C. Dan Morrill, Android

Engineer in Google, explained that Android is not a specification, or a distribution in the

traditional Linux sense. It's not a collection of replaceable components. Android is a chunk

of software that you port to a device. (Dan Morrill, 2010)

Android uses the Dalvik Virtual Machine to run Dalvik Executable code translated from

Java bytecode. All standard APIs are defined in terms of classes, interfaces, methods and

objects. In terms of hardware platform, ARM architecture is main platform for Android.

However, there is also support for x86 architecture.

2.1.2 Architecture

Android runs on Linux under Dalvik VM. Dalvik has a just-in-time compiler where the byte

code stored in memory is compiled to a machine code. Byte code can be defined as

‘intermediate level'. JIT compiler reads the bytecode in many sections and compiles

dynamically in order to run the program faster. Java performs checks on dependent portions

of the code and thus the code is compiled only before it is executed. When it is compiled

once, it is cached and set to be ready for later uses.

Page 9: Bus tracking application project report

9

Fig 2.1 Android Architecture

Page 10: Bus tracking application project report

10

2.2 Android Studio and Android SDK

Android Studio is the official IDE for Android app development, based on IntelliJ IDEA.

On top of IntelliJ's powerful code editor and developer tools, Android Studio offers even

more features that enhance your productivity when building Android apps, such as:

A flexible Gradle-based build system

Build variants and multiple APK file generation

Code templates to help you build common app features

A rich layout editor with support for drag and drop theme editing

Lint tools to catch performance, usability, version compatibility, and other problems

Code shrinking with ProGuard and resource shrinking with Gradle

Built-in support for Google Cloud Platform, making it easy to integrate Google

Cloud Messaging and App Engine

Android provides a custom plug-in for Android development called Android Development

Tool (ADT). It is designed to build Android applications. It lets the developer to establish

new Android projects, build and debug applications, and export APKs.

2.3 SQLite Database

SQLite is a relational database management system contained in a C programming library.

In contrast to many other database management systems, SQLite is not a client–

server database engine. Rather, it is embedded into the end program.

SQLite is ACID-compliant and implements most of the SQL standard, using a dynamically

and weakly typed SQL syntax that does not guarantee the domain integrity.

SQLite is a popular choice as embedded database software for local/client storage

in application software such as web browsers. It is arguably the most widely

deployed database engine, as it is used today by several widespread browsers, operating

Page 11: Bus tracking application project report

11

systems, and embedded systems, among others. SQLite has bindings to many programming

languages.

2.4 GPS Tracking Unit

A GPS tracking unit is a device, normally carried by a moving vehicle or person, that uses

the Global Positioning System to determine and track its precise location, and hence that of

its carrier, at intervals. The recorded location data can be stored within the tracking unit, or

it may be transmitted to a central location data base, or Internet-connected computer, using

a cellular (GPRS or SMS), radio, or satellite modem embedded in the unit. This allows the

asset's location to be displayed against a map backdrop either in real time or when analyzing

the track later, using GPS tracking software. Data tracking software is available

for smartphones with GPS capability.

2.5 GPS Tracking Unit Architecture

A GPS tracker essentially contains a GPS module to receive the GPS signal and calculate

the coordinates. For data loggers it contains large memory to store the coordinates, data

pushers additionally contains the GSM/GPRS modem to transmit this information to a

central computer either via SMS or via GPRS in form of IP packets.

2.5.1 Fundamentals

The GPS concept is based on time and the known position of specialized satellites. The

satellites carry very stable atomic clocks that are synchronized to each other and to ground

clocks. Any drift from true time maintained on the ground is corrected daily. Likewise, the

satellite locations are known with great precision. GPS receivers have clocks as well;

however, they are not synchronized with true time, and are less stable. GPS satellites

continuously transmit their current time and position. A GPS receiver monitors multiple

satellites and solves equations to determine the precise position of the receiver and its

deviation from true time. At a minimum, four satellites must be in view of the receiver for it

to compute four unknown quantities (three position coordinates and clock deviation from

satellite time).

Page 12: Bus tracking application project report

12

2.5.2 Mobile Phones with GPS Capability

Due in part to regulations encouraging mobile phone tracking, including E911, the majority

of GPS receivers are built into mobile telephones, with varying degrees of coverage and user

accessibility. Commercial navigation software is available for most 21st-

century smartphones as well as some Java-enabled phones that allow them to use an internal

or external GPS receiver (in the latter case, connecting via serial or Bluetooth). Some phones

using assisted GPS (A-GPS) function poorly when out of range of their carrier's cell towers.

Others can navigate worldwide with satellite GPS signals as well as a dedicated portable

GPS receiver does, upgrading their operation to A-GPS mode when in range. Still others

have a hybrid positioning system that can use other signals when GPS signals are

inadequate.

2.5.3 Mobile Messaging

Mobile messaging plays an essential role in LBS. Messaging, especially SMS, has been used

in combination with various LBS applications, such as location-based mobile

advertising. SMS is still the main technology carrying mobile advertising / marketing

campaigns to mobile phones. A classic example of LBS applications using SMS is the

delivery of mobile coupons or discounts to mobile subscribers who are near to advertising

restaurants, cafes, movie theatres. The Singaporean mobile operator Mobile One carried out

such an initiative in 2007 that involved many local marketers, what was reported to be a

huge success in terms of subscriber acceptance.

Companies offering location-based messaging (sometimes referred to as "geo-messaging")

include The Coupons App (US), Central (International), Zhiing (international), BluePont

(US), Dodgeball (US) and Beamster (Austria).

Page 13: Bus tracking application project report

13

CHAPTER 3

System Requirement Specification

A System Requirements Specification (abbreviated SRS when need to be distinct from

a Software Requirements Specification SRS) is a structured collection of information that

embodies the requirements of a system.

A business analyst, sometimes titled system analyst, is responsible for analyzing the

business needs of their clients and stakeholders to help identify business problems and

propose solutions. Within the systems development life cycle domain, the BA typically

performs a liaison function between the business side of an enterprise and the information

technology department or external service providers.

Software requirements specification establishes the basis for an agreement between

customers and contractors or suppliers (in market-driven projects, these roles may be played

by the marketing and development divisions) on what the software product is to do as well

as what it is not expected to do. Software requirements specification permits a rigorous

assessment of requirements before design can begin and reduces later redesign. It should

also provide a realistic basis for estimating product costs, risks, and schedules.

The software requirements specification document enlists enough and necessary

requirements that are required for the project development. To derive the requirements we

need to have clear and thorough understanding of the products to be developed or being

developed. This is achieved and refined with detailed and continuous communications with

the project team and customer till the completion of the software.

Page 14: Bus tracking application project report

14

3.1 Hardware Requirements

System Processor : Pentium P4

Mobile Processor : 1GHz or higher

Motherboard : Genuine Intel

RAM : 1 GB or higher

Memory : 200 MB or higher

3.2 Software Requirements:

Operating system : Windows XP

Technology Used : Android 4.1 or higher

IDE : Android Studio

Emulators : Micro emulator 555

Plug-in : ADT plug-in

Back-End : php, SQLite

Front-End : Android SDK

3.3 Web Server Requirement:

The Web Server Subsystem shall use insert-db.php & get.php to make HTTP

requests/ responses to Web Application Subsystem and the Database Subsystem.

Page 15: Bus tracking application project report

15

3.4 Device Permission Requirement

Map API requires some permissions in order to establish a connection. These must have

mention in Android manifest le. These permissions are:

Internet

This permission is required for to access the internet using the application.

ACCESS_COURSE_LOCATION

This permission is required for getting current location of user and bus using gsm

network

ACCESS_FINE_LOCATION

This permission is required for getting current location of user and bus using gsm

network

Page 16: Bus tracking application project report

16

CHAPTER 4

System Design

This chapter describes features, fragments, classes, architecture and the application itself by

providing necessary information of major components. First, an overall information is given

along with project's components and classes. Subsequently, the architecture details of the

application is discussed. Section 3.3 describes classes and methods under this sections.

4.1 Overview

Application starts with instantiating Location Manager. This is needed to track user location.

Detailed description regarding Location Manager is provided in this section. Next, UI and

user interaction handling sets up all necessary selections.

4.2 Components

In order to provide a detailed view concerning system mechanism, project can be

grouped in three segments. These are Location Manager, Fragments and AsyncTask &

Services.

The process in activity class and broadcast receiver intent, core fragments takes place where

they manage all handling and methods both in listing peers and establishing connection.

Core operations of the entire system is carried out with these two classes, namely as

MainActivity.java and GPSTracker.java

4.2.1 Location Manger

This class provides access to the system location services. These services allow applications

to obtain periodic updates of the device's geographical location, or to fire an application

specified Intent when the device enters the proximity of a given geographical location.

You do not instantiate this class directly; instead, retrieve it

through Context.getSystemService (Context.LOCATION_SERVICE).

Page 17: Bus tracking application project report

17

Unless noted, all Location API methods require

the ACCESS_COARSE_LOCATION or ACCESS_FINE_LOCATION permissions. If

your application only has the coarse permission then it will not have access to the GPS or

passive location providers. Other providers will still return location results, but the update

rate will be throttled and the exact location will be obfuscated to a coarse level of accuracy.

4.2.2 Fragments

Fragments handle core operations in this project such as Tracking, establishing connection,

opening sockets, showing details of buses. They are briefly responsible for managing all

session and configuring operations. Fragments also include asynchronous methods with

respect to file & text transfer as well as socket connection.

A Fragment is a piece of an application's user interface or behavior that can be placed in

an Activity and it represents a particular operation or interface that is running within a larger

Activity. A Fragment is closely tied to the Activity it is in, and cannot be used apart from

one. Though Fragment defines its own life cycle, that life cycle is dependent on its activity:

if the activity is stopped, no fragments inside of it can be started; when the activity is

destroyed, all fragments will be destroyed (Android, 2012).

Certainly, views can also be used in this regard. However, it is considerably reasonable

here to use fragments for some reasons. First of all, fragments are effective on creating

applications for various devices such as tablets and phones. If a developer desires to split

up views on different devices with different orientations and show them in two activities;

or show all the content as one on other devices, using fragment gives high edibility. In other

words, fragments can act as a small activity where it can essentially have multiple of them

on one screen.

Moreover, these multiple activities can cooperate and co-work in terms of communicating

with each other while they are visible. Thanks to its back stack management, pressing the

back button removes dynamically added fragments before the activity itself is eventually

finished. Lastly, it can have all sorts of services, operations such as AsyncTask, listeners,

and database access.

Page 18: Bus tracking application project report

18

4.2.3 AsyncTask & Services

Connection and data transfer operations are made by DeviceFragment.java class through

methods,

class SendPostReqAsyncTask extends AsyncTask<String, Void, String> {……}

AsyncTask process provides a simple way to maintain a background process with-out

working on other details such as threads and message loops. Its callback meth-ods help user

with scheduling tasks and updating UI. When a task executed, it goes through 4 steps.

However, in order to use AsyncTask class, at least one method, doInBackground(), must

be overridden. Methods are,

i. doInBackground() - This part runs in a seperate thread from the UI and con-

sists all the code which the application performs. It is called after onPreExecute

() and before onPostExecute().

ii. onPreExecute() - Called before thread starts running. It is used to setup a task

that is needed to be done in advance.

iii. onProgressUpdate() - Lets doInBackground() method pass data to UI thread.

iv. onPostExecute() - Runs after the background thread. It takes results from

doInBackground() method.

In this project, AsyncTasks are invoked on server side –

public void insertToDatabase(){…..} method in Server.java class - once a bus is assigned.

All tasks then go into a background process where the longitude and latitude of bus inserted

to server coming from services.

Page 19: Bus tracking application project report

19

Services are built for opening, binding a client socket and establishing connection between

server sides. When a connection is established, files and audio data is Final Values.

EXTRAS_GROUP_OWNER_PORT. Port numbers are determined as 8989 and 8988 for

audio data transfer and le transfer respectively.

Services and AsyncTasks are used in this study for particular reason. By definition, service

is used if there is a need for executing any long process in the back-ground. File sharing and

audio data transfer are maintained using service in order not to block any foreground process

and guarantee that the operation will not be interrupted. Services are best practice when there

are services for critical operation like sharing le or transferring data. On the other hand,

AsyncTasks provide a suit-able way to maintain background processing without handling

low-level details such threads, message loops. Its callback methods help to schedule tasks

and update interface when it is required. Since le sharing and audio data transfer are done

that are essentially isolated related to UI, using AsyncTask is best practice.

4.3 Block Diagram

Fig 4.1 System Block Diagram

Client has to enter in the application. To search for a bus, client has to enter the bus number

in the search bar. Then map is displayed which shows the current location of the bus. He can

also receive an alert notification when the bus came to the nearest stop. When the application

is launched, the home Activity fetches the routes from the server and binds it to the spinner

Page 20: Bus tracking application project report

20

for the client to select it. When the client selects a route, corresponding stops are fetched

from the server and binded to the spinner for the client to select. If the client selects “Track

Bus” then the location details of the bus for that route is fetched. If the client selects “Show

Map” then the location of the bus on the map will be displayed.

4.4 Flow Chart

Fig 4.2 Client Side Flow Chart

Page 21: Bus tracking application project report

21

Fig 4.3 Server Side Flow Chart

Page 22: Bus tracking application project report

22

4.5 Data Flow Diagram

The DFD was first developed by Larry Constiane as a way of expressing system in a

graphical form. A DFD, also known as Bubble Chart, has a purpose of clarifying system

requirement and identifying major transformation that will become the programs in the

system design.

DFD SYMBOLS

1. A SQUARE defines a source or destination of system data

2. An ARROW identifies data flow or data in motion. It is a pipeline through which

information flow.

3. A CIRCLE or a BUBBLE (Some people use an over bubble) represents a process

transforms in coming data flow into outgoing data flow.

4. An OPEN RECTANGLE is a data store or data at rest or a temporary rest repository of

data.

Page 23: Bus tracking application project report

23

4.5.1 Data flow Diagram Level 0

System User

Request Location

Server

Request Location

Send Location

Database

Fig 4.4 Data Flow Diagram

Page 24: Bus tracking application project report

24

4.6 Data Dictionary

Table 1. Schedule

Field Name Type Description

Bus_number Integer Primary Key

From Varchar

To Varchar

Time Varchar

Table 2.Route

Field name Type Description

Route_Name Varchar Primary Key

From Varchar

To Varchar

Number_of_Buses Integer

Bus_Number Integer

Page 25: Bus tracking application project report

25

4.7 The Entity Relationship Diagram (E-R Diagram)

We can express the overall logical structure of a database graphically with an ER diagram.

Its components are:

1 .Rectangles representing entity sets.

2. Ellipses representing attributes.

3. Diamonds representing relationship sets.

4. Lines linking attribute to entity sets and entity sets to relationship sets

Page 26: Bus tracking application project report

26

Fig 4.4 E-R Diagram(Client Side)

Page 27: Bus tracking application project report

27

Fig 4.5 E-R Diagram (Server Side)

Page 28: Bus tracking application project report

28

CHAPTER 5

Implementation

Project is designed in four parts where each part is responsible for different aspects.

Essentially, main activity handles instantiate methods and pre-configuration process for

Location Manager class such as manage the previous location, current location, distance

between two location and status check whether GPS is on or off. It also consists standard

Android life cycle methods e.g. onPause(), onResume() and onDestroy(). Particularly,

onDestroy() and onKeyDown() functions manage post-configuration process in or-der to

set the device for regular use. Killing services and setting speaker o again can be named as

these processes.

5.1 Overview

Location based bus tracking system server should be auto start on installation or boot up.

Then it can find current latitude and longitude value with previous latitude and longitude

value, and store it to server database. Database manager use to manage the database of the

application, then user will check for the bus and gets information from database for that

particular location then application will behave according to user interface application will

simply allow user to add, delete, and update the database.

Page 29: Bus tracking application project report

29

Fig 5.1 Working of a LBS Component

Using this application,

The passengers can easily select bus route number and their stop from the list of bus

route numbers and know where the bus is and how long will it take to reach their

stop.

They can also know the exact location of the bus on the Google Map which gives

them a better idea on the whereabouts of the bus.

The list of bus routes and their corresponding stops can be managed using the website

which gives the admin a better hold on the application.

This application helps the students and staff to track their buses and also college

authorities to manage efficiently.

Page 30: Bus tracking application project report

30

5.2 Activity Diagram

Activity diagram is basically a flow chart to represent the flow form one activity to

another activity. The activity can be described as an operation of the system. So the control

flow is drawn from one operation to another. This flow can be sequential, branched or

concurrent.

Fig 5.2 Activity Diagram

Page 31: Bus tracking application project report

31

5.3 Use-Case Diagram

A use case diagram at its simplest is a representation of a user's interaction with the system

that shows the relationship between the user and the different use cases in which the user is

involved. A use case diagram can identify the different types of users of a system and the

different use cases and will often be accompanied by other types of diagrams as well.

Fig 5.3 Use Case Diagram

Page 32: Bus tracking application project report

32

CHAPTER 6

TESTING

Testing is a process, which reveals errors in the program. It is the major quality measure

employed during software development. During software development. During testing, the

program is executed with a set of test cases and the output of the program for the test cases

is evaluated to determine if the program is performing as it is expected to perform.

6.1 TESTING STRATEGIES

In order to make sure that the system does not have errors, the different levels of

testing strategies that are applied at differing phases of software development are:

6.1.1 Unit Testing:

Unit Testing is done on individual modules as they are completed and become executable.

It is confined only to the designer's requirements.

Each module can be tested using the following two Strategies:

Black Box Testing:

In this strategy some test cases are generated as input conditions that fully execute all

functional requirements for the program. This testing has been uses to find errors in the

following categories:

Incorrect or missing functions

Interface errors

Errors in data structure or external database access

Performance errors

Initialization and termination errors.

Page 33: Bus tracking application project report

33

In this testing only the output is checked for correctness. The logical flow of the data is not

checked.

White Box testing:

In this the test cases are generated on the logic of each module by drawing flow graphs of

that module and logical decisions are tested on all the cases. It has been uses to generate the

test cases in the following cases:

Guarantee that all independent paths have been executed.

Execute all logical decisions on their true and false Sides.

Execute all loops at their boundaries and within their operational bounds

Execute internal data structures to ensure their validity

6.1.2 Integrating Testing:

Integration testing ensures that software and subsystems work together a whole. It tests the

interface of all the modules to make sure that the modules behave properly when integrated

together.

6.1.3 System Testing:

Involves in-house testing of the entire system before delivery to the user. Its aim is to satisfy

the user the system meets all requirements of the client's specifications.

6.1.4 Acceptance Testing:

It is a pre-delivery testing in which entire system is tested at client's site on real world data

to find errors.

Page 34: Bus tracking application project report

34

6.2 Test Approach

Testing can be done in two ways:

6.2.1 Bottom up Approach:

Testing can be performed starting from smallest and lowest level modules and proceeding

one at a time. For each module in bottom up testing a short program executes the module

and provides the needed data so that the module is asked to perform the way it will when

embedded within the larger system. When bottom level modules are tested attention turns to

those on the next level that use the lower level ones they are tested individually and then

linked with the previously examined lower level modules.

6.2.2 Top down approach:

This type of testing starts from upper level modules. Since the detailed activities usually

performed in the lower level routines are not provided stubs are written. A stub is a module

shell called by upper level module and that when reached properly will return a message to

the calling module indicating that proper interaction occurred. No attempt is made to verify

the correctness of the lower level module.

6.3 Validation and Verification:

The system has been tested and implemented successfully and thus ensured that all the

requirements as listed in the software requirements specification are completely fulfilled. In

case of erroneous input corresponding error messages are displayed.

In software project management, software testing, and software engineering, verification and

validation (V&V) is the process of checking that a software system meets specifications and

that it fulfills its intended purpose. It may also be referred to as software quality control. It

is normally the responsibility of software testers as part of the software development

lifecycle.

Page 35: Bus tracking application project report

35

Validation checks that the product design satisfies or fits the intended use (high-level

checking), i.e., the software meets the user requirements. This is done through dynamic

testing and other forms of review.

Verification and validation are not the same thing, although they are often confused. Boehm

succinctly expressed the difference between

Verification: Are we building the product right?

Validation: Are we building the right product?

According to the Capability Maturity Model (CMMI-SW v1.1),

Software Verification: The process of evaluating software to determine whether the products

of a given development phase satisfy the conditions imposed at the start of that phase[IEEE-

STD-610].

Software Validation: The process of evaluating software during or at the end of the

development process to determine whether it satisfies specified requirements[IEEE-STD-

610].

In other words, software verification is ensuring that the product has been built according to

the requirements and design specifications, while software validation ensures that the

product actually meets the user's needs, and that the specifications were correct in the first

place. Software verification ensures that "you built it right" Software validation ensures that

"you built the right thing". Software validation confirms that the product, as provided, will

fulfill its intended use.

From testing perspective:

Fault – wrong or missing function in the code.

Failure – the manifestation of a fault during execution.

Malfunction – according to its specification the system does not meet its specified

functionality.

Page 36: Bus tracking application project report

36

CHAPTER 7

SNAPSHOTS OF THE PROJECT

Page 37: Bus tracking application project report

37

Page 38: Bus tracking application project report

38

Page 39: Bus tracking application project report

39

Page 40: Bus tracking application project report

40

Page 41: Bus tracking application project report

41

CHAPTER 8

FUTURE SCOPE

This project will be put up on the cloud platform, so that it will be accessible by every

Android user.

The application will prove beneficial for every bus traveler, or even tourists. Not just

buses, but this application will be useful for every person travelling by any means of

transport.

The Location Tracker will give the exact location of the bus which will make it easy

for the passengers to travel.

Page 42: Bus tracking application project report

42

CHAPTER 9

CONCLUSION

The conclusions of this study suggest that knowledge of specific domain improves the

results. This Project has been implemented on Android platform. Also, different attributes

have been added to the project which will prove to be advantageous to the system. The

requirements and specifications have been listed above. This project is implemented using

Android and the SQL domain. Using the GPS system, the application will automatically

display the maps and routes to the different locations and also track the bus location using

client-server technology and forward it to the client device. It uses basic measurements of

distance between two locations and provides necessary details of each and every route for

people to easily pick up buses or any other conveyance possible on the specified route.

Specific location details are provided to the user along with bus no. so that the person can

identify the bus correctly. It uses remote server as its database. Due to this the records can

be easily manipulated on the device itself and the server burden gets reduced.

Page 43: Bus tracking application project report

43

References

References for the project development were taken from the following -

Aleksandar, Pejic; Szilveszter, Plet, “An Expert System for Tourists using Google

API”, 2009

Amit Kushwaha, Vineet Kushwaha, “Location Based Services using Android Mobile

Application”, ISSN: 2231-1963, 2009

Jianye Liu, Jianaun Yu, “Research on Development of Android Applications”, 2011

Fourth International Conference on Intelligent Networks and Intelligent Systems

2011

Robi Grgurina, Goran Brestovac and Tihana Galinac Grbac, “Development

Environment for Android Application Development: an Experience Report”,

MIPRO 2011, May 23-27, 2011

Google Play Store details “Pune Bus Guide”

https://play.google.com/store/apps/details?id=com.appsimplify.punebus

Google Play Store details “M-Indicator Mumbai”-

https://play.google.com/store/apps/details?id=com.mobond.mindicator

Google Play Store details “Delhi Bus Navigator” -

https://play.google.com/store/apps/details?id=com.hashtag.delhibusnavigator

Google Play Store details “Bangalore BMTC Info”-

https://play.google.com/store/apps/details?id=com.bmtc

Google Play Store details “Chennai Bus Route” -

https://play.google.com/store/apps/details?id=busroute.chennai

Google Play Store details “Ahmedabad BRTS” -

https://play.google.com/store/apps/details?id=in.hammerapps.brts