Locating Friends and Family Using Mobile Phones With Global ...

3 downloads 2698 Views 459KB Size Report
Nov 29, 2009 - network to the server. The user can .... of the points and Google earth for the other one [5]. Google .... Developer Network, 2004. [5] “Google ...
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 [email protected], [email protected] Abstract— This paper presents a mobile application based on providing Location Based Services (LBS) using Global Positioning System (GPS) as a location provider. The main objective of this work is to design and implement a client server system that helps users to locate their family members and receive alerts when friends are nearby. The mobile application was implemented using J2ME where the most recent APIs and other older APIs were combined together in order to make the application reliable on all types of mobiles. The server was implemented using PHP since PHP guarantees that the server would not be overloaded. The type of the Database used in the system was MySQL. The average location accuracy of the application is about couple of meters.

I.

INTRODUCTION (HEADING 1)

According to a new report from the research firm Berg Insight; “revenues from mobile location based services (LBS) in the European market will grow by 34 percent annually to reach €622 million in 2010”. This number shows how important LBS applications are becoming to mobile users [1]. LBS are the mobile services in which the user location information is used to provide a service. The user location information consists of X-Y coordinates generated by any given positioning technique such as Cell-ID, GPS, etc. The GPS is the most efficient positioning technique. It was developed mainly to be used in navigation systems. Because of the reduction in the size of the GPS receivers and because of the integration of GPS with some mobiles; GPS became one of the most important service providers in the LBS. There are not many projects that are carried out in the LBS field. This is because this type of application was somehow exclusive for mobile service providers because they use mobile cells information to get the location of the mobile and then provide a service to get it. But the introduction of GPS in this field will make designing and implementing LBS services open to researchers all over the world. II.

SYSTEM ARCHITECTURE

The internet is the medium that will be used to transfer user data and service request from the mobile to the server and

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

then the requested information back to the user. Figure 1 shows the main 5 elements that construct the system which are the GPS, the client tier, server tier and the database tier. A.

Client tier (Mobile) The mobile requests its location from the positioning system periodically and sends it through the communication network to the server. The user can request the location of a family member at any time from the server. Also an alert can be received whenever the user and a friend are in the same location. B. Server The server receives users' location and alerts two friends if they are in the same location or update the user about the location of family members. C. Database The database contains all users subscribed in the service with their location, a list for each user that contains friends and family members that can be located, and a table that contains locations with their coordinates. D. GPS Every time the mobile phone updates the user location in the server, it requests the location of the user from the GPS. The GPS determines the longitude and the latitude and sends them to the mobile phone. III.

FUNCTIONAL SPECIFICATIONS

A. Mobile Functions 1) User Registration: In order to use the service the user should register by providing a username and password. This information will be sent to the server. 2) User Login: If the user is already registered, he/she can login to the service by entering his username and password. Information will be sent to the server in order to decide giving the user a permission to use the service or not.

555

Authorized licensed use limited to: National Dong Hwa University. Downloaded on November 29, 2009 at 01:42 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

3) Add Member: The user can add any other registered user to his/her list. Also the user must specify whether to consider the added user as a friend or as a family member. 4) Family/Friends Request: After adding a user to the list, the request goes to the outgoing requests list of the user and to the incoming requests list of the added friend or family member. The friend or family member can choose whether to accept the incoming request or reject it. Also the user can cancel the request at any time. 5) GPS Connector: After adding a user to the list, the request goes to the outgoing requests list of the user and to the incoming requests list of the added friend or family member. The friend or family member can choose whether to accept the incoming request or reject it. Also the user can cancel the request at any time. 6) Coordinates Retriever and Update: This function gets the coordinates of the location of a user from the GPS receiver (either Bluetooth or built-in GPS receiver) and sends them to the server periodically where the period can be specified by the user. 7) Get Member Location: A user can retrieve the location of a family member at any time with the distance between both of them and the last time the family member updated the server with his/her location. This is done by sending a request to the server. 8) Get Friend Alert: Every time the application updates the server with the location of users, it retrieves the friends that are within 1km away from the user.

1) Users Table: This table stores all the users with their login information and location. 2) Users friends and family lists Table: This table stores the lists of all users that use the service. 3) Locations table Table: It contains Locations name with their corresponding coordinates. IV.

THEORATICAL FOUNDATION

A. GPS The Global Positioning System (GPS) is the only fully functional Global Navigation Satellite System (GNSS). It uses around 24 medium Earth orbit satellites that transmit precise radio signals. The system enables a GPS receiver to determine its location, speed and direction. 1) Calculating Positions: In order to calculate its position, a receiver needs to know the precise time. The satellites are equipped with accurate atomic clocks while the receiver uses an internal crystal oscillator-based clock that is continuously updated using the signals that are coming from the satellites. The receiver identifies each satellite's signal by a distinct Coarse / Acquisition (C/A) code pattern, and then measures the time delay for each satellite. To measure the time delay for each satellite, the receiver produces an identical C/A sequence using the same seed number (number used to initialize a random number generator) as the satellite. By lining up the two sequences, the receiver can measure the delay and calculate the distance to the satellite. The orbital position data from the Navigation Message is then used to calculate the satellite's precise

556 Authorized licensed use limited to: National Dong Hwa University. Downloaded on November 29, 2009 at 01:42 from IEEE Xplore. Restrictions apply.

position. Knowing the position and the distance of a satellite indicates that the receiver is located somewhere on the surface of an imaginary sphere centered on that satellite and whose radius is the distance to it. When three satellites are measured simultaneously, the intersection of the three imaginary spheres reveals the location of the receiver as shown in Figure 2. The location is represented as coordinates; the coordinates are represented in numbers. These numbers represents the longitude and the latitude of a location [2].

geographic location and orientation of the terminal and accessing a database of known landmarks stored in the terminal [4]. C. JAVA Bluetooth API The JAVA Bluetooth API is a package that enables mobile to connect to other devices that support Bluetooth connection and exchange information with them. 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

2) Coordinates format: The coordinates that are retrieved from the GPS can be represented as one of the following formats: DD˚MM’SS.SS, DD˚MM.MM, or DD.DD˚, where D is for Degrees, M is for Minutes and S for Seconds. 3) Calculating distances using coordinates: In order to calculate the distance between two points where the coordinates of each point is given; an equation that calculates the distance between two points on a circle surface should be used [3]. If the distance between point A (LongA, LatA) and the point B (LongB, LatB) wanted to be calculated, then the distance in meters is: ⎡cos( latA ) × cos( latB ) × cos( lonB − lonA ) + ⎤ D = a cos ⎢ ⎥×R ⎣sin(latA ) × sin( latB ) ⎦

(1)

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 4) GPS sources of error: There are several sources that may affect the accuracy of the GPS. These sources are shown in Table I below. TABLE I.

Effect

Ionospheric errors

± 5 meters

Ephemeris errors

± 2.5 meters

Satellite clock errors

± 2 meters

Multipath distortion

± 1 meter

Tropospheric effects

± 0.5 meter

Numerical errors

± 1 meter or less

VI.

TESTING

A. System validation The purpose of validation is to show that the implemented system satisfies the initial requirements. The requirements can be divided into four categories for the purpose of validation. These categories are the purposes of the system, portability, techniques and functions. The main category was the system portability where the system was tested on several mobile phones some of them support the JAVA location API and some have built in GPS receivers. The results of this test are shown in Table 2. TABLE II. Mobile model Nokia N95 Nokia N73 Sony Ericsson W880 Sony Ericsson K800

GPS SOURCES OF ERROR

Source

The second method is for mobiles that do not support the location API where the Bluetooth API was used for connecting and getting coordinates from the GPS receivers.

MOBILES CAPABILITIES AND SYSTEM PERFORMANCE

Capabilities

System Performance

Has a built in Bluetooth receiver and supports the location API Supports the location API

System worked well

Does not support the location API

System worked well

Does not support the location API

System worked well

System worked well

B. System Verification The purpose of verification is to ensure that the system correctly performs its functions and produces the correct results. For the purpose, different types of scenarios were used to test the functions of the system. All of the test results came positive.

B. JAVA Location API The Location API for JAVA is an optional Package that enables mobile phones to get information about the present

C. Evaluation The main part of the evaluation was the quantitative assessment where the average error in meters of the locations

557 Authorized licensed use limited to: National Dong Hwa University. Downloaded on November 29, 2009 at 01:42 from IEEE Xplore. Restrictions apply.

provided by the system was measured. This is done by calculating the distance between a point and itself where the coordinates are retrieved from the implemented system for one of the points and Google earth for the other one [5]. Google earth was considered as a reference for the system coordinates for this assessment. By calculating the error of several points, the average error was calculated. TABLE III.

MEASURING COORDINATES ERROR (POINT A)

Point A

Longitude

Latitude

System

5520.2381

2517.7348

Google earth

5520.2386

2517.7358

TABLE IV.

1.22 m

MEASURING COORDINATES ERROR (POINT B)

Point B

Longitude

Latitude

System

5523.9225

2521.2527

Google earth

5523.9242

2521.2516

TABLE V.

Distance

Distance

Longitude

Latitude

System

5520.329

2518.5686

Google earth

5520.330

2518.5682

Distance 1.09 m

From the three calculations, the average error is 1.47m. Another assessment was done where the distance calculation equation accuracy was tested. This is done by defining two points on the ground then measuring the distance between the two points using a measurement tool. After that, the GPS receiver was used to get the coordinates of both points and then the distance was calculated (using Equation 1). TABLE VI.

Longitude

Latitude

A

5520.2381

2517.7350

B

5520.2280

2517.7503

A J2ME mobile application based on providing Location Based Service using Global Positioning System (GPS) as a location provider is presented. The application is implemented as a client server system that helps users to locate their family members and receive alerts when friends are nearby. The location average accuracy using this system is believed to be within couple of meters. The application works in open space areas only since it relies on GPS. Future extensions may look at other options such as getting the location from the service provider. In this case the location accuracy will be reduced and will depend on the size of the cells where the user is located. Other future extensions can be summarized as follows: • Include maps, to send a map with a family member location rather than just sending the location name. Also a map that shows the path from a friend to another. • Provide a Mobile SOS (Save Our Souls) facility to mobile users. GPS satellites can be used to find the location of the user, and send the coordinates via SMS to a server.

DISTANCE CALCULATION BETWEEN TWO POINTS

Points

• The system provides the user with the member time of update whenever a family member location is requested. This will help the user to know whether the location is recently updated or not. The new JAVA location API supports both types of GPS (built in, Bluetooth) but the problem with this API is that not all available mobiles support it; also not many resources were found because the API is still new. To overcome this problem, both ways of getting the coordinates were used, the new API and the function that deals with the Bluetooth GPS receivers were used. The application was implemented to check if the mobile supports the implemented class that uses the location API or not. Therefore, if the mobile supports the API, then it use the class, otherwise it uses the Bluetooth connection class. VIII. CONCLUSION AND FUTURE WORK

2.1 m

MEASURING COORDINATES ERROR (POINT C)

Point C

• GPS does not work indoor. This problem was solved by always storing the last location updated by the application.

Distance 19.82 m

The measured distance using measurement tool was 21 meters while using GPS coordinates gave a distance of 19.82 meters, so the error in measuring the distance was 1.18 meters. VII. DISCUSSION Based on the tests that measure the system performance, the system has some strong and weak features: • The system built is portable and can run on any mobile phone that supports J2ME whether they support the new JAVA location API or not. • The system can run on mobiles that have a built in GPS receiver or mobiles that support Bluetooth which can be used to connect the mobile to external GPS receivers. • On the mobile side, the application size is small because all user lists and other data are stored in the server.

• Provide religious needs such as making the application to calculate the five Muslim prayer times using the GPS coordinates. Also determine the Qiblah (Makkah) direction using the coordinates provided by the receiver. • Allow the users to create other lists rather than just using the friends and the family members list. This will help in using the system in organizations that need to know the location of their employees during working hours. REFERENCES [1] [2] [3] [4] [5]

Axel Küpper , Location-based services, fundamentals and operation, WILEY, 2nd edition, 2005. Joel McNamara, GPS for Dummies, For Dummies, 1st edition, 1998. Rick Broida, How to Do Everything with Your GPS, McGrawHill/Osborne, 2nd edition, 2004. Qusay H. Mahmoud "J2ME and Location-Based Services". Sun Developer Network, 2004. “Google Earth software”. http://earth.google.com/ September 2008.

558 Authorized licensed use limited to: National Dong Hwa University. Downloaded on November 29, 2009 at 01:42 from IEEE Xplore. Restrictions apply.