Académique Documents
Professionnel Documents
Culture Documents
JUNE 2013
iii
ACKNOWLEDGEMENT
Besides, I would like to convey my thanks to Hafiz for his guidance and help
throughout this project.
Lastly, I would like to thank my parents for their motivation, support and
consideration along the period of project development.
v
ABSTRACT
ABSTRAK
TABLE OF CONTENTS
DECLARATION ii
DEDICATION iii
ACKNOWLEDGEMENTS iv
ABSTRACT v
ABSTRAK vi
LIST OF TABLES x
LIST OF FIGURES xi
1 INTRODUCTION 1
1.1 Introduction 1
2 LITERATURE REVIEW 8
2.1 Introduction 8
2.2 GPS 8
2.7 Conclusion 21
ix
3 SYSTEM DESIGN 24
3.1 Introduction 24
3.6 Summary 32
4.1 Introduction 33
4.2 Results 33
5.1 Introduction 39
5.2 Conclusion 39
REFERENCES 41
x
LIST OF TABLES
LIST OF FIGURES
LIST OF ABBREVIATIONS
3D - Three Dimensional
3G - Third generation
ADS - Ambulance dispatch system
ART - Ambulance Response Time
ASCII - American Standard Code for Information Interchange
CAD - Computer aided dispatch
COM Port - Communication port
EMD - Emergency Medical dispatcher
EMS - Emergency medical service
GPRS - General Packet Radio Service
GPS - Global positioning system
GSM - Global System for Mobile Communication
GUI - Graphical User Interface
HEDS - Hospital Emergency Department System
ID - Identity
IDE - Integrated Development Environment
LCD - Liquid crystal display
MCS - Main Central System
NMEA - National Marine Electronics Association
OEHR - Online Electronic Health Record
OS - Operation System
PhD - Doctor of Philosophy
PPS - Precise Positioning Service
RS232 - Recommended Standard 232
SIM - Subscriber Identity Module
SMS - Short Message Service
SOA - Service-Oriented Architecture
xiv
CHAPTER 1
INTRODUCTION
1.1 Introduction
account the traffic condition at different periods and days when planning for the
ambulance dispatch.
This project aims to develop a basic ambulance dispatch system (ADS) based
on client server architecture in which client (ambulance) can send its latest
coordinate information to server (center) and update its location on electronic map.
Meanwhile, server can receive the latest coordinate information from client and
display the updated location of client on electronic map as well. At the same time,
the server can send SOS short message service (SMS) to all registered first aider.
A study shows that the university hospital (HUSM) ART (913.2 seconds) is
far below the international standard of ART (276.5 seconds) as a benchmark of a
good ambulance service (Shah et al., 2008). A short survey in 2004 shows that after
conducting emergency medical dispatcher (EMD) training program, ART is reduced
by 45% (Hisamuddin et al., 2007). However the ART in Malaysia was still far below
the international standard due to outdated communication tool in EMD program
(Shah et al., 2008).
This project consists of three main parts which are hardware design, software
development and ADS live test.
enquiry, keep sending coordinate information to server with certain time period if
operation enquiry is accepted, and lastly keep updating the latest coordinate
information on electronic map. Besides, software development also focuses on
acquiring the GPS information from GPS module through Serial Peripheral Interface
(SPI) using Intel board, and processing the information. To be specific, it is to extract
the longitude and latitude information from the National Marine Electronics
Association (NMEA) sentence before sending out the coordinate information to
server.
The third part is real time live test on the functionality and efficiency of the
ADS. The functionality and efficiency of the ADS is evaluated based on the stability
of established connection between server and client programs and also the accuracy
of location on both server and client programs. A car representing an ambulance is
used in the live test. The live test covers Universiti Teknologi Malaysia (UTM) area
only.
Forth, the server and client programs are tested to verify their functionality.
The functionality is judged based on the comparison of saved GPS coordinate log file
between client and server.
5
Fifth, the SMS Sender program is developed. In this stage, GUI is developed
and several functions are added such as initialization of GSM, mode choosing of
GSM, SMS services, display of all received SMS, and waiting of incoming SMS.
Start
Problem
To develop a basic ADS based on client
server architecture
Literature Review
Objective 1
To develop a basic communication
program of client server
Basic client server
communication Scope
development -- Connection between server and client is
established.
-- Text can be sent and received
Objective 2
To develop client program with GUI
Objective 3
To develop server program with GUI and
SMS Sender program with GUI.
Server program
development
Scope
No -- ID assignation, GPS coordinate
information extraction, update of client
status
-- GSM initialisation, GSM mode
choosing, SMS sending, display of all
received SMS, waiting of incoming SMS
Integration of client
server program
Objective 4
Live test ADS
Scope
Experimental ADS -- Comparison of GPS coordinate between
tested working? server and client
-- Accuracy of sent/received information
Yes
Outcome
Functional ADS A working of basic ADS based on client
server architecture
End
Figure 1.1: Process flow of ADS. Begin from the literature review on theory and
related project, then to client and server program development, and lastly live test the
functionality of ADS.
7
The rest of this thesis is organized in the following manner. In Chapter 2, the
theory of GPS, NMEA Protocol, and client server application are presented. Besides,
three related projects and one existing CAD system are reviewed and summarized in
Chapter 2.
In Chapter 3, the basic ADS design is explained in details. The system mainly
consists of two parts of design which are hardware design and software design.
Hardware design covered the peripheral devices used in this project while software
design covered the connection between server and client, functions included in each
program respectively and the design of SMS Sender program.
Chapter 4 presents the experimental setup and results obtained. There is also
discussion on problems encountered throughout this project.
Scope of Research
Figure 1.2: Chapters mapping based on the project research methodology. Chapter 2
discusses the theory and reviews of related project. Chapter 3 discusses hardware and
software design. Chapter 4 discusses on the equipment setup and result obtained.
Chapter 5 summarizes the project and outlined the direction of future works.
8
CHAPTER 2
LITERATURE REVIEW
2.1 Introduction
This chapter illustrates some basic concepts about GPS, NMEA Protocol and
client server application. Besides, some related projects are presented in this chapter.
2.2 GPS
(a) (b)
(c) (d)
(e) (f)
Figure 2.1: In picture (a), GPS finds the distances to three known position satellite.
In picture (b), the distance is imagined as the radius of one satellite. In picture (c) and
(d), the two imaginary spheres form by two satellites will overlap and form a ring of
possible GPS receiver position. In picture (e) and (f), the third imaginary sphere form
by third satellite overlap with the ring and there will be two points of intersection;
one point located in the space while another point located on Earth. By dismisses the
point located in the space, the GPS receiver position can be determined.
10
Value Description
0 Fix not available or in valid
1 GPS SPS Mode, fix valid
2 Differential GPS, Standard
Positioning Service (SPS)
Mode, fix valid
3 GPS Precise Positioning
Service (PPS) Mode, fix
valid
In general, there are two applications which are server application and client
application that form a client server system. For server side application, the functions
of server application are mainly to open a connection, and wait for another
application to open a communication connection. This stage is called “listening” for
request from other application. It is similar to wait a phone to ring if you expecting
someone to call.
On the other side, the application at client side must try to connect to the
server application. It is similar to calling someone on the telephone. To be simple,
12
this client server connection is analogy to connection between two telephones A and
B. Telephone A must have connected to a network so that B can reach A. Before B
call to A, what A do is listening and waiting for B to call. In order for B to call A, B
must know the phone number of A. If B does not know the phone number, B can
look it up using A‟s name. So similar to client application, it must know the network
location or address of the server application.
Finally, the connection between two application can be closed if either one of
the application chose to end the connection. Similar to either A or B can hang up to
end the connection between two telephones.
.
Figure 2.2: The basic socket connection process. Server will open the socket and
listen for any incoming request. Once the client send its connection request to server
and server accept the connection request, the connection between server and client is
established and message can be send to-and-fro between each other.
13
Figure 2.3: TC35 Development Board with USB to UART Converter and UART to
RS232 Converter.
1. Find out which Communication port (COM Port) the modem is connecting
2. Use any software that sent data to COM Port
3. Open new connection. Change Bits per second to "9600".
4. Type "AT" and press Enter.
5. Type "AT+CMGF=1" and press Enter (It is to set the GSM modem to operate in
14
Figure 2.4: Setting for GSM TC35. Baud rate setting for GSM TC35 is 9600 bits per
second, data bits setting is 8 bits, parity setting is none stop bits setting is 1 bit and
flow control setting is none.
15
This project use Microsoft Visio 2000 Enterprise Edition for current database
analyzing and new database modeling. The new database was built up using
Microsoft Access 2000. Microsoft Visual Basic 6.0 Enterprise Edition is to program
the software prototype.
This project includes the basic function of an ADS such as call receiving and
dispatching. Besides, it also include the built up of new database to ease the system
management. Although the software prototype is developed using Microsoft Window
platform which differs from the Linux platform that is used in this project, the
functions included in this software prototype can be referred.
This project is a Doctor of Philosophy (PhD) project from UTM. One of the
objectives of this project is to find out the potential model and policy to optimize
current EMS system.
This project using multi-robot platform and EMS simulator to find out the
average calls response time and thus the potential model to optimize current EMS
can be identified. Figure 2.3 shows the graphical representation for the delivery of
EMS using a simulator. An ambulance is represented by a circle while the number
inside the circle indicates the total numbers of ambulances at that location. The status
of an ambulance is represented by the color of circle: green symbolizes free status,
yellow symbolizes less urgent calls dispatch, red symbolizes urgent calls dispatch,
while blue symbolizes busy at serving or transporting a victim (Lim et al., 2011).
17
The cons of this project is it evaluates the performance of different model and
policies in EMS by using multi-team robot system, and developed EMS simulator in
order to reduce cost involved. However, this project does not integrate a real map
inside the simulation.
Figure 2.6: Graphical representation for the delivery of EMS during simulation. An
ambulance is represented by a circle while the number inside the circle indicates the
total numbers of ambulances at that location. A hospital is represented by a light blue
rectangular with „H‟ inside. The status of an ambulance is represented by the color of
circle: green symbolizes free to accept any call, yellow symbolizes less urgent calls
dispatch, red symbolizes urgent calls dispatch, while blue symbolizes busy at serving
or transporting a victim.
18
All system components communicate with each other based on mobile web
services using Simple Object Access Protocol (SOAP) and the technology of Service
Oriented Architecture (SOA). Besides, all components are assumed to have fast
wireless internet access through General Packet Radio Service (GPRS) or Worldwide
Interoperability for Microwave Access (WIMAX) (El-Masri and Saddik, 2011).
Figure 2.8: Digital Road Network Synchronization Module that is used to improve
the quality of the digital road network, simplify the process of updating and
integrating road data to CAD system.
2. 7 Conclusion
(ii) Function:
a. User administration
b. Multi user simultaneous work
c. Separate call receiving
d. Call dispatching
e. Work schedule creation
(iii) Software:
a. Microsoft Visio 2000 Enterprise Edition for
current database analyzing and new database
modeling.
b. Microsoft Access 2000 for new database built up.
c. Microsoft Visual Basic 6.0 Enterprise Edition is to
program the software prototype.
Optimization of EMS
(i) Objective: To find out the potential model and policy
22
Mobile Emergency
(i) Objectives: To respond to the needs of an efficient
System and integration
and error free emergency system
(El-Masri and Saddik,
2011) (ii) 5 components
a. Emergency requester device
b. MCS
c. Ambulance system
d. OEHR
e. HEDS
(iv) Advantages:
a. Fully computerized throughout the whole process
a. Based on new advanced technology such as web
services
b. Reduce time to find and send an ambulance
c. Ambulance officer can effectively treat the patient
as patient‟s medical history is showed on the
devices installed on ambulance
d. Allows Hospital emergency department prepare
and monitor incoming patients and ambulances.
Urgences-santé Uses GIS
(i) Largest emergency pre-hospital services provider in
23
(iv) Responds to more than 900 calls and carries out more
than 530 ambulance transports per day
(vi) Function:
a. Tracking of ambulances using GPS
b. Status display of ambulances
c. Automatic locate the location of incoming calls
d. Dispatching of most appropriate ambulance
based on up-to-date traffic data.
e. Display shortest route to ambulance driver
within the mobile data terminal.
24
CHAPTER 3
SYSTEM DESIGN
3.1 Introduction
This chapter includes the methods of developing a basic ADS based on client
server architecture. This chapter covered hardware design and software design that
are implemented in this project. Besides that, the project flow of this project is also
discussed.
This project consists of three main parts which are hardware design, software
development and live test. The first part, hardware design focuses on the interfacing
of several peripherals in this project. Besides, compatibility of peripheral with Intel
Atom board is considered. GPS module Skylab SKM53 requires the use of Universal
Asynchronous Receiver-Transmitter (UART) to Universal Serial Bus (USB)
converter for connecting to Intel Atom board. Table 3.1 shows the peripherals used
in the project and their function respectively.
25
Peripherals Functionality
UART to USB converter To connect the GPS module to USB port of Intel
Atom Board
USB Third Generation (3G) To ensure the connectivity of server and client
dongle
The third part is live test on the functionality and efficiency of the ADS. The
functionality and efficiency of the ADS are evaluated based on the stability of the
26
established connection between server and client, and also the accuracy of location
on both server and client.
Figure 3.2 shows the sequence of flow to this project. The flow of this project
begins with literature review on various internet articles, journal and thesis relevant
to this project. After gaining enough information, the process of selecting the
compatible peripherals is carried out. The functionality of selected peripherals is
tested by interfacing them using Linux build-in software called Minicom. After the
peripheral is proven to be functioning well, the features of server, SMS Sender and
client program are designed and determined. Lastly, GUI is design according to the
features of server, SMS Sender and client program.
Connect to the
client (Ambulance)
via 3G technology
USB 3G Dongle
Send message to
Laptop GSM Modem
first aider
The Intel Atom board acts as a client and is connected to Liquid crystal
display (LCD), GPS receiver, USB 3G dongle, keyboard, and mouse. LCD is used as
an interface for displaying the GUI of client program. GPS receiver is essential to
trace ambulance‟s location and record the route taken by an ambulance in order to
monitor and provide minute-to-minute log throughout the whole ambulance‟s
operation. USB 3G dongle is used to connect to the server, uploads live data
collected such as location of participated ambulances, and traces of routes from the
main server. Besides it can be used to receive instructions and also live data of other
areas from the main server. Other than that, keyboard and mouse are used as an
interface for key in the message or clicking the button on GUI. Figure 3.3 shows the
block diagram of the mentioned peripherals.
28
LCD
GPS receiver
module
In client side, Intel Atom board that acts as client is responsible for trying to
open connection, requesting for services, waiting request to be accepted, sending
current coordinate information to server, accepting or rejecting the operation enquiry,
keep sending coordinate information to server with certain time period if operation
enquiry is accepted and lastly keep updating the latest coordinate information on
electronic map. Figure 3.4 illustrate the sequence diagram of client server
communication.
Open connection
Request server
Figure 3.4: Sequence diagram of client server communication. Once the connection
between server and client (ambulance) is established, ambulance will send its current
GPS coordinate to server and server will update the ambulance location in electronic
map. If the accident site is located near to that particular ambulance, server will send
operation request to ambulance. If that particular ambulance is free and accepted to
pick up patient, its location will be keep updated in electronic map. If that particular
ambulance is in operation, the server will send operation request to any other nearby
ambulances. Meanwhile, the server will change to send SMS mode and send SMS to
all the first aider. After the SMS is sent, server needs to change to receive SMS mode
back again to wait for any incoming call and incoming SMS.
30
Other than that, software design also involves the design of server program‟s
GUI and client program‟s GUI. In details, Server‟s GUI consists of several
components with their specific functions. Start Server Button is responsible for
opening connection, listening for request, and accepting the client‟s request.
Disconnect Button is responsible for disconnecting the client and cleaning up server
socket, socket, and input or output buffer information. ID Combo Box and Send
Request Button allow the user to select the most appropriate ambulance unit to be
dispatched and send an operation request to that particular ambulance. Text Area is
to display all the incoming information from client; meanwhile Text Field is to let
user key in the message to be sent. Send Button sends the keyed in message to client
if it is clicked. It also sends the coordinate information to GSM modem if destination
coordinate information is keyed in. Map displays the current location of ambulance
using marker and the shortest path to emergency scene with red route. Figure 3.5
shows the GUI of server program and the function of each component in GUI. The
status bar indicates different types of connections. Table 3.2 lists various colors that
might appear on the status bar of the server program.
Disconnected
Connecting
Connected
Error!! Could not connect!!
On the other hand, client‟s GUI also consists of several components with
their specific functions. Connect Server Button is responsible for trying to open
connection, requesting for services, and waiting request to be accepted. Disconnect
Button is responsible for disconnecting from server and cleaning up socket and input
or output buffer information. The user can accept the operation request by clicking
on the Accept Button. Send Location Button is used to send the current coordinate
information to server. Update location is used to send the up-to-date coordinate
information to server continuously. Text Area is to display all the incoming
information from server; meanwhile Text Field is to let user key in the message to
send. Send Button sends the keyed in message to server if it is clicked. Map displays
the current location of ambulance using marker and the shortest path to emergency
scene with red route. Figure 3.6 shows the GUI of client program and the function of
each component in GUI.
Besides sending the patient location from the server to client, (ambulance
dispatch center to ambulance), the server also sends the coordinate details to the
registered first aiders for emergency aid. Once the server obtains the exact location
of the patient, the client sends the location details to the mobile phones of the first
aiders around the incident via SMS using GSM modem. This process takes less than
a second. The advantage of the ADS is the trained first aiders can reach the
emergency scene right before the ambulance to conduct first aid. This greatly boosts
the survivability of the patient. Figure 3.7 shows the GUI of SMS Sender program
which is one part of the server program and the function of each component in GUI.
3.4 Summary
This chapter discusses the ADS in terms of its hardware design and software
design. To ensure the ADS is functioning well, all the hardware and software elements
have been carefully selected, designed and tested according to the project‟s objectives.
Finally, the developed server and client program is able to communicate between each
other and the SMS Sender program is able to send and receive SMS.
33
CHAPTER 4
4.1 Introduction
This thesis is aimed to develop a basic ADS for EMS based on client server
architecture in order to reduce ART. This chapter focuses on the results and
problems encountered throughout this project. Besides, the ADS live test result is
evaluated in order to measure the effectiveness of this system and discussion is
presented based on the evaluation.
4.2 Results
The basic ADS consists of two programs which are server program and client
program in which both are designed, developed and lastly installed in the computer
and Intel Atom board respectively. Other than developing the software, this project
also involved the interface of Intel Atom board and GPS module as well as USB 3G
dongle. Figure 4.1 shows the connection between laptop, GSM module and USB 3G
dongle while Figure 4.2 shows the connection between Intel Atom board, GPS
module and USB 3G dongle. Figure 4.3 (a), (b) are the screenshots of server and
client programs. Figure 4.4 shows are the screenshots of SMS Sender program
during operation. Besides, Figure 4.5 (a) and (b) are the log file that contain the GPS
coordinate on server and client programs respectively.
34
Figure 4.1: Connection between laptop, GSM module and USB 3G dongle
Figure 4.2: Connection between Intel Atom board, GPS module and USB 3G dongle.
The GPS module is connected to Intel Atom board through a USB to UART
converter as the GPS module is UART pin out.
35
(a)
(b)
Figure 4.3: Picture (a) and (b) are the screenshots of server and client programs
during operation. The pictures showed the messages can be delivered to and fro
between server and client programs. The location of the ambulance is displayed as a
yellow marker dot on the map once the client clicked the send location button that
will send its location to the server. The shortest route is displayed on both programs
after a destination location is given by server.
36
(a)
37
(b)
Figure 4.5: Picture (a) showed the log file that contains the GPS coordinates on
server program after the ADS live test. Picture (b) showed the log file that contains
the GPS coordinates on client program after the ADS live test. The contents of both
log files are compared in order to evaluate the effectiveness and accuracy of ADS.
(i) The GPS module can only function outdoor and when the weather is good.
(ii) The serial port cannot be access by user initially because of the multi-user
concept in Linux made the security and permission is crucial for every user.
Serial port can only be access once you add yourself to the group dialout.
(iii) RXTX library version mismatch error occurred during compilation in
NetBeans Integrated Development Environment (IDE). The error stated that
Jar version = RXTX-2.2pre1while native lib Version = RXTX-2.2pre2. The
error doesn‟t exist if reading serial data using terminal. The error can be
solved by remove all the openjdk java package in Linux because the pre-
installed java package contains native lib version that contradicts with the
newly installed Oracle Java package.
38
(iv) User failed to access serial port during the second time. This is because the
read serial data program is terminated forcefully by user and thus the lock file
is not being deleted. In Linux, lock files are used to prevent more than one
program accessing a port at a time. Therefore, the existing lock file
preventing the program to create a new lock file on that particular serial port
during second run time.
(v) Lock file creation error in Linux Fedora. This is because fedora expect to
hold device lock in /var/lock/lockdev, and IDE try to make lock in /var/lock,
so had to change access rights on this directory by key in the following
command in terminal
$ sudo chown root.lock /var/lock
$ sudo chmod g+rw /var/lock
(vi) Linkage error shows the librxtxSerial.so cannot be found even though the
library is on the right path in Fedora. This is because SELINUX-Targeted
Policy disallows restore segment prot after reloc which can be corrected by
switching to SELINUX-permissive policy. This can be achieved temporarily
by issuing
$ setenforce permissive
(vii) No main manifest attributes error when trying to execute the builded jar file.
This is because the main java file is not selected as Main class to execute
when clean and build the whole project in NetBeans IDE. First, go to
Netbeans, right click on the project, go to Properties, go to Run in Categories
tree, set the Main Class in the right side panel and lastly build the project.
(viii) The firewall of both host computer and Intel Atom board must be turned off
so that they can ping each other.
(ix) The connection between server and client can only be established by using
same network operator such as Digi operator in this project.
39
CHAPTER 5
5.1 Introduction
This thesis aimed to develop a prototype of basic ADS for EMS on purpose
to reduce the ART. The limitations in this project and some recommendations for
future works are presented in this final chapter.
5.2 Conclusion
The following are the main conclusions of this project that have shown to met
all of its objectives:
There are several aspects and features that can be added in to speed up the
ART so that the international standard of ART can be met.
(i) ADS with auto-routing ability using specific path finder algorithm.
(ii) Server program with feature that is able to track the location of caller even he
or she is in indoor via Wifi IP address or Facebook check in will make the
system more reliable.
(iii) Server program with feature that is able to inform the caller on the identity of
the attending first aider will make the system more reliable.
(iv) Phone application that can show map routing to accident scene to first aider
so that he or she can provide first aid to the patient before the ambulance
arrived.
(v) Phone application that is able to send its exact location through GPS to the
server to avoid giving wrong address.
(vi) A website that shows the location of ambulance and its up-to-date routing to
accident scene will make the system more transparent and credible.
41
REFERENCES
Adams, H. (2007). Urgences-santé Uses GIS to Save Lives. ArcNorth News, 10(1),
13.
El-Masri, S., & Saddik, B. (2011, June). Mobile Emergency System and Integration.
In Mobile Data Management (MDM), 2011 12th IEEE International Conference on
(Vol. 2, pp. 67-72). IEEE.
Fink, A., Planinc, S., and Vehar, T. (2003). Ambulance Service Dispatch Software
Prototype. bledconference.org, 74–75