Вы находитесь на странице: 1из 4

Locating Friends and Family Using Mobile Phones

With Global Positioning System (GPS)


Ghaith Bader Al-Suwaidi, Mohamed Jamal Zemerly
Computer Engineering Department
Khalifa University for Science, Technology and Research,
PO Box 573, Sharjah, UAE
g.b.alsuwaidi@gmail.com, jamal@kustar.ac.ae

Abstract— This paper presents a mobile application based on then the requested information back to the user. Figure 1
providing Location Based Services (LBS) using Global shows the main 5 elements that construct the system which are
Positioning System (GPS) as a location provider. The main the GPS, the client tier, server tier and the database tier.
objective of this work is to design and implement a client server
system that helps users to locate their family members and A. Client tier (Mobile)
receive alerts when friends are nearby. The mobile application
was implemented using J2ME where the most recent APIs and The mobile requests its location from the positioning
other older APIs were combined together in order to make the system periodically and sends it through the communication
application reliable on all types of mobiles. The server was network to the server. The user can request the location of a
implemented using PHP since PHP guarantees that the server family member at any time from the server. Also an alert can
would not be overloaded. The type of the Database used in the be received whenever the user and a friend are in the same
system was MySQL. The average location accuracy of the location.
application is about couple of meters.
B. Server
I. INTRODUCTION (HEADING 1) The server receives users' location and alerts two friends if
According to a new report from the research firm Berg they are in the same location or update the user about the
Insight; “revenues from mobile location based services (LBS) location of family members.
in the European market will grow by 34 percent annually to
reach €622 million in 2010”. This number shows how C. Database
important LBS applications are becoming to mobile users [1]. The database contains all users subscribed in the service
LBS are the mobile services in which the user location with their location, a list for each user that contains friends
information is used to provide a service. The user location and family members that can be located, and a table that
information consists of X-Y coordinates generated by any contains locations with their coordinates.
given positioning technique such as Cell-ID, GPS, etc.
D. GPS
The GPS is the most efficient positioning technique. It was
developed mainly to be used in navigation systems. Because Every time the mobile phone updates the user location in
of the reduction in the size of the GPS receivers and because the server, it requests the location of the user from the GPS.
of the integration of GPS with some mobiles; GPS became The GPS determines the longitude and the latitude and sends
one of the most important service providers in the LBS. them to the mobile phone.

There are not many projects that are carried out in the LBS III. FUNCTIONAL SPECIFICATIONS
field. This is because this type of application was somehow
exclusive for mobile service providers because they use A. Mobile Functions
mobile cells information to get the location of the mobile and 1) User Registration: In order to use the service the user
then provide a service to get it. But the introduction of GPS in should register by providing a username and password. This
this field will make designing and implementing LBS services information will be sent to the server.
open to researchers all over the world.
2) User Login: If the user is already registered, he/she can
II. SYSTEM ARCHITECTURE login to the service by entering his username and password.
Information will be sent to the server in order to decide
The internet is the medium that will be used to transfer
giving the user a permission to use the service or not.
user data and service request from the mobile to the server and

978-1-4244-3806-8/09/$25.00 © 2009 IEEE 555


Authorized licensed use limited to: Bharat University. Downloaded on August 31, 2009 at 13:23 from IEEE Xplore. Restrictions apply.
B. Server Functions
1) Registration Processes: The Server gets the
registration information and saves them into users table in the
Database.
2) Login Processes: The Server gets the login
information, and makes sure that the user has an access to the
system or not by checking the information with ones stored in
the database.
3) Member Addition Processe: The Server gets
information from the application, and then it adds the new
member to the user list.
4) Requests Processe: The Server sends the incoming
requests list and outgoing requests list to any user when ever
he/she requests. Then it gets the user response on any user in
the list and performs an action (accept, reject, cancel request).
5) Updating Location Processes: The Server gets the
coordinates of a user location and stores them in the database.
6) Getting Location Processes: The Server provides the
application with a family member location of a user list with
the location update time and the distance between the user
and the family member.
7) Alerting Processes: The Server calculates the distance
between two friends according to the coordinates stored in the
database and alerts the friends if they are nearby.
C. Database Functions
Figure 1. System Architecture 1) Users Table: This table stores all the users with their
login information and location.
3) Add Member: The user can add any other registered 2) Users friends and family lists Table: This table stores
user to his/her list. Also the user must specify whether to the lists of all users that use the service.
consider the added user as a friend or as a family member. 3) Locations table Table: It contains Locations name with
4) Family/Friends Request: After adding a user to the list, their corresponding coordinates.
the request goes to the outgoing requests list of the user and
to the incoming requests list of the added friend or family IV. THEORATICAL FOUNDATION
member. The friend or family member can choose whether to
accept the incoming request or reject it. Also the user can A. GPS
cancel the request at any time. The Global Positioning System (GPS) is the only fully
5) GPS Connector: After adding a user to the list, the functional Global Navigation Satellite System (GNSS). It uses
request goes to the outgoing requests list of the user and to around 24 medium Earth orbit satellites that transmit precise
the incoming requests list of the added friend or family radio signals. The system enables a GPS receiver to determine
member. The friend or family member can choose whether to its location, speed and direction.
accept the incoming request or reject it. Also the user can 1) Calculating Positions: In order to calculate its position,
cancel the request at any time. a receiver needs to know the precise time. The satellites are
6) Coordinates Retriever and Update: This function gets equipped with accurate atomic clocks while the receiver uses
the coordinates of the location of a user from the GPS an internal crystal oscillator-based clock that is continuously
receiver (either Bluetooth or built-in GPS receiver) and sends updated using the signals that are coming from the satellites.
them to the server periodically where the period can be The receiver identifies each satellite's signal by a distinct
specified by the user. Coarse / Acquisition (C/A) code pattern, and then measures
7) Get Member Location: A user can retrieve the location the time delay for each satellite.
of a family member at any time with the distance between To measure the time delay for each satellite, the receiver
both of them and the last time the family member updated the produces an identical C/A sequence using the same seed
server with his/her location. This is done by sending a request number (number used to initialize a random number
to the server. generator) as the satellite. By lining up the two sequences, the
8) Get Friend Alert: Every time the application updates receiver can measure the delay and calculate the distance to
the server with the location of users, it retrieves the friends the satellite. The orbital position data from the Navigation
that are within 1km away from the user. Message is then used to calculate the satellite's precise

556
Authorized licensed use limited to: Bharat University. Downloaded on August 31, 2009 at 13:23 from IEEE Xplore. Restrictions apply.
position. Knowing the position and the distance of a satellite geographic location and orientation of the terminal and
indicates that the receiver is located somewhere on the surface accessing a database of known landmarks stored in the
of an imaginary sphere centered on that satellite and whose terminal [4].
radius is the distance to it. When three satellites are measured
simultaneously, the intersection of the three imaginary spheres C. JAVA Bluetooth API
reveals the location of the receiver as shown in Figure 2. The The JAVA Bluetooth API is a package that enables mobile
location is represented as coordinates; the coordinates are to connect to other devices that support Bluetooth connection
represented in numbers. These numbers represents the and exchange information with them.
longitude and the latitude of a location [2].
V. IMPLEMENTATION
The mobile application was implemented using J2ME
while PHP was used for implementing server functions and
MySQL was used for the database.
In order to make sure that the application can run on
almost all mobiles, two different methods for dealing with
GPS receivers were used. The first one is for the new mobile
that are coming to the market and have built in GPS receivers
or the mobile that support LBS services, where the JAVA
location API was used in order to connect and retrieve
coordinates from the GPS receivers.
Figure 2. GPS Positioning
The second method is for mobiles that do not support the
location API where the Bluetooth API was used for
2) Coordinates format: The coordinates that are retrieved connecting and getting coordinates from the GPS receivers.
from the GPS can be represented as one of the following
formats: DD˚MM’SS.SS, DD˚MM.MM, or DD.DD˚, where VI. TESTING
D is for Degrees, M is for Minutes and S for Seconds.
3) Calculating distances using coordinates: In order to A. System validation
calculate the distance between two points where the The purpose of validation is to show that the implemented
coordinates of each point is given; an equation that calculates system satisfies the initial requirements. The requirements can
the distance between two points on a circle surface should be be divided into four categories for the purpose of validation.
used [3]. If the distance between point A (LongA, LatA) and These categories are the purposes of the system, portability,
the point B (LongB, LatB) wanted to be calculated, then the techniques and functions.
distance in meters is:
The main category was the system portability where the
⎡cos( latA ) × cos( latB ) × cos( lonB − lonA ) + ⎤ (1) system was tested on several mobile phones some of them
D = a cos ⎢ ⎥×R
⎣sin(latA ) × sin( latB ) ⎦ support the JAVA location API and some have built in GPS
receivers. The results of this test are shown in Table 2.
where D: the distance in meters, latA: Latitude of point A,
longA: Longitude of point A, latB: Latitude of point B, longB:
Longitude of point B, R: the radius of the earth in meters TABLE II. MOBILES CAPABILITIES AND SYSTEM PERFORMANCE

4) GPS sources of error: There are several sources that Mobile model Capabilities
System
may affect the accuracy of the GPS. These sources are shown Performance
in Table I below. Has a built in Bluetooth receiver
Nokia N95 System worked well
and supports the location API
Nokia N73 Supports the location API System worked well
TABLE I. GPS SOURCES OF ERROR Sony Ericsson
Does not support the location API System worked well
W880
Source Effect Sony Ericsson
Does not support the location API System worked well
Ionospheric errors ± 5 meters K800

Ephemeris errors ± 2.5 meters B. System Verification


Satellite clock errors ± 2 meters The purpose of verification is to ensure that the system
Multipath distortion ± 1 meter
correctly performs its functions and produces the correct
results. For the purpose, different types of scenarios were used
Tropospheric effects ± 0.5 meter to test the functions of the system. All of the test results came
Numerical errors ± 1 meter or less positive.

B. JAVA Location API C. Evaluation


The Location API for JAVA is an optional Package that The main part of the evaluation was the quantitative
enables mobile phones to get information about the present assessment where the average error in meters of the locations

557
Authorized licensed use limited to: Bharat University. Downloaded on August 31, 2009 at 13:23 from IEEE Xplore. Restrictions apply.
provided by the system was measured. This is done by • GPS does not work indoor. This problem was solved by
calculating the distance between a point and itself where the always storing the last location updated by the application.
coordinates are retrieved from the implemented system for one
of the points and Google earth for the other one [5]. Google • The system provides the user with the member time of
earth was considered as a reference for the system coordinates update whenever a family member location is requested.
for this assessment. By calculating the error of several points, This will help the user to know whether the location is
the average error was calculated. recently updated or not.
The new JAVA location API supports both types of GPS
TABLE III. MEASURING COORDINATES ERROR (POINT A)
(built in, Bluetooth) but the problem with this API is that not
all available mobiles support it; also not many resources were
Point A Longitude Latitude Distance found because the API is still new. To overcome this problem,
both ways of getting the coordinates were used, the new API
System 5520.2381 2517.7348
1.22 m and the function that deals with the Bluetooth GPS receivers
Google earth 5520.2386 2517.7358 were used. The application was implemented to check if the
mobile supports the implemented class that uses the location
TABLE IV. MEASURING COORDINATES ERROR (POINT B) API or not. Therefore, if the mobile supports the API, then it
use the class, otherwise it uses the Bluetooth connection class.
Point B Longitude Latitude Distance
System 5523.9225 2521.2527 VIII. CONCLUSION AND FUTURE WORK
2.1 m
Google earth 5523.9242 2521.2516 A J2ME mobile application based on providing Location
Based Service using Global Positioning System (GPS) as a
TABLE V. MEASURING COORDINATES ERROR (POINT C) location provider is presented. The application is implemented
as a client server system that helps users to locate their family
Point C Longitude Latitude Distance members and receive alerts when friends are nearby. The
System 5520.329 2518.5686 location average accuracy using this system is believed to be
1.09 m within couple of meters. The application works in open space
Google earth 5520.330 2518.5682
areas only since it relies on GPS. Future extensions may look
at other options such as getting the location from the service
From the three calculations, the average error is 1.47m. provider. In this case the location accuracy will be reduced
and will depend on the size of the cells where the user is
Another assessment was done where the distance
located. Other future extensions can be summarized as
calculation equation accuracy was tested. This is done by
follows:
defining two points on the ground then measuring the distance
between the two points using a measurement tool. After that, • Include maps, to send a map with a family member location
the GPS receiver was used to get the coordinates of both rather than just sending the location name. Also a map that
points and then the distance was calculated (using Equation 1). shows the path from a friend to another.
• Provide a Mobile SOS (Save Our Souls) facility to mobile
TABLE VI. DISTANCE CALCULATION BETWEEN TWO POINTS
users. GPS satellites can be used to find the location of the
Points Longitude Latitude Distance user, and send the coordinates via SMS to a server.
A 5520.2381 2517.7350 • Provide religious needs such as making the application to
19.82 m
B 5520.2280 2517.7503 calculate the five Muslim prayer times using the GPS
coordinates. Also determine the Qiblah (Makkah) direction
The measured distance using measurement tool was 21 using the coordinates provided by the receiver.
meters while using GPS coordinates gave a distance of 19.82
• Allow the users to create other lists rather than just using the
meters, so the error in measuring the distance was 1.18 meters.
friends and the family members list. This will help in using
VII. DISCUSSION the system in organizations that need to know the location
of their employees during working hours.
Based on the tests that measure the system performance,
the system has some strong and weak features: REFERENCES
• The system built is portable and can run on any mobile [1] Axel Küpper , Location-based services, fundamentals and operation,
WILEY, 2nd edition, 2005.
phone that supports J2ME whether they support the new
[2] Joel McNamara, GPS for Dummies, For Dummies, 1st edition, 1998.
JAVA location API or not.
[3] Rick Broida, How to Do Everything with Your GPS, McGraw-
• The system can run on mobiles that have a built in GPS Hill/Osborne, 2nd edition, 2004.
receiver or mobiles that support Bluetooth which can be [4] Qusay H. Mahmoud "J2ME and Location-Based Services". Sun
used to connect the mobile to external GPS receivers. Developer Network, 2004.
[5] “Google Earth software”. http://earth.google.com/ September 2008.
• On the mobile side, the application size is small because all
user lists and other data are stored in the server.

558
Authorized licensed use limited to: Bharat University. Downloaded on August 31, 2009 at 13:23 from IEEE Xplore. Restrictions apply.

Вам также может понравиться